It’s a typical scenario: You listen to a song at a restaurant or an event, and then that song stays with you, haunting you, forcing you to find its source and singer. If you wish to know more about how Shazam’s highly advanced algorithm for recognizing songs and other audio content works, and if you wish to use the same logic and process to create your own mobile app for recognizing songs, then our System Architects and Mobile App Engineers at TechAhead can help you.
Source: https://www.techaheadcorp.com/blog/decoding-shazam-how-does-music-recognition-work-with-shazam-app/
2. It’s a typical scenario: You listen to a song at a restaurant or an event, and
then that song stays with you, haunting you, forcing you to find its source
and singer.
Earlier, the only option was to replicate that song, or a few verses and ask
friends and family to hunt for the source.
But since 1999, this changed, because that year, a magical app was born,
called Shazam.
3. WHAT EXACTLY IS SHAZAM?
Shazam is an app that can recognize music, movies, advertising, and television
shows, and showcase the source and other details about that content.
It seems magical, right?
In this blog, we will decode the internal working of Shazam, and find out how it
works.
But first, let’s have an overview of Shazam, and find out some startling facts
about this app.
4. STUNNING FACTS ABOUT SHAZAM
As of September 2022, Shazam has more than 225 million global monthly users, and it’s expanding at a rapid
pace.
In 2015, it was found that 5% of all music downloads, across the world, originated from Shazam, making it
one of the biggest databases for music content, anywhere in the world.
And one interesting trivia: The most searched (Shazamed) song ever is Dance Monkey, which has been
searched a record 41 million times, and Drake is the most Shazamed artist ever with 350 million hits.
An incredible achievement for a tech-powered mobile app!
5. HOW SHAZAM WORKS: UNDERSTANDING MUSIC RECOGNITION
ALGORITHMS & FINGERPRINTING
The operational model of the Shazam app is simple: The app listens to max
20 seconds of a song or video content from TV, a movie, ads, etc, and it
can be a chorus, verse, or a mere intro, and then instantly recognize that
content, and show the results.
An important thing to note: No matter how long that song or content is, the
Shazam app will only read the first 20 seconds.
6. Now, once that data is fed into the Shazam app, then it will:
• Create a fingerprint record that sample
• Create a fingerprint record that sample
• Deploy music recognition algorithms to tell you exactly which
song or content it is.
In 2013, one of the inventors of the Shazam app: Avery Li-Chung
Wang, shared the magic behind Shazam app via research paper,
and for the first time, revealed how this app works.
7. First, let’s understand what is sound..
As per science, sound is a vibration, that propagates via
mechanical waves comprising pressure and displacement, and the
medium is air mostly, or water in some cases.
The three main components of sound are frequency, time, and
amplitude.
Understanding the elements of sound
8. Amplitude is the loudness of the sound,
which is actually the size of the vibration.
Frequency, measured in Hertz (Hz) is the
rate at which the vibration occurs. A human
being can only listen to sound whose
frequency lies between 20Hz to 20,000Hz.
Source:
https://www.toptal.com/algorithms/shazam-it-music-processing-
fingerprinting-and-recognition
9. Once the Shazam app records the first few seconds of
a song or any audio content (max is 20 seconds of
recording), it will create a unique audio fingerprint of
that song.
Two unique fingerprints are created, and then they
are matched to find the exact song which is being fed
into the system.
Creating unique audio fingerprint
10. At this point, we have the unique fingerprints of both
audio files. Now, the actual process of matching the
songs starts.
Now, if we plot this process of the matching process
onto a scatter plot, wherein the Y-axis represents the
time at which hash occurs in the user’s recording, and
X-axis is the time at which the hash occurs in the
database’ recording, then the matching hashes will
form a diagonal line.
How Shazam matches the songs & provides the results?
12. If you wish to know more about how Shazam’s highly advanced
algorithm for recognizing songs and other audio content works,
and if you wish to use the same logic and process to create your
own mobile app for recognizing songs, then our System
Architects and Mobile App Engineers at TechAhead can help you.
Schedule a no-obligation, free consulting session with our team
right here!