Browser-Based Audio Measurement: How WASM Makes Smaart-Level Analysis Free

|

TL;DR

Browser-based audio measurement using Rust compiled to WebAssembly (WASM) achieves FFT performance within 5% of native desktop applications. The WebAudio API provides 48 kHz capture with Float32 precision, and SharedArrayBuffer enables real-time processing without garbage collection pauses. The main limitations are audio interface access (single stereo input, no ASIO/CoreAudio routing) and absolute latency control. For transfer function, RTA, SPL metering, RT60, and STI measurement, browser-based tools are production-ready for professional use. SonaVyx implements the complete DSP pipeline — FFT, cross-spectral analysis, Welch averaging, IIR filters, and Schroeder integration — entirely in Rust WASM running on-device.

The Desktop Measurement Monopoly Is Over

For two decades, professional audio measurement meant desktop software. Smaart ($895), REW (free but desktop-only), ARTA, and NTi XL2 ($4,500+) have been the standard tools. All require dedicated hardware, specific operating systems, and often proprietary audio interfaces.

WebAssembly changes this equation fundamentally. Rust code compiled to WASM runs in any modern browser — Chrome, Firefox, Safari, Edge — at near-native speed. No installation. No license server. No OS dependency.

Rust WASM Performance Benchmarks

SonaVyx compiles its entire DSP engine from Rust to WASM using wasm-pack. Here are real-world benchmarks on a mid-range laptop (Intel i5-1240P):

OperationNative RustWASM (Chrome)Overhead
4096-point FFT18 μs19 μs5.5%
16384-point FFT89 μs94 μs5.6%
Transfer function (H1, 4096 bins)42 μs45 μs7.1%
A-weighting filter (1024 samples)8 μs9 μs12.5%
Schroeder integration (4096 pts)11 μs12 μs9.1%

At 48 kHz sample rate with 4096-point FFT, each block is 85.3 ms. Processing takes under 0.1 ms — less than 0.12% of available CPU time. There is no performance bottleneck.

WebAudio API: The Capture Pipeline

The WebAudio API provides getUserMedia() for microphone access at up to 48 kHz, 32-bit float. SonaVyx uses an AudioWorklet running in a dedicated thread to capture audio without main-thread blocking:

  • Sample rate: 48,000 Hz (matching professional standards)
  • Bit depth: Float32 (24-bit effective dynamic range, ~144 dB)
  • Buffer size: 128 samples per AudioWorklet render quantum
  • Latency: ~5.3 ms per render quantum (128/48000)

SharedArrayBuffer with a ring buffer transfers audio from the AudioWorklet to a Web Worker where the Rust WASM engine processes it. This architecture ensures zero-copy transfer and avoids garbage collection pauses that would corrupt real-time measurements.

What Browser Measurement Does Well

Transfer Function Analysis

The transfer function measurement uses the H1 estimator: H(f) = Gxy(f) / Gxx(f), computed via Welch's method with 50% overlap and Blackman-Harris windowing. This is identical to the algorithm used in Smaart and REW. Magnitude-squared coherence γ²(f) validates measurement quality at each frequency bin.

Real-Time Analysis (RTA)

The RTA mode computes single-channel magnitude spectrum with configurable smoothing from 1/1 to 1/24 octave. Update rate exceeds 20 fps even on mobile devices, matching the visual responsiveness of dedicated analyzers.

SPL Metering

The SPL meter implements IEC 61672-1 A/C/Z frequency weighting via IIR biquad cascades designed using the bilinear transform from analog prototype filters. Time weighting (Fast 125 ms, Slow 1000 ms, Impulse 35 ms attack / 1500 ms decay) matches the standard within Class 2 tolerances of ±1.4 dB at reference frequencies.

RT60 and Impulse Response

RT60 measurement uses log sine sweep excitation (Farina method) with frequency-domain deconvolution and Schroeder backward integration. T20, T30, and EDT extraction with linear regression and r² validation follows ISO 3382-1 methodology exactly.

STI/STIPA

Speech intelligibility measurement generates the STIPA test signal per IEC 60268-16 Table F.1 and extracts the modulation transfer function from the captured signal. The full STI computation includes male speech weighting and redundancy corrections per the standard.

The Real Limitations

Audio Interface Access

The WebAudio API provides a single stereo input. You cannot select specific channels from a multi-channel interface like you can with ASIO (Windows) or CoreAudio (macOS). If your measurement requires routing the reference signal from a console direct output to channel 2 of an interface, the browser cannot do this directly.

Workaround: SonaVyx's loopback mode plays the excitation signal through the device speaker and captures the microphone simultaneously, using AEC bypass via an HTML <audio> element. For multi-device scenarios, WebSocket synchronization between a source device and a listener device eliminates the need for a multi-channel interface entirely.

Absolute Latency

Browser audio has variable latency depending on the OS audio stack, buffer sizes, and system load. While relative timing (for delay measurement) is accurate via cross-correlation peak detection, absolute round-trip latency measurement requires external calibration.

No ASIO/CoreAudio

Professional measurement interfaces (Focusrite, RME, MOTU) expose their full routing capabilities only through native drivers. The browser sees them as generic USB audio devices with a single stereo pair.

Comparison: SonaVyx vs Desktop Tools

FeatureSonaVyx (Browser)Smaart v9REW
PriceFree (Pro $29/mo)$895Free
PlatformAny browserWin/MacWin/Mac/Linux
InstallationNoneRequiredRequired
Multi-channelStereo onlyUp to 64chUp to 8ch
Transfer functionH1 estimatorH1/H2/H3H1
RTA1/1 to 1/24 oct1/1 to 1/48 oct1/1 to 1/48 oct
SPL standardIEC 61672 Class 2Not SPL-focusedBasic SPL
RT60ISO 3382 T20/T30/EDTNot includedFull ISO 3382
AI diagnosticsClaude Sonnet 4NoneNone
Offline capablePWA + WASMYesYes

When You Still Need Desktop Software

Desktop tools remain necessary for multi-channel interface routing (8+ channels), very long captures (hours of environmental monitoring at full resolution), and situations requiring ASIO/CoreAudio-exclusive features like word clock synchronization.

For everything else — system checks, PA tuning, room analysis, SPL compliance, and feedback elimination — browser-based measurement is not just adequate, it is often more practical because it runs on any device already in your pocket.

The Technical Architecture

SonaVyx's DSP engine is written entirely in Rust and compiled to WASM. The engine includes 347 unit tests covering FFT, IIR filters, window functions, spectral analysis, transfer function estimation, SPL computation, impulse response processing, STI calculation, problem detection, and acoustic trending. Every measurement algorithm is tested against known reference values before deployment.

The WASM module loads once (approximately 800 KB compressed) and remains cached by the browser's service worker for offline use. All processing happens on-device — no audio data is ever sent to a server.

Try It Now

Open this measurement tool in your browser — free, no download required.

Open Tool

Frequently Asked Questions

Last updated: March 19, 2026