We’ve all been there – in the store, in the car – we just catch a song and we just can’t place it. Maybe it’s an old favorite that we just can’t place, or it could be something brand new that we want to hear again. And since 2008, we’ve been turning to Shazam to aid our memories and answer, “What was that song?”And nearly flawlessly, we’ve been able to get a quick and accurate answer that tells us not only the title, but also the artist, the lyrics and the year. And even a link to buy it as an mp3!
Shazam is able to “listen” to a small part of a recorded song through the microphone on a cell phone or other device, and provide the basic information you’d be interested in. That includes the title, artist, album and year – even the lyrics. While we’ve come to take it for granted, within seconds we’re able to see all the information we need.
And if you really like what you heard, you can download it too! Shazam drives about 5% of all music downloads – around 400,000 per day.
There are millions of songs in Shazam’s database. That makes it unbelievable to realize that it sorts information so quickly and is able to provide a result from just a few seconds worth of a song. A single song three to 4 minutes long is normally about 4 megabytes of data, and Shazam is able to identify your song out of terabytes of information.
How Shazam Can Recognize Millions Of Songs
Having said that, we have to admit it’s not exactly true. While terabyte hard drives are becoming more common in home computers, it’s still not that easy to search that much data. It would be both a storage and an efficiency nightmare. Instead, this highly-advanced algorithm is a version of that old game show “Name That Tune.”
Creating Audio Fingerprints
Shazam takes “fingerprints” of the music, called spectrograms. These are digitized versions of snippets of the song. A small section of sound is identified by its time, frequency and intensity. This data is turned into a digital hashtag – a series of numbers that together uniquely identify a section of audio.
That’s what makes up the “real” library that is searched in Shazam.
Identifying The Song
No two songs have exactly the same spectrogram. In fact, no two performances of the same song have exactly the same spectrogram. There’s always a slight variance in at least one of the three factors that make it unique. That’s how Shazam can tell Panic! At the Disco’s version of “Bohemian Rhapsody” (featured in Suicide Squad) from Queen’s original.
When you “Shazam” a song, a spectrogram of that song is created and compared to the database.
It works kind of like a fingerprint. It’s hard to avoid all the crime dramas on TV, like CSI and NCIS, so you’ve probably seen how computers don’t examine the entire fingerprint, but choose just enough points on the whorls to make a match. Obviously, a single difference is enough to invalidate the match completely. But when enough points are identical, it’s reasonable to conclude that the hunt is successful.
We’re not talking here about just a couple spectrograms per song; there’s at least a few every second. That part of the algorithm isn’t announced, but estimates run between three and 30 points per seconds. So there’s a couple points that Shazam is comparing every second.
Shazam first narrows the possibilities down by frequency, but that’s not enough to identify the song. A combination of frequency and timing is what makes a song unique. After identifying matches by frequency, a match is found for the timing from within the first results.
The ideas behind this were developed by Avery Wang, a team member at Shazam. Wang is the only member of the original team still with the project.
Building a Library
How did Shazam get such a huge database? The answer lies in making deals. Even before the era of apps, Shazam was in the business of song recognition. They’d made a deal to digitize a library of 1.5 million songs for Entertainment UK in return for the right to create their database. Through similar deals over the years, they’ve been able to continue to grow.
It’s hard to find out how many songs they have indexed now, but even nine years ago it was over eight million. With new music coming out all the time and the vast amounts of lesser-known music and recordings outside the English-speaking world, it’s a library that can continue to grow forever.
Shazam also includes much more than just songs in its library: TV commercials and even programs now work with the app so that the user can be brought to additional content online. It’s become a key part of cross-platform marketing in many cases.
What Shazam Can’t Do, And Why
The millions of songs in their database give Shazam a huge advantage. But it doesn’t always work. How could that be?
More Music Than We Imagine
It’s hard to imagine, but not all the songs ever recorded are in the database. Yes, they only have the “greatest hits” – even if these charts include millions of entries. While Shazam may contain most of our favorites, there are still large gaps.
Did you ever stop to think about how much recorded music there is? Even the number of recorded covers of Beatles songs is huge – 2710, according to a list from WhoSampled.com. The same list says Frank Sinatra’s been covered 473 times and did 144 covers himself. That’s a LOT of recordings. A grand total in the millions doesn’t seem so outlandish now, does it?
A Wide World
There are also many non-English songs not in the database yet. While it’s constantly growing and including more diverse music, it still has far to go.
Since 2013, Shazam has an agreement with India’s Saavn.com, for instance, and is now able to recognize many songs of different genres across many Indian languages. They continue to grow in other areas as well.
There’s always the possibility that Shazam hasn’t obtained the rights to catalog certain music, as well, but so far they’ve been extremely successful handling these legal challenges.
The Milli Vanilli Effect
If you’re at a concert or even watch a “live” performance on TV and Shazam does recognize the song, it might be time to be suspicious. The data Shazam uses is so precise that it won’t identify two different renditions of the same song, even by the same artist. So there might just be lip-syncing going on if the app does know the song!
Why? No artist duplicates a song 100% identically two times. Even tiny changes in frequency or timing are picked up by Shazam’s algorithm. The smallest change – unnoticeable to the human ear – makes Shazam recognize that it’s different.
For the same reason, Shazam isn’t going to recognize a song when you try singing along or humming it either – no matter how good you are.
Could It Ever Be Wrong?
It’s hard to imagine circumstances where Shazam would give the wrong information for a song. It’s far more likely not to recognize one. But it’s possible that if an extended part of a song was sampled in another recording without altering the speed or making other changes, Shazam could identify the original, not the remix. However, it would take incredible timing for Shazam to only hear the sampled part of the song.
A Brief History of Shazam
At the beginning of this article, we mention that Shazam’s been the best-known music app since 2008. But the company actually goes back to 1999, before there were apps. Started in England, it was originally called 2580 – which was cell phone shortcode you could call. Just play the song into your phone for 30 seconds, and you’d receive a text with the name and artist. By 2004 it made its way to the US, and it appeared in app form for the iPhone 2.0 in July 2008.
There have been over one billion downloads of the app, ranking it among the most-downloaded of all time. About 120 million active monthly users have “Shazamed” 30 billion songs.
The app makes money through advertising as well as referrals for all those songs it helps sell. An ad-free version, Shazam Encore, is available for $6.99. This version also integrates with Spotify to offer full-track playback.
When you just have to know who sings that song on the radio or what it’s called, Shazam is a great place to turn. Its revolutionary way of identifying music makes it a reliable and fast way to find almost any song you may be looking for. It may not be much help when you’re just randomly humming something and you don’t know what it is, but when it comes to identifying recorded audio, it’s an amazing tool for getting the info you want.