Google AIY Voice Kit

So I have this old (circa 1980s) replica of a really old cathedral radio. It looks a lot like this:

image

only mine is in a lot worse shape with a lighter finish (for now, I plan on refinishing it). I picked it up for next to nothing at a Goodwill about a year ago.

Anyway, my plan is to put a Raspberry Pi with a Google AIY Voice kit inside and use it for some voice control of the house, at least in the living room. The speaker isn’t half bad so I’ll probably do some music from it as well. I was able to pick up a RPi 3 + Google AIY Voice kit from Micro Center (the only one in my state is not close) for a good price and they were in stock.

I searched the forum and I’ve not seen anyone posting about Google AIY with openHAB. My own looking shows that I should be able to set up MQTT messages in response to custom commands and there probably is nothing stopping me from using the REST API directly.

I plan on writing up a tutorial, or at least project notes for what I’m doing and post them here.

But I wanted to know if anyone has played with or experimented with using it with openHAB and get some lessons learned if so.

Thanks

3 Likes

What are you trying to accomplish? Here’s mine. I did both Alexa and Google Assistant on the same pi.

While this works just for “fun” you will need a good microphone if you want to issue commands to it from afar. Regular microphones are good for maybe 6 feet max? I use a respeaker now with far-field microphones and can issue commands to the assistant(s) sometimes even from the other room.

Like you, I have mine now on a gutted vintage radio. The radio works as is but I replaced the speakers with a full-range one. Also the radio itself can play like it used to but once I the assistant starts talking, the audio signal to the speakers switches from the radio to the pi via a simple SSR relay controlled by the pi itself. The NC connects to the radio and the NO connects to the pi.

As far as the custom commands, once you call assistant.start(), it will return an array of events. Each event will have args which will contain the string that you actually said. So if you say Hey Google, whats up, args will contain whats up. Now you can intercept that. Even define a trigger if you want, so if your trigger is in args, you can have Google STOP right there by calling stop_conversation().

For example:

...
events = assistant.start()
...

for event in events:
            whatIsaid=str(event.args).lower()
            if 'mytrigger' in whatIsaid:
                assistant.stop_conversation()
                DO_SOMETHING_HERE()

I do this for some stuff, since I don’t need ‘cloud’ or a real Google action for this. FOr example, Hey Google shutdown the pi. And the python script will actually shutdown the pi :wink: