CLI reference
dsp-audio-metrics ships a zero-dependency CLI that runs the same engine as the library.
Usage
dsp-audio-metrics [options] <file.wav ...>| Option | Description |
|---|---|
--json | Print one JSON object per file (machines / jq / spreadsheets). |
--help / -h | Print usage and exit. |
--version / -v | Print the package version and exit. |
Only WAV files are supported. RIFF headers with 16-bit PCM are decoded; mono files are normalized to stereo; any sample rate is accepted (resampled to 48 kHz internally).
Human output
track.wav
duration 3:42.10 (2ch @ 44100 Hz)
integrated -14.21 LUFS
true peak -6.40 dBTP
LRA 8.4 LU
levels rms -19.8 dB | peak -12.1 dB | crest 7.7 dB
width -17.4 dB (avg side/mid)
balance sub=3.1% low=11.2% mid=67.0% high=18.7%JSON output
{
"file": "track.wav",
"sr": 44100,
"durationSec": 222.1,
"channels": 2,
"integratedLufs": -14.21,
"truePeakDb": -6.4,
"loudnessRange": 8.4,
"rmsDb": -19.8,
"peakDb": -12.1,
"crestFactorDb": 7.7,
"stereoWidthDb": -17.4,
"bandBalance": { "sub": 3.1, "low": 11.2, "mid": 67.0, "high": 18.7 }
}integratedLufs, truePeakDb and stereoWidthDb can be -Infinity for silence; loudnessRange is null when no valid short-term blocks exist. JSON never contains NaN (it isn't valid JSON).
Exit codes
| Code | Meaning |
|---|---|
0 | All files measured successfully. |
2 | No files / bad arguments / a file could not be read or parsed. |
Details
bandBalance splits energy into sub (0–60 Hz), low (60–250 Hz), mid (250–4 kHz) and high (4 kHz+) using a 4th-order Butterworth cascade, and reports each band as a percentage of the total (the four values sum to ~100%).
width reports the mean side/mid level per 500 ms block, in dB — the closer to 0, the wider the stereo image; strongly correlated (mono) content sits far negative.
