Decibel Meter processes normalized microphone samples locally through Web Audio and AudioWorklet. The current development engine reports digital level, energy average, time-weighted minimum and maximum, and sample peak. It does not claim laboratory-validated physical sound pressure accuracy or certified frequency weighting.
Microphone signal and processing chain
After an explicit Start action, the browser requests audio input through getUserMedia. The implementation requests a single input channel and asks for automatic gain control, noise suppression and echo cancellation to be disabled. [MDN] It checks available track settings but cannot guarantee that all hardware or operating-system processing is absent.
The audio worklet processes samples on the browser audio thread. It sends numerical aggregates to the interface and outputs silence through a muted audio graph; the measurement module does not record, replay or upload raw audio.
Digital RMS and time-weighted current level
For normalized samples x, the mean-square quantity is the sum of x squared divided by the sample count. Digital RMS level is 10 log10(mean(x²)), referenced here to unity normalized sample amplitude. A zero mean square has no finite logarithmic level and is displayed as unavailable rather than a physical zero dB.
The live estimate uses exponential smoothing of squared samples. The coefficient is exp(-1/(sampleRate × tau)); nominal tau is 0.125 s for Fast or 1 s for Slow. These response constants do not establish instrument-standard compliance.
Session energy average and extrema
The energy average is calculated from the sum of squares over all valid samples divided by their total count, then converted to dB. It is not the arithmetic mean of displayed dB values. Minimum and maximum use the extrema of the time-weighted energy after an initial settling period of three time constants.
Sample peak is 20 log10(maximum absolute sample). It is a digital sample peak rather than a verified acoustic peak measurement. The code counts samples with absolute amplitude of at least 0.999 as possible clips.
History, duration and interruptions
The worklet emits aggregates approximately every tenth of a second, based on sample count. The interface keeps up to 6,000 history frames while session summary statistics cover the accumulated valid sample count. Digital silence contributes zero energy to the session average; missing or interrupted audio is not added as silence.
If audio frames stop arriving, the watchdog can stop the session. Stop, page hiding and page exit release the input. CSV exports are generated locally and include units, duration, offset and available input-processing information.
Frequency analysis and limitations
The frequency analyzer uses a Web Audio AnalyserNode with a 4,096-sample FFT. At a 48 kHz sample rate, nominal bin spacing is 48,000 / 4,096, approximately 11.7 Hz. The dominant-frequency display identifies an approximate strongest usable FFT bin; it is not a precision frequency counter or calibrated spectral SPL measurement.
The current signal path is unweighted in the digital sense. It is not validated against A, C or Z frequency-response requirements.
Experimental reference estimates
When the calibration checks pass, a single offset is calculated from a reference SPL and the recent digital energy average. The app starts new session statistics while applying the offset. The offset is removed on a fresh Start. It cannot correct frequency-dependent errors or establish traceability.
Future physical validation must document device configurations, reference equipment, test conditions, repeatability and error before any numerical accuracy or instrument-class claim is made.
References and further reading
Development content; final technical, editorial and applicable jurisdiction review pending.