Class SpeechConfig
Config for speech generation and transcription.
public record SpeechConfig : IEquatable<SpeechConfig>
- Inheritance
-
SpeechConfig
- Implements
- Inherited Members
Properties
LanguageCode
Optional. The language code (ISO 639-1) for the speech synthesis.
[JsonPropertyName("languageCode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? LanguageCode { get; set; }
Property Value
MultiSpeakerVoiceConfig
The configuration for a multi-speaker text-to-speech request. This field is mutually
exclusive with voice_config.
[JsonPropertyName("multiSpeakerVoiceConfig")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public MultiSpeakerVoiceConfig? MultiSpeakerVoiceConfig { get; set; }
Property Value
VoiceConfig
The configuration in case of single-voice output.
[JsonPropertyName("voiceConfig")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public VoiceConfig? VoiceConfig { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a SpeechConfig object.
public static SpeechConfig? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- SpeechConfig
The deserialized SpeechConfig object, or null if deserialization fails.