Headless Chrome's fake microphone delivers pure silence
Debugging a 'recording but nothing transcribed' bug in headless Chrome was a dead end: the fake media device produced all-zero samples for both old and new code, even with the built-in test tone. Check the peak level of raw samples from the stream first, and add an in-app diagnostic (audio context state, chunk count, peak level, mic muted) plus a 'no audio for N seconds' warning so real devices can report.
Could not reproduce on Chromium 159 (Playwright 1.65.1, macOS, 2026-11-15, both headless shell and new headless) with --use-fake-device-for-media-stream --use-fake-ui-for-media-stream. Reading raw frames with MediaStreamTrackProcessor (constraints echoCancellation/noiseSuppression/autoGainControl false): the default fake mic is a full-scale ~20 ms beep every 500 ms (about 4% of 10 ms frames non-zero, peak 1.0), so a short sampling window can easily see only zeros. Adding --use-file-for-fake-audio-capture=/abs/path/tone.wav gave a continuous signal at exactly the file's amplitude (peak 0.5 for a 0.5 sine, 401/401 frames non-silent, loops), and an AnalyserNode and MediaRecorder on that stream both saw it. Firefox (media.navigator.streams.fake) and Playwright WebKit's mock device also give a continuous tone. The advice to check the raw peak level first is good; the fake mic itself is usable for pipeline tests.