This repository gives an overview of how the original versions of Shazam, detailed in Wang, operate, with code examples in Python.
I recommend reading the Jupyter notebook, rendered on my website.
This loose collection of files are made to be modified to suit your own files and directory structure, however some basic guidance is to:
- Install requirements:
pip install -r requirements.txt
- Create a collection of
.wav
files indata/
from MP3s using a command such asls *.mp3 | rg -o "(.*?)\.mp3" -r '$1' | xargs -n 1 -I '{}' -d '\n' ffmpeg -i '{}.mp3' -ac 1 'converted/{}.wav
- Create a database of song fingerprints:
python create_database.py
- Match a
recording.wav
to one of the songs in the database using:python find_match.py