Wednesday, September 29, 2010

How Exactly Does Shazam Work...?

We have all been in a situation where you hear a song in which you wish you could identify... Currently there are two big song identifying Apps that come to mind: SoundHound and Shazam
If any of you ever tried either one of these Apps, I'm sure you were just as amazed as I was on how accurate, consistent and fast they were at identifying songs that I threw at it.... even the weird obscure ones with heavy background noise. It left me scratching my head and wondering how exactly does it work?
Lets take Shazam for example... from the users point of view, all we have to do is turn the App on, hold the phone up and WHAM! it usually identifies the musician and song no problemo... It's what's happening behind the scenes that is remarkable. 'It relies on fingerprinted music based on the spectogram...'

1. Beforehand, Shazam fingerprints a comprehensive catalog of music, and stores the fingerprints in a database. 2. A user "tags" a song they hear, which fingerprints a 10 second sample of audio. 3. The Shazam app uploads the fingerprint to Shazam's service, which runs a search for a matching fingerprint in their database. 4. If a match is found, the song info is returned to the user, otherwise an error is returned.
 How exactly 'Fingerprinting' works... 
You can think of any piece of music as a time-frequency graph called a spectrogram.  On one axis is time, on another is frequency, and on the 3rd is intensity.  Each point on the graph represents the intensity of a given frequency at a specific point in time. Assuming time is on the x-axis and frequency is on the y-axis, a horizontal line would represent a continuous pure tone and a vertical line would represent an instantaneous burst of white noise.  Here's one example of how a song might look:


Spectrogram of a song sample with peak intensities marked in red. Wang, Avery Li-Chun. An Industrial-Strength Audio Search Algorithm. Shazam Entertainment, 2003. Fig. 1A,B.
....read more at the link below.


No comments:

Post a Comment