Interface RecognizeCallback
- All Known Implementing Classes:
BaseRecognizeCallback
public interface RecognizeCallback
The recognize callback used during a
WebSocket
recognition by the SpeechToText
service.-
Method Summary
Modifier and Type Method Description void
onConnected()
Called when a WebSocket connection was made.void
onDisconnected()
Called when a WebSocket connection was closed.void
onError(Exception e)
Called when there is an error in the Web Socket connection.void
onInactivityTimeout(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 aSpeechRecognitionResults
was received.void
onTranscriptionComplete()
Called after the service returns the final result for the transcription.
-
Method Details
-
onTranscription
Called when aSpeechRecognitionResults
was received.- Parameters:
speechResults
- the speech results
-
onConnected
void onConnected()Called when a WebSocket connection was made. -
onError
Called when there is an error in the Web Socket connection.- Parameters:
e
- the exception
-
onDisconnected
void onDisconnected()Called when a WebSocket connection was closed. -
onInactivityTimeout
Called when there is an inactivity timeout.- Parameters:
runtimeException
- the runtime exception
-
onListening
void onListening()Called when the service is listening for audio. -
onTranscriptionComplete
void onTranscriptionComplete()Called after the service returns the final result for the transcription.
-