How can Shazam identify a song in less than 10 seconds?

In the remote past, when we listened to a song on the radio and really enjoyed it, we had to hope that the broadcaster would speak the name of the artist or song to look for vinyl and listen until we got sick. Today, fortunately, just point the phone to the source of the song and in less than 10 seconds you can get name, artist, lyrics and many other data! But how can Shazam make this recognition so quickly?

For this to happen, the app needs to have a truly powerful database, being updated daily with music from various regions of the planet. For each song, Shazam creates a kind of fingerprint on a 3D graphic. This image is called a spectogram and is the key to music recognition.

On the X axis, the tempo of the song is printed, while on the Y its frequency is recorded, while on the Z it marks the intensity. That way you can turn a song into a scannable graphic by the app. Below is a simple representation using only the X and Y axes, but you can already get an idea of ​​how the program works:

Graphic

Shazam

Musical frequency varies even within the same song. The application, when recording the initial information, looks for the highest point of this frequency, from there to create a match for the rest of the graph, which is formed through the time of the song.

When a user points the app to a song they want to find out more about, the program creates that same 3D graph from that 10-second recording, scans the database for songs that match exactly the same points, and that's it! The magic is complete!

If the song is not included in the database or the recording source is too noisy, it is not identified by Shazam, and is quite annoying for those who searched and could not. However, this has been decreasing more and more.

Shazam

In the beginning, it was different

And if you think that Shazam started out cute as an app, you're pretty much mistaken. The company was founded in 1999, providing music identification service in 2002 - you might imagine that not even broadband was so popular at that time, so what about smartphones and the like ...

In this period, only users in England had access to the service, which was made through a telephone call. One had to dial 2580 and place the cell phone near the sound source. The call was automatic: as soon as Shazam listened to the music, the call was cut off and a moment later the person received a message identifying the name and artist.