java.lang.Object
okhttp3.WebSocketListener
com.alibaba.dashscope.legacy_2x.audio.qwen_tts_realtime.QwenTtsRealtime

@Deprecated public class QwenTtsRealtime extends okhttp3.WebSocketListener
Deprecated.
Author:
lengjiayi
  • Constructor Details

  • Method Details

    • checkStatus

      public void checkStatus()
      Deprecated.
    • connect

      public void connect() throws NoApiKeyException, InterruptedException
      Deprecated.
      Connect to server, create session and return default session configuration
      Throws:
      NoApiKeyException
      InterruptedException
    • updateSession

      public void updateSession(QwenTtsRealtimeConfig config)
      Deprecated.
      Update session configuration, should be used before append text
      Parameters:
      config - session configuration
    • appendText

      public void appendText(String text)
      Deprecated.
      Send text
      Parameters:
      text - text to send
    • commit

      public void commit()
      Deprecated.
      Commit the text sent before, create response and start synthesis audio.
    • clearAppendedText

      public void clearAppendedText()
      Deprecated.
      Clear the text sent to server before.
    • cancelResponse

      public void cancelResponse()
      Deprecated.
      cancel the current response
    • finish

      public void finish()
      Deprecated.
      finish input text stream, server will synthesis all text in buffer and close the connection
    • close

      public void close()
      Deprecated.
      close the connection to server
    • close

      public void close(int code, String reason)
      Deprecated.
      close the connection to server
      Parameters:
      code - websocket close code
      reason - websocket close reason
    • sendRaw

      public void sendRaw(String rawData)
      Deprecated.
      send raw data to server
      Parameters:
      rawData - raw data
    • getSessionId

      public String getSessionId()
      Deprecated.
    • getResponseId

      public String getResponseId()
      Deprecated.
    • getFirstAudioDelay

      public long getFirstAudioDelay()
      Deprecated.
    • onOpen

      public void onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response)
      Deprecated.
      WebSocket callbacks
      Overrides:
      onOpen in class okhttp3.WebSocketListener
    • onMessage

      public void onMessage(okhttp3.WebSocket webSocket, String text)
      Deprecated.
      Overrides:
      onMessage in class okhttp3.WebSocketListener
    • onClosed

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

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

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