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_IDandSPOTIFY_CLIENT_SECRET - Authenticate by running
main.py - Run
main.pyto 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 randomto 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 randomto play a random artist from your followed artists) - Say
playlist {playlist name}to play a playlist from Your Library - Say
pauseto pause the music - Say
resumeto resume the music - Say
skipto skip to the next track - Say
volume {number}to set the volume to a number between 0 and 100 - Say
repeatto put the current track in on repeat - Say
shuffle {ON/OFF}to turn shuffle on or off - Say
current songto see the current song playing. - Say
go backorbackto go back to the last played song. - Say
quitto quit the program - Sometimes the speech_recognition library doesn't understand some names. For this there is a presets feature
- Go to
settings.jsonand add your own presets - See
presets_example.jsonfor 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
(^)
