Mycroft with Google AIY Voice kit disk image

Perfect, thank you! :smiley:

2 Likes

Here is a short video I put up on our YouTube channel.

Thanks.

3 Likes

Hey @tjoen this is great! I apologize if you already posted but I’m having trouble finding the github link for Picroft/AIY. I’d like to experiment with some of the new skills you added with the release.

Thanks for making this!

Hi @kaiservonarctic,

I wanted to make a repo for the aiy version, but support for the AIY will probably be incorporated in the picroft version soon, and I actually did not have time to set it up properly.

The skills however are all online:

sarcasm fallback skill - https://github.com/tjoen/fallback-sarcasm
dutch radio skill - https://github.com/tjoen/skill-dutchradio
better joke skill - https://github.com/tjoen/skill-better-jokes can now be installed through mycroft-skills
numbers skill - https://github.com/tjoen/mycroft-skill-numbers

The sonos chromecast streaming is not really a skill, but a python script. Still needs a wrapper to be started from mycroft.

Sonsos and Chromecast streaming - https://gist.github.com/tjoen/b503c4366803e21c809a929b8d183f99

The image backup script is not yet online, if your interested in that one, let me know, I will create a repo.

Currently making progress on a speechclient that adds a virtual character with mouthshapes, and working on a trivia skill, that does not work properly yet. I just had contact with a german dev, who lets us use his soccer api, so a soccer skill will probably be added in the near future.

I still have to add the skills to the official mycroft skills repo.

Kind regards,
Tjoen

2 Likes

Thank you for all your hard work. Thanks to you, in a few days when I get my Google AIY kit, I’ll have my first Mycroft device to assemble! I’ve been watching Mycroft for over a year, but now is a good time to get started. I plan to install Mycroft on my Linux Mint desktop, and Android devices.

1 Like

Hey @tjoen great work in compiling an image with AIY support. I’ve the latest image of yours and followed multiple threads on this forum to troubleshoot the audio output -

  1. When running a fresh install, before pairing I can hear the voice agent about “connected to internet” …pair code etc.
  2. after pairing and reboot, cLI starts up. It detects hotword, mic is working fine, its throwing output on the cli
  3. But I don’t hear anything (no sound output)
  4. I’ve tried modifying the mycroft.conf in etc, pulse defaults etc. as per the suggestions mentioned by you and other members on the forum

Could you please help debug ?

Side note - Once this is on, I am going to enable Mopidy (Which is an another anticipated roadblock because of audio configuration) but want to stabilize the current build with default skills working flawlessly without any errors.

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