I want to compare 2 audio files programmatically. For example: I have a sound file in my iPhone app, and then I record another one. I want to check if the existing sound mat
That's called Audio Fingerprinting. There exist some open source projects from which you can get some ideas. Take a look here: Audio Fingerprint - MusicBrainz.
I know the question has been asked a long time ago, but a clear answer could help someone else.
The libraries from Echoprint ( website: echoprint.me/start ) will help you solve the following problems :
PS: For more music-oriented features, you can check the list of APIs here.
If you want to implement Fingerprinting by yourself, you should read the docs listed as references here, and probably have a look at musicip-libofa on Google Code
Hope this will help ;)
I got interested and i found another solution in Java over sourge forge. yo can retrieve the code from SVN.
http://sourceforge.net/projects/comparisong/
give it a look and let me know if it worked for you.
cheers
Sounds like Shazam might help.
There are a few articles on the web talking about this, including this one that I read a while ago.
Using the Shazam technique for analysis would provide a great starting point for side-by-side comparison.
Have a server doing audio fingerprinting computation that is not suitable for mobile device anyway. And then your mobile app uploads your files to the server and gets the analysis result for display. So I don't think programming language implementing it matters much. Following are a few AF implementations.
Java: http://www.redcode.nl/blog/2010/06/creating-shazam-in-java/
VC++: http://code.google.com/p/musicip-libofa/
c#: http://www.codeproject.com/KB/WPF/duplicates.aspx
It can be fairly Mhz intensive.
The DSP details are in the well known text: