public final class SpeechToTextWebSocketListener
extends okhttp3.WebSocketListener
WebSocket
events. SpeechToText
Constructor and Description |
---|
SpeechToTextWebSocketListener(RecognizeWithWebsocketsOptions options,
RecognizeCallback callback)
Instantiates a new speech to text web socket listener.
|
Modifier and Type | Method and 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) |
public SpeechToTextWebSocketListener(RecognizeWithWebsocketsOptions options, RecognizeCallback callback)
options
- the recognize optionscallback
- the callbackpublic void onClosing(okhttp3.WebSocket webSocket, int code, String reason)
onClosing
in class okhttp3.WebSocketListener
public void onFailure(okhttp3.WebSocket webSocket, Throwable t, okhttp3.Response response)
onFailure
in class okhttp3.WebSocketListener
public void onMessage(okhttp3.WebSocket webSocket, String message)
onMessage
in class okhttp3.WebSocketListener
public void onOpen(okhttp3.WebSocket socket, okhttp3.Response response)
onOpen
in class okhttp3.WebSocketListener
Copyright © 2021 IBM Cloud. All rights reserved.