类 TTSResponse.Builder
java.lang.Object
io.agentscope.core.model.tts.TTSResponse.Builder
- 封闭类:
TTSResponse
Builder for constructing TTSResponse instances.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明audioData(byte[] audioData) Sets the raw audio data.Sets the audio URL.build()Builds the TTSResponse instance.durationMs(Long durationMs) Sets the duration.Sets the audio format.Sets the request ID.sampleRate(Integer sampleRate) Sets the sample rate.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
audioData
Sets the raw audio data.- 参数:
audioData- audio bytes- 返回:
- this builder
-
audioUrl
Sets the audio URL.- 参数:
audioUrl- URL to audio file- 返回:
- this builder
-
format
Sets the audio format.- 参数:
format- audio format- 返回:
- this builder
-
sampleRate
Sets the sample rate.- 参数:
sampleRate- sample rate in Hz- 返回:
- this builder
-
durationMs
Sets the duration.- 参数:
durationMs- duration in milliseconds- 返回:
- this builder
-
requestId
Sets the request ID.- 参数:
requestId- request ID- 返回:
- this builder
-
build
Builds the TTSResponse instance.- 返回:
- a new TTSResponse
-