Google TTS times out on start since OH 3

Tags: #<Tag:0x00007f43384a70e0> #<Tag:0x00007f43384a6de8>

First Post here so I hope I don’t do too many things wrong.

Ever since upgrading to OH3 I’ve been having this issue with the Google TTS. Most of the time when I start openhab it times out and doesn’t start.

2021-03-20 19:01:02.407 [WARN ] [ce.googletts.internal.GoogleCloudAPI] - Error initializing Google Cloud TTS service: java.util.concurrent.TimeoutException: Total timeout 5000 ms elapsed

I’m guessing there’s a way to extend the timeout or just turn it off all together, but I’ve done a bit of searching and haven’t found a way to do it. I’ve also searched for this problem for quite a while but haven’t found anything similar to this.

Platform information:

  • Hardware: raspberry pi 4(4gb)
  • OS: Raspberry Pi OS (buster)
  • Java Runtime Environment:
  • openHAB version: 3.0.1

I am running a raspberry pi 4 (although I used to have the same openhab installation running on a pi 2 and the Google TTS worked fine on there too), so I don’t think it should even be timing out, but if just removing the timeout fixes it I’m fine with that.


what happens if you restart the bundle once openhab is up and running?
Have you re-authenticated your Google tts service after upgrading?
I wouldn’t say that your warning is what prevents your Google tts from working, as it should just retry connecting…
Be sure to use Desktop as target when you generate your client ID in the Google dev console: OH3 Google TTS: Error - grant type authorization_code
All the best


restarting it does actually seem to make it start properly, but now there’s a new problem. I re-authenticated and put the new info in the settings, but the google voices still don’t show up in the dropdown menu in the “Voice” settings. Then I restarted the bundle again, and now the authentication key is missing again. So I re-authenticated a dozen times, trying “Desktop” as a traget and “TV and limited input” as well, but no luck. It always either just doesn’t work, or the authentication key goes missing. At least I now figured out that the timeout message happens when there’s no auth key.

The logs aren’t helpful either, when I re-authenticate, I get the normal
2021-03-22 09:50:23.219 [WARN ] [.googletts.internal.GoogleTTSService] - Audio format OGG_OPUS is not yet supported.
but it still doesn’t actually work.

When the auth key goes missing, I either get the timeout message (happens only on first startup), or I get:

2021-03-20 23:38:06.361 [WARN ] [ce.googletts.internal.GoogleCloudAPI] - Error initializing Google Cloud TTS service: Error fetching access token. Invalid authcode? Please generate a new one.

when restarting the bundle.

This issue seems similar to the one you linked, but I tried all the suggestions and none of them worked for me. I set the log mode to TRACE (as suggested in one of the replies) and I’ll see if I find anything helpful.