Streaming audio buffers: reduce dropouts and latency
Streaming uses distinct capture queues, model chunks, network jitter buffers, and playback buffers. Identify each and measure overflow, underrun, and waiting time before tuning.
A larger buffer may reduce dropouts but adds delay. Measure capture queue depth and dropped samples; model chunk length and input wait; network packet gaps, reordering, arrival variation and late discards; and playback underruns. Tune only the stage showing the problem.
With RTP, sequence numbers help detect loss and restore packet order; timestamps indicate sampling instants. RFC 3550 defines interarrival jitter as a smoothed estimate of sender-versus-receiver packet-spacing variation, intended for comparison over time rather than as an absolute buffer-size setting. Packet duration and delay before transmission also affect receiver buffering. RFC 3550 §§ 5, 6.4.1
Use a consistent audio clock; test short and long speech, target devices, and stable and impaired networks. Compare p50/p90 latency with drops and underruns. Change one setting at a time. If a queue keeps growing because processing cannot keep up, inspect scheduling, backpressure, load shedding, or capacity instead of enlarging it indefinitely. No chunk size or jitter duration is universal. Evaluate quality and latency for the codec, device, network, model, and use case. Shangguan et al. (2021)