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 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.
-
Constructor Details
-
BaseRecognizeCallback
public BaseRecognizeCallback()
-
-
Method Details
-
onTranscription
Description copied from interface:RecognizeCallback
Called when aSpeechRecognitionResults
was received.- Specified by:
onTranscription
in interfaceRecognizeCallback
- Parameters:
speechResults
- the speech results
-
onConnected
public void onConnected()Description copied from interface:RecognizeCallback
Called when a WebSocket connection was made.- Specified by:
onConnected
in interfaceRecognizeCallback
-
onError
Description copied from interface:RecognizeCallback
Called when there is an error in the Web Socket connection.- Specified by:
onError
in interfaceRecognizeCallback
- Parameters:
e
- the exception
-
onDisconnected
public void onDisconnected()Description copied from interface:RecognizeCallback
Called when a WebSocket connection was closed.- Specified by:
onDisconnected
in interfaceRecognizeCallback
-
onInactivityTimeout
Description copied from interface:RecognizeCallback
Called when there is an inactivity timeout.- Specified by:
onInactivityTimeout
in interfaceRecognizeCallback
- Parameters:
runtimeException
- the runtime exception
-
onListening
public void onListening()Description copied from interface:RecognizeCallback
Called when the service is listening for audio.- Specified by:
onListening
in interfaceRecognizeCallback
-
onTranscriptionComplete
public void onTranscriptionComplete()Description copied from interface:RecognizeCallback
Called after the service returns the final result for the transcription.- Specified by:
onTranscriptionComplete
in interfaceRecognizeCallback
-