Java: Comparing two audio files to see if they are the same "music"
Solution 1
Search for "audio fingerprinting". A possible solution might be this library or this paper.
Solution 2
I'd check out Google's open source lib musicg API: http://code.google.com/p/musicg/
It's Java and gives similarity metrics for two audio files.
Solution 3
You can use the Open Source echoprint
Basically, you will generate a fingerprint of your local song and compare it with a database of songs if it is found.
If you want to compare two of your songs, what you need to do is to create a local database with the first song and then try to match the second song in your own database. If it is found, means they are the same.
Note that the concept of "being the same song" is tricky. Actually what fingerprint does is compare many parts of the song, trying to match these many parts. This means that even if you have interferences in the audio (like people speaking, background noise, etc) you can be able to match a song, because most of the audio will be similar to the original.
There is a paper explaining how echoprint works in details
Comments
-
ThaSaleni about 2 years
I'm working on a music streaming service and I've come across a problem: how do I compare two audio files to see if they represent the same song. The files might not have the same extension (e.g OGG, mp3, wma) but might still be the same song, and they might have a different bit rate and volume level.