5

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

There are several linux applications available that require a running desktop (Gtk) which I do not have. These are useless. http://www.baudline.com http://quickplot.sourceforge.net/

GnuPlot and Octave seem to only be able to produce spectrograph's which is not what I am trying to do.

Any ideas?

oden
  • 3,461
  • 1
  • 31
  • 33

1 Answers1

4

If you can get the raw audio data as a list of numbers, you can use matplotlib to draw your waveform as a chart. The code would look something like this:

matplotlib.pyplot.plot(raw_audio_data)
meatvest
  • 879
  • 6
  • 11
  • 1
    and scikits.audiolab is the way of getting the raw audio into an numpy array so it can be fed into matplotlib. Thanks for point me in the right direction :) – oden Jun 24 '10 at 16:29