How the Heck does Shazam work?
3 days ago
- #song-recognition-algorithm
- #audio-fingerprinting
- #spectrogram-analysis
- Phones identify songs by capturing audio with a microphone, converting it into a digital waveform, and applying a Fast Fourier Transform (FFT) to create a spectrogram.
- The algorithm simplifies the spectrogram by discarding most data, keeping only prominent frequency peaks as 'fingerprints' or hashes based on frequency pairs and time differences.
- Matching uses an inverted index for efficient lookup, comparing hashes and their timing against a large database, with modern approaches including server-based systems like Shazam and on-device recognition like Apple's and Google's features.