Generate a waveform image from an audio file

Building a python application that converts the original audio files into a wave using sox on a linux system. I want it to be able to generate an image (PNG or Jpeg) of a sound wave pattern, but I cannot find a command line tool or a python package that will do this. Not being an experienced Python programmer, my options are limited.

Several Linux applications are available that require a desktop (Gtk) that I don’t have. It's useless. http://www.baudline.com http://quickplot.sourceforge.net/

GnuPlot and Octave seem to be able to produce a spectrograph, which is not what I'm trying to do.

Any ideas?

+5
source share
1 answer

If you can get raw audio in the form of a list of numbers, you can use matplotlib to draw a waveform in the form of a diagram. The code will look something like this:

matplotlib.pyplot.plot(raw_audio_data)
+2
source

All Articles