I was playing with my phone and there is this app on it that when u use it to record 10 seconds of a song, it tells you the title and author of that song. Now as a software engineer I can't help but wonder, How does this 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.
Play the audio file (or a video where the music is playing) in any Chrome tab, and click the Shazam extension icon. The service will take a few moments and identify the song for you. This service works extremely well with popular music, but may not be ideal for obscure tracks.
Shazam identifies a song by creating a unique digital fingerprint to match what you're hearing with one of the millions of songs in the Shazam database.
Shazam will identify any song in seconds. Discover artists, lyrics, videos & playlists, all for free.
Well, actually Shazam has written a paper explaining the inner workings of the algorithm, you can find it at this address (pdf).
Basically they have a huge database of all the songs that the algorithm can recognize and they create a kind of "hashtag" of the music using its spectrogram. Then, when you record a part of the song and send it to them, they pass it through the same algorithm and try to match it with the hashtags that are stored in the database.
Of course it's a lot more complicated than that since they have to manage the recording noise and stuff like that, but it's the basic idea.
Find the answer here: http://laplacian.wordpress.com/2009/01/10/how-shazam-works
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With