4
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Generally speaking wind noise should be eliminated at source but is continuous. Blowing on a mic will take place in short pulses of a few seconds. Look for very low frequency pulses (0.2 Hz) \$\endgroup\$ – JIm Dearden Jun 17 '13 at 9:56
  • \$\begingroup\$ Oh okay Jim, and what about the methods I am using? I mean FFT and zero crossing. Is there any particular method that would give me precise frequency? \$\endgroup\$ – Matt_9.0 Jun 17 '13 at 10:02
  • \$\begingroup\$ None that I know. You're essentially dealing with bursts of noise. \$\endgroup\$ – JIm Dearden Jun 17 '13 at 10:13
  • \$\begingroup\$ The sound captured by a microphone due to air being blown onto it is definitely not a specific frequency or range of frequencies: The range would vary by the microphone's native parameters as well as those of the amplification stages. What you might want to detect for, is a relatively wide band of white noise, at a level higher than the continuous noise floor, and consistent for a duration of at least a second. If there is a specific set of prevalent frequencies, it's probably not the air-blowing sound, more likely to be a voice, music, or other sounds. Briefer white noise could be impact etc. \$\endgroup\$ – Anindo Ghosh Jun 17 '13 at 10:14
  • \$\begingroup\$ Okay, one more question, would it be better to apply low pass filter, so that I might get a precise frequency and then I can take that specific range of the frequency every time I blow into the microphone. Also, thank you for clearing things for me Jim and Anindo. I have been searching a lot about this. I will study more about White Noise too now. \$\endgroup\$ – Matt_9.0 Jun 17 '13 at 10:30
2
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Well, you are right, I definitely need to know the other way around. But, by posting my question here, I got quite an information and ideas. About focusing on a single device, it is really tough to do in Android. There are multiple vendors and a wide range of devices running Android. All I can do is test it on several devices and hope for the best. But it's a good idea that you gave and I'm going to search and implement a function to calculate the "noise floor". If I succeed, I will let everyone know here. \$\endgroup\$ – Matt_9.0 Jun 21 '13 at 18:33
1
\$\begingroup\$

This is more along the lines of good advice but there are some pointers in here so be patient.

I'm going to attack this from the standpoint of a vocalist (which allegedly I am). Phrases that begin with P, B and T (for instance with P being the worst) send a blast of air from the mouth to the microphone which is akin to someone blowing for a short length of time.

Hold your hand in front of you mouth and say POP. You should feel what I mean.

Why am I saying this? A standard requirement for a studio microphone is a POP filter and this is a thin gauze stretched on a frame that largely stops the pops hitting the microphone. They don't attenuate real speech or vocals; they just stop the gush of air hitting the microphone diaphragm and making a nonsese of what you are trying to record.

Other microphones have them embedded in the black circular foamy thing that people sing into. They are not as good but work OK for live performances.

So, I've established that normal speech into a mic can contain gusts of air and this makes it trickier for you to design something that can differentiate normal speech and someone blowing.

There will be a pop filter on the mic of an android phone and this will make your app more difficult. It will look like a small circular black piece of material covering the electret microphone.

What I can say is that there will be a definite low frequency (below 100Hz) content when someone blows on a mic and I'd recommend using your PC, a sound card and a programme that can open and manipulate wav files. I use Wavelab but there are some free programs about. Record some "blows" and analyse the results. If you can come up with something that recognizes POPs then I'm interested in what you find because there are no hardware or software filters that I'm aware of that come close to the mechanical pop filter.

I've tried a few and even tried to modify some of the filters to take out the pops. In the end I've re-recorded or gone in with a knife to the wave file and butchered the sections that were popping because visually (in the wavefile) you can see them as clear as day.

\$\endgroup\$
  • \$\begingroup\$ Sounds like a wavelet filter, or maybe a pattern matcher would be an ok approach for a pop filter. \$\endgroup\$ – Scott Seidman Jun 18 '13 at 2:16
  • \$\begingroup\$ okay, I will try on this. I am going to do the research on this in weekend, as I need to move on with the development of my application. But, I really want to crack this and would sure let you know if I find out some method to recognize POP. \$\endgroup\$ – Matt_9.0 Jun 18 '13 at 7:46

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