SpeechConfig

Speech configuration class for controlling the model's speech and audio generation behaviors.

This allows you to configure the voice properties (single-speaker OR multi-speaker setup) and language preferences when requesting the model to generate spoken responses.

Constructors

Link copied to clipboard
constructor(voice: Voice, languageCode: String? = null)

Constructs a SpeechConfig for a single-speaker setup.

constructor(multiSpeakerVoiceConfig: MultiSpeakerVoiceConfig, languageCode: String? = null)

Constructs a SpeechConfig for a multi-speaker setup.

Properties

Link copied to clipboard

The optional IETF BCP-47 language code (such as "en-US", "es-ES") used to guide the model's speech synthesis and recognition.

Link copied to clipboard

The multi-speaker configuration. Note that this configuration is not supported by the Live API (like LiveGenerationConfig).

Link copied to clipboard
val voice: Voice?

The single-speaker Voice configuration.