Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does music fingerprinting work (for sites such as Shazam and Lala.com)?

Tags:

My large (120gb) music collection contains many duplicate songs, and I've been trying to fingerprint tracks in the hopes of detecting duplicates. And since I'm a CS Major I'm very curious as to what is done out there? Nothing I do has nearly the accuracy of something like Shazam or Lala.com. How do they "hash" tracks? I have run a standard MD5 hash on all my files (26,000 files) and I found hundreds of equal hashes on different tracks, so that doesn't work.

I'm more interested in Lala.com since they work with full files, unlike Shazam, but I'm assuming both use a similar technique. Can anyone explain how to generate unique identifiers for music?

like image 836
Niels Joubert Avatar asked Jan 12 '10 04:01

Niels Joubert


People also ask

How is audio fingerprinting done?

An audio fingerprint is a condensed digital summary of an audio signal, generated by extracting acoustic relevant characteristics of a piece of audio content. Along with matching algorithms, this digital signature permits to identify different versions of a single recording with the same title.

How does Shazam paper work?

The Shazam algorithm distills samples of a song into fingerprints, and matches these fingerprints against fingerprints from known songs, taking into account their timing relative to each other within a song.

How do you think Shazam can identify just about any song in seconds?

All you need to do is record a few seconds of the song on the app. The Shazam app uses sophisticated audio recognition technology to identify the music you hear in a matter of seconds so you can find out the name of the artist and track, watch videos, and even buy or stream the song on your device.

How does Shazam work so fast?

First off, the actual audio files are not what is being searched when you Shazam a song. Instead, Shazam has an audio fingerprint for each audio file in the database. The recording that a Shazam user submits is also made into an audio fingerprint which allows them to make comparisons accurately and quickly.


2 Answers

The seminal paper on audio fingerprinting is the work by Haitsma and Kalker in 2002-03. For each frame of audio, it preprocesses (differences across time frames and frequency bands) and then stores a binarized version of the frame's spectrum.

This procedure adds robustness. If the entire signal is shifted in time, it still works (at least, one can derive a lower bound on performance degradation). It is pretty robust to environmental noise. Since its inception, there have been many papers on low-level music similarity, so there is no single answer.

Do you have absolutely identical files, i.e., the signals are time aligned, bit depth is the same, sampling rate is the same? Then I would think a hash like MD5 should work. But if any of those parameters are changed, so will the hashes. In such an event, a procedure like the one mentioned earlier would work better.

Take a look at the ISMIR proceedings available free online. Fun stuff. http://www.ismir.net/

like image 169
Steve Tjoa Avatar answered Oct 27 '22 17:10

Steve Tjoa


There are a lot of algorithms for acoustic fingerprinting. Some of the more popular ones are:

  1. AMG LASSO
  2. AudioID
  3. LibFooID

In fact libfooId is opensource , so you can check out its code in google-code!!

like image 26
Suraj Chandran Avatar answered Oct 27 '22 17:10

Suraj Chandran