A Python Shazam-style audio recognition project. It includes a socket server, a Tkinter desktop client, user authentication, catalog management, and audio fingerprinting for matching recorded snippets against a local song database.
- Desktop client for recording audio and viewing recognition results
- Socket server for login, registration, recognition, and admin commands
- SQLite-backed user, song, and fingerprint storage
- Admin tools for importing songs and editing catalog metadata
- Audio fingerprinting and comparison pipeline
- Configurable host, port, and database path through environment variables
- Python 3.10 or newer
- PortAudio/PyAudio support on your system
- Python packages listed in
requirements.txt
git clone https://github.com/benbop/Shaben.git
cd Shaben
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txtOn Windows PowerShell:
git clone https://github.com/benbop/Shaben.git
cd Shaben
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txtStart the server:
python server.pyIn another terminal, start the client:
python client.pyBy default, the server listens on port 65432. The client connects to
127.0.0.1:65432.
When the database is initialized, default users are created if no users exist:
- Admin:
admin/admin123 - User:
listener/listener123
You can override these defaults with environment variables before starting the server:
export SHAZAM_ADMIN_USERNAME="admin"
export SHAZAM_ADMIN_PASSWORD="change-me"
export SHAZAM_USER_PASSWORD="listener-password"SHAZAM_DB_PATH- path to the SQLite database fileHOSTandPORT- client connection targetSERVER_HOSTandCHAT_HOST- server host/port configuration used by the app
server.py- socket server and command handlingclient.py- Tkinter desktop clientpg_db.py- SQLite database setup and authentication helpersingest_catalog.py- import songs into the catalogbackend/- fingerprinting, spectrogram, peak detection, and comparison codeprotocol.py- message packing and JSON helpers
Apache-2.0