Has anyone started work on using Google AIY Voice Kit (voice control as a basic Google Home) to control LMS?
There is a Raspberry Pi HAT board and supporting software that was given away with the May issue of "The MagPi" magazine.
One piece of good news is that most of the software does not rely on the Google board being used.
In theory it can work with any Linux supported Mic and sound output (e.g. local analogue or HDMI).
The local capabilities do not have the "intelligence" to semantically understand a spoken sentence but it does a good job to Voice-to-text.
I wrote some code to make it control some Pimoroni lights and can see how it could readily perform tasks like
select player X
Pause
Play
Play Favorite Y
Play Artist Z
I know that there is great work being done by meep on getting things to work with Amazon Echo Alexa and I know from personal experience that this works with an emulated Alexa on RPi. However, it does require a cloud service.
The potential is there with Google Voice Kit to do it all locally I think (and/or use Google voice service in cloud).
Results 1 to 9 of 9
-
2017-05-14, 08:08 #1
- Join Date
- Apr 2005
- Location
- UK/London
- Posts
- 5,818
Basic voice control using Google AIY
Paul Webster
Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin
-
2017-05-24, 07:19 #2
- Join Date
- Apr 2005
- Location
- UK/London
- Posts
- 5,818
I have a very basic version now working.
I tried using the Python libraries of LMSTools and PyLMS.
I had problems with both running under Python3 (3.4) that came with the Google AIY kit.
I managed to make a few hacks to get PyLMS to work (at least enough for me) and hard-coded things like IP address and MAC address of a player... and it works.
I can play/pause/stop by voice.
I'll have a go at getting it to recognise players by name and a favourite by number.
Operation is like this:
OK Google ..... squeezebox playPaul Webster
Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin
-
2017-05-24, 08:38 #3
- Join Date
- Feb 2010
- Posts
- 344
Will follow with interest. Sent the echo back as I'm not sold on voice right now but I think home has a lot more potential and use cases for me.
-
2017-07-05, 09:38 #4
- Join Date
- Dec 2007
- Posts
- 45
Very interested!
Got my Google Home today - an amazing box and am very impressed with the possibilities.
Controlling my LMS with it would be a huge boon and significantly cheaper in the long run than subscribing to Google Home Music...
-
2017-07-05, 10:41 #5
- Join Date
- Apr 2005
- Location
- UK/London
- Posts
- 5,818
My hack was on the Raspberry Pi implantation of Google Home. I don't think the same approach would work with a real Google Home because, I presume, it needs a hosted service.
Peter Mee's Amazon Echo implementation is probably a good starting point.
Sent from my iPhone using TapatalkPaul Webster
Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin
-
2017-07-05, 12:18 #6
Thanks Paul
People might be interested to know that I'll be bringing HabTunes LMS voice control to Google Home soon.
Want to get the functionality finalised on Echo first and we're almost ready to move to Beta. Once I get that into Amazon certification, I'll start building out the Google app. All the heavy lifting is already done in the skill logic and companion plug-in so it will just (!!) be case of implementing the speech model in Google.
ALEXA LMS SKILL: http://www.hab-tunes.com | Twitter: #habtunes
Personal HA BLOG: http://mediaserver8.blogspot.com
Squeezebox x2 | Squeezebox Radio x 2 | Squeezebox Duet x2
-
2017-11-22, 12:09 #7
- Join Date
- Apr 2006
- Posts
- 112
-
2018-01-13, 07:52 #8
- Join Date
- Nov 2011
- Posts
- 4
+1
-
2018-03-20, 11:18 #9
- Join Date
- Apr 2005
- Location
- UK/London
- Posts
- 5,818
Thought I'd update this with the set of voice commands (including alternatives that the Google AIY hears.
Remember though this is for the Google AIY Voice Kit (which you could probably get to run on a Raspberry Pi with a USB Mic instead of the Google hardware).
It is a hack based on the original AIY kit so would need to be re-done if using the updated software from Google (which I might do if there was enough interest).
Code:{"squeezeboxcmds":[ {"command":"pause", "spokenregexp":"pause|paws|pose|pools" }, {"command":"mute", "spokenregexp":"mute|moot|moat|silence" }, {"command":"unmute", "spokenregexp":"unmute|noise" }, {"command":"next", "spokenreqexp":"next|skip" }, {"command":"previous", "spokenregexp":"previous|back" }, {"command":"resume", "spokenregexp":"resume|play" }, {"command":"stop", "spokenregexp":"stop|halt" }, {"command":"poweron", "spokenregexp":"(?:power|switch) on","helptext":"Power On" }, {"command":"poweroff", "spokenregexp":"(?:power|switch) off","helptext":"Power Off" }, {"command":"volumeup", "spokenregexp":"volume up|increase volume|louder","helptext":"Louder" }, {"command":"volumedown","spokenregexp":"volume down|decrease volume|quieter","helptext":"Quieter" }, {"command":"fave", "spokenregexp":"favo(?:u|)rite(?:s|)","helptext":"Favorite" }, {"command":"turntable", "spokenregexp":"turn(?: |)table|record (?:player|deck)","helptext":"Record Player" }, {"command":"playing", "spokenregexp":"what(?: i|\\')s playing(?:\\?|)|what song is this(?:\\?|)","helptext":"What is playing?" } ]}
"spokenregexp" is a regex to match the spoken words
"command" is what it maps to - it is converted into LMS commands later in the processing
"helptext" if specified is used to tell the user the list of available commands (if not present then the "command" is used) when given request is not recognised
As an example ... saying:
OK Google ... Squeezebox Favorite 4
will (in my case) play BBC Radio 4
and
OK Google ... Squeezebox Record Player
will issue a:
playlist play wavin:sysdefault:CARD=CODEC
which will start streaming from the turntable (in the other room) ... not entirely practical but fun.Paul Webster
Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin