The Latency Knob Below Your Voice Agent

Notebook setup: suppose the application requests a 20 ms jitter-buffer target and the dashboard repeats “20 ms.” That would confirm configuration, not receiver behavior.

jitterBufferTarget is one of those controls that looks end-to-end because its unit is familiar. It is actually much narrower: a receive-side request about how much media the jitter buffer should hold.

Observation to keep separate

Write two labels before looking at a graph:

requested target, ms — the value assigned by the application

observed receiver-buffer delay, ms — an interval average derived from receiver statistics

Do not merge them into a field called “jitter delay.” The browser may clamp the requested target within its own minimum and maximum, those bounds can change with network and memory conditions, and the resulting delay can move gradually. A requested step is not evidence of an observed step.

Scratch calculation

The WebRTC Statistics specification defines jitterBufferDelay as cumulative seconds spent in the buffer by emitted audio samples or video frames. jitterBufferEmittedCount is the cumulative count of those emitted samples or frames. The useful ratio comes from deltas over an interval, not the lifetime totals.

Here is a hypothetical calculation, not a captured call:

same inbound-rtp stats object id: audio-inbound-7

before: jitterBufferDelay = 12.4 seconds
        jitterBufferEmittedCount = 2000

after:  jitterBufferDelay = 13.0 seconds
        jitterBufferEmittedCount = 2120

delta delay = 13.0 - 12.4 = 0.6 seconds
delta count = 2120 - 2000 = 120 emitted samples

interval average = 0.6 seconds / 120 = 0.005 seconds
                 = 0.005 x 1000 = 5 milliseconds

The comparison is therefore requested 20 ms versus observed interval average 5 ms. It is not 20 versus 0.6: the cumulative seconds delta must be divided by the emitted-count delta and converted to milliseconds. It is also not safe to subtract counters from different stats objects. Preserve the same object identifier; if the object is replaced or counters reset, start a new interval. Skip the ratio when the count delta is zero.

What the knob is allowed to mean

The WebRTC specification defines RTCRtpReceiver.jitterBufferTarget as a nullable target duration in milliseconds. More buffering gives the receiver room to absorb network jitter and can influence retransmission and packet-loss recovery, at the cost of playout delay. Less buffering may reduce that delay while increasing the chance of running out of frames.

That tradeoff belongs to the receiver buffer. It does not include microphone capture, upstream transport before receipt, ASR, model inference, TTS, or output-device playout. A five-millisecond receiver average is not a five-millisecond voice agent.

The observation interval matters too. Keep its timestamps and network context beside the two deltas. The specifications define the statistic and control behavior, not a universal test duration or product threshold. Comparing two target settings across different traffic conditions can turn browser adaptation into a fake target effect.

Silence is not a zero-delay control

Discontinuous transmission deserves a note in the margin. The WebRTC specification says an average jitter-buffer delay is expected even with DTX: when packets resume after silence, a larger target can lead the user agent to buffer them instead of playing them immediately.

That is a mechanism described by the specification, not a quantified result for a particular browser, codec, or call. Mark whether DTX was active and where silence transitions occurred; do not claim a post-silence latency without measuring it.

Close the notebook with the missing evidence

The debugging question is not “did the app set the knob?” It is “what did this receiver do over a comparable interval, and what else changed while it adapted?” Keeping the request, observed ratio, object identity, and network context separate prevents a small transport control from absorbing the whole voice-agent latency story.

Please attach two same-ID inbound-rtp snapshots, the requested target in milliseconds, interval timestamps, network context, and whether DTX was active.

I would treat a target change as the start of an observation window, not as an
instantaneous state change. The specification allows the user agent to apply the
target gradually, and its effective bounds can move with network conditions and
memory pressure. That makes the first samples after a write transition data, not
a clean comparison against a previous setting.

Recommendation: run the comparison as a small convergence check. Record the
target-write timestamp, keep sampling one RTCInboundRtpStreamStats object over
equal-duration intervals, and predeclare how many consecutive intervals must
remain within your chosen stability tolerance before admitting the window for a
target comparison. Restart the window if the stats object changes, its counters
reset, the network context changes materially, or a DTX silence/resume boundary
falls inside the interval. Stop without a comparison if the window never meets
that rule within the test’s time budget.

DTX deserves its own segment rather than a generic “quiet network” label. The
specification notes that packets resuming after silence can be buffered instead
of played immediately when the target is larger. Mixing that transition into a
steady speech interval can make a normal resume effect look like slow target
convergence.

Inference: stable interval averages are evidence that the observed receiver
behavior has settled under the recorded conditions; they are not proof of the
user agent’s internal applied target. Keep the requested value, same-object
interval statistics, DTX state, and network/memory context in the test record.
If any of those boundaries differ, report separate windows rather than one
before/after result.