Class SpeechToTextWebSocketListener
java.lang.Object
okhttp3.WebSocketListener
com.ibm.watson.speech_to_text.v1.websocket.SpeechToTextWebSocketListener
public final class SpeechToTextWebSocketListener
extends okhttp3.WebSocketListener
The listener interface for receiving
The class that is interested in processing a event implements this interface. When the event occurs, that object's appropriate method is invoked.
WebSocket
events. The class that is interested in processing a event implements this interface. When the event occurs, that object's appropriate method is invoked.
- See Also:
SpeechToText
-
Constructor Summary
Constructors Constructor Description SpeechToTextWebSocketListener(RecognizeWithWebsocketsOptions options, RecognizeCallback callback)
Instantiates a new speech to text web socket listener. -
Method Summary
Modifier and Type Method Description void
onClosing(okhttp3.WebSocket webSocket, int code, String reason)
void
onFailure(okhttp3.WebSocket webSocket, Throwable t, okhttp3.Response response)
void
onMessage(okhttp3.WebSocket webSocket, String message)
void
onOpen(okhttp3.WebSocket socket, okhttp3.Response response)
Methods inherited from class okhttp3.WebSocketListener
onClosed, onMessage
-
Constructor Details
-
SpeechToTextWebSocketListener
public SpeechToTextWebSocketListener(RecognizeWithWebsocketsOptions options, RecognizeCallback callback)Instantiates a new speech to text web socket listener.- Parameters:
options
- the recognize optionscallback
- the callback
-
-
Method Details
-
onClosing
- Overrides:
onClosing
in classokhttp3.WebSocketListener
-
onFailure
- Overrides:
onFailure
in classokhttp3.WebSocketListener
-
onMessage
- Overrides:
onMessage
in classokhttp3.WebSocketListener
-
onOpen
public void onOpen(okhttp3.WebSocket socket, okhttp3.Response response)- Overrides:
onOpen
in classokhttp3.WebSocketListener
-