Electret microphone wave output

I have a couple of these microphones which I got from http://www.sparkfun.com/commerce/product_info.php?products_id=8635, the intended use is to get a wave output when it picks up some sound and to check for patterns with previous sound waves. So my questions are, A) Is this device ok to use for said intention; B) if so, where do I go from here; C) if not, any help is appreciated.

Thanks for the reply. To be specific, this is the one I bought. http://www.sparkfun.com/commerce/product_info.php?products_id=9964http://www.sparkfun.com/commerce/product_info.php?products_id=9964 which says it comes with a 100x opamp.

For the pattern recognition, I was guessing I have to get the wave from the output by using a oscillator, such as http://www.sparkfun.com/commerce/product_info.php?products_id=9089. Am I thinking in the right direction?

For the pattern recognition, I was guessing I have to get the wave from the output by using a oscillator, such as http://www.sparkfun.com/commerce/product_info.php?products_id=9089. Am I thinking in the right direction?

Whaaa?

I don't follow at all.

@sciguy, what do you mean you dont follow. Do you mean you know how to do this, and what I said doesn't make sense. If so, can you throw me a idea? Or do you mean, you dont know what to do and are interested in this topic?

the intended use is to get a wave output when it picks up some sound and to check for patterns with previous sound waves.

I don’t think the Arduino has the horsepower to do any kind of audio signal analysis like pattern recongnition. At best you could hope for is a yes there is a sound or no there is no sound.

Lefty

ok, so I wont use it for any pattern analysis., instead I will have another device handle that. How about just receiving/creating the sound waves? Am I in the right direction, what else do I need to do?

Again, sound or no sound detected, that's about it in my opinion.

Lefty

Thanks for the reply's. I planned on having the microphones(4) listen in for when someone starts speaking. When it sees there is a change in noise level, they will start to "record" the sound wave from when noise increase till when the noise returns to a similar noise level prior to change. Thats what I would like to start off with.

So I'll pass that task off to another device. I am in the right direction on how to get the sound wave? If not, can you provide me with how?

@rickburgen
If you think simply recording a digitised audio stream and comparing it to another recording is going to give you a measure of recognition then you need to do a lot more research. If it were that easy we would have had voice command computers back in the 70’s.

Even if you record the same sound (say from a recording) twice the resulting data stream will not be the same. This is due to the fact that the sampling time is not synchronised between the two recordings coupled with the quantisation error means that for identical sounds the waveform is different.

This can be smoothed over by taking the Fourier transform of the wave, but comparison of that still does not give you identical results.

There are a couple of key words that i've googled around in the past that have revealed just how big of a task you're dealing with: The first, fft or fast fourier transform, is what is generally used for simple sound segmentation into frequency buckets. one of the things you can do with fft would be the bucketing mechanism behind an audio spectrum analyzer. fyi, fft has generally been considered too resource intensive to run on a small mcu such as an arduino. I did see that sparkfun recently announced that they have a spectrum analyzer IC (http://www.sparkfun.com/commerce/product_info.php?products_id=10024) that could be essentially used as a poor man's fft (it probably uses fft internally but as it only has 7 frequency buckets its value as a dsp precursor are limited).

The second key term is digital signal processing or dsp which leads you into the dark art of audio pattern recognition which as others have indicated is some heavy duty stuff.

fyi, the chip from sparkfun would have actually been perfect for my need which was to create something akin to a clapper - you know... and must sing along... "clap on - clap off - the clapper" you can build a clapper with just the board you already have but it would be rediculously prone to lots (as in lots and lots) of false positives - e.g. there would be no way to limit to two spikes in a given frequency range indicating consecutive claps - literally any two loud spikes (or whatever pattern you were looking for in your arduino code) of any frequency would set it off because without fft or a chip such as the one I mentioned you'd not be able to tell what sound frequency was generating the spike. Given that you may be able to bitify the output from the chip and use it in combination with a timer interrupt to do some very simplistic voice recognition - e.g. you can probably save a matrix of the bitified output of a stated word and then upon a spike on the electret start a comparison process. keep in mind that the output of the IC is a value indicating the volume in a given frequency range at that moment so any subsequent attempt to match the pattern would have to not only match it in frequency combinations but also in volume. Or of course you can try to apply some logic to normalize the pattern out away from the volume component - i have no idea how you'd attempt to do that - dsp processors would have some answers i'd suspect.

hth

Thanks for the replies. If I don't get this working with the Arduino, at least I will have future knowledge on the topic. Can anybody suggest another device that is capable of such tasks? And what are my options with using the microphones and Arduinos(2) toward this task?

I am looking to do this from scratch, I know this is a lot of work. But I have had an interest in this for a while, as most current options are not 100%. You maybe asking yourself "Than why start with arduino"?, well, because I wanted to start off with (what I though was going to be) handling small tasks. So if someone can point me in the right direction, I would really appreciate it.

Thanks for the right direction!

as most current options are not 100%.

True

You maybe asking yourself

Why you think you can do it starting off with zero knowledge of the topic when there are researchers who have spent the whole of their careerer and many many PhD thesis trying to do this and still not getting 100%?

You might be the one to make the breakthrough who knows. Look for DSP processors and be prepared to learn a lot of maths. Good luck.

You don't need to run FFTs to detect a clap. In fact, the frequency information isn't of much use here.

If you look at a clap in terms of signal processing, it's a lot like an impulse. The microphone hears ambient noise before the clap, high energy at all frequencies during the clap, followed by ambient noise/echo after the clap.

The signal processing consists of converting the mic input to energy by squaring it and cleaning it up with a little filtering. You detect a clap by looking for ambient energy (you'll have to calibrate it to find this value) followed by high energy (you'll have to calibrate to find this value too), followed by amibient energy.

Arduino is capable of running this kind of signal processing.

The biggest problem is that doing this requires more programming and signal processing knowledge than beginners have.