I’m trying to find an algorithm to detect when the user blows into the microphone (like Ninentdo DS or iPhone) on a WM6 device with C#.
I was thinking to use Waveform to read from the mic in real time into a small buffer, but I'm a bit lost on how to recognize the blowing sound, I guess it sounds like white noise. Anyone has an idea on how to do it?
Any help will be greatly appreciated.
A: The mic with higher quality will be more sensitive, and it will pick up more noise - unwanted ambient sound like typing and mouse clicks. Unless you're recording in a vacuum, it's impossible to get rid of all ambient sound from recordings.
Open Sound. Click the Recording tab. Double-click on the microphone you are using in the list of recording devices: Click the Levels tab.
If I were to tackle the problem, I'd blow into the mic and record that. Then run an FFT on the wave data to get a dominant frequency (or a few). I'd do that for several "blows" to see if they produce similar results. If they do (and I'm fairly sure they will) then I'd use an algorithm to look for that same frequency.
It's not a trivial task, but since a lot of the recording and math work is done, you could probably get it to work without too much pain.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With