USB Music
Play Music from local (non-cloud based) sources (usb, smb, local path) with Mycroft.ai
About
This Skill will play local (non-cloud) music sources (USB, SMB, Local)
- Inserting a USB drive into your Mycroft device. Upon Inserting a USB Device Mycroft
will scan the device for playable music and add it to a temporary library that you can play.
- Adding an SMB source will let you play music from that source.
- Adding a local path source will let you play music from that source.
- Supports the following music formats 'mp3', 'm4a', 'flac', 'wav', 'wma','aac'
Features
AutoPlay
If AutoPlay is enabled in the websettings then the USB music will begin playing immediately when inserted.
Unplugging the usb will automatically stop and unmount the USB device.
AutoPlay only functions with USB sources, not SMB or Local Path.
Automatic Insert Command Request
If enabled the skill will automatically send a command to the messagebus
when the USB is inserted.
Why?
Why not?
This will let you do all sorts of things with this skill by invoking other skills.
Example:
- You have a running playlist that is stored on a USB stick.
- You insert the USB before you jump on the treadmill.
- The insertion automatically issues the following command to the messagebus
- "set a timer for 20 minutes"
- Now you have workout music and a timer to notify you when your workout is complete.
Command Examples -
Collecting the library may take several minutes depending on the library size
- "play the artist elvis Presley"
- "play all shook up"
- "play the song blue suede shoes"
- "play the album appeal to reason"
- "play music by Elton John"
- "play my music"
- "play some music"
- "play any music"
- "update network library"
- "update local library"
- "update usb library"
- "update music library"
- "show music library"
- "stop"
Credits
- PCWii (20200709 Covid-19 Project)
- Some elements borrowed from https://github.com/Preston-Sundar/RaspberryPi-Pyudev-Usb-Storage-Detector/blob/master/usbdev.py
Category
Media
Tags
'#music, #usb, #mycroft.ai, #python, #skills, #mp3, #m4a, #flac, #wav, #wma, #aac, #CPS, #SMB, #Local '
Require
Tested on platform_picroft (others untested)
Other Requirements
- Mycroft
- mutagen
- pyudev
- vlc
Installation Notes
- SSH and run: msm install https://github.com/pcwii/usb-music.git
If all the requirements are not satisfied manually install the requirements before installing this skill
- SSH and run:
pip install pyudev
sudo apt-get install vlc
sudo reboot
msm remove https://github.com/pcwii/usb-music.git
msm install https://github.com/pcwii/usb-music.git
Todo
- Add "next/previous" commands
- Add "random" selection
- Add thumbnails for display
- Need to cleanup the regex and make requests more generic (20210508)
Add Network "SMB" support (20200710)
Add support for other music formats (FLAC, OGG)
Add Local path support (20200722)