Skip to main content

sounddifff

CI PyPI Python License: MIT

Origin and maintenance. sounddifff is the continuation of sounddiff, created by systemBlue and released under the MIT license (original package on PyPI, last version 0.2.1). The original repository is no longer available. This project is maintained by Jaime Fernández González (jaimefgdev): the original idea and the code up to March 2026 are systemBlue's; everything added from October 2026 onward is listed in the CHANGELOG.

sounddifff is a CLI tool for audio producers and developers to compare two audio files and see exactly what changed. It reports differences in loudness, spectral balance, timing, and flags issues like clipping and silence. Output comes as colored terminal text, structured JSON, or a self-contained HTML report.

Example

$ sounddifff mix-v3.wav mix-v4.wav

sounddifff: mix-v3.wav vs mix-v4.wav

Duration     3:42.108 → 3:42.108  (no change)
Sample Rate  48000 Hz → 48000 Hz  (no change)
Channels     stereo   → stereo    (no change)

Loudness (integrated)
  LUFS       -14.2    → -12.8     (+1.4 dB)
  Peak dBTP  -1.1     → -0.3      (+0.8 dB)
  LRA         8.2     →  6.4      (-1.8 LU)

Spectral
  Low  (20-250 Hz)    +0.8 dB avg
  Mid  (250-4k Hz)    +0.3 dB avg
  High (4k-20k Hz)    +1.9 dB avg

Segments
  0:00-1:12   similar (correlation: 0.97)
  1:12-1:14   ADDED (new content, 2.1s)
  1:14-3:42   similar (correlation: 0.98, shifted +2.1s)

Issues
  ⚠ Clipping detected in mix-v4.wav at 2:31.4 (3 samples)

Installation

pip install sounddifff

The name has three f's: the original sounddiff package on PyPI belongs to systemBlue and stopped at 0.2.1. Package, command and Python module are all called sounddifff.

Requires Python 3.10 or later. Supports WAV, FLAC, OGG, and AIFF natively. For MP3 and AAC support, install ffmpeg.

Usage

Compare two files with colored terminal output:

sounddifff old-mix.wav new-mix.wav

Get structured JSON for scripts and CI pipelines:

sounddifff old.wav new.wav --format json

Generate an HTML report:

sounddifff old.wav new.wav --format html -o report.html

Audio regression checks in CI

--fail-if turns sounddifff into a test: it prints the report as usual and exits with code 3 if any rule is broken (code 1 is reserved for errors such as unreadable files).

sounddifff reference.wav render.wav --fail-if "lufs>1,peak>0.5,band>3,clipping"
Rule Fails when
lufs>N integrated loudness changes by more than N LU
peak>N true peak changes by more than N dB
lra>N loudness range changes by more than N LU
band>N any spectral band changes by more than N dB
duration>N duration changes by more than N seconds
correlation<N overall waveform correlation drops below N
clipping the second file clips
silence the second file has more silent regions than the first
format sample rate or channel count differ

GitHub Action

- uses: jaimefgdev/sounddifff@v0.3.0
  with:
    reference: audio/reference.wav
    candidate: build/render.wav
    fail-if: lufs>1,peak>0.5,clipping

The report is added to the job summary and uploaded as an HTML artifact; the step fails if a rule is broken. Outputs: passed (true/false) and report (path of the HTML file).

--fail-if and the GitHub Action were added by Jaime Fernández González (jaimefgdev) in October 2026.

See docs/usage.md for all options.

What it analyzes

Category Measurements
Loudness Integrated LUFS, true peak (dBTP), loudness range (LRA) per ITU-R BS.1770
Spectral Average energy per frequency band (low, mid, high) with configurable ranges
Temporal Segment-level cross-correlation, added/removed/shifted section detection
Detection Clipping events (timestamp, channel, sample count), silence regions
Metadata Duration, sample rate, channels, bit depth, format

Output formats

Terminal is the default. Colored, grouped by category, designed to be read top to bottom. Uses rich for formatting.

JSON outputs the same data in a structured format. Pipe it to jq, parse it in Python, or use it in CI pipelines for automated regression testing.

HTML generates a self-contained report with inline styles. No external dependencies. Open it in any browser, share it with your team, or archive it alongside your session files.

How it's built

sounddifff is written in Python with a modular architecture. Each analysis type (loudness, spectral, temporal, detection) lives in its own module with no cross-dependencies. The core orchestrator loads two audio files, runs all analyzers, and passes the results to a formatter.

Dependency Purpose
soundfile Audio I/O via libsndfile
numpy Array math, FFT, cross-correlation
scipy Signal processing
pyloudnorm ITU-R BS.1770 loudness measurement
click CLI framework
rich Terminal formatting
jinja2 HTML report templates

See docs/architecture.md for the full module breakdown and data flow.

Documentation

Contributing

Contributions are welcome. See CONTRIBUTING.md for setup instructions and our development workflow.

The issue board has open work organized by milestone. Issues labeled good first issue are scoped for newcomers and have enough context to get started without deep DSP knowledge.

Security

Report vulnerabilities privately through GitHub security advisories. See SECURITY.md for our disclosure policy.

License

MIT

Metadata

Release files for sounddifff 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sounddifff 0.3.0
File Size Uploaded
sounddifff-0.3.0.tar.gz 42.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sounddifff 0.3.0
File Interpreter ABI Platform
sounddifff-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 64.5 kB

Release files / sounddifff-0.3.0.tar.gz

Download URL sounddifff-0.3.0.tar.gz
Size 42.5 kB
Tags Source
SHA-256 checksum
How to use checksums
815aa422971252afe33eac63e47763a493e258b971726d09342ac0bcd47e1043
BLAKE2b-256 checksum
How to use checksums
2c8fddb9ca9c9bd9f7398486646a3520fa425dd78fe853865d6f580c21252b19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / sounddifff-0.3.0-py3-none-any.whl

Download URL sounddifff-0.3.0-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
010619387aa9e03210040ba95b77af757a516ba9db1a445785f1046d1682929d
BLAKE2b-256 checksum
How to use checksums
3657f30385e6e11c1ed0452d65ee71ba83a3249a3c1f0119de6b5313ad7e5c7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

2 release files

This release

0.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page