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
SpeechRecognitionResults was received. |
void |
onTranscriptionComplete()
Called after the service returns the final result for the transcription.
|
public void onTranscription(SpeechRecognitionResults speechResults)
RecognizeCallback
SpeechRecognitionResults
was received.onTranscription
in interface RecognizeCallback
speechResults
- the speech resultspublic void onConnected()
RecognizeCallback
onConnected
in interface RecognizeCallback
public void onError(Exception e)
RecognizeCallback
onError
in interface RecognizeCallback
e
- the exceptionpublic void onDisconnected()
RecognizeCallback
onDisconnected
in interface RecognizeCallback
public void onInactivityTimeout(RuntimeException runtimeException)
RecognizeCallback
onInactivityTimeout
in interface RecognizeCallback
runtimeException
- the runtime exceptionpublic void onListening()
RecognizeCallback
onListening
in interface RecognizeCallback
public void onTranscriptionComplete()
RecognizeCallback
onTranscriptionComplete
in interface RecognizeCallback
Copyright © 2023 IBM Cloud. All rights reserved.