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)
-
Go to: https://aistudio.google.com/generate-speech?model=gemini-2.5-flash-preview-tts
-
Press “Run Ctrl” (Bottom right)
-
Listen to auto-generated sound that comes out imperfect, grainy, with white noise.
Steps to reproduce “B” (Via code)
-
Go to: https://aistudio.google.com/generate-speech?model=gemini-2.5-flash-preview-tts
-
Press “<> Get Code” (Top right)
-
Execute Python code autogenerated in any container machine just replacing your api key “GEMINI_API_KEY” and output wav filename “ENTER_FILE_NAME” values.
-
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.