microscopic-gold-81132
11/03/2025, 2:57 PMlivekit-agents library, does "thinking_sound" of BackgroundAudioPlayer work with Realtime models? The "ambient_sound" works just fine, but the "thinking_sound" does not work at all with google.beta.realtime.RealtimeModel ("gemini-live-2.5-flash-preview"). My intuition was that RT models do not have "thinking" state and therefore the sound is not played, but when I logged @session.on("agent_state_changed") it appeared that RT models do indeed enter thinking state too, so now I'm confused as to whether or not it's disabled through another way.tall-airline-16756
11/03/2025, 2:57 PMtall-airline-16756
11/03/2025, 2:58 PMBackgroundAudioPlayer from the LiveKit Agents library. Currently, this feature isn’t supported for Realtime models like google.beta.realtime.RealtimeModel when using the Node.js (TypeScript) implementation. This is because it relies on AudioMixer support, which helps manage multiple audio sources at once. So, if you add a "thinkingSound" option during initialization, you’ll see a gentle warning saying: "thinkingSound is not yet supported."
On a brighter note, the Python implementation of LiveKit Agents does fully support "thinking_sound" for Realtime models—it automatically plays the configured sound whenever the agent is in the "thinking" state, which is pretty handy!
If you’re working with Node.js and really want this feature, you might consider switching to the Python version or creating your own audio cues based on when the agent’s state changes. Please feel free to reach out if you’d like some help with that or have any other questions—I’m here for you!
Sources: plugins/google/README.md | livekit-agents/livekit/agents/voice/background_audio.py | Gemini Live API plugin | LiveKit docsmicroscopic-gold-81132
11/03/2025, 2:59 PM