[Release] Google Home Assistant Relay Driver (v1 and v2)- text to speech on Google Home devices

PM2? That's for auto-startup correct? I don't use that. Sorry. I run all my apps on a MacBook Pro. Lots of horse power to spare. It's on a UPS and runs 24/7. I just open another terminal window and start the next app. I have 5 running simultaneously right now.

The real value in Google Assistant Relay (in my opinion) is the [CC] do this thing
(whatever that thing might be) feature.

1 Like

I see a lot of value in the assistant relay as well because my music in spotify will resume after a TTS and that was something that I was looking for. Will try the [CC] as well. Thanks

Cast-web-api let's you send a TTS message to an individual speaker but it is not a broadcast. It will interrupt whatever is playing. The only way to do a broadcast to individual devices is to create dummy Google account and link each one to only one speaker. Then when that user broadcasts it only goes to that speaker. However, this is only a theory developed by Greg, the developer for AR. I tried it and couldn't get it to work.

Did you figure out your PM2 problem? If not, and you have installed cast web, just reinstall your version of node using the script I linked to above. Even if you reinstall the same version it will repair all the linking to PM2 that got broken. That's how I fixed mine.

1 Like

no, PM2 is not yet working. Let me reinstall NodeJs. Any version you suggest? I have currently 8.11.3

Just use the script I linked to to reinstall the same version. That will automatically reinstall all of your global node libraries (installed with - g) and fix the linking to PM2.

so it would be this command right? (sorry for double checking but I do not want to screw up my cast-web-api that took me days to make it work)

Working through the process. Had some trouble with v10 of of nodejs being loaded instead of v8 but managed to downgrade it. In case it's of use to anyone else, this helped...

Got to the npm install and it worked away but now seems stuck here...

What to do? The cursor isnt responding to mouse movement so I'm assuming the RPi is locked up.

[Update - fixed as noted below]

Restarted the Pi and did an audit fix and it completed the install ok. Assistant relay is running! Onward.

Ah, another issue....not sure what this means...

[update] opened a fresh terminal window and retyped the command and now it seems OK. Process is running and command issued successfully.

But now when trying to set up so that Assistant-relay starts every time the RPi boots, I get the terminal window hanging at this....

I've done a reboot and tried again but it hangs at the same point. Very exciting install this :smile:

[Update] finally got npm to complete. Seems many people have issue. I found these 2 references helpful...

http://luxiyalu.com/how-to-remove-all-npm-proxy-settings/

Specifically, clearing the proxy settings...

npm config delete http-proxy
npm config delete https-proxy

npm config rm proxy
npm config rm https-proxy

set HTTP_PROXY=null
set HTTPS_PROXY=null

Setting the maximum sockets...

npm set maxsockets 3

Splitting the command into 2 lines...

npm install -g pm2
pm2 install

And trying the 1st line until eventually all the files were loaded into cache and then I could complete the install successfully with the 2nd line.

That was interesting :smile:

Anyway, hope my notes help someone in the future. Keep at it - eventually you will get it to work!

1 Like

That's the first step. Then you actually have to run the thing. Did you read the instructions on the page? I guarantee all your questions will be answered.

The 'broadcast from %username% completely ruines this for me

that together that if we have multiple devices the voice will not be fully sync between them, so one speaker will start and then after a second the others will so there is a terrible echo sound.. the only thing I like from it is that if I am playing music it will resume after the TTS

Yep, google need to sort their sh!t

The way around that is to use cast-web-api and create a speaker group in your GH system. You then cast the TTS to that speaker group and they are all synced. However, some speakers might have the first few syllables cut off as the speakers sync themselves up. No solution is perfect, everything has it's downsides. It just depends on what you are willing to live with.

I have both the google relay and cast-web-api and the problem with this second is that if I am playing music in Spotify and then comes a TTS the spotify music will not resume after the TTS. I am living with google-relay and the horrible echo created by devices not being synch when speaking

Just a note for anybody who got hung up on assistant-relay itself not working correctly:

There's apparently a bug on Google's end that stops one of one of its dependencies (google-assistant) from functioning properly. Broadcasting won't work on any network with IPv6 enabled. I wasn't actually hearing the output from any commands I sent the relay until I disabled IPv6 within my router. Now it works like a charm.

Spent a few hours on this, didn't see it here, and thought I might save someone some time.

1 Like

Hmmm... I do believe that tip is included in the very first post of this thread! :wink:

But it's a good reminder for everyone just getting started! Glad to hear you got it working!

Also interesting to see that they STILL haven't fixed that bug. I have to say, I reported that one on multiple forums, in multiple Assistant SDK github repos and to Google too. It's interesting that it still hasn't been fixed yet. It doesn't seem like it would be that hard to only use the IPv4 address to determine if the devices are in the same network.

Got a new one for you @ogiewon. I'll posted a pull-request in Github. It seems that this would be good to have in the AR driver as well. That way, if you get a request across the Maker API with [CC] in the message it will translate it correctly. In order to "urlerize" [CC] it would change it to %5BCC%5D.

1 Like