Mycroft with Google AIY Voice kit disk image

Hmm, if you also don’t hear the listening sound, I sometimes find it has muted the speaker.
‘Set volume to 7’ on the commandline, works pretty good then then. I should actually put that in the custom.sh to make sure it does not start muted. It does that sometimes after updates I guess?

Also updating to the latest version seems to start the buttoncode before starting the messagebus.
It should be started after the admin_service (re)starts by the autorun.sh. I still don’t get why that got changed.

However the voice output should work if you heard the voice before when booting? So after the update it remains quiet?

I also installed mopidy on this setup before, so that can be done for sure.
I will see if I got some install docs somewhere.

so, after multiple attempts realized a couple of things -

  1. default mimic TTS works. Google TTS is erratic (though very accurate when it works). Will stick to mimic for the time being to test out other functionalities
  2. it cannot hear any commands when its playing something in the speaker - tried mic levels, going very close to the mic etc. it just doesn’t detect the hotword
  3. sound level has been okay (commenting on your suggestion). since i can hear the feedback ‘beep’ sound on hotword detection
  4. installed mopidy as well. unable to access web clients (installed mopify and iris). i have installed mopidy on other machines and it works flawlessly. it just loads a mopidy landing page on ipaddress:6680

any suggestions are most welcome. thanks!

I tried to build these today but I bought the 3B+ Pi’s, which don’t seem to have support in your image. It also seems that the picroft builds don’t have support for AIY yet. So I’m in a bit of a pickle.

Could you post the instructions on how you modified the image for AIY? (or built it?) I’d like to build off the newer picroft image to the get the Pi 3B+ support.

Thanks,
Ted

Is AIY now supported in Picroft Master? That would be great if so!

hey voiceco,

I only tested with mimic as a voice so far.

The design of the cardboard box is indeed stupid, the mic is placed above the speaker, should have moved it to the other side. I designed a new printable encasing, but I still have to print it. You could end the song/music with the stop button though, but commands will not be picked up with the mic in its default location.

I found my mopidy adjustments, I installed like this:

# add mopidy as a repo
wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/jessie.list
sudo apt-get update

#make exfat dir for usb disk or in my case, usb attached mp3 player, for local mp3 playing
sudo mkdir /media/Walkman

#install modules
sudo apt-get install exfat-fuse exfat-utils sox libsox-fmt-mp3 mopidy-spotify mopidy-local-sqlite mopidy libffi-dev

#modules for mopidy-local
sudo pip install nested-lookup 

# install envirex version to enable local dirs
msm install https://github.com/Enverex/skill-mopidy-local.git

# install mopidy-local info
edit or create .mycroft/mycroft.conf
and add:

{
  "Mopidy Skill": {
    "mopidy_url" : "http://localhost:6680"
  }
}


#enable mopidy as a service, then stop it
sudo systemctl enable mopidy
sudo systemctl stop mopidy

# update config
sudo cp -r mopidy.conf /etc/mopidy/mopidy.conf

# start mopidy and index your local music files
sudo systemctl start mopidy
sudo mopidyctl local scan

#reboot
sudo reboot now

My mopidy.conf looks like this:

[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy

[logging]
config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log

[local]
enabled = true
library = sqlite
media_dir = /media/Walkman
scan_flush_threshold = 100
scan_follow_symlinks = false

[m3u]
playlists_dir = /var/lib/mopidy/playlists

[http]
enabled = true
hostname = 0.0.0.0
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[spotify]
enabled = false

[local-sqlite]
enabled = true
directories =
  Albums                  local:directory?type=album
  Artists                 local:directory?type=artist
  Composers               local:directory?type=artist&role=composer
  Genres                  local:directory?type=genre
  Performers              local:directory?type=artist&role=performer
  Release Years           local:directory?type=date&format=%25Y
  Tracks                  local:directory?type=track
  Last Week's Updates     local:directory?max-age=604800
  Last Month's Updates    local:directory?max-age=2592000
timeout = 10
use_album_mbid_uri = true
use_artist_mbid_uri = false
use_artist_sortname = false

I also mount the usb disk or mp3 player attached to the raspberry pi when booting up,
To do that I changed custom_setup.sh in the homedir, and added:

sudo mount /dev/sda1 /media/Walkman

Hope this works for you!
grtz,
Tjoen

Hi Ted.
The image is actually a raspbian jessie image, which updates using the default picroft version. I just use a newer kernel version, to enable the aiy, and adjusted some config files. The problem is that the new rpi seems to use raspbian stretch. Mycroft does not work properly on stretch, yet… I came across dependency problems, and weird ssl errors when installing it on stretch.
It seems I am not the only one: Raspberry Pi 3 Model B+ Compatibility?

Not sure how you would be able to get it working yet.

This thread has all the configuration info you need for the AIY: PiCroft issue with pairing

Good luck,
Tjoen

Hey @tjoen ,

Thanks for the detail response. So here’s how its working for me -

  1. I have pretty much the same config on mycrof and mopidy
  2. Have a bunch of other extensions as well on mopidy
  3. Whenever I pass a voice command, I do see “Mopidy: Lowering volume/Restoring volume” - which means Mopidy is working
  4. Unfortunately, its not passing the command to Mopidy - for e.g. play michael jackson on spotify - it starts searching for the Artist on Wikipedia (which means its detecting the intent but not passing it to the correct handler)
  5. I still don’t see the Web frontend on ipaddress:6680/iris/. - This way I can actually test if Mopidy or Spotify is working.
  6. When I manually start Mopidy, I can see the log that Mopidy is working and Spotify is connected (with the provided credentials)

Any other ideas I can try/debug ?

Hmm, not sure if lowering mopidy volume means it’s working. That will be generated by the skill. If you don’t get the web interface, it seems to me it’s not working. Is the http setting in mopidy set to 0.0.0.0 or to the local ipaddress? Then you should be able to get the webinterface on local ipadres http://x.x.x.x:6680/

You might want to try adding this to your mopidy.conf:

[audio]
mixer = software
mixer_volume =
output = autoaudiosink
buffer_time =

[softwaremixer]
enabled = true

Not sure if I had this in my setup, it’s in a saved mopidy.conf file I found.
I will try and install mopidy this week to the image, see if anything has changed.

@tjoen As mentioned, I have the mopidy working -

  1. Checked via the CLI status
  2. Checked this as well - ipadd:6680 - this shows the landing page of Mopidy.

Problem is, I dont get the Web extensions such as Iris or Mopify (though I have installed the extensions & configured in the .conf file).

Ah, did you happen to install those though pip?
I do actually remember having problems, mopidy would not use my installed extensions.
Not quite sure if it was from using pip or apt-get.

Did you try installing a webextension though apt-get?

ye, i figured that as well. unfortunately, i couldn’t find apt-get repos for the extensions and the commands didnt work. could you please help (for Iris) ?

Just added the repo, updated and did a search with sudo apt-cache search mopidy
I also can’t seem to find a webextension now, I was pretty sure I fixed it that way.

Might have pulled it with git in the directory. I’m not sure, it’s been a couple of months
I will reinstall mopidy tomorrow on the AIY and see if I got some notes on what I did before,

If mopidy is running as ‘mopidy’ user, you could try:

sudo -u mopidy pip install Mopidy-Iris

Will let you know my progress tomorrow.

grtz, Tjoen

okay i have tried this earlier. cool shall wait after you’ve tested it. much thanks for prompt response

Thanks @tjoen. I think for the short term it makes sense for me to just return the 3B+ boards and get the 3B ones. Saves me $5 a board. I don’t need 5GHz wireless :slight_smile:

Thank you for your work on the image.

1 Like

hmm, ok. I first uninstalled mopidy 2.1 with:
sudo pip uninstall mopidy
sudo apt-get uninstall mopidy

then reinstalled with:

sudo apt-get uninstall mopidy libsox-fmt-mp3 mopidy-spotify mopidy-local-sqlite

setup my mopidy.conf with a local dir of mp3’s,

[local]
enabled = true
library = sqlite
media_dir = /media/Walkman
scan_flush_threshold = 100
scan_follow_symlinks = false

sudo systemctl enable mopidy
sudo systemctl start mopidy

index that mp3 dir:

sudo mopidyctl local scan

I then did a “play artist beasty boys” in the mycroft-cli and it played the song.
I also did a “play track glorybox” in the mycroft-cli and it played Portishead glorybox.
Both were in my mounted mp3 directory.
Still not able to install a webinterface though, but mopidy seems to work here.

I did have a webinterface installed before, but I did not document it.

I’m using @Enverex mopidy skill:
msm install https://github.com/Enverex/skill-mopidy-local.git

okay. and which mopidy config file does it load ? also, is your mopidy installation on usr/bin or usr/local/bin ?

It’s in /usr/local/bin/mopidy
And my mopidy config is in /etc/mopidy/mopidy.conf

[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy

[logging]
config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log

[local]
enabled = true
library = sqlite
media_dir = /media/Walkman
scan_flush_threshold = 100
scan_follow_symlinks = false

[m3u]
playlists_dir = /var/lib/mopidy/playlists

[http]
enabled = true
hostname = 0.0.0.0
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[spotify]
enabled = false

[local-sqlite]
enabled = true
directories =
  Albums                  local:directory?type=album
  Artists                 local:directory?type=artist
  Composers               local:directory?type=artist&role=composer
  Genres                  local:directory?type=genre
  Performers              local:directory?type=artist&role=performer
  Release Years           local:directory?type=date&format=%25Y
  Tracks                  local:directory?type=track
  Last Week's Updates     local:directory?max-age=604800
  Last Month's Updates    local:directory?max-age=2592000
timeout = 10
use_album_mbid_uri = true
use_artist_mbid_uri = false
use_artist_sortname = false

grtz, Tjoen

are you sure these are the correct commands ?

also, the biggest catch is around installing a web extension or any extension which is done through pip install. since that’s where the user permissions and config files are in conflicts. on a stock rpi setup, this works flawlessly but with mycroft setup - there’s some work around py virtual environment and user permissions