Advertisement

audio comparison

Started by October 17, 2009 08:12 AM
-1 comments, last by super_jj 15 years, 3 months ago
Hello I am looking for a good tutorial about audio comparison... Basically, my goal is, given two audio files (or data in memory), determine how different or similar they are. Can anybody point me to the right direction? Ideally some code written in c or c++... Thanks a lot
For this purpose, you will want to build a frequency spectrum, as it is hard to compare the samples directly (unless a binary compare is what you want, which is quite trivial, but surely not what you want).

For that, read up on "fourier transform", "discrete cosinus transform", and "continuous wavelet transform".
Finding a measure of similarity or equality is very similar to lossy compression. You may want to read up on JPEG compression, too (this is working on 2D data, but basically it's the same idea). Or, look at Vorbis, which uses the same idea for audio signals (source code for both JPEG and Vorbis is publicly available too).

What you'll be doing is transform samples into the frequency domain. Then you "drop" the least significant information for each time interval, or quantize everything, or something the like (drop the last wavelet, whatever).
If you then compare what's left, noise and "insignificant" differences will have dropped out. This is what lossy compression exploits, too. It compresses only what's important to be a "real" difference.

This topic is closed to new replies.

Advertisement