Package com.google.genai.types
Class SpeechConfig
-
- All Implemented Interfaces:
public abstract class SpeechConfig extends JsonSerializable
Config for speech generation and transcription.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classSpeechConfig.BuilderBuilder for SpeechConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description SpeechConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<VoiceConfig>voiceConfig()The configuration in case of single-voice output. abstract Optional<String>languageCode()Optional. abstract Optional<MultiSpeakerVoiceConfig>multiSpeakerVoiceConfig()The configuration for a multi-speaker text-to-speech request. static SpeechConfig.Builderbuilder()Instantiates a builder for SpeechConfig. abstract SpeechConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static SpeechConfigfromJson(String jsonString)Deserializes a JSON string to a SpeechConfig 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
-
voiceConfig
abstract Optional<VoiceConfig> voiceConfig()
The configuration in case of single-voice output.
-
languageCode
abstract Optional<String> languageCode()
Optional. The language code (ISO 639-1) for the speech synthesis.
-
multiSpeakerVoiceConfig
abstract Optional<MultiSpeakerVoiceConfig> multiSpeakerVoiceConfig()
The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
-
builder
static SpeechConfig.Builder builder()
Instantiates a builder for SpeechConfig.
-
toBuilder
abstract SpeechConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static SpeechConfig fromJson(String jsonString)
Deserializes a JSON string to a SpeechConfig object.
-
-
-
-