Control Spotify with your hands, no keyboard or mouse needed. Real-time hand tracking maps gestures to playback controls, and a virtual hover keyboard lets you search for songs.
- Gesture recognition from MediaPipe's 21 hand landmarks, using finger-state heuristics
- Play/Pause, Volume up/down, Next/Previous and Scroll
- Virtual hover keyboard: hold a fingertip over a key to type and search for tracks hands-free
- Spotify Web API (Spotipy) for search, metadata and playback control
| File | Purpose |
|---|---|
main.py |
Webcam loop and gesture-to-action mapping |
gesture_utils.py |
Finger status and gesture classification |
virtual_keyboard.py |
On-screen hover keyboard |
spotifyApi.py |
Spotify client setup |
pip install opencv-python mediapipe spotipy pyautogui python-dotenv
# create .env with SPOTIPY_CLIENT_ID, SPOTIPY_CLIENT_SECRET, SPOTIPY_REDIRECT_URI
python main.pyRequires Spotify Premium for playback control.