adorable-engine-68435
11/04/2025, 4:12 AMtall-airline-16756
11/04/2025, 4:12 AMtall-airline-16756
11/04/2025, 4:13 AMSTTMetrics (e.g., audio_duration, duration, streamed)
◦ LLM: LLMMetrics (ttft, duration, token counts)
◦ TTS: TTSMetrics (ttfb, duration, audio_duration)
◦ Turn timing: EOUMetrics (end_of_utterance_delay, transcription_delay, on_user_turn_completed_delay)
◦ Docs: Logs, metrics, and telemetry
• Correlate by turn:
◦ Use the shared speech_id in LLM/TTS/EOU metrics to stitch STT → LLM → TTS for each user turn.
• Subscribe and emit:
◦ Enable AgentSession metrics and subscribe to the metrics_collected event to receive these records from your agent runtime. Agent session integration
• Trace end-to-end:
◦ Enable OpenTelemetry tracing to capture timing across nodes (session start → STT → LLM → TTS). Metrics & telemetry
• What to watch (targets):
◦ TTFT (LLM): < 300 ms
◦ TTFB (TTS): < 200 ms
◦ End-to-end (speech end → agent speech start): < 1000 ms
◦ Latency tips: deploy agents close to your STT/LLM/TTS providers. Operational guidance
Would you like example code to subscribe to metrics_collected and compute end-to-end latency per speech_id?
Sources: Operational Guidance & Best Practices | livekit/livekit_composite | DeepWik... | Logs, metrics, and telemetry | LiveKit Docs | Agent Session & Client Integration | livekit/livekit_composite | DeepWiki | Community & Support | livekit/livekit_composite | DeepWiki