Mycroft Community Forum

USB Music Skill - testing and feedback

usbmusic USB Music
Play Music from a USB device with


Play local music by inserting a USB drive into your Mycroft device. Upon Inserting a USB Device Mycroft
will scan the device for MP3 music and add it to a temporary library that you can play.


If autoplay is enabled in the websettings then the usb music will begin playing imediatly when inserted.
Unplugging the usb will automatically stop and unmount the device.

Command Examples

  • “play the artist elvis Presley”
  • “play all shook up”
  • “play the song blue suede shoes”
  • “play the album appeal to reason”





#music, #usb,, #python, #skills, #mp3, #CPS


Tested on platform_picroft (others untested)

Other Requirements

Installation Notes


  • Add “next/previous” commands
  • Add “random” selection
  • Add thumbnails for display
  • …?


  • I have only tested this on picroft so feedback on other devices is very much welcome.
  • provide feedback in this Topic
  • provide feedback in github

Nice skill, wondering if it would be possible to make it run from an smb share instead of the usb drive (with a settings to select the path). Mixed with CMDSkill to mount the path it could auto play. I havent looked at the code yet but I am pretty sure this could be done

1 Like

So I got this working as a test… Sort of… be warned it took a bit of time to load the library in my test case, I don’t know how many songs you have but I am going to need to optimize things and clean up the code a bit. If you are adventurous, update to the latest build “msm update” then update your websettings with your smb share and then issue the command “load network music” and be prepared to wait if you have a large library (maybe try a smaller share first)

Great I will give it a try tomorrow. Thumbs up !

Cool skill, I have some questions:

That means it will copy locally the items or it creates an m3u pointing to the right place? (USB, SMB/whatever future path)

What about other formats like flac, ogg, etc?

What about, if you are willing to create a similar skill for videos, to create a meta-skill “USB-load” which scans the USB (or network path, but we’re speaking of USB) and determine how many audio files and video files are present on the device and playing it accordingly? My ideal skill would be one which scans the media and you can tell something like “play 12 monkeys movie on living TV’s Kodi” or “play the artist elvis presley (locally)”

I do not copy the files to a temporary area. Currently my approach for the “library” is to create a mount point then scan the mount point for mp3 data. I then create a dict of the data that I index when a request is made. The dict list consists of the following data for each found item.

info = {
                        "location": song_path,
                        "label": self.song_label,
                        "artist": self.song_artist,
                        "album": self.song_album

it does take some time to index all the items. and I am not sure at this point if this is a blocking event. I will need to do some testing to be sure. I will look into the flac, ogg, as far as the movies I am just about ready to release my revamped kodi skill and it should cover off some of those items.