faint-arm-51818
08/25/2025, 1:42 PMtall-airline-16756
08/25/2025, 1:42 PMtall-airline-16756
08/25/2025, 1:44 PMuser_state_changed, agent_state_changed, and user_input_transcribed.
• Metrics Collection: Gather detailed metrics for each part, like how long STT takes, LLM response times, TTS audio lengths, and VAD inference durations.
• VAD Event Monitoring: Tune into VAD-specific events to help debug voice activity detection, including idle times and inference durations.
• Turn Detection Debugging: Try adding a custom wrapper that shows internal probabilities for predicting when a turn ends.
• Audio Playback Monitoring: Keep an eye on audio playback events for TTS, such as where playback is at and if anything interrupts it.
• Function Tool Execution: Watch LLM function tool calls to see how execution details unfold.
• Usage Tracking: Use the built-in usage collector to log and summarize your session’s metrics easily.
If you’d like, I can share some detailed code examples for any of these methods—just let me know!
Sources: livekit-agents/livekit/agents/voice/agent_session.py | metrics/metrics_vad.py