fierce-zoo-69908
05/20/2026, 11:29 AMlivekit.agents._exceptions.APIConnectionError: Failed to connect to Gemini Live
google.genai.errors.APIError: 1007 None. Cannot extract voices from a non-audiotall-airline-16756
05/20/2026, 11:29 AMtall-airline-16756
05/20/2026, 11:30 AMAPIConnectionError: Failed to connect to Gemini Live and
• google.genai.errors.APIError: 1007 None. Cannot extract voices from a non-audio.
To help diagnose and fix this, please confirm these items and share the requested details so I can pinpoint the root cause:
1. Environment & auth
◦ Are you setting GOOGLE_API_KEY in the environment where the agent runs? (This is required for Gemini Live.)
◦ Are you running locally, in CI, or on a cloud host? Any corporate firewall / proxy / NAT that could block WebSocket/WebRTC?
1. Media configuration
◦ Is the agent configured to use audio modalities? (Confirm modalities includes "AUDIO" and that audio_input=True is enabled in your Room/agent options.)
◦ Are you using WebRTC audio tracks from the LiveKit room? Confirm the participant actually publishes an audio track and that LiveKit RoomOptions allows audio.
1. Payload/stream details
◦ Is the data sent to Gemini actually audio (PCM/Opus via WebRTC) or might a binary/text message have been routed to the audio stream by mistake? The 1007 error means non-audio data was presented where audio was expected.
◦ Are you using any custom transcoders/recorders or changing codecs that could corrupt the audio stream?
1. Logs & repro
◦ Share minimal server/client logs around the time of the error (WebSocket connect attempts, any WebRTC track events, agent debug logs).
◦ If possible, share a short reproducible sequence: steps to switch model, how the audio track is attached, and exact code/config snippets for the agent/room setup (mask any secrets).
Quick troubleshooting steps to try now
• Verify GOOGLE_API_KEY is present and valid.
• Confirm the participant publishes an audio track in the LiveKit room and audio_input is enabled.
• Ensure modalities includes "AUDIO" for the Gemini model.
• Run a connection test for WebSocket/WebRTC/TURN (see the connection test utility) to rule out network blocking: https://kb.livekit.io/articles/3972989092-diagnosing-connection-errors-with-connectionchecker
If you send the environment, relevant config snippets, and the small log excerpt requested above, I’ll review them and provide the next concrete fix.
Sources: Diagnosing Connection Errors with Connection Test Utility, with interactive elementsfierce-zoo-69908
05/20/2026, 11:35 AMtall-airline-16756
05/20/2026, 11:35 AMfierce-zoo-69908
05/20/2026, 11:38 AM