Class SpeechSynthesizerV2
java.lang.Object
com.alibaba.dashscope.legacy_2x.audio.ttsv2.SpeechSynthesizerV2
- All Implemented Interfaces:
AudioWebsocketCallback
Deprecated.
- Author:
- songsong.sss
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.CosyVoice Speech Synthesis SDKSpeechSynthesizerV2(SpeechSynthesisParam param, ResultCallback<SpeechSynthesisResult> callback) Deprecated.CosyVoice Speech Synthesis SDKSpeechSynthesizerV2(SpeechSynthesisParam param, ResultCallback<SpeechSynthesisResult> callback, String baseUrl) Deprecated.CosyVoice Speech Synthesis SDKSpeechSynthesizerV2(SpeechSynthesisParam param, ResultCallback<SpeechSynthesisResult> callback, String baseUrl, ConnectionOptions connectionOptions) Deprecated.CosyVoice Speech Synthesis SDKSpeechSynthesizerV2(String baseUrl, ConnectionOptions connectionOptions) Deprecated.CosyVoice Speech Synthesis SDK -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Deprecated.Deprecated.voidclose()Deprecated.voidconnect()Deprecated.longDeprecated.longDeprecated.First Package Delay is the time between start sending text and receive first audio packageDeprecated.longDeprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidonMessage(okhttp3.WebSocket webSocket, ByteBuffer bytes) Deprecated.voidonOpen()Deprecated.voidsendFlush(com.google.gson.JsonObject params) Deprecated.Sends a flush directive, asking the server to synthesize the text buffered so far without ending the session.voidDeprecated.voidsetFirstAudioTimeout(long firstAudioTimeout) Deprecated.voidsetStartedTimeout(long startedTimeout) Deprecated.voidstartSynthesizer(boolean enableSsml) Deprecated.voidDeprecated.voidstreamingCall(String text) Deprecated.voidDeprecated.voidDeprecated.voidstreamingComplete(long completeTimeoutMillis) Deprecated.voidDeprecated.Forces the server to synthesize the text submitted so far.voidstreamingFlush(com.google.gson.JsonObject params) Deprecated.Forces the server to synthesize the text submitted so far.voidupdateParamAndCallback(SpeechSynthesisParam param, ResultCallback<SpeechSynthesisResult> callback) Deprecated.
-
Constructor Details
-
SpeechSynthesizerV2
public SpeechSynthesizerV2(SpeechSynthesisParam param, ResultCallback<SpeechSynthesisResult> callback, String baseUrl, ConnectionOptions connectionOptions) Deprecated.CosyVoice Speech Synthesis SDK- Parameters:
param- Configuration for speech synthesis, including voice type, volume, etc.callback- In non-streaming output scenarios, this can be set to nullbaseUrl- Base URLconnectionOptions- Connection options
-
SpeechSynthesizerV2
Deprecated.CosyVoice Speech Synthesis SDK- Parameters:
baseUrl- Base URLconnectionOptions- Connection options
-
SpeechSynthesizerV2
public SpeechSynthesizerV2()Deprecated.CosyVoice Speech Synthesis SDK -
SpeechSynthesizerV2
public SpeechSynthesizerV2(SpeechSynthesisParam param, ResultCallback<SpeechSynthesisResult> callback, String baseUrl) Deprecated.CosyVoice Speech Synthesis SDK- Parameters:
param- Configuration for speech synthesis, including voice type, volume, etc.callback- In non-streaming output scenarios, this can be set to nullbaseUrl- Base URL
-
SpeechSynthesizerV2
public SpeechSynthesizerV2(SpeechSynthesisParam param, ResultCallback<SpeechSynthesisResult> callback) Deprecated.CosyVoice Speech Synthesis SDK- Parameters:
param- Configuration for speech synthesis, including voice type, volume, etc.callback- In non-streaming output scenarios, this can be set to null
-
-
Method Details
-
updateParamAndCallback
public void updateParamAndCallback(SpeechSynthesisParam param, ResultCallback<SpeechSynthesisResult> callback) Deprecated. -
getLastRequestId
Deprecated. -
connect
Deprecated. -
close
public void close()Deprecated. -
startSynthesizer
Deprecated.- Throws:
InterruptedException
-
sendText
Deprecated. -
sendFlush
public void sendFlush(com.google.gson.JsonObject params) Deprecated.Sends a flush directive, asking the server to synthesize the text buffered so far without ending the session.- Parameters:
params- Optional fields carried next to the flush flag, may be null. Keys already present are kept, so the flush flag itself cannot be overridden.
-
stopSynthesizer
public void stopSynthesizer()Deprecated. -
onOpen
public void onOpen()Deprecated.- Specified by:
onOpenin interfaceAudioWebsocketCallback
-
onMessage
Deprecated.- Specified by:
onMessagein interfaceAudioWebsocketCallback
-
onMessage
Deprecated.- Specified by:
onMessagein interfaceAudioWebsocketCallback
-
onError
Deprecated.- Specified by:
onErrorin interfaceAudioWebsocketCallback
-
onClose
Deprecated.- Specified by:
onClosein interfaceAudioWebsocketCallback
-
getFirstPackageDelay
public long getFirstPackageDelay()Deprecated.First Package Delay is the time between start sending text and receive first audio package -
streamingComplete
public void streamingComplete(long completeTimeoutMillis) Deprecated. -
streamingComplete
public void streamingComplete()Deprecated. -
asyncStreamingComplete
public void asyncStreamingComplete()Deprecated. -
streamingCancel
public void streamingCancel()Deprecated. -
streamingCall
Deprecated. -
streamingFlush
public void streamingFlush()Deprecated.Forces the server to synthesize the text submitted so far. The session stays open, so streamingCall() can keep sending text afterwards. -
streamingFlush
public void streamingFlush(com.google.gson.JsonObject params) Deprecated.Forces the server to synthesize the text submitted so far. The session stays open, so streamingCall() can keep sending text afterwards.- Parameters:
params- Optional fields carried next to the flush flag, may be null.
-
call
Deprecated.- Throws:
RuntimeException
-
call
Deprecated. -
getStartedTimeout
public long getStartedTimeout()Deprecated. -
setStartedTimeout
public void setStartedTimeout(long startedTimeout) Deprecated. -
getFirstAudioTimeout
public long getFirstAudioTimeout()Deprecated. -
setFirstAudioTimeout
public void setFirstAudioTimeout(long firstAudioTimeout) Deprecated.
-