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(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 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(Exception e)
e
- the exceptionvoid onDisconnected()
void onInactivityTimeout(RuntimeException runtimeException)
runtimeException
- the runtime exceptionvoid onListening()
void onTranscriptionComplete()
Copyright © 2022 IBM Cloud. All rights reserved.