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 voidonConnected()Called when a WebSocket connection was made.voidonDisconnected()Called when a WebSocket connection was closed.voidonError(Exception e)Called when there is an error in the Web Socket connection.voidonInactivityTimeout(RuntimeException runtimeException)Called when there is an inactivity timeout.voidonListening()Called when the service is listening for audio.voidonTranscription(SpeechRecognitionResults speechResults)Called when aSpeechRecognitionResultswas received.voidonTranscriptionComplete()Called after the service returns the final result for the transcription.
-
Method Details
-
onTranscription
Called when aSpeechRecognitionResultswas 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.
-