sounddiff old-mix.wav new-mix.wavThis runs all analyses (loudness, spectral, temporal, detection) and prints a colored terminal report.
The first argument is the reference file. The second is the file you're comparing against it. Deltas are reported as changes from the first file to the second (positive means the second file is louder, has more energy in a band, etc.).
sounddiff a.wav b.wavColored, grouped by category. Designed to be read top to bottom. Loudness changes are highlighted in red (louder) or green (quieter). Clipping and other issues are flagged at the bottom.
sounddiff a.wav b.wav --format jsonStructured JSON with the same data as the terminal output. Every measurement is included with both raw values and computed deltas. Useful for piping to jq, parsing in scripts, or integrating into CI pipelines.
sounddiff a.wav b.wav --format html -o report.htmlSelf-contained HTML file with inline styles. No external dependencies, no JavaScript. Open it in any browser, email it, or archive it alongside your session files.
| Flag | Description |
|---|---|
--format |
Output format: terminal, json, or html |
-o, --output |
Write output to a file (required for HTML, optional for others) |
--verbose |
Show additional detail in the output |
--no-color |
Disable colored terminal output (useful when piping to a file) |
--version |
Print the installed version and exit |
--help |
Print help text and exit |
| Format | Extension | Requires ffmpeg |
|---|---|---|
| WAV | .wav |
No |
| FLAC | .flac |
No |
| OGG Vorbis | .ogg |
No |
| AIFF | .aiff, .aif |
No |
| MP3 | .mp3 |
Yes |
| AAC | .aac, .m4a |
Yes |
| WMA | .wma |
Yes |
| Opus | .opus |
Yes |
Compares duration, sample rate, and channel count between the two files. If sample rates differ, sounddiff warns you that comparison accuracy may be reduced.
Three measurements per file:
- LUFS (Loudness Units Full Scale): integrated loudness per ITU-R BS.1770. The standard measurement for broadcast and streaming loudness.
- True Peak (dBTP): the maximum sample amplitude in decibels. Values above -1.0 dBTP are a concern for inter-sample clipping in lossy codecs.
- LRA (Loudness Range): the difference between the 95th and 10th percentile of short-term loudness. Higher LRA means more dynamic range.
Average energy per frequency band, reported as a delta in dB. Default bands are:
- Low: 20-250 Hz (bass, kick, sub)
- Mid: 250 Hz - 4 kHz (vocals, guitars, keys)
- High: 4-20 kHz (cymbals, air, presence)
A positive delta means the second file has more energy in that band.
Compares the waveform in chunks using cross-correlation. Each segment is classified as:
- similar: correlation above the threshold (default 0.9)
- changed: content exists in both files at that position but differs significantly
- added: content exists in the second file but not the first
- removed: content exists in the first file but not the second
Flags potential problems detected in either file:
- Clipping: consecutive samples at maximum amplitude. Reports the timestamp, channel, and number of clipped samples.
- Silence: regions below the silence threshold (default -60 dBFS) lasting longer than the minimum duration (default 100ms).
Use JSON output and parse the results in your CI pipeline:
# Check if loudness changed by more than 0.5 dB
sounddiff reference.wav output.wav --format json | jq '.loudness.lufs_delta'See examples/ci_regression_test.py for a complete example with configurable thresholds and pass/fail exit codes.