Class SpeechConfig

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.SpeechConfig

public abstract class SpeechConfig extends JsonSerializable
The speech generation configuration.
  • Constructor Details

    • SpeechConfig

      public SpeechConfig()
  • Method Details

    • voiceConfig

      public abstract Optional<VoiceConfig> voiceConfig()
      The configuration for the speaker to use.
    • multiSpeakerVoiceConfig

      public abstract Optional<MultiSpeakerVoiceConfig> multiSpeakerVoiceConfig()
      The configuration for the multi-speaker setup. It is mutually exclusive with the voice_config field.
    • languageCode

      public abstract Optional<String> languageCode()
      Language code (ISO 639. e.g. en-US) for the speech synthesization. Only available for Live API.
    • builder

      public static SpeechConfig.Builder builder()
      Instantiates a builder for SpeechConfig.
    • toBuilder

      public abstract SpeechConfig.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static SpeechConfig fromJson(String jsonString)
      Deserializes a JSON string to a SpeechConfig object.