Package com.google.genai.types
Class VoiceConfig
-
- All Implemented Interfaces:
public abstract class VoiceConfig extends JsonSerializable
The configuration for the voice to use.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classVoiceConfig.BuilderBuilder for VoiceConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description VoiceConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<ReplicatedVoiceConfig>replicatedVoiceConfig()The configuration for a replicated voice, which is a clone of a user's voice that can be used for speech synthesis. abstract Optional<PrebuiltVoiceConfig>prebuiltVoiceConfig()The configuration for a prebuilt voice. static VoiceConfig.Builderbuilder()Instantiates a builder for VoiceConfig. abstract VoiceConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static VoiceConfigfromJson(String jsonString)Deserializes a JSON string to a VoiceConfig 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
-
replicatedVoiceConfig
abstract Optional<ReplicatedVoiceConfig> replicatedVoiceConfig()
The configuration for a replicated voice, which is a clone of a user's voice that can be used for speech synthesis. If this is unset, a default voice is used.
-
prebuiltVoiceConfig
abstract Optional<PrebuiltVoiceConfig> prebuiltVoiceConfig()
The configuration for a prebuilt voice.
-
builder
static VoiceConfig.Builder builder()
Instantiates a builder for VoiceConfig.
-
toBuilder
abstract VoiceConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static VoiceConfig fromJson(String jsonString)
Deserializes a JSON string to a VoiceConfig object.
-
-
-
-