Class SpeakerVoiceConfig
Configuration for a single speaker in a multi-speaker setup.
public record SpeakerVoiceConfig : IEquatable<SpeakerVoiceConfig>
- Inheritance
-
SpeakerVoiceConfig
- Implements
- Inherited Members
Properties
Speaker
The name of the speaker. This should be the same as the speaker name used in the prompt.
[JsonPropertyName("speaker")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Speaker { get; set; }
Property Value
VoiceConfig
The configuration for the voice of this speaker.
[JsonPropertyName("voiceConfig")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public VoiceConfig? VoiceConfig { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a SpeakerVoiceConfig object.
public static SpeakerVoiceConfig? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- SpeakerVoiceConfig
The deserialized SpeakerVoiceConfig object, or null if deserialization fails.