note
jcwren
<p>This is a non-trivial task, although not impossible.</p>
<p>Basically, you'd need to run a sliding window FFT/DFT (Fast Fourier Transform/Discrete Fourier Transform) and look at the spectral energy density of various frequency groups. If the energy density is the same for both samples at the same time, you could consider them the same.</p>
<p>FFT/DFTs are not difficult to implement, and while I'd tend to do it in C, I think Perl should do it pretty well. There are dozens of FFT/DFT implementations on the 'net. Decoding the .WAV format is pretty simple, also.</p>
<p>About the only problem I can really see is that if you have two .WAV files sampled at different rates (i.e., one is 44.1Khz, and the other 10Khz). In that case, you'd have to resample one to match the other. Still not overly difficult, but an added step.</p>
<p>Welcome to DSP-101</p>
<p>--Chris</p>
<p><center>e-mail <a href="mailto:jcwren@jcwren.com">jcwren</a></center></p>
169641
169641