Glitch Sound TTS 3.8 Model

Hasn’t anyone noticed this sound yet? The `gemini-3.8-flash-tts` model has a screeching sound when it reaches the last second: https//limewire.com/d/1aqc3#IsaqXnGrOc

Hello @NeonByteNomad ,

Thanks for reporting this. For unary (non-streaming) requests, gemini-3.8-flash-tts returns complete WAV audio with a header by default, not headerless raw PCM. If your code treats the whole returned buffer as raw PCM (for example, wrapping it in a new WAV header or decoding it as raw samples), a short noise can be heard at the very end of the clip.

Could you please try one of the following:

  • Write the returned audio bytes directly to a .wav file, or open them with a WAV reader, instead of reading the whole buffer as raw PCM.
  • If you need raw PCM, set response_format mime_type to audio/l16.

More details are in the audio output formats section. If the sound still occurs after this, please share your request code (without the API key) and the input text and voice of an affected clip.

Thanks, that was it. The model returns a WAV with a header now, and I was still decoding it as raw PCM.

My old command forced raw PCM input, so the header and trailing bytes were decoded as audio:

base64 -d audio.b64 | ffmpeg -f s16le -ar 24000 -i - -c:a libopus -b:a 32k out.ogg

Now I decode the base64 first and let ffmpeg read the WAV header itself:

base64 -d audio.b64 > audio.wav
ffmpeg -y -i audio.wav -c:a libopus -b:a 32k out.ogg

For raw PCM (the older gemini-2.5-flash-preview-tts), the format flags are still needed:

base64 -d audio.b64 > audio.pcm
ffmpeg -y -f s16le -ar 24000 -i audio.pcm -c:a libopus -b:a 32k out.ogg

The screech is gone. It was a bug in my code, not the model.