HandJam lets you control your Spotify music hands-free using your laptop's webcam.
Pause, play, skip tracks, and adjust volume with simple hand gestures — no mouse, no keyboard, just your vibe.
- Gesture-based controls:
- Open palm → Play / Pause
- Point right → Next track
- Thumb up → Volume up
- Thumb down → Volume down
- Real-time track info & album art overlay
- Spotify Web API integration (works with any active Spotify device)
Using MediaPipe Hands and OpenCV, AI DJ recognizes your hand gestures in real time and maps them to Spotify playback controls via Spotipy.
-
Clone the repo
git clone https://github.com/your-username/AI-DJ.git cd AI-DJ
-
Install dependencies
pip install -r requirements.txt
-
Configure Spotify API
- Create an app at Spotify Developer Dashboard
- Add this redirect URI:
http://127.0.0.1:8888/callback
- Copy your Client ID and Client Secret into
music_controls.py
.
-
Run
python main.py
- Launch the app and allow Spotify authentication (opens in your browser).
- Ensure you have an active Spotify device (desktop, phone, or speaker).
- Show gestures in front of your webcam — AI DJ will do the rest.
- Press
q
to quit.
- Python
- OpenCV – Camera feed & UI
- MediaPipe Hands – Gesture recognition
- Spotipy – Spotify API integration
- Requests & NumPy – For album art display
- Package into a one-click desktop app (Windows/macOS)
- Gesture remapping & calibration
- Support for Spotify Premium advanced features
Pull requests and suggestions are welcome! Feel free to fork and improve AI DJ.
MIT License – free to use and modify.