A command-line tool to compare audio/media files side-by-side, showing file metadata and audio statistics (RMS, peak, crest factor, A-weighted levels).
I wrote this because I wanted a quick way to check the sample rate, bit depth, and other properties of audio files, and to optionally compare them side-by-side. It can be useful for checking the output of audio processing scripts, or comparing different versions of a file.
Run directly from GitHub with uvx:
uvx --from git+https://github.com/martin-hunt/audio_metrics audio_metrics <input1> [input2] [input3] [--verbose]Analyse a single file:
uv run python audio_metrics.py <input>Compare two or three files:
uv run python audio_metrics.py <input1> <input2> [<input3>]Show metadata tags (ID3, Vorbis comment, etc.):
uv run python audio_metrics.py <input1> <input2> --verboseAfter uv sync the script is also available as an installed entry point:
uv run audio_metrics <input1> <input2>uv run pytestOr run tests with uvx (no prior setup needed):
uvx --from pytest --with . pytestuv run python audio_metrics.py test/files/LDC93S1.wavDifferences between files are highlighted in yellow in the terminal.
uv run python audio_metrics.py test/files/sr006*| Format | Read | Tags |
|---|---|---|
| WAV | ✓ | ✓ (if ID3 embedded) |
| FLAC | ✓ | ✓ (Vorbis comment) |
| OGG Vorbis | ✓ | ✓ (Vorbis comment) |
| OGG Opus | ✓ | ✓ (Vorbis comment) |
| MP3 | ✓ | ✓ (ID3) |

