How It Works

    A detailed explanation of how Snap Decibel Meter turns your phone's microphone into a practical noise estimation tool — from raw audio capture to the numbers on your screen.

    Step 1

    Microphone Access

    When you tap Start, the app requests access to your device microphone through the browser's standard permission system. The microphone captures raw audio data in real time.

    Step 2

    Local Audio Processing

    Using the Web Audio API, the app connects your microphone stream to an audio analyzer. It computes the RMS (root mean square) amplitude of the audio signal — a standard method for estimating sound intensity.

    Step 3

    Estimated dB Calculation

    The RMS amplitude is converted to a level in decibels relative to digital full scale (dBFS), optionally A-weighted using the IEC 61672 filter, then time-weighted with a fast (125 ms) or slow (1 s) exponential response. If you have completed the optional one-point calibration, your stored offset is added and the result is labelled as an estimated A-weighted level. The app also tracks minimum, maximum and an equivalent level over the last minute.

    Step 4

    Sound Class Estimation

    By analyzing the frequency spectrum — including low, mid, and high energy bands, spectral centroid, and flatness — the app estimates a broad sound category like traffic noise, human speech, nature sounds, or music.

    Under the Hood: The Web Audio API

    The Web Audio API is a high-level browser interface for processing and synthesizing audio. Unlike simple audio playback, it provides a node-based graph architecture where audio sources, processors, and destinations are connected in a chain. Snap Decibel Meter creates a minimal graph: your microphone feeds into an AnalyserNode, which performs a Fast Fourier Transform (FFT) on the incoming signal in real time.

    The FFT decomposes the raw time-domain waveform into individual frequency components, producing a spectrum that shows how much energy exists at each frequency. From this spectrum, we extract multiple features — total energy (for dB estimation), the balance between low and high frequencies (for sound classification), and the overall shape of the spectrum (to distinguish tonal sounds from broadband noise). All of this happens within a single animation frame, typically every 16 milliseconds, without ever storing the underlying audio.

    From Sound Waves to Numbers: RMS and Decibels

    Sound is a pressure wave — a rapid alternation between compression and rarefaction of air molecules. A microphone converts this pressure variation into an electrical signal, which the phone's analog-to-digital converter samples thousands of times per second. The resulting digital signal oscillates around zero, with the size of the oscillations corresponding to the loudness of the sound.

    Simply averaging these samples would give a value near zero because positive and negative swings cancel out. Instead, we use the Root Mean Square (RMS) method: square each sample (making all values positive), calculate the mean of the squared values, then take the square root. The result is a single positive number that represents the effective amplitude of the signal — a well-established technique used in both audio engineering and electrical power measurement.

    Converting RMS amplitude to decibels involves a logarithmic formula: dB = 20 × log₁₀(RMS / reference). The logarithmic scale compresses the enormous range of human hearing — from the threshold of perception to the threshold of pain, sound pressure varies by a factor of over one million — into a manageable range of roughly 0 to 140 dB. Snap Decibel Meter works in dB relative to digital full scale (dBFS). Without calibration there is no absolute acoustic reference, so the number on screen is a signal level and is labelled as such rather than as a sound pressure level. The optional one-point calibration adds a fixed offset you derive from a reference meter, which turns the display into an estimated A-weighted level — an estimate on consumer hardware, not a measurement traceable to a physical standard.

    How Sound Classification Works

    Sound classification in Snap Decibel Meter uses a rule-based spectral analysis approach rather than machine learning. The frequency spectrum from the FFT is divided into three bands: low (below 500 Hz), mid (500 Hz–2 kHz), and high (above 2 kHz). The relative energy distribution across these bands creates a rough "fingerprint" characteristic of different sound types, and the label shown is a best-guess estimate rather than a verified identification.

    Traffic noise, for example, tends to concentrate energy heavily in the low and low-mid bands, with a gradual roll-off above 1 kHz. Human speech shows distinct energy peaks in the 300 Hz–3 kHz range with characteristic modulation patterns. Music typically has broader spectral content with stronger tonal peaks. Nature sounds often feature high-frequency energy from birdsong combined with broadband low-frequency content from wind or water.

    The classifier also examines spectral flatness — a measure of how evenly energy is distributed across frequencies. White noise has high spectral flatness (energy everywhere), while a single musical note has very low flatness (energy concentrated at one frequency and its harmonics). Combined with the spectral centroid — the "center of gravity" of the spectrum, indicating whether the sound is dominated by low or high frequencies — these features allow a surprisingly effective broad classification without the computational overhead or data requirements of neural networks.

    Smoothing, Averaging, and What You See on Screen

    Raw audio analysis produces values that fluctuate rapidly — dozens of times per second. Displaying these raw values directly would create a jittery, unreadable gauge. Snap Decibel Meter applies exponential smoothing to the dB output, giving recent samples more weight while gradually incorporating older ones. This creates the smooth, responsive gauge movement you see, which responds quickly to changes in sound level without nervously jumping on every micro-fluctuation.

    The peak hold feature captures the highest instantaneous reading during your session and displays it separately from the current level. This is important because many real-world noise concerns involve intermittent peaks — a truck braking, a dog barking, construction impact noise — that are brief but significant. The running average, meanwhile, tells you about the sustained background level, which is more relevant for assessing long-term exposure risk or general ambient noise conditions.

    Important: Estimated Readings

    Phone microphones are not calibrated to professional standards. All readings from Snap Decibel Meter are estimates designed for general reference. For certified measurements, use a professional Type 1 or Type 2 sound level meter.

    Try It Yourself

    See how it works in practice — measure the sound level around you right now.

    Start Measuring

    Common Questions About Sound Measurement

    How accurate is this meter compared with a professional one?

    We do not publish an accuracy tolerance. Uncalibrated, the value shown is a signal level in dBFS rather than a sound pressure level, so it is not comparable to a professional meter at all. After your own one-point calibration it is an estimated A-weighted level whose accuracy depends on the reference you used and on your device. For numbers you can defend, use a calibrated Type 1 or Type 2 sound level meter.

    Does Snap Decibel Meter need an app?

    No — it runs entirely in your browser using the Web Audio API. There's nothing to install. Just open the page, allow microphone access, and start measuring.

    Does the meter use A-weighting (dBA)?

    Yes. A-weighting (dBA) adjusts a measurement to reflect how the human ear perceives loudness, and it is the standard for noise exposure assessment. Snap Decibel Meter implements the IEC 61672 A-weighting filter in the energy domain and lets you switch it off to see an unweighted level. Weighting does not turn a dBFS signal level into a sound pressure level, which is a separate question answered by calibration.

    Can I use this for legal noise complaints?

    Snap Decibel Meter provides estimates suitable for personal awareness and reference. Legal or workplace noise documentation requires a calibrated Type 1 or Type 2 sound level meter operated by a qualified professional.

    What's the difference between current, average, and peak dB?

    Current shows the instantaneous sound level. Average is the smoothed running level over your session — useful for sustained background noise. Peak captures the loudest single moment, useful for impact noises like a slamming door or barking dog.