类 AudioPlayer.Builder
java.lang.Object
io.agentscope.core.model.tts.AudioPlayer.Builder
- 封闭类:
AudioPlayer
Builder for constructing AudioPlayer instances.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明bigEndian(boolean bigEndian) Sets the byte order of the audio data.build()Builds the AudioPlayer instance.channels(int channels) Sets the number of audio channels.sampleRate(int sampleRate) Sets the sample rate in Hz.sampleSizeInBits(int sampleSizeInBits) Sets the sample size in bits.signed(boolean signed) Sets whether the audio data is signed.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
sampleRate
Sets the sample rate in Hz.- 参数:
sampleRate- sample rate (e.g., 16000, 24000, 48000)- 返回:
- this builder
-
sampleSizeInBits
Sets the sample size in bits.- 参数:
sampleSizeInBits- bits per sample (e.g., 8, 16)- 返回:
- this builder
-
channels
Sets the number of audio channels.- 参数:
channels- 1 for mono, 2 for stereo- 返回:
- this builder
-
signed
Sets whether the audio data is signed.- 参数:
signed- true for signed, false for unsigned- 返回:
- this builder
-
bigEndian
Sets the byte order of the audio data.- 参数:
bigEndian- true for big-endian, false for little-endian- 返回:
- this builder
-
build
Builds the AudioPlayer instance.- 返回:
- a configured AudioPlayer
-