Gemini TTS API Static Noise

Hi,

I am trying to use Gemini 2.5 Pro/Flash TTS. However when I use the exact script provided in the google aistudio , the audio responds and saves, but is just static noise. The duration varies with the length of the text though.

Please help.
Thanks

Environment details

  • Programming language: Python 3.14.3

  • OS: Debian GNU/Linux 13.3 (trixie)

Steps to reproduce “A” (No code)

  1. Go to: https://aistudio.google.com/generate-speech?model=gemini-2.5-flash-preview-tts

  2. Press “Run Ctrl” (Bottom right)

  3. Listen to auto-generated sound that comes out imperfect, grainy, with white noise.

Steps to reproduce “B” (Via code)

  1. Go to: https://aistudio.google.com/generate-speech?model=gemini-2.5-flash-preview-tts

  2. Press “<> Get Code” (Top right)

  3. Execute Python code autogenerated in any container machine just replacing your api key “GEMINI_API_KEY” and output wav filename “ENTER_FILE_NAME” values.

  4. Listen to auto-generated sound that comes out imperfect, grainy, with white noise.

(My environment: Python 3.14.3 - OS: Debian GNU/Linux 13.3 - (trixie) - google-genai version: 1.69.0 (https://github.com/googleapis/python-genai) )

Thanks for looking.