Spotify Gesture Controller is a project realised during "Programming in functional languages" course. The main goal was create the app, which can:
- play/pause current track
- skip to next/previous track
- add/remove song to saved
- volume up/down music
using hand gestures. To do this, Python 3.9 was used with OpenCV and MediaPipe libraries. Tensorflow model was trained on custom dataset, which was created by myself.
Remember: to use this app you need to have premium version of Spotify.
- Download repository
git clone https://github.com/kzaleskaa/hand-gesture-recognition.git cd hand-gesture-recognition
- Create a new project at Spotify Dashboard and edit settings - add
http://localhost:8888/spotify-api/callback/
in Redirect URLs. - Create your environment and activate it
$ python -m venv venv
- Install requirements
$ pip install -r .\requirements.txt
- In root project directory, create .env file with following content (from your Spotify Dashboard):
CLIENT_ID=<YOUR CLIENT ID> CLIENT_SECRET=<YOUR CLIENT SECRET>
- Start app
python main.py
- Open your spotify app, start play music and use this app to control it
Based on simple REST principles, the Spotify Web API endpoints return JSON metadata about music artists, albums, and tracks, directly from the Spotify Data Catalogue.
If no action on Spotify is made, please open your app and start play music manually. Then, you can use this app to control it.