Mycroft with Google AIY Voice kit disk image

hey @tjoen

so tried this as well. tell you what’s currently happening -

  1. after removing and purging everything, did a fresh mopidy install
  2. updated the config file at /etc/mopidy/
  3. when i run sudo mopidyctl config -
  4. i still see the same config file details (though they are not the same in /etc/mopidy or ~/.config) - which is it doesn’t reflect http (i have removed static dir = though its still showing up in the config file), it doesn’t show mopify (which i have added the extension via pip and also modified the config file)

here it is for reference (output of mopidyctl config) -

^Cpi@picroft:~ sudo mopidyctl configf
Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config" as user mopidy
[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n  %(message)s
debug_file = /var/log/mopidy/mopidy-debug.log
config_file = /etc/mopidy/logging.conf

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

[proxy]
scheme = 
hostname = 
port = 
username = 
password = 

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password = 
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist = 
  listall
  listallinfo
default_playlist_scheme = m3u

[http]
enabled = true
hostname = ::
port = 6680
static_dir =
zeroconf = 

[stream]
enabled = true
protocols = 
  http
  https
  mms
  rtmp
  rtmps
  rtsp
metadata_blacklist = 
timeout = 5000

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir = /var/lib/mopidy/playlists

[softwaremixer]
enabled = true

[file]
enabled = true
media_dirs = 
  $XDG_MUSIC_DIR|Music
  ~/|Home
excluded_file_extensions = 
  .jpg
  .jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local]
enabled = true
library = json
media_dir = /var/lib/mopidy/media
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions = 
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .png
  .txt

actual file 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]
media_dir = /var/lib/mopidy/media

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

[mopify]
enabled = true
debug = false

[spotify]
enabled = true
username = **
password = **
client_id = **
client_secret = **
bitrate = 160
volume_normalization = true
private_session = true
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =

[http]
enabled = true
hostname = ::
port = 6680
zeroconf =

really scratching my head over this, since i have scoured through related posts on this forum. have a feeling that its just one command away from sorting this out and enjoy mycroft to the fullest.

So does the service start if you try: sudo systemctl start mopidy
What does the /var/log/mopidy.mopidy.log say?

If I manually run /usr/bin/mopidy it seems to create a config file
at /home/pi/.config/mopidy/mopidy.conf (or in root dir if using sudo…)

Mopidy then seems to be running, but I cannot reach the webinterface.
So I can only use the service to start it, which is what I want anyway.

yes, service starts. its enabled as a system service. i can also see the webpage at ipadd:6680. as mentioned earlier, the problem is the config file its loading. hence, cannot access the web frontends, plugins and so on…

Yes, but you don’t need a webinterface to use the skill though…

It is much handier, 'cause you can use your phone for instance, but it should work without a webinterface too. If you can see the webinterface then the skill should work.

hmm. not sure. as you can see from the config file that its not updated with [spotify] section in the output of sudo mopidyctl config. which i have provided the details in the /etc/mopidy/mopidy.conf file. i want to control spotify via mopidy and bunch of other plugins such as tune in, podcasts etc.

output when i check the status -

● mopidy.service - Mopidy music server
   Loaded: loaded (/lib/systemd/system/mopidy.service; enabled)
   Active: active (running) since Tue 2018-04-03 17:25:25 CEST; 1h 11min ago
  Process: 682 ExecStartPre=/bin/chown mopidy:audio /var/cache/mopidy (code=exited, status=0/SUCCESS)
  Process: 630 ExecStartPre=/bin/mkdir -p /var/cache/mopidy (code=exited, status=0/SUCCESS)
 Main PID: 696 (mopidy)
   CGroup: /system.slice/mopidy.service
           └─696 /usr/bin/python /usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf

Apr 03 17:25:31 picroft mopidy[696]: INFO     Starting Mopidy audio
Apr 03 17:25:31 picroft mopidy[696]: INFO     Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend, LocalBackend
Apr 03 17:25:31 picroft mopidy[696]: INFO     No local library metadata cache found at /var/lib/mopidy/local/library.json.gz. Please run `mopidy local scan` to index your local music library. If you do not have a local music collection, you can disable the local backend to hide this message.
Apr 03 17:25:31 picroft mopidy[696]: INFO     Loaded 0 local tracks using json
Apr 03 17:25:31 picroft mopidy[696]: INFO     Starting Mopidy core
Apr 03 17:25:31 picroft mopidy[696]: INFO     Audio output set to "autoaudiosink"
Apr 03 17:25:31 picroft mopidy[696]: INFO     Starting Mopidy frontends: MpdFrontend, HttpFrontend
Apr 03 17:25:31 picroft mopidy[696]: INFO     MPD server running at [::ffff:127.0.0.1]:6600
Apr 03 17:25:32 picroft mopidy[696]: INFO     HTTP server running at [::]:6680
Apr 03 17:25:32 picroft mopidy[696]: INFO     Starting GLib mainloop```

Everything I install from the apt-source seems to work here and be picked up by mopidy…

I also installed mopidy-spotify from the apt directory.
Installing from apt-get enabled it for me, it tries to load it from my config, (and complains because I did not enter the settings.)

so sudo apt-get install mopidy-tunein mopidy-podcast mopidy-spotify
should work, but you probably tried that already?

The only thing that does not work for me is installing from pip.

same here with pip.

are you able to pass a command - hey mycroft, play michael jackson from spotify ? or play radio from tune in ?

I don’t have a premium account so spotify does load, but does not work anyway.
I will check the tune-in plugin tomorrow.
My testmachines are in the office,

Local directories/artists already play fine with “play artist michael jackson”. I think the skill from @forslund works a bit different, allowing you to skip the artist or track keyword.

I just installed podcast and tune-in though apt-get, and they get installed and loaded.

cat /var/log/mopidy/mopidy.log:

2018-04-04 13:20:15,329 INFO [1665:MainThread] mopidy.__main__: Starting Mopidy 2.1.0
2018-04-04 13:20:15,379 INFO [1665:MainThread] mopidy.config: Loading config from builtin defaults
2018-04-04 13:20:15,389 INFO [1665:MainThread] mopidy.config: Loading config from /etc/mopidy/mopidy.conf
2018-04-04 13:20:15,395 INFO [1665:MainThread] mopidy.config: Loading config from command line options
2018-04-04 13:20:15,790 INFO [1665:MainThread] mopidy.__main__: Enabled extensions: mpd, http, stream, m3u, tunein, softwaremixer, file, podcast, local, local-sqlite
2018-04-04 13:20:15,791 INFO [1665:MainThread] mopidy.__main__: Disabled extensions: spotify
2018-04-04 13:20:16,072 INFO [1665:MainThread] mopidy.commands: Starting Mopidy mixer: SoftwareMixer
2018-04-04 13:20:16,079 INFO [1665:MainThread] mopidy.commands: Starting Mopidy audio
2018-04-04 13:20:16,085 INFO [1665:MainThread] mopidy.commands: Starting Mopidy backends: PodcastBackend, StreamBackend, M3UBackend, FileBackend, LocalBackend, TuneInBackend
2018-04-04 13:20:16,126 INFO [1665:Audio-2] mopidy.audio.actor: Audio output set to "autoaudiosink"
2018-04-04 13:20:16,167 INFO [1665:MainThread] mopidy.local.library: Loaded 105 local tracks using sqlite
2018-04-04 13:20:16,186 INFO [1665:MainThread] mopidy.commands: Starting Mopidy core
2018-04-04 13:20:16,232 INFO [1665:MainThread] mopidy.commands: Starting Mopidy frontends: MpdFrontend, HttpFrontend
2018-04-04 13:20:16,236 INFO [1665:MainThread] mopidy.mpd.actor: MPD server running at [::ffff:127.0.0.1]:6600
2018-04-04 13:20:16,243 INFO [1665:HttpFrontend-12] mopidy.http.actor: HTTP server running at [::ffff:0.0.0.0]:6680
2018-04-04 13:20:16,244 INFO [1665:MainThread] mopidy.commands: Starting GLib mainloop

So the big problem is installing the webinterfaces with pip.

I’ll see if doing a manual install with git works. May take some time, I’m currently a bit busy with a totally unrelated android VR game.

okay, but it does it work via voice command ?

I don’t think so, spotify maybe works with forslunds version?
I’m not sure what skill you are using. There are at least 3 different versions as far as I know.

I came across http://remotedy.com/ which works nicely in browsing and playing songs using my android phone, but I’m not sure if it also searches spotify.

1 Like

Hi Tjoen,

Thanks to your nice job I can see what Mycroft is able to do with my Raspberry and Google Voice kit.

I tried to install the raspian-strech_Picroft-2018-09-12 but failed : errors and issues are above my skills.
So I am happy with your version.

Henri

2 Likes

Was really helpful !

1 Like

Is this mycroft on the google kit or is it loading it onto the mycroft device?

If you install Picroft on the raspberrypi, then the you can choose Google AIY voice kit in the setup guide. It is for the version 1 of the kit.
After installation you can install the Google AIY voicekit skill from the market to get the botton and lidht to work.
I use it on all my devises :slight_smile:

Hey,

I used Mycroft on a rpi3b+ with the ps3 and had problems that Mycroft wasn’t able to detect the wake word after an amount of time.
Did any of you run into this problem using the G-AIY-Voice-Kit? Because it has a 2mic (or 4mic?)
Microphone board.

Would you recommend buying this kit (also should I rather buy the v1 over the v2 bc I already have a rpi3b+ and don’t want to use a rpi pi0)? I’d like to use the picroft daily in my room but due to the problems I was never able to. Also I’m wondering if maybe I should just by a better mic board or does the one of the g aiy voice kit does the job quite good?

Sry for all of these questions :smiley:

PS: @andlo Seeing the picroft-google-aiy-voicekit-skill it should be easy to implement the button just as a mute button, right? (just changing the behavoir of the handle_button() method). Dont want to push it anytime just to give a voice cmd

If you can find the v1 for < $5 still, it’s worth it. Microcenter used to have them for $1, even. It’s a decent mic and speaker, but not a miracle worker (no aec/beamforming).

This image no longer works. Upon reboot the system force installs v20.08 then hangs. It never finished the upgrade. I have tested this twice, and future users should avoid this image, unless the creator can fix the upgrade problem.

1 Like