few-zebra-58968
11/03/2025, 1:44 PMbackground_audio.play() method directly?
background_audio = BackgroundAudioPlayer(
thinking_sound=AudioConfig(
source=thinking_audio_path,
volume=0.6,
),
)
await background_audio.start(room=ctx.room, agent_session=session)
I liked the thinking_sound as it's way less work than manually setting this for function calls..green-cricket-85998
11/03/2025, 2:09 PMfew-zebra-58968
11/03/2025, 3:28 PMgreen-cricket-85998
11/03/2025, 4:35 PMfew-zebra-58968
11/03/2025, 4:38 PMrefined-appointment-81829
11/03/2025, 8:55 PMcreamy-tiger-14805
11/05/2025, 8:21 AMfew-zebra-58968
11/05/2025, 3:41 PMuser: "hello"
<music> // unexpected
agent: "hello, how are you?"
user: "i'm fine thanks. When's david available? I need an appointment"
<music> // unexpected
agent: "great! let me check his calendar, this might take a moment!
<agent_tool_call>
<music> // EXPECTED
....
agent: "alright, david is available starting at 3pm until 5pm today..."With realtime models this works, but i think for pipeline agents every llm call is interpreted as "thinking" state which in a normal conversation would result in the music being played every time the agent answers. I can record a short voice sample so you can hear what i mean. Hence my suggestion here:
I think instead of a workaround it would make sense to specify the thinking state of the pipeline agent differently. So the usual llm calls shouldn’t make the agent “think” as this is the normal agent turnor
can you somehow specify the threshold for the latency? Like only play the thinking music after 500ms or so. Because latency with pipeline is 200-500ms
refined-appointment-81829
11/05/2025, 5:19 PMthinking
https://github.com/livekit/agents/blob/main/livekit-agents/livekit/agents/voice/agent_activity.py
Quickly put this diagram together just not as a basic outlineflaky-beard-91685
12/01/2025, 7:15 AM