Many people interesting in this question. Shazam is quite popular app, so we want to have analoges.

Have you ever wondered how Shazam works? Of course you have, thats why youre here!

Step #1: Shazam fingerprints a massive catalog of music (beforehand) and then stores these fingerprints in a database.

Step #2: A user makes a 10-second sample of a song which is fingerprinted automatically.

Step #3: The application uploads the fingerprint to Shazams service that runs a search for a corresponding fingerprint in the database.

Step #4: If a match is found, a user gets the info on a song hes interested in; otherwise, he will be informed that the song wasnt found.

How does Shazam make money?
Shazam generates the greatest part of its revenue with ads. It shows ads to users while they use the app. On top of that, Shazam is owned by Apple, so it can redirect the traffic to Apple Music and other music streaming platforms.

Where does Shazam get data to identify music?
It's turned out that their team always looks for new opportunities to build a partnership with the most famous labels, music, television and advertising companies, and even movie makers. Moreover, they work directly with artists to upload their tracks before their official release. They even have teams of people who scour through music stores for new and unusual songs! You can read more in this well described guide.