Interface RevAiWebSocketListener


  • public interface RevAiWebSocketListener
    Listens for events over the WebSocket connection to Rev AI
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onClose​(int code, String reason)
      Supplies the close code and close reason received during a WebSocket CloseEvent.
      void onConnected​(ConnectedMessage message)
      Supplies the connection message received from Rev AI.
      void onError​(Throwable t, okhttp3.Response response)
      Supplies the error and response received during a WebSocket ErrorEvent.
      void onHypothesis​(Hypothesis hypothesis)
      Supplies the Hypothesis returned from Rev AI.
      void onOpen​(okhttp3.Response response)
      Supplies the response received during the handshake.
    • Method Detail

      • onHypothesis

        void onHypothesis​(Hypothesis hypothesis)
        Supplies the Hypothesis returned from Rev AI.
        Parameters:
        hypothesis - the partial or final hypothesis of the audio.
        See Also:
        Hypothesis
      • onError

        void onError​(Throwable t,
                     okhttp3.Response response)
        Supplies the error and response received during a WebSocket ErrorEvent.
        Parameters:
        t - the error thrown.
        response - the WebSocket response to the error.
      • onClose

        void onClose​(int code,
                     String reason)
        Supplies the close code and close reason received during a WebSocket CloseEvent.
        Parameters:
        code - the close code.
        reason - the close reason.
      • onOpen

        void onOpen​(okhttp3.Response response)
        Supplies the response received during the handshake.
        Parameters:
        response - the handshake response.