public class BaseRecognizeCallback extends 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(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  SpeechRecognitionResultswas received. | 
| void | onTranscriptionComplete()Called after the service returns the final result for the transcription. | 
public void onTranscription(SpeechRecognitionResults speechResults)
RecognizeCallbackSpeechRecognitionResults was received.onTranscription in interface RecognizeCallbackspeechResults - the speech resultspublic void onConnected()
RecognizeCallbackonConnected in interface RecognizeCallbackpublic void onError(Exception e)
RecognizeCallbackonError in interface RecognizeCallbacke - the exceptionpublic void onDisconnected()
RecognizeCallbackonDisconnected in interface RecognizeCallbackpublic void onInactivityTimeout(RuntimeException runtimeException)
RecognizeCallbackonInactivityTimeout in interface RecognizeCallbackruntimeException - the runtime exceptionpublic void onListening()
RecognizeCallbackonListening in interface RecognizeCallbackpublic void onTranscriptionComplete()
RecognizeCallbackonTranscriptionComplete in interface RecognizeCallbackCopyright © 2023 IBM Cloud. All rights reserved.