Electronic – ny way to differentiate the sound of blowing air from normal sound through phone microphone

androidfftfrequencysound

I have been working on an Android app that takes input from microphone when user blows into it. I am using FFT based sound analysis and converting the values in frequency by using a zero crossing method.

I am still unsatisfied with the results. What I want is, it should only detect the "air-blow" and should generate a unique value, so that i can ignore all other sounds. I have been searching for the same on Google a lot but was not able to get any clear answers. I hope I will get some solution out here.

EDIT: Now, I did not really get enough time to research on the solutions provided. Also, I think I will have to take the formulas and create my own classes in JAVA and it's going to take time. But I would like to share the link for the application that I published. It is not the most efficient as I mentioned in my question but it works. The link for my app is:

Appy Birthday on Play Store

I would like Android users to try it and provide me feedback as well.

Best Answer

Most of the comments focus on the more common problem of removing/ignoring the noise so that the other sound can be extracted. You want to do the other thing around: detect air-blow sounds, rejecting all other sound.

First, your zero crossing method is not going to be very useful for this. Air-blow is close to pink noise in signal shape, with some "tint" to the spectrum depending on position of blower, position of microphone, manufacture of phone, etc.

Because you say you have FFT already, I would run repeated frames of 50ms or so, and look for the signature of blowing into the microphone. It will likely be a very wide spectrum distribution without sharp peaks. Also, it will have a duration greater than a single frame.

Other signals will often have more distinct peaks within the spectrum. Thus, you could calculate how well the spectrum you get compares to a wide, pink-noise-like distribution. Beware that the output of the FFT will not keep the frequency bins in increasing order, but rather the "butterfly" order, and ever other data value out of the FFT is phase, rather than amplitude, and thus is not interesting to this analysis.

When you have both a "blow" sound and "background" sound coming in, you will have a "noise floor" of the blow sound, and individual peaks from the other sounds. You have to remove the peaks, and detect the blow sound based on whatever profile you can "underlay" your spectrum and still fit the blow sound. There are various curve fitting/regression functions you can use here.

In the end, I think you'll still have problems with this approach, as different phones have different sonic characteristics. You may have to "train" the application on the particular phone the user is using for best result.