diff --git a/src/GenerativeAI/Types/ContentGeneration/Config/MultiSpeakerVoiceConfig.cs b/src/GenerativeAI/Types/ContentGeneration/Config/MultiSpeakerVoiceConfig.cs new file mode 100644 index 00000000..87f71ca8 --- /dev/null +++ b/src/GenerativeAI/Types/ContentGeneration/Config/MultiSpeakerVoiceConfig.cs @@ -0,0 +1,16 @@ +using System.Text.Json.Serialization; + +namespace GenerativeAI.Types; + +/// +/// The configuration for the multi-speaker setup. +/// +/// See Official API Documentation +public class MultiSpeakerVoiceConfig +{ + /// + /// Required. All the enabled speaker voices. + /// + [JsonPropertyName("speakerVoiceConfigs")] + public List? SpeakerVoiceConfigs { get; set; } +} \ No newline at end of file diff --git a/src/GenerativeAI/Types/ContentGeneration/Config/SpeakerVoiceConfig.cs b/src/GenerativeAI/Types/ContentGeneration/Config/SpeakerVoiceConfig.cs new file mode 100644 index 00000000..e3fe3f75 --- /dev/null +++ b/src/GenerativeAI/Types/ContentGeneration/Config/SpeakerVoiceConfig.cs @@ -0,0 +1,22 @@ +using System.Text.Json.Serialization; + +namespace GenerativeAI.Types; + +/// +/// The configuration for a single speaker in a multi speaker setup. +/// +/// See Official API Documentation +public class SpeakerVoiceConfig +{ + /// + /// Required. The name of the speaker to use. Should be the same as in the prompt. + /// + [JsonPropertyName("speaker")] + public string? Speaker { get; set; } + + /// + /// Required. The configuration for the voice to use. + /// + [JsonPropertyName("voiceConfig")] + public VoiceConfig? VoiceConfig { get; set; } +} \ No newline at end of file diff --git a/src/GenerativeAI/Types/ContentGeneration/Config/SpeechConfig.cs b/src/GenerativeAI/Types/ContentGeneration/Config/SpeechConfig.cs index 1ad5d9c3..fbcf4c5a 100644 --- a/src/GenerativeAI/Types/ContentGeneration/Config/SpeechConfig.cs +++ b/src/GenerativeAI/Types/ContentGeneration/Config/SpeechConfig.cs @@ -13,4 +13,18 @@ public class SpeechConfig /// [JsonPropertyName("voiceConfig")] public VoiceConfig? VoiceConfig { get; set; } + + /// + /// Optional. The configuration for the multi-speaker setup. + /// It is mutually exclusive with the field. + /// + [JsonPropertyName("multiSpeakerVoiceConfig")] + public MultiSpeakerVoiceConfig? MultiSpeakerVoiceConfig { get; set; } + + /// + /// Optional. Language code (in BCP 47 format, e.g. "en-US") for speech synthesis. + /// Valid values are shown at the above URI. + /// + [JsonPropertyName("languageCode")] + public string? LanguageCode { get; set; } } \ No newline at end of file