astonishing-gpu-67869
09/10/2025, 4:29 PMtall-airline-16756
09/10/2025, 4:29 PMtall-airline-16756
09/10/2025, 4:30 PMttft
metric from the LLMMetrics
object. This tells you the time from when the LLM request is sent until the very first token is generated.
• STT Latency: For non-streaming STT, the duration
metric shows how long it takes to create the transcript. If you’re working with streaming STT, this value will always be 0
. Also, the audio_duration
metric gives you the length of the audio input processed.
• TTS Latency (Time to First Byte): Here, the ttfb
metric from the TTSMetrics
object helps you measure the time it takes for the TTS model to generate the first byte of audio output.
To get a fuller picture, you can combine these relevant metrics—like end-of-utterance delay, LLM TTFT, and TTS TTFB—to calculate the total conversation latency.
If you’d like to dive deeper or see some hands-on examples, I highly recommend checking out the LiveKit Metrics API documentation and the Python agents examples repository. They’re great resources to help you get comfortable with the implementation.
Sources: metrics/metrics_llm.py | README.md | Agent Testing & Evaluation | livekit/livekit_composite | DeepWiki | Capturing metrics | LiveKit Docs | Logs, metrics, and telemetry | LiveKit Docs