0

We are working on Sound processing and Analysis where we need to extract frequencies, pitches, octaves and other parameters of sound including dBPowerSpectrum Analysis.

We also need to do this irrespective of the file formats or do the conversion between quite a file format(though conversion is not a very critical requirement if those parameters can be analyzed on most file formats).
We also need to capture/record sound from Mic. We found a Python module called Snack which does almost everything we need, but the whole problem is that it requires tkinter to be installed.
Since we are planning to write a Web client for this program, I feel installing tkinter and initializing and passing its object to Sound Processing module is an overhead.
Can you please suggest us few good Sound Processing Module. We don't expect an all in one module. Its OK even if these functionalities are spread over several modules.

Kindly suggest.

Thanks in Advance

pradyunsg
  • 18,287
  • 11
  • 43
  • 96

3 Answers3

2

For audio capture and playback I've liked PyAudio. It's cross-platform and pretty easy to use.

Justin Peel
  • 46,722
  • 6
  • 58
  • 80
2

See http://www.csounds.com/node/188 for a package that does much of this.

S.Lott
  • 384,516
  • 81
  • 508
  • 779
1

You can use scikits audiolab to read in any file supported by libsndfile, and then use PyLab (NumPy and SciPy) to do the processing.

I don't know of a way to read in live audio from the mic, though, which is why I was just looking at Snack myself. If there's a way to convert Snack sounds into numpy arrays, then that would work.

If you use padsp ipython in Ubuntu, you can read in data from /dev/dsp, and it will actually be coming from PulseAudio's input. You can use the ossaudiodev module, though I haven't gotten this to work, or you can do some kind of ugly construction like:

audio = numpy.fromfile('/dev/dsp'...

but I guess you still need to use ossaudiodev to set up the sampling rate, format, etc. first.

endolith
  • 25,479
  • 34
  • 128
  • 192