Class ReplicatedVoiceConfig.Builder

java.lang.Object
com.google.genai.types.ReplicatedVoiceConfig.Builder
Enclosing class:
ReplicatedVoiceConfig

public abstract static class ReplicatedVoiceConfig.Builder extends Object
Builder for ReplicatedVoiceConfig.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • mimeType

      public abstract ReplicatedVoiceConfig.Builder mimeType(String mimeType)
      Setter for mimeType.

      mimeType: The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate.

    • clearMimeType

      @CanIgnoreReturnValue public ReplicatedVoiceConfig.Builder clearMimeType()
      Clears the value of mimeType field.
    • voiceSampleAudio

      public abstract ReplicatedVoiceConfig.Builder voiceSampleAudio(byte[] voiceSampleAudio)
      Setter for voiceSampleAudio.

      voiceSampleAudio: The sample of the custom voice.

    • clearVoiceSampleAudio

      @CanIgnoreReturnValue public ReplicatedVoiceConfig.Builder clearVoiceSampleAudio()
      Clears the value of voiceSampleAudio field.
    • consentAudio

      public abstract ReplicatedVoiceConfig.Builder consentAudio(byte[] consentAudio)
      Setter for consentAudio.

      consentAudio: Recorded consent verifying ownership of the voice. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate.

    • clearConsentAudio

      @CanIgnoreReturnValue public ReplicatedVoiceConfig.Builder clearConsentAudio()
      Clears the value of consentAudio field.
    • voiceConsentSignature

      public abstract ReplicatedVoiceConfig.Builder voiceConsentSignature(VoiceConsentSignature voiceConsentSignature)
      Setter for voiceConsentSignature.

      voiceConsentSignature: Signature of a previously verified consent audio. This should be populated with a signature generated by the server for a previous request containing the consent_audio field. When provided, the signature is verified instead of the consent_audio field to reduce latency. Requests will fail if the signature is invalid or expired.

    • voiceConsentSignature

      @CanIgnoreReturnValue public ReplicatedVoiceConfig.Builder voiceConsentSignature(VoiceConsentSignature.Builder voiceConsentSignatureBuilder)
      Setter for voiceConsentSignature builder.

      voiceConsentSignature: Signature of a previously verified consent audio. This should be populated with a signature generated by the server for a previous request containing the consent_audio field. When provided, the signature is verified instead of the consent_audio field to reduce latency. Requests will fail if the signature is invalid or expired.

    • clearVoiceConsentSignature

      @CanIgnoreReturnValue public ReplicatedVoiceConfig.Builder clearVoiceConsentSignature()
      Clears the value of voiceConsentSignature field.
    • build

      public abstract ReplicatedVoiceConfig build()