Mycroft voice assistant skill that allows spotify music playback on sonos speakers
Mycroft (https://mycroft.ai/) is an open source project that provides a local and controlled alternative to Google Assistant and Alexa. Mycroft can run on a Raspberry Pi. Similarly to Alexa, you can add functionalities to your Mycroft voice assistant setup by installing “skills”.
This project is a skill for Mycroft that provides convenient voice commands to play Spotify music on Sonos speakers.
Big kudos to:
In its current state, this project provides all the commands I have needed in order to voice-control Sonos and Spotify while cooking dinner :). It currently only supports playing music on one Sonos speaker but using the node http api, it should be fairly easy to add support for several speakers.
node-sonos-http-api
node-sonos-http-api
is expected to run on the Pi and be available ay http://localhost:5005/
node-sonos-http-api-resources
# -> Install node.js on the raspberry pi. Google it yourself or check https://linuxize.com/post/how-to-install-node-js-on-raspberry-pi/ for example
cd /home/pi
git clone https://github.com/jishi/node-sonos-http-api.git
cd node-sonos-http-api
touch settings.json
# -> Add your spotify credentials in settings.json. See example in `node-sonos-http-api-resources/settings.json`
# -> Place the file `node-sonos-http-api-resources/node-sonos-http-api.service` in /lib/systemd/system/`
sudo systemctl enable node-sonos-http-api
sudo systemctl start node-sonos-http-api
mycroft-msm install https://github.com/lnguyenh/spotify-sonos-bot-skill
on the Pi.Music & Audio
Spotify
Sonos