public class BaseRecognizeCallback extends java.lang.Object implements RecognizeCallback
RecognizeCallback
interface.Constructor and Description |
---|
BaseRecognizeCallback() |
Modifier and Type | Method and Description |
---|---|
void |
onConnected()
Called when a WebSocket connection was made.
|
void |
onDisconnected()
Called when a WebSocket connection was closed.
|
void |
onError(java.lang.Exception e)
Called when there is an error in the Web Socket connection.
|
void |
onInactivityTimeout(java.lang.RuntimeException runtimeException)
Called when there is an inactivity timeout.
|
void |
onListening()
Called when the service is listening for audio.
|
void |
onTranscription(SpeechRecognitionResults speechResults)
Called when a
SpeechRecognitionResults was received. |
void |
onTranscriptionComplete()
Called after the service returns the final result for the transcription.
|
public void onTranscription(SpeechRecognitionResults speechResults)
RecognizeCallback
SpeechRecognitionResults
was received.onTranscription
in interface RecognizeCallback
speechResults
- the speech resultspublic void onConnected()
RecognizeCallback
onConnected
in interface RecognizeCallback
public void onError(java.lang.Exception e)
RecognizeCallback
onError
in interface RecognizeCallback
e
- the exceptionpublic void onDisconnected()
RecognizeCallback
onDisconnected
in interface RecognizeCallback
public void onInactivityTimeout(java.lang.RuntimeException runtimeException)
RecognizeCallback
onInactivityTimeout
in interface RecognizeCallback
runtimeException
- the runtime exceptionpublic void onListening()
RecognizeCallback
onListening
in interface RecognizeCallback
public void onTranscriptionComplete()
RecognizeCallback
onTranscriptionComplete
in interface RecognizeCallback