Class HttpSpeechSynthesisParam
java.lang.Object
com.alibaba.dashscope.legacy_2x.base.HalfDuplexParamBase
com.alibaba.dashscope.legacy_2x.base.HalfDuplexServiceParam
com.alibaba.dashscope.legacy_2x.audio.http_tts.HttpSpeechSynthesisParam
Deprecated.
HTTP TTS (Text-to-Speech) synthesis parameter class. Supports HTTP SSE-based speech synthesis API
calls for models like CosyVoice.
Example usage:
HttpSpeechSynthesisParam param = HttpSpeechSynthesisParam.builder()
.model("cosyvoice-v3-flash")
.text("Hello, welcome to the text-to-speech service.")
.voice("longanyang")
.format("wav")
.sampleRate(24000)
.build();
- Author:
- DashScope SDK Team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHttpSpeechSynthesisParam.HttpSpeechSynthesisParamBuilder<C extends HttpSpeechSynthesisParam,B extends HttpSpeechSynthesisParam.HttpSpeechSynthesisParamBuilder<C, B>> Deprecated.Nested classes/interfaces inherited from class com.alibaba.dashscope.legacy_2x.base.HalfDuplexServiceParam
HalfDuplexServiceParam.HalfDuplexServiceParamBuilder<C extends HalfDuplexServiceParam,B extends HalfDuplexServiceParam.HalfDuplexServiceParamBuilder<C, B>> Nested classes/interfaces inherited from class com.alibaba.dashscope.legacy_2x.base.HalfDuplexParamBase
HalfDuplexParamBase.HalfDuplexParamBaseBuilder<C extends HalfDuplexParamBase,B extends HalfDuplexParamBase.HalfDuplexParamBaseBuilder<C, B>> -
Field Summary
Fields inherited from class com.alibaba.dashscope.legacy_2x.base.HalfDuplexParamBase
headers, parameters -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Deprecated.protected booleanDeprecated.booleanDeprecated.Deprecated.Get the binary data, only websocket, if no binary data, return null.Deprecated.The audio format (e.g., "wav", "mp3", "pcm").com.google.gson.JsonObjectDeprecated.Get the batch request data.getInput()Deprecated.Get the request input data.getPitch()Deprecated.The pitch rate (0.5-2.0).getRate()Deprecated.The speech rate (0.5-2.0).Deprecated.The sample rate in Hz (e.g., 8000, 16000, 24000, 48000).@NonNull StringgetText()Deprecated.The text to be synthesized into speech.getVoice()Deprecated.The voice name for synthesis (e.g., "longanyang", "longxiaochun").Deprecated.The audio volume (0-100).inthashCode()Deprecated.voidDeprecated.The audio format (e.g., "wav", "mp3", "pcm").voidDeprecated.The pitch rate (0.5-2.0).voidDeprecated.The speech rate (0.5-2.0).voidsetSampleRate(Integer sampleRate) Deprecated.The sample rate in Hz (e.g., 8000, 16000, 24000, 48000).voidDeprecated.The text to be synthesized into speech.voidDeprecated.The voice name for synthesis (e.g., "longanyang", "longxiaochun").voidDeprecated.The audio volume (0-100).toString()Deprecated.voidvalidate()Deprecated.Validate the input and parameters.Methods inherited from class com.alibaba.dashscope.legacy_2x.base.HalfDuplexServiceParam
getHeaders, getModel, getParameters, getResources, putHeaderMethods inherited from class com.alibaba.dashscope.legacy_2x.base.HalfDuplexParamBase
getApiKey, getEnableEncrypt, getWorkspace, isSecurityCheck, setApiKey, setEnableEncrypt, setHeaders, setParameters, setSecurityCheck, setWorkspace, shouldSerializeExplicitNulls
-
Constructor Details
-
HttpSpeechSynthesisParam
Deprecated.
-
-
Method Details
-
getHttpBody
public com.google.gson.JsonObject getHttpBody()Deprecated.Description copied from class:HalfDuplexParamBaseGet the batch request data. Http body include {"model": "model_name", "input": "input data", "parameters": "The request parameters"}- Specified by:
getHttpBodyin classHalfDuplexParamBase- Returns:
- The http request body
-
getInput
Deprecated.Description copied from class:HalfDuplexParamBaseGet the request input data.- Specified by:
getInputin classHalfDuplexParamBase- Returns:
- The input data object.
-
getBinaryData
Deprecated.Description copied from class:HalfDuplexParamBaseGet the binary data, only websocket, if no binary data, return null.- Specified by:
getBinaryDatain classHalfDuplexParamBase- Returns:
- The binary data
-
validate
Deprecated.Description copied from class:HalfDuplexParamBaseValidate the input and parameters.- Specified by:
validatein classHalfDuplexParamBase- Throws:
InputRequiredException- Missing input fields.
-
builder
Deprecated. -
getText
Deprecated.The text to be synthesized into speech. -
getVoice
Deprecated.The voice name for synthesis (e.g., "longanyang", "longxiaochun"). -
getFormat
Deprecated.The audio format (e.g., "wav", "mp3", "pcm"). -
getSampleRate
Deprecated.The sample rate in Hz (e.g., 8000, 16000, 24000, 48000). -
getVolume
Deprecated.The audio volume (0-100). -
getRate
Deprecated.The speech rate (0.5-2.0). -
getPitch
Deprecated.The pitch rate (0.5-2.0). -
setText
Deprecated.The text to be synthesized into speech. -
setVoice
Deprecated.The voice name for synthesis (e.g., "longanyang", "longxiaochun"). -
setFormat
Deprecated.The audio format (e.g., "wav", "mp3", "pcm"). -
setSampleRate
Deprecated.The sample rate in Hz (e.g., 8000, 16000, 24000, 48000). -
setVolume
Deprecated.The audio volume (0-100). -
setRate
Deprecated.The speech rate (0.5-2.0). -
setPitch
Deprecated.The pitch rate (0.5-2.0). -
toString
Deprecated.- Overrides:
toStringin classHalfDuplexParamBase
-
equals
Deprecated.- Overrides:
equalsin classHalfDuplexServiceParam
-
canEqual
Deprecated.- Overrides:
canEqualin classHalfDuplexServiceParam
-
hashCode
public int hashCode()Deprecated.- Overrides:
hashCodein classHalfDuplexServiceParam
-