Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: How to compare 2 wav files.

by arunhorne (Pilgrim)
on May 27, 2002 at 23:06 UTC ( [id://169663]=note: print w/replies, xml ) Need Help??


in reply to How to compare 2 wav files.

Fast Fourier Transform is a good option but you might also consider Hidden Markov Models (HMMs). These statistical models are commonly used for speech recognition tasks and have the advantage over FFT that they are less likely to be fooled by an off-target sample point. HMMs build a probabalistic model of a pattern (in this case a sound wave) and will provide you will a likelihood that the sound wave it is given matches the training set.

To apply the idea to your problem, you use the first wave file as a training set and the second as test set. If the HMM returns a probablility for the test set of greater than say, 0.9 consider them equal. This probabilistic approach will serve you well in this case. For example, with FFT to identical wave files recorded at different frequency may not be matched, whereas an HMM should be able to encapsulate this difference.

Here are some links to get you started. However, be aware that what you are attempting is non-trivial as jcwren points out and also many people devote their entire degrees/Phds to this area... would it be better if you just used a human? There are times when a computer isn't the best solution, and knowing when to recognise this can be key to many Artifical Intelligence tasks...

HMM Tutorial

HMMs for Speech

Hope this helps, or at least touches the tip of the ice-berg.

____________
Arun

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://169663]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-04-23 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found