public interface ISpeechRecognitionServerEvents
Modifier and Type | Method and Description |
---|---|
void |
onAudioEvent(boolean recording)
Invoked when the audio recording state has changed.
|
void |
onError(int errorCode,
java.lang.String response)
Invoked when an error is detected
|
void |
onFinalResponseReceived(RecognitionResult response)
In ShortPhrase mode, the client gets one final multiple n-best choice result
when recognition is complete.
|
void |
onIntentReceived(java.lang.String payload)
Invoked when an intent parsing is received.
|
void |
onPartialResponseReceived(java.lang.String response)
Invoked when during the recognition process, the Speech Recognition
server can create a hypothesis on what the recognized text might be.
|
void onPartialResponseReceived(java.lang.String response)
response
- The display textvoid onFinalResponseReceived(RecognitionResult response)
In LongDictation mode, the client will receive multiple final results, based on where the server thinks sentence pauses are. This event will be fired for each final result, as the server determines them.
response
- A StreamlinedRecognitionResults which contains the n-best recognized
text results and their confidences. A StreamlinedRecognitionResults can
then further be used to obtain a SpeechRecognitionResults which has even
more n-best result data.void onIntentReceived(java.lang.String payload)
void onError(int errorCode, java.lang.String response)
errorCode
- The error code.response
- The body of the http response for the error.void onAudioEvent(boolean recording)
recording
- The current recording state