brief-zebra-39660
04/06/2026, 11:29 PMtall-airline-16756
04/06/2026, 11:29 PMtall-airline-16756
04/06/2026, 11:30 PMBackgroundAudioPlayer.thinking_sound to only tool/function calls or to set a min_duration_ms. thinking_sound fires whenever the agent enters the "thinking" state (which happens for any LLM turn, not just tool execution).
Workarounds you can use:
• Remove thinking_sound from the automatic BackgroundAudioPlayer config and play audio manually inside your tool functions using background_audio.play() (or context.session.say() if you prefer TTS). This ensures the typing/hold sound only runs during actual tool execution.
• Pre-synthesize and cache any audio clips to avoid TTS latency when playing them during tool calls.
• If needed, use context.disallow_interruptions() while playing a tool-specific audio cue to prevent premature interruption.
If you want, tell me which SDK/language you’re using and I’ll give a short code example for playing the audio only inside tool execution.
Sources: Background audio | LiveKit Documentation | Turns overview | LiveKit Documentation | External data and RAG | LiveKit Documentation | Function tool definition | LiveKit Documentation | Audio customization | LiveKit Documentation, with interactive elements