Class SpeechSynthesisParam.SpeechSynthesisParamBuilder<C extends SpeechSynthesisParam,B extends SpeechSynthesisParam.SpeechSynthesisParamBuilder<C,B>>
java.lang.Object
com.alibaba.dashscope.legacy_2x.base.FullDuplexParamBase.FullDuplexParamBaseBuilder<C,B>
com.alibaba.dashscope.legacy_2x.base.FullDuplexServiceParam.FullDuplexServiceParamBuilder<C,B>
com.alibaba.dashscope.legacy_2x.audio.ttsv2.SpeechSynthesisParam.SpeechSynthesisParamBuilder<C,B>
- Enclosing class:
- SpeechSynthesisParam
public abstract static class SpeechSynthesisParam.SpeechSynthesisParamBuilder<C extends SpeechSynthesisParam,B extends SpeechSynthesisParam.SpeechSynthesisParamBuilder<C,B>>
extends FullDuplexServiceParam.FullDuplexServiceParamBuilder<C,B>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Cbuild()connectionTimeout(long connectionTimeout) enablePhonemeTimestamp(boolean enablePhonemeTimestamp) enable phoneme level timestamp.enableWordTimestamp(boolean enableWordTimestamp) enable word level timestamp.firstPackageTimeout(long firstPackageTimeout) format(SpeechSynthesisAudioFormat format) synthesis audio format.hotFix(ParamHotFix hotFix) Hot fix configuration for pronunciation and replace rules.instruction(String instruction) the following parameters take effect only in CosyVoice V3 and later versions. instruction for synthesis.languageHints(List<String> languageHints) language hints.pitchRate(float pitchRate) synthesis audio pitch.seed(int seed) random seed.protected abstract Bself()speechRate(float speechRate) synthesis audio speed.style(int style) synthesis styletextType(SpeechSynthesisTextType textType) Input text type.toString()voice namevolume(int volume) synthesis audio volume.Methods inherited from class com.alibaba.dashscope.legacy_2x.base.FullDuplexServiceParam.FullDuplexServiceParamBuilder
resourcesMethods inherited from class com.alibaba.dashscope.legacy_2x.base.FullDuplexParamBase.FullDuplexParamBaseBuilder
apiKey, clearHeaders, clearParameters, header, headers, model, parameter, parameters, securityCheck, workspace
-
Constructor Details
-
SpeechSynthesisParamBuilder
public SpeechSynthesisParamBuilder()
-
-
Method Details
-
textType
Input text type.- Returns:
this.
-
voice
voice name- Returns:
this.
-
format
synthesis audio format.- Returns:
this.
-
volume
synthesis audio volume.- Returns:
this.
-
speechRate
synthesis audio speed.- Returns:
this.
-
pitchRate
synthesis audio pitch.- Returns:
this.
-
enableWordTimestamp
enable word level timestamp.- Returns:
this.
-
enablePhonemeTimestamp
enable phoneme level timestamp.- Returns:
this.
-
connectionTimeout
- Returns:
this.
-
firstPackageTimeout
- Returns:
this.
-
instruction
the following parameters take effect only in CosyVoice V3 and later versions. instruction for synthesis.- Returns:
this.
-
seed
random seed.- Returns:
this.
-
languageHints
language hints.- Returns:
this.
-
style
synthesis style- Returns:
this.
-
hotFix
Hot fix configuration for pronunciation and replace rules.- Returns:
this.
-
self
- Specified by:
selfin classFullDuplexServiceParam.FullDuplexServiceParamBuilder<C extends SpeechSynthesisParam,B extends SpeechSynthesisParam.SpeechSynthesisParamBuilder<C, B>>
-
build
- Specified by:
buildin classFullDuplexServiceParam.FullDuplexServiceParamBuilder<C extends SpeechSynthesisParam,B extends SpeechSynthesisParam.SpeechSynthesisParamBuilder<C, B>>
-
toString
- Overrides:
toStringin classFullDuplexServiceParam.FullDuplexServiceParamBuilder<C extends SpeechSynthesisParam,B extends SpeechSynthesisParam.SpeechSynthesisParamBuilder<C, B>>
-