Reputation: 101
I am using the basic methods from http://msdn.microsoft.com/en-us/library/gg442302(v=vs.92).aspx to access the microphone. But I am trying to detect the occurrance of a specific sound, like the clapper. How does one interpret the stream from the microphone? What exactly do the floats in the buffer represent?
Thanks
Upvotes: 2
Views: 361
Reputation: 31724
I think this might help http://en.wikipedia.org/wiki/Pulse-code_modulation. I think the values in a way represent the offset of the mechanical part in the microphone from its middle position, but I am sure the theory and vocabulary might go really deep.
When it comes to recognizing sounds - it can also get arbitrarily complex, but a clapper might be a simple task - you basically want to detect a sudden increase in volume, which would manifest in a sharp, short-term increase of the moving-average of absolute values in the stream, so I'd put a sliding windows on the stream and keep checking with certain thresholds - one short window for the high volume threshold and two adjacent, longer and lower threshold windows to make sure there was no such noise before and after the clapper.
Upvotes: 3