Streaming Multimodal Interaction › Serving a Streaming System: A Latency Accounting
Language AI HandbookAll chapters If a critical path is purely serialized, its elapsed latency is the sum of its nonoverlapping stage durations. The next fixture assumes capture, VAD, partial transcription, endpointing, prefill, first token and playout all run serially. The first six intervals total 960 ms to the decoded token. The final 40 ms yields 1,000 ms from initial capture to first audio. These sums use hypothetical stage durations and are independent of the earlier trace.
In a live system, earlier chunks may be processed during the user’s turn and per-stage spans can overlap. Even when every stage is serial, summing stage quantiles generally gives a different result from taking a quantile of total latency. Measure the total for each trial to get the listener-facing distribution. Inspect the longest observed dependency chain when diagnosing a slow path.
PythonIn [18]Expand
hops = {
"capture": 30,
"vad": 60,
"asr partial": 150,
"endpointing": 300,
"model prefill": 300,
"first token": 120,
"playout startup": 40,
}
total = sum(hops.values())ConsoleOut [19]Expand
Serial capture to first audio: 1000 ms
VisualizationOut [21]Expand

The stages also motivate a scenario that separates prefill improvement from critical-path improvement. Suppose prefill decreases by 60 ms while 40 ms of that reduction occurs during work that was going to run anyway. The end-to-end gain is 20 ms under those assumptions. The same prefill change gives the full 60 ms in the serial fixture. A trace can test whether an optimization changed the critical path before attributing a system-level latency gain to its local measurements.
An experiment can measure concurrent stages from observed timestamps on the same replay trace. Record their intervals, predecessors, and whether the relevant endpoint needs all of them. For two parallel prerequisites with 50 ms and 80 ms remaining from a shared start, the earliest downstream start is 80 ms after that start. Further shortening the 50 ms prerequisite leaves this downstream start unchanged. Network wait, internal scheduling and playback startup belong in that model when they constrain start time.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!