Running the latest version of Indigo and Airfoil on OS X 10.11.6. I have several Google Home Minis through my house and would like to be able to send announcements (indigo.server.speak("text to speak", waitUntilDone=True).

I'm struggling with how to code this in python. I've tried the following:

Using the terminal on my Mac, I can get the Google Home to speak with the CLI (say "hello"). To do this, I have to have the source set to com.apple.speech.speechsynthesisd and pre-select the correct Google Home in the light blue list of speakers.

I did see in Airfoil's preferences there is an "Automatically Transmit To" tab. I've tried to use this, but nothing worked.

No, I don’t think it is Google Home because I tried your code myself out of curiosity and it’s the same result to an AirPlay device.

So I then set up an action group that did the same thing and got almost the same result. My test was to say “test speech” and it got “t” out (maybe it was “ch”) but I got a tiny bit of speech.

This led me to try a really long phrase “the brown cow jumped over the big white fence” and got “umped over the big white fence” with the action group but the same phrase in the Py code got nothing at all.

Yea, that was going to be my next step if I hadn't been working on other plugin stuff today, I assumed it was timing based on my test results. The timing of calling it from code is more than the timing of calling it from the native UI apparently.

It's too bad about the 10s timing issue... there is a way with a Google Home that allows you to broadcast a message to all of the ones connected to your account. Unfortunately, this would require Oauth. I remember reading in a thread somewhere that Matt & Jay were looking into adding an Oauth server? +1 for that. (would also allow me to start using my GH for device control).

So does mine about 80% of the time, but - and perhaps this is the result of other processes on the computer running Indigo - it can take 5+ seconds. This has been on my todo list to add to one of my plugins for a while so I just rolled it into on to see if running as a plugin thread made any difference and it's about the same performance.

My guess is that it's somewhat network intensive and so connection times can vary given the amount of other things that the device being AirPlayed to is doing and what other network traffic is going on.