Class VoiceOutput
A voice resource representing either a custom voice (created via `CreateVoice`) or a prebuilt system voice (returned by `ListVoices`).
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionVoiceOutput(VoiceType type) VoiceOutput(String accent, String context, String description, String displayName, OffsetDateTime expireTime, String gender, String id, String key, String languageCode, String model, String persona, Pitch pitch, PromptedVoice prompted, String regionCode, AudioData sampleAudio, VoiceType type, Usage usage) -
Method Summary
Modifier and TypeMethodDescriptionaccent()Optional.static VoiceOutput.Builderbuilder()context()Optional.Optional.Optional.booleanOutput only.gender()Optional.inthashCode()id()Output only.key()Output only.Optional.model()Optional.persona()Optional.pitch()prompted()Parameters for prompted voice generation.Optional.Audio payload used for voice creation.toString()type()usage()Statistics on the interaction request's token usage.withAccent(String accent) Optional.withContext(String context) Optional.withDescription(String description) Optional.withDisplayName(String displayName) Optional.withExpireTime(OffsetDateTime expireTime) Output only.withGender(String gender) Optional.Output only.Output only.withLanguageCode(String languageCode) Optional.Optional.withPersona(String persona) Optional.withPrompted(PromptedVoice prompted) Parameters for prompted voice generation.withRegionCode(String regionCode) Optional.withSampleAudio(AudioData sampleAudio) Audio payload used for voice creation.Statistics on the interaction request's token usage.
-
Constructor Details
-
VoiceOutput
public VoiceOutput(@Nullable String accent, @Nullable String context, @Nullable String description, @Nullable String displayName, @Nullable OffsetDateTime expireTime, @Nullable String gender, @Nullable String id, @Nullable String key, @Nullable String languageCode, @Nullable String model, @Nullable String persona, @Nullable Pitch pitch, @Nullable PromptedVoice prompted, @Nullable String regionCode, @Nullable AudioData sampleAudio, @Nonnull VoiceType type, @Nullable Usage usage) -
VoiceOutput
-
-
Method Details
-
accent
Optional. Regional accent descriptor (e.g. "American", "British"). -
context
Optional. Optimal usage context or domain (e.g. "Conversational", "Audiobook", "News"). -
description
Optional. Descriptive summary of vocal timbre, personality, and tone. -
displayName
Optional. User-provided display name for a stored voice (`store = true`), or the catalog name for a prebuilt voice. -
expireTime
Output only. The timestamp at which a custom stored voice (`store = true`) or replicated voice key (`store = false`) expires. For custom stored voices (`store = true`), this expiration time is extended when the voice is used for speech synthesis or as a `base_voice` in `CreateVoice`. Unset for prebuilt catalog voices (`"prebuilt"`), which do not expire. -
gender
Optional. Perceived voice gender presentation (e.g. "female", "male", "neutral"). -
id
Output only. The unique identifier of the voice.* For Google-managed custom voices (`store = true`), this is a generated ID with prefix `voice_` (for example, `voice_abc123def456`). Pass `voices/{id}` as the `name` in `GetVoice` and `DeleteVoice`, and pass `{id}` directly to `SpeechConfig.voice_config.voice` (or `SpeechConfig.voice`) during speech synthesis. * For prebuilt catalog voices (`"prebuilt"` returned by `ListVoices`), this is the speaker name (for example, `Puck` or `Charon`). * Unset when `CreateVoice` is called with `store = false`.
-
key
Output only. The client-managed voice replication key (with prefix `voicekey_`). Returned only by `CreateVoice` when `type` is `"replicated"` and `store` is `false`. Pass this key to `SpeechConfig.voice_config.voice` (or `SpeechConfig.voice`) during speech synthesis. -
languageCode
Optional. Primary BCP-47 language tag (e.g. "en-US", "fr-FR"). -
model
Optional. The model used to design or replicate the voice. If omitted in `CreateVoice`, defaults to the latest supported voice design model. Returned in `CreateVoice`, `GetVoice`, and `ListVoices` responses for custom voices (`"prompted"` and `"replicated"`); unset for `"prebuilt"` voices. Created voices can be synthesized across any supported TTS synthesis model. -
persona
Optional. Intended persona or character archetype (e.g. "Warm, Friendly", "Narrator"). -
pitch
-
prompted
Parameters for prompted voice generation. Required in `CreateVoice` when `type` is `"prompted"`. Returned in `CreateVoice`, `GetVoice`, and `ListVoices` responses for prompted voices. -
regionCode
Optional. ISO 3166-1 alpha-2 or UN M.49 geographic region code (e.g. "US", "GB", "001"). -
sampleAudio
Audio payload used for voice creation. -
type
-
usage
Statistics on the interaction request's token usage. -
builder
-
withAccent
Optional. Regional accent descriptor (e.g. "American", "British"). -
withContext
Optional. Optimal usage context or domain (e.g. "Conversational", "Audiobook", "News"). -
withDescription
Optional. Descriptive summary of vocal timbre, personality, and tone. -
withDisplayName
Optional. User-provided display name for a stored voice (`store = true`), or the catalog name for a prebuilt voice. -
withExpireTime
Output only. The timestamp at which a custom stored voice (`store = true`) or replicated voice key (`store = false`) expires. For custom stored voices (`store = true`), this expiration time is extended when the voice is used for speech synthesis or as a `base_voice` in `CreateVoice`. Unset for prebuilt catalog voices (`"prebuilt"`), which do not expire. -
withGender
Optional. Perceived voice gender presentation (e.g. "female", "male", "neutral"). -
withId
Output only. The unique identifier of the voice.* For Google-managed custom voices (`store = true`), this is a generated ID with prefix `voice_` (for example, `voice_abc123def456`). Pass `voices/{id}` as the `name` in `GetVoice` and `DeleteVoice`, and pass `{id}` directly to `SpeechConfig.voice_config.voice` (or `SpeechConfig.voice`) during speech synthesis. * For prebuilt catalog voices (`"prebuilt"` returned by `ListVoices`), this is the speaker name (for example, `Puck` or `Charon`). * Unset when `CreateVoice` is called with `store = false`.
-
withKey
Output only. The client-managed voice replication key (with prefix `voicekey_`). Returned only by `CreateVoice` when `type` is `"replicated"` and `store` is `false`. Pass this key to `SpeechConfig.voice_config.voice` (or `SpeechConfig.voice`) during speech synthesis. -
withLanguageCode
Optional. Primary BCP-47 language tag (e.g. "en-US", "fr-FR"). -
withModel
Optional. The model used to design or replicate the voice. If omitted in `CreateVoice`, defaults to the latest supported voice design model. Returned in `CreateVoice`, `GetVoice`, and `ListVoices` responses for custom voices (`"prompted"` and `"replicated"`); unset for `"prebuilt"` voices. Created voices can be synthesized across any supported TTS synthesis model. -
withPersona
Optional. Intended persona or character archetype (e.g. "Warm, Friendly", "Narrator"). -
withPitch
-
withPrompted
Parameters for prompted voice generation. Required in `CreateVoice` when `type` is `"prompted"`. Returned in `CreateVoice`, `GetVoice`, and `ListVoices` responses for prompted voices. -
withRegionCode
Optional. ISO 3166-1 alpha-2 or UN M.49 geographic region code (e.g. "US", "GB", "001"). -
withSampleAudio
Audio payload used for voice creation. -
withType
-
withUsage
Statistics on the interaction request's token usage. -
equals
-
hashCode
public int hashCode() -
toString
-