Manage spotify playback state with voice control.
Explore the docs »
- Spotify account
- Spotify App
- Python 3.6.8
- Microphone
- Save Client Id, Client Secret and Redirect Uri as variables in your os enviroment. You can find them in your Dashboard
SPOTIFY_CLIENT_ID = client_id SPOTIFY_CLIENT_SECRET = client_secret SPOTIFY_REDIRECT_URI = redirect_uri
- Clone the repo
git clone https://github.com/LucasACH/spotify-virtual-assistant.git
- Activate python virtual enviroment
venv\Scripts\activate.bat
To start using the voice control make sure to have spotify open on at least one device.
python app.pyYou can now use these voice commands for changing your current spotify playback state
| Voice command | Action |
|---|---|
| spotify pause | Pause playback on the user’s account |
| spotify play | Resume a user's playback |
| spotify next song | Skip user's playback to next track |
| spotify previous song | Skip user's playback to previous track |
| spotify set volume to [volume %] | Set the volume for the user’s current playback device |
| spotify set repeat mode on | Set the repeat mode on for the user’s playback |
| spotify set repeat mode off | Set the repeat mode off for the user’s playback |
| spotify turn on shuffle mode | Toggle shuffle on for user’s playback |
| spotify turn off shuffle mode | Toggle shuffle off for user’s playback |
| spotify current song name | Get information about a user’s current song |
| spotify devices | Get information about a user’s available devices |
| spotify transfer playback to [computer or smartphone] | Transfer playback to a new device and determine if it should start playing. |
Lucas Achaval
[email protected]
LucasACH