Voice Replication CreateVoice returns HTTP 500 with nested INVALID_ARGUMENT for consent verification

Hello Gemini API team,

We are investigating a Voice Replication CreateVoice validation failure. We have stopped making registration requests and are seeking guidance before any further submission.

  • Endpoint/model: POST /v1beta/voices, gemini-3.8-flash-tts, store: true, type: replicated.
  • The request body follows the published REST example: source_audio and consent_audio, each containing base64-encoded 24 kHz mono PCM16 WAV with mime_type: audio/wav.
  • The reference is a continuous 25.2-second natural speech recording. The consent recordings are real recordings from the person who provided the reference, according to the account holder; no synthetic speech or phrase splicing was used.
  • A 12.096-second Japanese consent recording was locally transcribed as the full published ja-JP consent sentence, but the service returned HTTP 500 with nested INVALID_ARGUMENT: Consent flow failed. The recorded phrase didn't match the text on screen. Increasing only its level produced the same response.
  • A separate English consent recording received the same response. A local ASR transcript did not confirm the exact ending of the published English sentence, so we do not claim that this recording is verbatim.
  • With an earlier Japanese consent recording and this reference, the service instead returned nested INVALID_ARGUMENT: Voice mismatch detected. A different reference with that earlier Japanese consent had previously succeeded in the same project.

Could you clarify whether CreateVoice accepts any explicit consent recognition locale, and whether Voice.language_code affects consent validation? Are there undisclosed consent-audio limits or diagnostic fields that could identify which check failed? Is the HTTP 500 wrapper around this nested INVALID_ARGUMENT expected? Please advise on a way to investigate without repeatedly uploading biometric recordings. We can provide request timestamps and further diagnostics through a private Google support channel if needed.

We have intentionally omitted audio, transcripts of the reference speech, API credentials, project identifiers, and voice identifiers from this initial message.

Hey Send code here Okok

Hello @taka000825,

Thank you for the detailed write-up.

The nested error message is the part to act on, as it tells you which check failed: “The recorded phrase didn’t match the text on screen” means the consent check failed, and “Voice mismatch detected” means the reference and consent clips were not recognized as the same speaker.

There is no separate consent language setting in the request. The consent clip only needs to contain the exact consent statement in one of the supported languages. Before trying again, please check the following:

  • Read the consent statement word for word from the supported consent phrases table for one of the listed languages: Google AI Studio
  • Record the reference and consent clips from the same adult speaker on the same microphone in the same quiet setting.
  • Use a 10-30 second clean natural speech reference clip, resampled to 24kHz mono 16-bit WAV.

You can find the full requirements here: Google AI Studio