How can I Compare 2 Audio Files Programmatically?

I know the question has been asked a long time ago, but a clear answer could help someone else.

  1. The libraries from Echoprint ( website: echoprint.me/start ) will help you solve the following problems :

    • De-duplicate a big collection
    • Identify (Track, Artist ...) a song on a hard drive or on a server
    • Run an Echoprint server with your data
    • Identify a song on an iOS device

    PS: For more music-oriented features, you can check the list of APIs here.

  2. 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 ;)


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#: https://web.archive.org/web/20190128062416/https://www.codeproject.com/Articles/206507/Duplicates-detector-via-audio-fingerprinting


  • Apply bandpass filter to reduce noise
  • Normalize for amplitude
  • Calculate the cross-correlation

It can be fairly Mhz intensive.

The DSP details are in the well known text:

  • Digital Signal Processing by Alan V. Oppenheim and Ronald W. Schafer