类 DashScopeTTSModel.Builder
java.lang.Object
io.agentscope.core.model.tts.DashScopeTTSModel.Builder
- 封闭类:
DashScopeTTSModel
Builder for constructing DashScopeTTSModel instances.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Sets the API key for DashScope authentication.Sets a custom base URL for DashScope API.build()Builds the DashScopeTTSModel instance.defaultOptions(TTSOptions options) Sets the default TTS options.httpTransport(HttpTransport transport) Sets the HTTP transport to use.Sets the TTS model name.Sets the default voice for synthesis.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
apiKey
Sets the API key for DashScope authentication.- 参数:
apiKey- the API key- 返回:
- this builder
-
modelName
Sets the TTS model name.Available models:
- qwen3-tts-flash - Fast Qwen3 TTS
- qwen-tts - Standard Qwen TTS
- sambert-zhimao-v1 - Sambert Chinese voice
- cosyvoice-v1 - CosyVoice model
- 参数:
modelName- the model name- 返回:
- this builder
-
voice
Sets the default voice for synthesis.Common voices include: Cherry, zhimao, etc.
- 参数:
voice- the voice name- 返回:
- this builder
-
defaultOptions
Sets the default TTS options.- 参数:
options- default options- 返回:
- this builder
-
baseUrl
Sets a custom base URL for DashScope API.- 参数:
baseUrl- the base URL- 返回:
- this builder
-
httpTransport
Sets the HTTP transport to use.- 参数:
transport- the HTTP transport- 返回:
- this builder
-
build
Builds the DashScopeTTSModel instance.- 返回:
- a configured DashScopeTTSModel
- 抛出:
IllegalArgumentException- if apiKey is not set
-