Spectral comparator

As described in this article, I made a python script to automatize audio compression and spectral graphical comparison for AAC / OGG formats.
The required dependancies are :

  • Python 2.7.x
  • Spectrum (documentation).
  • Audiolab.
  • Matplotlib (python-matplotlib package for Debian).
  • faac / faad / oggenc / oggdec tools (available in Debian repositories).
  • A few CPU and memory ressources.

Before starting the tests, configure the script with the following variables in config.py :

  • SOURCE_FILE='<original_file_path>
    (WAV format, created from a lossless source, FLAC or CD.)
  • tests = {<quality_1>: '<graph_color_1>', <quality_2>: '<graph_color_2>'}
    (with quality between 1 and 9, and graph_color in the matplotlib format.)
  • Only if required, the sample duration can be reduced by setting s = snd[<min_sample>:<max_sample>,0].

The script is available for download here (Python – 4 kB)
SHA-256 : 7df114dc46e5bc925ecf5259f91d980d9c23ba5fb2ece9f1789cc8c8b8f89690.