Class BaseRecognizeCallback
java.lang.Object
com.ibm.watson.speech_to_text.v1.websocket.BaseRecognizeCallback
- All Implemented Interfaces:
RecognizeCallback
public class BaseRecognizeCallback extends Object implements RecognizeCallback
An empty implementation of
RecognizeCallback interface.-
Constructor Summary
Constructors Constructor Description BaseRecognizeCallback() -
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.
-
Constructor Details
-
BaseRecognizeCallback
public BaseRecognizeCallback()
-
-
Method Details
-
onTranscription
Description copied from interface:RecognizeCallbackCalled when aSpeechRecognitionResultswas received.- Specified by:
onTranscriptionin interfaceRecognizeCallback- Parameters:
speechResults- the speech results
-
onConnected
public void onConnected()Description copied from interface:RecognizeCallbackCalled when a WebSocket connection was made.- Specified by:
onConnectedin interfaceRecognizeCallback
-
onError
Description copied from interface:RecognizeCallbackCalled when there is an error in the Web Socket connection.- Specified by:
onErrorin interfaceRecognizeCallback- Parameters:
e- the exception
-
onDisconnected
public void onDisconnected()Description copied from interface:RecognizeCallbackCalled when a WebSocket connection was closed.- Specified by:
onDisconnectedin interfaceRecognizeCallback
-
onInactivityTimeout
Description copied from interface:RecognizeCallbackCalled when there is an inactivity timeout.- Specified by:
onInactivityTimeoutin interfaceRecognizeCallback- Parameters:
runtimeException- the runtime exception
-
onListening
public void onListening()Description copied from interface:RecognizeCallbackCalled when the service is listening for audio.- Specified by:
onListeningin interfaceRecognizeCallback
-
onTranscriptionComplete
public void onTranscriptionComplete()Description copied from interface:RecognizeCallbackCalled after the service returns the final result for the transcription.- Specified by:
onTranscriptionCompletein interfaceRecognizeCallback
-