Skip to content

nschloe/spectro

Repository files navigation

spectro

Delicious audio file spectrograms.

PyPi Version PyPI pyversions GitHub stars PyPi downloads

gh-actions codecov Code style: black

spectro is a collection of easy-to-use Python and command-line tools for analyzing audio files. Install from PyPi with

pip install spectro

and use with

spectro show filename.mp3                # shows the wave spectrum of the audio file
spectro check {dirname or filename.mp3}  # checks if the audio file is worse than it pretends to be

See -h for their respective command-line arguments.

The quality of MP3 files is typically determined by their bitrate. For audio files, 128 kbps (kilobit per second) is considered low quality, 320 kbps is considered high quality. It is of course possible to re-encode a low-quality MP3 with a higher bitrate or even a WAV file. spectro can help singling out those foul eggs.

Here is the spectro show output of a sample file (only first channel shown):

Full-quality WAV 320 kbps MP3 256 kbps MP3
192 kbps MP3 128 kbps MP3 96 kbps MP3
64 kbps MP3 32 kbps MP3 16 kbps MP3