hundreds-rainbow-68836
03/06/2026, 12:53 PMtall-airline-16756
03/06/2026, 12:53 PMtall-airline-16756
03/06/2026, 12:54 PMcredentials_file, env var GOOGLE_APPLICATION_CREDENTIALS, or credentials_info.
3. Does the timeout happen after a consistent duration (e.g., always ~30s)? Or randomly?
4. Are you running LiveKit Cloud or a self-hosted LiveKit server? If self-hosted, what region and network setup is the server in?
5. Whether you see any LiveKit agent logs or metrics around the time of the timeout (request/response times, errors).
Possible causes and short-term mitigations
• Credentials/permission issue: Ensure the service account has Text-to-Speech enabled. If credentials fail mid-request, Google TTS might start streaming audio then fail on a follow-up call.
• Network/latency/timeouts: Agent latency and proximity to Google endpoints matter. If your LiveKit instance is far from the Google endpoint you’re using, requests can time out. Deploy closer or increase timeouts if possible.
• Frame size / streaming settings: Very large batched requests can cause longer processing times. Try smaller frame sizes (Google recommends 100ms but smaller may work better in practice) or stream in small chunks.
• Recoverability: Add retries or a fallback TTS provider so a single failed request doesn’t drop the audio mid-call.
If you want, send the error log and your config snippet and I’ll look through them and propose the exact code/config changes to test next. I can also suggest a small reproducible test you can run locally to prove whether the issue is LiveKit integration vs Google credentials/network.
Sources: Google Cloud TTS integration guide | LiveKit Documentation | Agents Framework | livekit/livekit_composite | DeepWiki | Live Conversations with AI using ChatGPT and WebRTC | Python Agents: Handling exceptions in your entrypoint | LiveKit