Control your music with the wave of a hand!
PalmPlay turns your webcam into a touch-free media controller. Whether you're using the modern web interface or the classic desktop app, you can control Spotify or local music files with simple hand gestures.
- Gesture Control: Play/Pause, Next/Prev Track, and Volume Control using hand signs.
- Modern Web Interface: beautiful Dark Theme UI with Glassmorphism, built with Streamlit.
- Classic Desktop Mode: Lightweight windowed application for quick control.
- Spotify Integration: Seamlessly control your Spotify playback.
- Local Music Support: Play files directly from your local folders.
- Visual Feedback: Real-time gesture tracking and smooth animations.
pip install -r requirements.txtLaunch the beautiful, feature-rich web interface:
streamlit run app.pyOpens in your browser at http://localhost:8501
Run the lightweight CV window:
python gesture_spotify_player.pyThe player uses intuitive gestures to control your playback:
| Action | Gesture | Description |
|---|---|---|
| Play / Pause | ✊ Fist | Clench your hand to toggle playback. |
| Next Track | 🖐️ Swipe Right | Move your open palm rapidly to the right. |
| Prev Track | 🖐️ Swipe Left | Move your open palm rapidly to the left. |
| Volume Control | ✌️ Two Fingers | Hold a "Peace" sign and move your hand Up or Down. |
To control Spotify, set these environment variables (create a .env file):
SPOTIPY_CLIENT_ID='your_client_id'
SPOTIPY_CLIENT_SECRET='your_client_secret'
SPOTIPY_REDIRECT_URI='http://localhost:8888/callback'Place your .mp3, .wav, or .ogg files in the local_music/ folder. The app will automatically detect them.
app.py: The modern Streamlit web application.gesture_spotify_player.py: The core gesture recognition logic and desktop app.server.py: FastAPI backend for advanced serving capabilities.static/: Assets for the web interface.local_music/: Directory for local audio files.
Created with ❤️ for intuitive music control.
This README is automatically generated and updated by AI and CI/CD pipelines.
graph TD;
test_tasks_api["test_tasks_api.py"];
check_env["check_env.py"];
gesture_spotify_player["gesture_spotify_player.py"];
app["app.py"];
server["server.py"];
debug_mp["debug_mp.py"];
generate_tone["generate_tone.py"];
Client --> server;
An interactive, clickable node diagram has been generated. View Interactive Diagram
- Python ecosystem
| Variable | Description |
|---|---|
SPOTIPY_CLIENT_ID |
Configured externally |
SPOTIPY_CLIENT_SECRET |
Configured externally |
SPOTIPY_REDIRECT_URI |
Configured externally |
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment: Copy
.env.exampleor.env.bakto.envand configure. -
Run the application:
python app.py # or streamlit run app.py depending on your framework