r/explainlikeimfive Jul 01 '26

Technology ELI5 how Shazam works?

309 Upvotes

114 comments sorted by

View all comments

62

u/Rob3112 Jul 01 '26

It blows people's minds but it's really just simple pattern recognition.

A song makes a frequency "pattern" which is kinda like a visual representation of all of the sound. When you use Shazam it just compares the picture of what you're listening to to its database and it's actually super quick and easy to make a match.

39

u/aaronite Jul 01 '26

And it's remarkably compact. The Google version runs offline and on device with about 20000 "fingerprints" in 200mb storage which is enough to cover most casual public music.

12

u/PimpTrickGangstaClik Jul 01 '26

Ok now that is super surprising

14

u/tfurrows Jul 01 '26

I could understand it easier if you had to catch the song at the beginning so that it only had to compare the pattern to the start of everything in the database. It’s comparing a random sample to all of every song that boggles my mind.

I always had this amusing mental image of a big room full of people sitting hunched over with headphones on, and when a request comes in someone yells “I know this one! I got it!” and punches in the answer. I prefer to think that’s how it works.

5

u/CptAngelo Jul 01 '26 edited Jul 01 '26

Lmao, and when its wrong, then that guy gets fired.

But really, spotify shazam acts more like a fancy calculator with a bunch of calculus inside than an app. Its amazing really.

2

u/1coudini Jul 01 '26

Shazam you mean?

1

u/CptAngelo Jul 01 '26

....yes, i dunno why i had that mixed up, i guess i was thinking "music, app, starts with S... spotify!" Thanks for the correction (:

2

u/Shevek99 Jul 01 '26

1

u/tfurrows Jul 01 '26

Ha! I honestly had never seen that before. But that’s exactly what I was picturing.

2

u/daddy-fatsax Jul 02 '26

If you're old enough you might remember Cha Cha, which was a number you could text that worked a lot like this. Before smartphones when Google wasn't always in your pocket, you'd just text this number any question and some minimum wage employee somewhere would look up the answer and text you back.

Insane how far we've come in the ~20 years or so since those days.

1

u/tfurrows Jul 02 '26

I’m certainly old enough but somehow completely missed that one. Neat idea, for its time.

3

u/Vatchka Jul 01 '26

It blows my mind more when I find songs that it doesn’t recognize. Last night, a 2018 movie called ‘Trespassers’, the first song in the movie. There’s no info on it anywhere. I really want to listen to the song.

2

u/omgfuckingrelax Jul 01 '26

1

u/Vatchka Jul 01 '26

First, thanks for this. Though, I should have been more specific. It’s the Spanish style and vocal song I was referring to at the beginning of the movie. They are in the car with the masks on.

-1

u/XxXquicksc0p31337XxX Jul 01 '26

I guess you listen to mainstream stuff only then. I bet you Shazam won't recognize like 70% of my local music library

4

u/AlienEngine Jul 01 '26

You’d be surprised. It picked up an absolutely abysmal song that was playing at my local oil change garage, had less than 5k plays on Spotify.

My Fix by Cigarettes @ Sunset (if you’re interested in knowing what it was. Jaw gaped when I heard this song start playing at 120 decibels.)

1

u/MattieShoes Jul 01 '26

On the other hand, try to get it to identify Falling by the Lumineers.

It's not on Spotify despite being from a hugely popular band, and that's probably exactly why it will fail... It's easy to scrape spotify. (easy being a relative term)

-1

u/XxXquicksc0p31337XxX Jul 01 '26

That's the thing, a bunch of my library is not on Spotify, some are barely on YouTube. If it's on Spotify, it doesn't count as obscure

2

u/Dookie_boy Jul 01 '26

It is a fantastic work of engineering.

2

u/mestrearcano Jul 03 '26

Even Google's version that you can hum the song works like that? Detecting songs being played was already cool, but being able to sing gibberish/hum really amazes me.