public class SpeechRecognizerBase
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
AUDIO_COMPRESS_LIBRARY_TYPE_CPP |
static int |
AUDIO_COMPRESS_LIBRARY_TYPE_JAVA |
protected int |
FRAME_LENGTH_MILLISECONDS |
protected int |
INSTANT_NOISE_LENGTH_MILLISECONDS |
static int |
RECOGNIZE_RESULT_TYPE_ALL |
static int |
RECOGNIZE_RESULT_TYPE_NLI |
static int |
RECOGNIZE_RESULT_TYPE_STT |
protected static int |
RECORD_FRAMES |
protected int |
RESERVED_INPUT_LENGTH_MILLISECONDS |
protected static java.lang.String |
SDK_TYPE |
protected int |
VAD_TAIL_SILENCE_LEVEL |
| Constructor and Description |
|---|
SpeechRecognizerBase() |
| Modifier and Type | Method and Description |
|---|---|
int |
getAudioCompressLibraryType() |
protected int |
getFrameSize() |
protected int |
getFrequencyToGettingResult() |
protected int |
getMinFrequencyToGettingResult() |
protected int |
getMinUploadAudioLengthMilliseconds() |
protected int |
getRecognizeResultType() |
protected int |
getRecordDataSize() |
protected int |
getSilenceLevel() |
protected int |
getUploadAudioLengthMilliseconds() |
protected int |
getVADEndMilliseconds() |
void |
setAudioCompressLibraryType(int type)
Set type of the audio compression library.
|
protected void |
setFrameSize(int size) |
protected void |
setFrequencyToGettingResult(int frequency) |
void |
setLengthOfVADEnd(int milliseconds)
Set length of end time of the VAD in milliseconds to stop voice recording automatically.
|
protected void |
setMinFrequencyToGettingResult(int frequency) |
protected void |
setMinUploadAudioLengthMilliseconds(int milliseconds) |
void |
setRecognizeResultType(int type)
Set type of the recognition results of the query.
|
protected void |
setRecordDataSize(int size) |
void |
setResultQueryFrequency(int milliseconds)
Set the frequency in milliseconds of the recognition result query,
then the recognizer client will query the result once every milliseconds you set.
|
protected void |
setSilenceLevel(int level) |
void |
setSilenceLevelOfVADTail(int level)
Set level of silence volume of the VAD to stop voice recording automatically.
|
void |
setSpeechUploadLength(int milliseconds)
Set audio length in milliseconds to upload,
then the recognizer client will upload parts of audio once every milliseconds you set.
|
protected void |
setUploadAudioLengthMilliseconds(int milliseconds) |
protected void |
setVADEndMilliseconds(int milliseconds) |
public static final int RECOGNIZE_RESULT_TYPE_STT
public static final int RECOGNIZE_RESULT_TYPE_ALL
public static final int RECOGNIZE_RESULT_TYPE_NLI
public static final int AUDIO_COMPRESS_LIBRARY_TYPE_JAVA
public static final int AUDIO_COMPRESS_LIBRARY_TYPE_CPP
protected static final java.lang.String SDK_TYPE
protected static final int RECORD_FRAMES
protected final int FRAME_LENGTH_MILLISECONDS
protected final int RESERVED_INPUT_LENGTH_MILLISECONDS
protected final int INSTANT_NOISE_LENGTH_MILLISECONDS
protected final int VAD_TAIL_SILENCE_LEVEL
public int getAudioCompressLibraryType()
protected int getRecognizeResultType()
protected int getSilenceLevel()
protected void setSilenceLevel(int level)
protected int getFrameSize()
protected void setFrameSize(int size)
protected int getRecordDataSize()
protected void setRecordDataSize(int size)
protected int getMinUploadAudioLengthMilliseconds()
protected void setMinUploadAudioLengthMilliseconds(int milliseconds)
protected int getUploadAudioLengthMilliseconds()
protected void setUploadAudioLengthMilliseconds(int milliseconds)
protected int getMinFrequencyToGettingResult()
protected void setMinFrequencyToGettingResult(int frequency)
protected int getFrequencyToGettingResult()
protected void setFrequencyToGettingResult(int frequency)
protected int getVADEndMilliseconds()
protected void setVADEndMilliseconds(int milliseconds)
public void setSpeechUploadLength(int milliseconds)
milliseconds - - How long of the audio in milliseconds do you want to upload once.public void setResultQueryFrequency(int milliseconds)
milliseconds - - How long in milliseconds do you want to query once.public void setLengthOfVADEnd(int milliseconds)
milliseconds - - length of end time in milliseconds for the speech input idle.public void setSilenceLevelOfVADTail(int level)
level - - level for the silence volume.public void setRecognizeResultType(int type)
type - - Type of the recognition results:
RECOGNIZE_RESULT_TYPE_STT to get result of Speech-To-Text.
RECOGNIZE_RESULT_TYPE_ALL to get results of the all types.
RECOGNIZE_RESULT_TYPE_NLI to get results of Speech-To-Text and NLI.public void setAudioCompressLibraryType(int type)
type - - Type of the recognition results:
RECOGNIZE_RESULT_TYPE_STT to get result of Speech-To-Text.
RECOGNIZE_RESULT_TYPE_ALL to get results of the all types.
RECOGNIZE_RESULT_TYPE_NLI to get results of Speech-To-Text and NLI.