https://github.com/nexxeln/spotify-voice-control
Voice control for Spotify through the terminal
https://github.com/nexxeln/spotify-voice-control
music python speech-recognition spotify spotify-api voice-commands voice-recognition
Last synced: about 2 months ago
JSON representation
Voice control for Spotify through the terminal
- Host: GitHub
- URL: https://github.com/nexxeln/spotify-voice-control
- Owner: nexxeln
- License: mit
- Created: 2022-02-02T04:35:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-23T03:17:30.000Z (over 2 years ago)
- Last Synced: 2024-10-04T11:52:54.963Z (9 months ago)
- Topics: music, python, speech-recognition, spotify, spotify-api, voice-commands, voice-recognition
- Language: Python
- Homepage:
- Size: 338 KB
- Stars: 75
- Watchers: 2
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/funding.yml
- License: LICENSE
Awesome Lists containing this project
README
Logo credit: soph

_Demo video will be added soon_
### Built With
- [Python](https://python.org/)
- [spotipy - Spotify api wrapper](https://github.com/plamere/spotipy)
- [speech_recognition](https://github.com/Uberi/speech_recognition)(^)
### Prerequisites
- [Python 3.6+](https://www.python.org/downloads/)
- [Spotify Premium](https://www.spotify.com/premium/)(^)
### Installation
1. Make a application at [https://developer.spotify.com](https://developer.spotify.com)
2. Add a Redirect URI to the application and set is as `http://localhost:8888/callback`
3. Clone this repository (`git clone https://github.com/nexxeln/spotify-voice-control`)
4. Install all dependencies (`pip install -r requirements.txt`)
5. Set two environment variables, `SPOTIFY_CLIENT_ID` and `SPOTIFY_CLIENT_SECRET`
6. Authenticate by running `main.py`
7. Run `main.py` to use(^)
### Usage
1. Have some music playing thorough Spotify in the device you want to listen in.
2. Run `main.py`
3. Say `play {track name}` to play a track (say `play random` to play a random track from your saved tracks)
4. Say `album {album name}` to play an album
5. Say `artist {artist name}` to play songs of an artist (say `artist random` to play a random artist from your followed artists)
6. Say `playlist {playlist name}` to play a playlist from Your Library
7. Say `pause` to pause the music
8. Say `resume` to resume the music
9. Say `skip` to skip to the next track
10. Say `volume {number}` to set the volume to a number between 0 and 100
11. Say `repeat` to put the current track in on repeat
12. Say `shuffle {ON/OFF}` to turn shuffle on or off
13. Say `current song` to see the current song playing.
14. Say `go back` or `back` to go back to the last played song.
15. Say `quit` to quit the program
16. 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_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`
(^)
## Future plans
Make the whole thing in Rust to make it a whole lot faster.
(^)
## Contributing
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!1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request(^)