Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I need to find or create a tool that analyzes the audio spectrum of a sound file (like a .wav or .mp3). I need to output the "volume" or power of x number of frequency bands and output the data as text. This will be used to produce a visualization, a graphic equalizer like you'd see on a stereo.

I am currently looking at python to do it. My question is are there some tools out there that would do this (signal processing), like math works or others? I don't have any experience with them so any advice would be appreciated.

share|improve this question

closed as off topic by Dynamic, Walter, thorsten müller, Blrfl, Robert Harvey Dec 17 '12 at 15:36

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Start with an Internet Search for "Audio spectral analysis python". –  Robert Harvey Dec 16 '12 at 6:51

1 Answer 1

Similar to Robert Harvey's comment, you'll want to look for a Fast Fourier Transform with python.

There is an SO question that discusses the output from one of the algorithms and how to interpret it.

Here's the numpy module which came up second in my search. So it looks like you shouldn't need to do much coding at all.

This link will point you to some other implementations.

And here's a wordpress blog that provides some background on the FFT as well as using the numpy module.

And as jk points out: "you may need a Window Function as well to smooth out spectral leakage."

share|improve this answer
you may need a en.wikipedia.org/wiki/Window_function as well to smooth out spectral leakage –  jk. Dec 17 '12 at 14:56
@jk. - good point, and I've updated my answer accordingly. Thanks! –  GlenH7 Dec 17 '12 at 15:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.