Skip to navigation

Latency Report

Sends STT, LLM, and TTS latency as one field per LatencyReport message; group the messages by turn for the full breakdown.

Voice Agent

The LatencyReport message is the richest latency signal the Agent API emits. Together, the reports break down latency across the full STT → LLM → TTS pipeline. Each LatencyReport message carries one field, so a turn’s breakdown arrives as several messages.

Purpose

LatencyReport lets you attribute latency to the right stage — for example, separating LLM time-to-first-token from TTS time, and isolating tool-call and thinking overhead. It’s fully supported and sent automatically; no configuration flag is required to receive it.

Fields

All fields are floats in seconds. Each message carries type plus one latency field, so collect the fields on the client rather than expecting the whole breakdown in one message.

FieldTypeWhat It Measures
typestringMust be "LatencyReport".
stt_latencynumberSpeech-to-text: audio received to transcript produced.
ttt_token_latencynumberTime to first token of any type (text, tool call, or thinking).
ttt_text_latencynumberTime to first text token from the LLM.
ttt_tool_latencynumberTime to first tool-call token from the LLM.
ttt_thinking_latencynumberTime to first thinking token from the LLM.
tts_latencynumberText-to-speech: first text token to first audio byte.
total_latencynumberEnd-to-end: user utterance end to first audio byte.

When reports arrive

  • LLM and TTS fields arrive once per turn, as separate messages within about 100 ms of each other. A plain turn sends ttt_token_latency, ttt_text_latency, tts_latency, total_latency.
  • Tool turns send ttt_token_latency and ttt_tool_latency before the FunctionCallRequest. After your FunctionCallResponse, ttt_token_latency arrives again with the same value, followed by ttt_text_latency, tts_latency, and total_latency.
  • stt_latency arrives on its own schedule, not with the turn’s other fields. With Flux STT it arrives roughly every 240 ms throughout the session, including silence. With Nova-3 it arrives once per turn.

Example messages

A plain turn on Flux STT sends these four messages, in this order, alongside the periodic stt_latency messages:

JSON
{"type": "LatencyReport", "ttt_token_latency": 0.46}
{"type": "LatencyReport", "ttt_text_latency": 0.46}
{"type": "LatencyReport", "tts_latency": 0.10}
{"type": "LatencyReport", "total_latency": 0.62}

A periodic speech-to-text report:

JSON
{"type": "LatencyReport", "stt_latency": 0.04}

Use cases

Capture LatencyReport the same way as every other frame, and group the fields by turn (a turn’s fields start with its first ttt_token_latency), to chart and troubleshoot latency:

  • Attribute end-to-end latency to the STT, LLM, or TTS stage.
  • Separate LLM time-to-first-token from TTS time.
  • Isolate tool-call and thinking overhead from text generation.

For an end-to-end logging pattern that persists every WebSocket frame, see Session observability.