How Does Shazam Recognize Your Music?

Julius Marlowe / Sep-05-2021
How Does Shazam Recognize Your Music?

If you want to see today’s magic, you don’t have to go further than Shazam. It works wonders when you accidentally hear some track and record a small fragment of it – and this noisy, contaminated, often distorted audio fragment matches the song you want to find. What technologies lie behind this simple blue button? Let’s take a look inside.

How Shazam Changed Music Fans’ Lives

With a superhero’s name and matching abilities, Shazam is now a must for any music fan. It takes tune recognition to a fantastic level. How do you search for the song you suddenly hear and like a lot, so you want it in your player? Okay, if it’s in a familiar language, you can google a line you remember. But what if it’s an instrumental, or the lyrics are in a language you don’t understand?

Here comes Shazam. You launch an app and tap a button. Then the app records a fragment and uploads it to the server where it’s processed. And just in seconds it returns with a result – the name of the artist and the track, plus the album or compilation it’s from.

Classical music? Pop tunes? World music? Club beats? Rap? Reggae? Rock? House? Folk? Samba? Whatever you listen to, chances are Shazam has it. But this implies it has an enormous library and extremely fast hardware to process it? Or how is it done?

Audio Fingerprints

The idea of an audio fingerprint is the core of how Shazam works. It’s not the actual audio Shazam sends to the server to compare with other tracks: it’s the fingerprint it generates locally. That’s why it happens so fast and consumes so little data. The fingerprint is analyzed to find its match in the enormous database that contains over 15 billion tracks.

The technology of audio fingerprinting was invented and developed by Avery Lin-Chun Wang, a chief data scientist who came up with this idea in 2003. Yes, four years before the first iPhone. Wang does not reveal the details of his invention, but it’s known that it utilizes spectrograms. Fingerprints are based on the loudest notes that define the uniqueness of any given piece.

The fingerprints are a sort of hash that sorts out the essential characteristics of the song and filters out background noises, like talks, car and bike sounds, dishes and coffee machines, and stuff. More than that: Shazam often recognizes a song even when its tempo is altered (it often happens at clubs where DJ’s apply pitch control to match the tempo with some other track).

With club music, the magic shows like with no other. It’s often hard even for experienced DJ’s to tell tracks from each other as they only start with drum beats. Shazam is capable of that. It indicates how audio fingerprints reflect even the slightest details that may be unnoticed by humans.

Last but not least: Shazam is not perfect. It can fail at live versions of songs (including your own singing), bootleg mashups and remixes, distorted tracks, or if the environment is too noisy. But if Shazam recognizes the song incorrectly or does not at all, you can report it and provide the right track information. It helps the project to improve. So, human recognition is not completely excluded – it only comes in when necessary.

How Shazam Makes Money

Maintaining the infrastructure of Shazam costs a lot. Plus, its library needs to be updated daily so it can recognize the freshest tracks. If it’s free for users, where does the money come from?

The most obvious answer comes when you recognize a track with it. You can watch it on YouTube, and here comes the ad. You can purchase it on iTunes, and that’s money. It advertises other tracks you listen to on streaming services or buy digitally. And no wonder, as in 2018 Shazam was acquired by Apple. So, it’s not only direct revenue that counts, but also the data it collects and growing attention to the Apple ecosystem (though on Android it works fine too).

The Magic Remains

And even as we know all that, we still cannot help admiring how it recognizes a song we hear in a small café somewhere abroad, with poor mobile Internet and dirty sound. Well, let it remain a wonder. We used to experience such a great feeling when suddenly learning the name of some track we searched for years. With Shazam, this version of discovery is lost, but the general feeling of miracle remains.

Was it interesting for you to read this? Do you often use Shazam? Did it always work correctly? Were there any songs you could not find for long but did with Shazam? If so, tell us your story in the comments. Or share this on Facebook, Twitter, etc., and attach something personal to get your friends to read it too.

Previous Article Next Article

Share on social

Latest Articles

Trending Games

Latest Reviews