Package com.google.genai.types
Class SpeakerVoiceConfig
-
- All Implemented Interfaces:
public abstract class SpeakerVoiceConfig extends JsonSerializable
Configuration for a single speaker in a multi-speaker setup.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classSpeakerVoiceConfig.BuilderBuilder for SpeakerVoiceConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description SpeakerVoiceConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>speaker()Required. abstract Optional<VoiceConfig>voiceConfig()Required. static SpeakerVoiceConfig.Builderbuilder()Instantiates a builder for SpeakerVoiceConfig. abstract SpeakerVoiceConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static SpeakerVoiceConfigfromJson(String jsonString)Deserializes a JSON string to a SpeakerVoiceConfig object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
speaker
abstract Optional<String> speaker()
Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
-
voiceConfig
abstract Optional<VoiceConfig> voiceConfig()
Required. The configuration for the voice of this speaker.
-
builder
static SpeakerVoiceConfig.Builder builder()
Instantiates a builder for SpeakerVoiceConfig.
-
toBuilder
abstract SpeakerVoiceConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static SpeakerVoiceConfig fromJson(String jsonString)
Deserializes a JSON string to a SpeakerVoiceConfig object.
-
-
-
-