Logo credit: soph
Demo video will be added soon
(^)
(^)
- Make a application at https://developer.spotify.com
- Add a Redirect URI to the application and set is as
http://localhost:8888/callback
- Clone this repository (
git clone https://github.com/nexxeln/spotify-voice-control
) - Install all dependencies (
pip install -r requirements.txt
) - Set two environment variables,
SPOTIFY_CLIENT_ID
andSPOTIFY_CLIENT_SECRET
- Authenticate by running
main.py
- Run
main.py
to use
(^)
- Have some music playing thorough Spotify in the device you want to listen in.
- Run
main.py
- Say
play {track name}
to play a track (sayplay random
to play a random track from your saved tracks) - Say
album {album name}
to play an album - Say
artist {artist name}
to play songs of an artist (sayartist random
to play a random artist from your followed artists) - Say
playlist {playlist name}
to play a playlist from Your Library - Say
pause
to pause the music - Say
resume
to resume the music - Say
skip
to skip to the next track - Say
volume {number}
to set the volume to a number between 0 and 100 - Say
repeat
to put the current track in on repeat - Say
shuffle {ON/OFF}
to turn shuffle on or off - Say
current song
to see the current song playing. - Say
go back
orback
to go back to the last played song. - Say
quit
to quit the program - Sometimes the speech_recognition library doesn't understand some names. For this there is a presets feature
- Go to
settings.json
and add your own presets - See
presets_example.json
for an example - Make your own in
settings.json
- Presets can only be one word so make it meaningful
- Now you can say
{preset}
to play a preset
- Go to
Note: Sometimes the speech_recognition library hangs, in that case you have to force quit the program by using ctrl + C
or cmd + C
. Then restart the program by using python main.py
(^)
Make the whole thing in Rust to make it a whole lot faster.
(^)
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
(^)