Class VoiceInput

java.lang.Object
com.google.genai.gaos.models.voices.VoiceInput

public class VoiceInput extends Object
VoiceInput

A voice resource representing either a custom voice (created via `CreateVoice`) or a prebuilt system voice (returned by `ListVoices`).

  • Constructor Details

  • Method Details

    • accent

      public Optional<String> accent()
      Optional. Regional accent descriptor (e.g. "American", "British").
    • context

      public Optional<String> context()
      Optional. Optimal usage context or domain (e.g. "Conversational", "Audiobook", "News").
    • description

      public Optional<String> description()
      Optional. Descriptive summary of vocal timbre, personality, and tone.
    • displayName

      public Optional<String> displayName()
      Optional. User-provided display name for a stored voice (`store = true`), or the catalog name for a prebuilt voice.
    • gender

      public Optional<String> gender()
      Optional. Perceived voice gender presentation (e.g. "female", "male", "neutral").
    • languageCode

      public Optional<String> languageCode()
      Optional. Primary BCP-47 language tag (e.g. "en-US", "fr-FR").
    • model

      public Optional<String> 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

      public Optional<String> persona()
      Optional. Intended persona or character archetype (e.g. "Warm, Friendly", "Narrator").
    • pitch

      public Optional<Pitch> pitch()
    • prompted

      public Optional<PromptedVoice> prompted()
      Parameters for prompted voice generation. Required in `CreateVoice` when `type` is `"prompted"`. Returned in `CreateVoice`, `GetVoice`, and `ListVoices` responses for prompted voices.
    • regionCode

      public Optional<String> regionCode()
      Optional. ISO 3166-1 alpha-2 or UN M.49 geographic region code (e.g. "US", "GB", "001").
    • replicated

      public Optional<ReplicatedVoice> replicated()
      Input only. Parameters for replicated voice generation. Required on input when `type` is `"replicated"`. Not returned in responses.
    • sampleAudio

      public Optional<AudioData> sampleAudio()
      Audio payload used for voice creation.
    • type

      public Optional<VoiceType> type()
    • builder

      public static VoiceInput.Builder builder()
    • withAccent

      public VoiceInput withAccent(@Nullable String accent)
      Optional. Regional accent descriptor (e.g. "American", "British").
    • withContext

      public VoiceInput withContext(@Nullable String context)
      Optional. Optimal usage context or domain (e.g. "Conversational", "Audiobook", "News").
    • withDescription

      public VoiceInput withDescription(@Nullable String description)
      Optional. Descriptive summary of vocal timbre, personality, and tone.
    • withDisplayName

      public VoiceInput withDisplayName(@Nullable String displayName)
      Optional. User-provided display name for a stored voice (`store = true`), or the catalog name for a prebuilt voice.
    • withGender

      public VoiceInput withGender(@Nullable String gender)
      Optional. Perceived voice gender presentation (e.g. "female", "male", "neutral").
    • withLanguageCode

      public VoiceInput withLanguageCode(@Nullable String languageCode)
      Optional. Primary BCP-47 language tag (e.g. "en-US", "fr-FR").
    • withModel

      public VoiceInput withModel(@Nullable String 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.
    • withPersona

      public VoiceInput withPersona(@Nullable String persona)
      Optional. Intended persona or character archetype (e.g. "Warm, Friendly", "Narrator").
    • withPitch

      public VoiceInput withPitch(@Nullable Pitch pitch)
    • withPrompted

      public VoiceInput withPrompted(@Nullable PromptedVoice prompted)
      Parameters for prompted voice generation. Required in `CreateVoice` when `type` is `"prompted"`. Returned in `CreateVoice`, `GetVoice`, and `ListVoices` responses for prompted voices.
    • withRegionCode

      public VoiceInput withRegionCode(@Nullable String regionCode)
      Optional. ISO 3166-1 alpha-2 or UN M.49 geographic region code (e.g. "US", "GB", "001").
    • withReplicated

      public VoiceInput withReplicated(@Nullable ReplicatedVoice replicated)
      Input only. Parameters for replicated voice generation. Required on input when `type` is `"replicated"`. Not returned in responses.
    • withSampleAudio

      public VoiceInput withSampleAudio(@Nullable AudioData sampleAudio)
      Audio payload used for voice creation.
    • withType

      public VoiceInput withType(@Nonnull VoiceType type)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object