How can I find music/audio files on my system that are possible duplicates, say via audio finger printing, that also provides the C# source on how its done? This CodeProject project is how...
As a software engineer, I was always interested in how a computer can be taught to behave intelligently, at least on some simple tasks that we (homo-sapiens) can easily solve within frames of seconds. One of them applies to audio recognition, which in recent years has been analyzed thoroughly. For this reason, in this article you will be introduced to one of complex tasks which arise in the field of computer science: the efficient comparison and recognition of analog signals in digital format. ...
In simple terms, if you want to compare audio files by their perceptual equality, you should create the so called "fingerprints" (similar to human fingerprints, which uniquely describe person's identity), and see if sets of these objects, gathered from different audio, match or not. Logically, similar audio objects should generate similar fingerprints, whereas different files should emanate unlike signatures. One of the requirements for these fingerprints is that they should act as "forgiving hashes", in order to cope with format differences, noise, "loudness", etc. The simplified concept of audio fingerprinting can be visualized below.
Basically, audio fingerprinting algorithms provide the ability to link short, unlabeled snippets of audio content to corresponding data about that content (it's all about finding unique characteristics of a song that can be later used to recall an unknown sample, or find a duplicate in the database of already processed songs). These types of algorithms can be used in a variety of different applications (please note, until Content Fingerprinting Using Wavelets was published, a number of other approaches have been developed):
With all the advantages that the sound fingerprinting system has, there are several challenges that it has to address. One of them is a huge database to search (imagine Youtube's database of video content that is monitored for audio copyright issues). Normally, each song will generate a big amount of fingerprints (in the described algorithm the granularity of each of them is going to be
- Automatic population the metadata of a song (MusicBrainz)
- Identifying a currently playing song (Shazam)
- Monitoring radio broadcasts (Mediaguide, Nielson BSD)
- Solving Peer-2-Peer copyright issues
- Managing sound effect libraries
1.48 sec, so we'll have about 150 objects for 1 song). In conclusion, there will be a need in using an efficient search algorithm that works well, when the solution is scaled. The simplest approach is performing a simple comparison between the query point and each object in the database. But, because this method is too time-consuming, the k-nearest neighbor solution (
Min-Hash + Locality Sensitive Hashing) will be explored.
Audio Finger printing is currently all the rage with the different cloud music services coming online, etc. But just how is that done? This article/project provides one look into that. Also I don't think I've seen an audio finger printing solution made available this way (i.e. source available). And the fact the author mixes in some MVVM too is icing on the cake.
While I don't like to do this much, expect to see this project covered in a little more details on a future Coding4Fun blog post (it's just that I do those a week in advance and I thought this too cool not mention right now... and it's cool enough to get two posts anyway... lol ;)