Table of Contents

Class MultiSpeakerVoiceConfig

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Configuration for a multi-speaker text-to-speech request.

public record MultiSpeakerVoiceConfig : IEquatable<MultiSpeakerVoiceConfig>
Inheritance
MultiSpeakerVoiceConfig
Implements
Inherited Members

Properties

SpeakerVoiceConfigs

A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.

[JsonPropertyName("speakerVoiceConfigs")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<SpeakerVoiceConfig>? SpeakerVoiceConfigs { get; set; }

Property Value

List<SpeakerVoiceConfig>

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a MultiSpeakerVoiceConfig object.

public static MultiSpeakerVoiceConfig? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

MultiSpeakerVoiceConfig

The deserialized MultiSpeakerVoiceConfig object, or null if deserialization fails.