Can anyone give me an example on how to use fft to see weather there is a certain frequency above a certain amplitude in the microphones current sample(s).

9 Years
Discussion Span
Last Post by Gribouillis

I can give you a hint

>>> from scipy.fftpack import fft

and a link.
Now, all you have to do is to obtain an array of sampled data, call the function and get another array, the fft of the first. Next step: understand the meaning of the output.


Alright, now what does the output of the fft mean?

Edited by computerfreak97: n/a


You can see it as a frequency analysis of the sound. If your output array is a series of complex numbers, you should compute the array of the squared modulus of the numbers and plot this array. You should obtain a graph where the x axis is the frequency of the sound and the y axix is the energy. So peaks in this graph represent the frequencies which carry the more energy in the incoming signal. The next step si to compute the scale of the frequency axis. It depends on the duration of your sample data. If you can post a plotted result of both the sample and it's fft, it would be great.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.