Local-only Web Audio workbench · no prompt on load · no audio upload

Mic Latency Test: Buffer Budget Calculator, Reported Latency and a Labelled Loopback Estimate

Read the latency the audio stack actually reports, then budget it precisely: choose a buffer size, a sample rate and a USB or Bluetooth link overhead, and see the single-pass and round-trip delay with a verdict you can act on before the next call.

Honest baseLatency / outputLatency readout64 → 2048 sample buffers44.1 / 48 / 96 kHzWired vs Bluetooth verdict

Interactive microphone workbench

Frames held per pass. Smaller is faster and heavier on the CPU.

The device native rate is almost always the right choice.

Web Audio processing requests

Stored only in this tab and in optional #m= share links (up to 80 graphemes, clipped by grapheme cluster rather than by a raw maxlength).

Microphone diagnostics and live levels

Buffer 128 samples at 48,000 Hz · link 0 ms · round trip 5.33 ms

5.33 ms round trip · < 10 ms · instant

2.67 msSingle pass
5.33 msRound trip
Not measured yetbaseLatency
Not measured yetoutputLatency
Not reported by browserTrack latency
Not run yetLoopback

128 / 48,000 × 1000 = 2.67 ms · 2 × (2.67 + 0) = 5.33 ms

Under 10 ms round trip your own voice sounds natural in headphones; this is a working monitoring setting.

Idle — nothing has been captured in this tab.

Capture, the waveform and spectrum views, the dBFS maths, the 16-bit PCM WAV encoder and every replay run inside this tab. No audio upload, no account, no microphone prompt on load, and no third-party player.

What the browser will and will not tell you about latency

An AudioContext exposes baseLatency, the delay between the graph producing a sample and the audio device consuming it, and outputLatency, an estimate of the device’s own buffering. A captured track may also report latency through track.getSettings(). All three are implementation estimates rather than measurements, and any of them can be missing, so the card prints Not reported by browser instead of substituting a plausible number.

The buffer budget is the part you control. A buffer holds a fixed number of sample frames, so its duration is the buffer size divided by the sample rate, multiplied by a thousand to read in milliseconds. One hundred and twenty-eight frames at 48,000 Hz is 2.67 milliseconds; two hundred and fifty-six frames at 44,100 Hz is 5.80 milliseconds; the same 128 frames at 96,000 Hz is only 1.33 milliseconds because the frames are half as long.

Round trip is where the ear notices. The signal is buffered once on capture and once on playback, and a USB interface or a Bluetooth headset adds its own link latency in each direction, so the calculator adds the link overhead you enter to the buffer duration and then doubles the sum. That is why a Bluetooth headset with 45 milliseconds of link latency and a 512-frame buffer at 48 kHz lands near 111 milliseconds even though the buffer itself is only about 11 milliseconds.

Choosing a buffer instead of guessing at one

Start from what you are doing rather than from a number somebody posted online. For a call, anything under 20 milliseconds round trip is imperceptible. For monitoring your own voice in headphones, stay under 10 milliseconds if you can, because your own voice arrives through bone conduction with essentially no delay and even a small offset is audible as a hollow doubling.

Smaller buffers cost CPU. A 64-frame buffer at 96 kHz asks the audio thread to wake every 0.67 milliseconds, which is fine on a desktop and a recipe for dropouts on a busy laptop running a video call, a browser with forty tabs and a screen recorder. If you hear crackles rather than delay, the buffer is too small; if you hear your own voice late, it is too large. Change one variable at a time and keep the sample rate fixed while you do it.

The grade at the bottom of the card states the boundary it used: under 10 milliseconds is instant, 10 to 20 is good, 20 to 50 is noticeable, and above 50 is high. Those thresholds describe monitoring and conversation, not measurement: a scientific acoustic measurement needs a known loopback delay far more precise than any of this, which is why the next section is explicit about what the loopback estimate actually is.

What the loopback estimate does and does not measure

A true acoustic loopback test plays a short pulse through the speakers and listens for it on the microphone, then reports the time between the two. That measures the whole chain including the air, the room and the microphone, and it is what a measurement engineer would call an end-to-end figure. Doing it honestly from a browser needs a known output level, a quiet room and a microphone that is not being echo-cancelled, so this page reports it only when the demo signal is running and labels the result as simulated.

In demo mode the loopback figure is computed deterministically from your buffer, sample rate and link overhead, so it demonstrates the arithmetic and the interface without pretending to have heard anything. With a live microphone, the page reports the estimate from the buffer budget plus any latency the audio stack reported, clearly named as an estimate, because a browser cannot guarantee that a pulse it schedules left the speaker at the moment it was scheduled.

For a real end-to-end measurement, use a dedicated tool with a physical loopback cable or an acoustic measurement application, and treat this page as the budgeting stage: it tells you whether the delay you are about to configure is in the range where a human notices it, and it names the exact numbers behind that judgement so a colleague can reproduce the calculation.

Frequently asked questions

How is the single-pass buffer delay calculated?

Divide the buffer size in sample frames by the sample rate in frames per second, then multiply by one thousand to read the answer in milliseconds. A 128-frame buffer at 48,000 Hz is 128 ÷ 48,000 × 1,000 = 2.67 ms. The round-trip figure doubles that and adds the USB or Bluetooth link overhead you entered, because the signal is buffered once on capture and once on playback, and a wireless link pays its latency in both directions.

Why does the page say Not reported when I expect a latency number?

Because the browser or the operating system did not provide one. baseLatency and outputLatency are implementation estimates that some browsers and some audio backends omit, and track.getSettings().latency is optional in the specification. Printing a plausible-looking number would be worse than printing nothing, so the card states that the value was not reported and the calculator works from the buffer and sample rate you choose instead.

Is the loopback figure a real acoustic measurement?

Only in demo mode, where it is a clearly labelled deterministic simulation computed from your buffer, sample rate and link overhead. With a live microphone the page reports an estimate derived from the buffer budget and the latency the audio stack reported, and names it as an estimate. A genuine end-to-end acoustic loopback needs a quiet room, a known output level and a microphone with echo cancellation disabled, and this page does not claim to have performed one.

Does a higher sample rate always reduce latency?

For a fixed buffer size in frames, yes: 128 frames at 96,000 Hz last half as long as 128 frames at 48,000 Hz. In practice the buffer is often set by the driver in milliseconds rather than frames, so raising the rate may simply double the frame count and leave the delay unchanged while doubling the CPU cost. Change the buffer first, keep the sample rate at the device native rate, and measure the result rather than assuming it.

Every page shares the same Web Audio capture pipeline, the same honest track.getSettings() readout, the same local 16-bit PCM WAV encoder, the same zero-upload boundary, and the same CSV plus one page print output.

Specifications and engineering notes

Every level, latency figure, WAV byte and permission state on this site follows a public browser or audio-engineering specification rather than a private measurement.

Every capture, level, take and WAV file is produced locally by the Web Audio API inside this tab and sent only to your own output device. No audio upload, no account, no third-party player, and no microphone prompt until you press Start Live Mic.

Put this calculator on your site

Embed this calculator

Copy the snippet into any page. The widget is free, needs no key and sends nothing until a visitor interacts with it.

Open widget view