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 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 Details

    • SpeechToTextWebSocketListener

      public SpeechToTextWebSocketListener​(RecognizeWithWebsocketsOptions options, RecognizeCallback callback)
      Instantiates a new speech to text web socket listener.
      Parameters:
      options - the recognize options
      callback - the callback
  • Method Details

    • onClosing

      public void onClosing​(okhttp3.WebSocket webSocket, int code, String reason)
      Overrides:
      onClosing in class okhttp3.WebSocketListener
    • onFailure

      public void onFailure​(okhttp3.WebSocket webSocket, Throwable t, okhttp3.Response response)
      Overrides:
      onFailure in class okhttp3.WebSocketListener
    • onMessage

      public void onMessage​(okhttp3.WebSocket webSocket, String message)
      Overrides:
      onMessage in class okhttp3.WebSocketListener
    • onOpen

      public void onOpen​(okhttp3.WebSocket socket, okhttp3.Response response)
      Overrides:
      onOpen in class okhttp3.WebSocketListener