what is the best way to track if the playback is s...
# agents
t
what is the best way to track if the playback is still running ? can it be possible that agent state is not speaking and yet, playback is running? if yes then how to check it?? please help?
r
Sorry I don't understand this question.
t
so, there is a method called:
wait for playout
it makes us wait for audio to finish. But, I want to know if audio is currently being sent to user right now or not.
r
Do you mean like if background audio is playing?
t
Not background audio. Here: https://docs.livekit.io/agents/multimodality/audio/
wait_for_playout()
this tells us if agent has finished speaking.