Decoding Shazam’s Song Identification Magic

Elshad Karimov
2 min readJan 6, 2024

Shazam, a seemingly magical app, has revolutionized the way we identify music. With just a short sample of a song, it can almost instantly tell you what you’re listening to. But how does it manage this feat, especially considering the millions of songs available online? Let’s demystify Shazam’s technology.

The Core Mechanism

When you play a song and tap Shazam, the app captures a brief audio snippet. Instead of tediously comparing this snippet against every song in its massive database, Shazam employs a more sophisticated technique.

Spectrogram: The Visual Blueprint

Shazam first transforms the audio snippet into a spectrogram — a visual representation of the sound frequencies over time. Imagine this as a unique graph that maps out the song’s sound waves, highlighting its distinct features.

Focusing on the Peaks

The app then identifies the loudest frequencies in the spectrogram, which contribute to the song’s unique “fingerprint.” These peaks are chosen because they’re the most resilient parts of a sound wave, less likely to be distorted by background noise or poor recording quality.

The Maximum Filter Technique

--

--

Elshad Karimov
Elshad Karimov

Written by Elshad Karimov

Software Engineer, Udemy Instructor and Book Author, Founder at AppMillers

No responses yet