system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does shazam recognize a song from any part, and how does it do that so fast?
gpt
ELI5 version:

They run a program that listens to a bunch of songs. By taking samples of the song at different points and convert this into a unique key. The song is then stored in a huge list of songs, each labeled with that unique key. When you want to find the name of a song, you tell the Shazam app to sample the song you are listening to, it creates a key and then finds a matching key in the huge list of songs, along with the song you are looking for.


ELIprogram:

Algorithm that scans a large catalog of songs, samples peak frequency of song at sudo-random intervals, converts samples into a hash, stores song in hash-table. Similar algorithm for look-up.