๐Ÿ“ฆ nexxeln / spotify-voice-control

Voice control for Spotify through the terminal

โ˜… 79 stars โ‘‚ 7 forks ๐Ÿ‘ 79 watching โš–๏ธ MIT License
musicpythonspeech-recognitionspotifyspotify-apivoice-commandsvoice-recognition
๐Ÿ“ฅ Clone https://github.com/nexxeln/spotify-voice-control.git
HTTPS git clone https://github.com/nexxeln/spotify-voice-control.git
SSH git clone git@github.com:nexxeln/spotify-voice-control.git
CLI gh repo clone nexxeln/spotify-voice-control
Shoubhit Dash Shoubhit Dash chore: add funding.yml f304538 3 years ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ screenshots
๐Ÿ“ src
๐Ÿ“„ .gitignore
๐Ÿ“„ LICENSE
๐Ÿ“„ main.py
๐Ÿ“„ methods.py
๐Ÿ“„ README.md
๐Ÿ“„ requirements.txt
๐Ÿ“„ settings.json
๐Ÿ“„ README.md

Logo

Spotify Voice Control

A voice control utility for Spotify ยท Report Bug ยท Request Feature

Logo credit: soph

play Demo video will be added soon

Built With

(^)

Prerequisites

(^)

Installation

  • 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 and SPOTIFY_CLIENT_SECRET
  • Authenticate by running main.py
  • Run main.py to use

(^)

Usage

  • 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 (say play 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 (say artist 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 or back 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
Note: Sometimes the speechrecognition 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!
  • 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

(^)