Class QwenTtsRealtime
java.lang.Object
okhttp3.WebSocketListener
com.alibaba.dashscope.legacy_2x.audio.qwen_tts_realtime.QwenTtsRealtime
Deprecated.
- Author:
- lengjiayi
-
Constructor Summary
ConstructorsConstructorDescriptionQwenTtsRealtime(QwenTtsRealtimeParam param, QwenTtsRealtimeCallback callback) Deprecated.Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidappendText(String text) Deprecated.Send textvoidDeprecated.cancel the current responsevoidDeprecated.voidDeprecated.Clear the text sent to server before.voidclose()Deprecated.close the connection to servervoidDeprecated.close the connection to servervoidcommit()Deprecated.Commit the text sent before, create response and start synthesis audio.voidconnect()Deprecated.Connect to server, create session and return default session configurationvoidfinish()Deprecated.finish input text stream, server will synthesis all text in buffer and close the connectionlongDeprecated.Deprecated.Deprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidonOpen(okhttp3.WebSocket webSocket, okhttp3.Response response) Deprecated.WebSocket callbacksvoidDeprecated.send raw data to servervoidupdateSession(QwenTtsRealtimeConfig config) Deprecated.Update session configuration, should be used before append textMethods inherited from class okhttp3.WebSocketListener
onMessage
-
Constructor Details
-
QwenTtsRealtime
Deprecated.Constructor- Parameters:
param- apikey, model, url, etc.callback- callback
-
-
Method Details
-
checkStatus
public void checkStatus()Deprecated. -
connect
Deprecated.Connect to server, create session and return default session configuration -
updateSession
Deprecated.Update session configuration, should be used before append text- Parameters:
config- session configuration
-
appendText
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
Deprecated.close the connection to server- Parameters:
code- websocket close codereason- websocket close reason
-
sendRaw
Deprecated.send raw data to server- Parameters:
rawData- raw data
-
getSessionId
Deprecated. -
getResponseId
Deprecated. -
getFirstAudioDelay
public long getFirstAudioDelay()Deprecated. -
onOpen
public void onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response) Deprecated.WebSocket callbacks- Overrides:
onOpenin classokhttp3.WebSocketListener
-
onMessage
Deprecated.- Overrides:
onMessagein classokhttp3.WebSocketListener
-
onClosed
Deprecated.- Overrides:
onClosedin classokhttp3.WebSocketListener
-
onClosing
Deprecated.- Overrides:
onClosingin classokhttp3.WebSocketListener
-
onFailure
Deprecated.- Overrides:
onFailurein classokhttp3.WebSocketListener
-