How the Shazam App Recognizes Songs So Quickly

Brian McManus of Real Engineering takes a look at the technology behind song recognition app Shazam and how it reveals matching song information so quickly and easily, even in noisy environments. McManus explains how the programming works using hash functions via primary and secondary hash tables for rapid data lookup and seemingly instant results.

First we go through our database of songs and calculate the hash number for each anchor point. Paired songs will contain multiple anchor points which will allow us to categorize short snippets of songs by the frequency of the anchor point. … These addresses are also categorized with song IDs and timestamps within the song in a secondary hash table, allowing us to search for matching songs. This makes it much faster to locate our matches and to find our song.