类 TTSOptions.Builder

java.lang.Object
io.agentscope.core.model.tts.TTSOptions.Builder
封闭类:
TTSOptions

public static class TTSOptions.Builder extends Object
Builder for constructing TTSOptions instances.
  • 构造器详细资料

    • Builder

      public Builder()
  • 方法详细资料

    • voice

      public TTSOptions.Builder voice(String voice)
      Sets the voice for synthesis.
      参数:
      voice - the voice name/ID
      返回:
      this builder
    • sampleRate

      public TTSOptions.Builder sampleRate(Integer sampleRate)
      Sets the audio sample rate.
      参数:
      sampleRate - sample rate in Hz
      返回:
      this builder
    • format

      public TTSOptions.Builder format(String format)
      Sets the output audio format.
      参数:
      format - audio format (e.g., "wav", "mp3")
      返回:
      this builder
    • speed

      public TTSOptions.Builder speed(Float speed)
      Sets the speech speed.
      参数:
      speed - speed multiplier (0.5-2.0)
      返回:
      this builder
    • volume

      public TTSOptions.Builder volume(Float volume)
      Sets the audio volume.
      参数:
      volume - volume level (0-100)
      返回:
      this builder
    • pitch

      public TTSOptions.Builder pitch(Float pitch)
      Sets the speech pitch.
      参数:
      pitch - pitch multiplier (0.5-2.0)
      返回:
      this builder
    • language

      public TTSOptions.Builder language(String language)
      Sets the language type.
      参数:
      language - language code (e.g., "Chinese")
      返回:
      this builder
    • build

      public TTSOptions build()
      Builds the TTSOptions instance.
      返回:
      a new TTSOptions