public interface RecognizeCallback
WebSocket
recognition by the SpeechToText
service.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.
|
void onTranscription(SpeechRecognitionResults speechResults)
SpeechRecognitionResults
was received.speechResults
- the speech resultsvoid onConnected()
void onError(java.lang.Exception e)
e
- the exceptionvoid onDisconnected()
void onInactivityTimeout(java.lang.RuntimeException runtimeException)
runtimeException
- the runtime exceptionvoid onListening()
void onTranscriptionComplete()