How Shazam Recognises Songs: Audio Fingerprinting for Piano Learners

Shazam identifies a song by turning a few seconds of audio into a compact "fingerprint" and matching it against a huge catalogue of fingerprints made from recordings. It does not listen for lyrics or melody the way a person does. Instead, it picks out the loudest points in a spectrogram, links them into small patterns, and looks for a recording where the same patterns appear with the same spacing in time.
That idea, described by co-founder Avery Wang in a 2003 paper, explains both why Shazam is so fast and why it cannot recognise you humming or playing a song on the piano. This article walks through the method in plain language and connects it to how modern practice apps listen to learners.
A short history
- 1999: Four co-founders, including Chris Barton and Avery Wang, started Shazam in London.
- 2002: the service launched in the United Kingdom. You called the short number 2580 and let the phone hear the track; the answer then arrived as a text message.
- 2003: Wang presented "An Industrial-Strength Audio Search Algorithm" at the ISMIR conference, explaining the fingerprinting method.
- 2008 onward: smartphone app stores turned Shazam into a widely used app.
- 2018: Apple completed its acquisition of the company.

Step by step: from sound to fingerprint
1. Draw a picture of the sound
The app converts the recording into a spectrogram, a chart with time along one axis and frequency along the other. Bright spots show where energy is strongest.
2. Keep only the peaks
Most of the picture is thrown away. The algorithm keeps a scattered set of strong points, which Wang compared to a constellation of stars. Peaks are robust: they usually survive background noise, a cheap speaker or a busy café.
3. Pair the stars
Each peak is linked with a few nearby peaks that come shortly after it. Every pair becomes a small code made of the two frequencies and the time gap between them. These codes are called hashes.
4. Search the catalogue
The hashes are looked up in a database built in advance from a very large catalogue of recordings. Many recordings will share a few hashes by chance.
5. Check the timing
The true match is the one where lots of hashes line up with the same time offset, meaning the patterns appear in the same order and spacing as in your clip. That consistent alignment is what confirms the song.
Why it cannot recognise your piano
Because Shazam matches a specific recording, it is listening for the exact sound of that track: the mix, the instruments, the production. When you play the same song on your piano, the melody and chords may be correct, but the spectrogram looks completely different. The peaks will not line up with the original, so there is no match.
Humming search tools work differently. They follow the shape of the melody rather than the fingerprint of a recording. And practice apps for musicians use yet another approach: they detect which notes are sounding and when, then compare that with the piece you are learning.
{{IMG:tiga-studio-night-1.webp}}
Three kinds of listening machines
It helps to separate the jobs that music software does:
- Recording identification: "Which exact track is playing?" This is Shazam's fingerprinting.
- Melody search: "Which song has this tune?" This follows the rise and fall of pitches, so it can work with humming or singing.
- Performance analysis: "Which notes did this player press, how evenly, and how close to the score?" This is what an AI piano teaching app needs, because it must follow you, not a studio recording.
The third task is the hardest for piano, since many notes sound together and each one fades slowly. It relies on models trained to recognise piano notes inside rich chords, plus careful timing measurement.
What learners can take from fingerprinting
Wang's method is a neat lesson in focus. It ignores almost everything and keeps only the strongest, most reliable features. Practice can work the same way.
- Find the peaks of a piece. Mark the strongest moments in a phrase, the high point, the loudest chord, the arrival note, and make sure they stand out.
- Check the spacing. Shazam confirms a match by timing. Your playing sounds "right" to listeners largely through steady, consistent timing between important notes.
- Practise in noise, then in quiet. Peaks survive noise. If you can keep a phrase clear with a little background sound, it will be even clearer in a quiet room.
- Use your ears like a search engine. When you hear a new song, try to name its key, its first chord and its rhythm pattern before you look anything up.
Frequently asked questions
Q: Does Shazam listen to the lyrics?
A: No. It matches acoustic fingerprints built from spectrogram peaks, not words or melody.
Q: Why does Shazam work in noisy places?
A: The strongest spectrogram peaks usually survive background noise, and only a portion of hashes needs to match with consistent timing.
Q: Can Shazam identify a song I play on the piano?
A: Usually not, because it looks for the exact recording. Your performance creates a different fingerprint.
Q: How does a piano app hear my playing then?
A: It detects the notes you play and their timing, then compares them with the piece. That is performance analysis, not fingerprinting.
Q: Is it worth learning how this works?
A: Understanding the technology helps you choose the right tool and reminds you that clear peaks and steady timing are what listeners notice.
Start practising with an app that listens to you
TIGA ALPHA is an AI piano teaching app built by a Thai team, with lessons in Thai, English and Mandarin. Its CEO, Teacher Aum, is a piano teacher with 20 years of experience who brings real music teaching into piano teaching with AI. Unlike a song-finder, it is an online piano teaching application that follows your own playing, so you can learn piano, play piano with steadier timing and play music you enjoy. Use it as an online piano lessons app, an AI online piano course or part of a wider piano learning course or piano course, and learn music theory as you go. Careful piano teaching and clear feedback suit anyone who wants to learn piano online. Try a 7-day free Premium trial, then 799 THB/month. Download from the TIGA ALPHA landing page, see studio lessons at TIGA Studio, and read more at tigaalpha.com. A piano teaching app should know your performance, not just the record.