If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

recognize a .WAV File

I need to develop an application in VC++ that will take .WAV files as an input and identify if there is a Gun shot in that wave file. WAVE file with gunshot must be having certain paramaters like frequency, bit rate etc which I don't know right now. But is there a way in VC++ to develop a program that can recognize gunshots by comparing that .WAV file with certain parameters?

Re: recognize a .WAV File

Short answer:
yes.

Reality answer:
analyzing sound is a very complex undertaking, and identifying some wav file as having an actual gunshot vs something that has a sort of similar audible pattern (hitting a drum, hitting a baseball with a bat, slamming a door shut, clapping your hand, ...) is going to take advanced algorithms. And a lot of complex math.

If you are happy enough with signalling a file as "this could maybe have a gunshot, needs a human to listen to make sure", then you can probably take somewhat of a shortcut by trying to spot a high volume spike. But that may not work well if the gunshot is further away or muffled or the entire wav file is silenced or improperly scaled.

Re: recognize a .WAV File

maybe... I don't know of such library.

In practice, I can say that those "sound analyzing software" you often see used on TV shows that within seconds can do those "amazing things", in practice don't exist. Or at least don't exist in the way you see on TV. Most sound analysis requires a trained specialist to "guide" the software. Not the other way around.

That said, yes, there are tools that pick up certain patterns in sound. Whether they can recognize a gunshot vs something else. I can't say for sure. Just know that a LOT of things affect sound.
ambient sounds in the area (cars, people, birds, wind, ...), echo's, doppler effect, sound being distorted by surrounding buildings etc. quality of the recording...

Even if you take a wav of ambient sound outdoors. and you mix in an actual soundsample, even at the proper speed. Trying to have some bit of software pick up that sound in the sample will be a challenge, let alone if the sound sample and the actual sound you're analyzing aren't 100% identical.

I'm not going to say "impossible". But I can say "not likely". If any such software does exist to do it automatically, it's probably going to be quite expensive.
Software that will help a trained specialist work through large amounts of audio data for potential gunshots (or something else) faster, to be verified by a human on the other hand does exist and even comes in freeware.