[SOLVED] [Google TTS] Chromecast Audio Sink not working

Hi @Dim

I’ve tried and shows an error saying no TTS service. If I use smarthome:voide voices then I can read:

gtts:esESStandardA es-ES-Standard-A - español (España)

So I think that this is not the problem.

About @Mihai_Badea says, I change it but nothing happens, only one “beep” and nothing more.

OH2 version, platform and java being used?

openHAB 2.3.0 Release Build, Windows 10 and java version “1.8.0_181” with
Java™ SE Runtime Environment (build 1.8.0_181-b13)

How did you deploy Google TTS on OH2.3?

I found it in the community with the name of “org.openhab.voice.gtts-2.4.0-SNAPSHOT”. After download, I put it in the addons folder.

It won’t work on OH2.3.0 core
If it’s not too much trouble: boost your core to OH2.4.0.M6 and use the included voice addon

Ok, I’m going to update.

1 Like

Hi @Dim,

I’ve updated the runtime. Now I’m in the openHAB 2.4.0.

I retry it and I can see in my Thing Google Home that the status is OFFLINE - COMMUNICATION ERROR Waiting for response timed out.

In the logs:

20:52:11.002 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Test' received command ON
20:52:11.004 [INFO ] [smarthome.event.ItemStateChangedEvent] - Test changed from OFF to ON
20:52:11.006 [INFO ] [.smarthome.model.script.default.rules] - Trying to say Hi!
20:52:41.226 [INFO ] [.smarthome.model.script.default.rules] - END HI
20:52:41.228 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:fc070cef4c0727c90482fabdccf82384' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Waiting for response timed out

I would try to delete the existing chromecast thing and re-discover it
maybe? the latest version of the binding has some changes to the way it handles the chromecast things (not sure since I don’t use currently this binding)

did you go to OH2.4 M(ilestone) (build #?) or S(napshot) (build #?) ?

openHAB 2.4.0 Build #1446

Yes, I did it.

I can see this warn when start openhab:

20:58:41.155 [WARN ] [.voice.gtts.internal.GoogleTTSService] - Audio format OGG_OPUS is not yet supported.

that’s harmless. it’s just a warning that all of us have with Google TTS Addon.

Make sure that you don’t have any old TTS jar and/or chromecast jar in your addons folder and use the bindings from PaperUI. Clean tmp&cache also.

21:10:42.301 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Test' received command OFF
21:10:42.302 [INFO ] [smarthome.event.ItemStateChangedEvent] - Test changed from ON to OFF
21:10:42.334 [INFO ] [.smarthome.model.script.default.rules] - Try to say Bye!
21:10:45.526 [INFO ] [smarthome.event.ItemStateChangedEvent] - chromecast_chromecast_fc070cef4c0727c90482fabdccf82384_control changed from NULL to PLAY
21:10:45.528 [INFO ] [smarthome.event.ItemStateChangedEvent] - Google_Home changed from NULL to PLAY
21:11:14.414 [INFO ] [.smarthome.model.script.default.rules] - END BYE
21:11:14.414 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:fc070cef4c0727c90482fabdccf82384' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Waiting for response timed out
21:11:29.133 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:fc070cef4c0727c90482fabdccf82384' changed from OFFLINE (COMMUNICATION_ERROR): Waiting for response timed out to ONLINE
21:12:10.543 [WARN ] [okhttp3.OkHttpClient                 ] - A connection to https://myopenhab.org/ was leaked. Did you forget to close a response body?

But only sounds a “beep”

audio sinks
voice voices

rule contents plz

openhab> audio sinks
* Google Home (chromecast:chromecast:fc070cef4c0727c90482fabdccf82384)
  System Speaker (javasound)
  System Speaker (with mp3 support) (enhancedjavasound)
  Web Audio (webaudio)
openhab> voice voices
  Google Cloud TTS Service - alemán (Alemania) - de-DE-Standard-A (gtts:deDEStandardA)
  Google Cloud TTS Service - alemán (Alemania) - de-DE-Standard-B (gtts:deDEStandardB)
  Google Cloud TTS Service - alemán (Alemania) - de-DE-Wavenet-A (gtts:deDEWavenetA)
  Google Cloud TTS Service - alemán (Alemania) - de-DE-Wavenet-B (gtts:deDEWavenetB)
  Google Cloud TTS Service - alemán (Alemania) - de-DE-Wavenet-C (gtts:deDEWavenetC)
  Google Cloud TTS Service - alemán (Alemania) - de-DE-Wavenet-D (gtts:deDEWavenetD)
  Google Cloud TTS Service - coreano (Corea del Sur) - ko-KR-Standard-A (gtts:koKRStandardA)
  Google Cloud TTS Service - coreano (Corea del Sur) - ko-KR-Wavenet-A (gtts:koKRWavenetA)
  Google Cloud TTS Service - danés (Dinamarca) - da-DK-Standard-A (gtts:daDKStandardA)
  Google Cloud TTS Service - danés (Dinamarca) - da-DK-Wavenet-A (gtts:daDKWavenetA)
  Google Cloud TTS Service - eslovaco (Eslovaquia) - sk-SK-Standard-A (gtts:skSKStandardA)
  Google Cloud TTS Service - eslovaco (Eslovaquia) - sk-SK-Wavenet-A (gtts:skSKWavenetA)
* Google Cloud TTS Service - español (España) - es-ES-Standard-A (gtts:esESStandardA)
  Google Cloud TTS Service - francés (Canadá) - fr-CA-Standard-A (gtts:frCAStandardA)
  Google Cloud TTS Service - francés (Canadá) - fr-CA-Standard-B (gtts:frCAStandardB)
  Google Cloud TTS Service - francés (Canadá) - fr-CA-Standard-C (gtts:frCAStandardC)
  Google Cloud TTS Service - francés (Canadá) - fr-CA-Standard-D (gtts:frCAStandardD)
  Google Cloud TTS Service - francés (Canadá) - fr-CA-Wavenet-A (gtts:frCAWavenetA)
  Google Cloud TTS Service - francés (Canadá) - fr-CA-Wavenet-B (gtts:frCAWavenetB)
  Google Cloud TTS Service - francés (Canadá) - fr-CA-Wavenet-C (gtts:frCAWavenetC)
  Google Cloud TTS Service - francés (Canadá) - fr-CA-Wavenet-D (gtts:frCAWavenetD)
  Google Cloud TTS Service - francés (Francia) - fr-FR-Standard-A (gtts:frFRStandardA)
  Google Cloud TTS Service - francés (Francia) - fr-FR-Standard-B (gtts:frFRStandardB)
  Google Cloud TTS Service - francés (Francia) - fr-FR-Standard-C (gtts:frFRStandardC)
  Google Cloud TTS Service - francés (Francia) - fr-FR-Standard-D (gtts:frFRStandardD)
  Google Cloud TTS Service - francés (Francia) - fr-FR-Wavenet-A (gtts:frFRWavenetA)
  Google Cloud TTS Service - francés (Francia) - fr-FR-Wavenet-B (gtts:frFRWavenetB)
  Google Cloud TTS Service - francés (Francia) - fr-FR-Wavenet-C (gtts:frFRWavenetC)
  Google Cloud TTS Service - francés (Francia) - fr-FR-Wavenet-D (gtts:frFRWavenetD)
  Google Cloud TTS Service - inglés (Australia) - en-AU-Standard-A (gtts:enAUStandardA)
  Google Cloud TTS Service - inglés (Australia) - en-AU-Standard-B (gtts:enAUStandardB)
  Google Cloud TTS Service - inglés (Australia) - en-AU-Standard-C (gtts:enAUStandardC)
  Google Cloud TTS Service - inglés (Australia) - en-AU-Standard-D (gtts:enAUStandardD)
  Google Cloud TTS Service - inglés (Australia) - en-AU-Wavenet-A (gtts:enAUWavenetA)
  Google Cloud TTS Service - inglés (Australia) - en-AU-Wavenet-B (gtts:enAUWavenetB)
  Google Cloud TTS Service - inglés (Australia) - en-AU-Wavenet-C (gtts:enAUWavenetC)
  Google Cloud TTS Service - inglés (Australia) - en-AU-Wavenet-D (gtts:enAUWavenetD)
  Google Cloud TTS Service - inglés (Estados Unidos) - en-US-Standard-B (gtts:enUSStandardB)
  Google Cloud TTS Service - inglés (Estados Unidos) - en-US-Standard-C (gtts:enUSStandardC)
  Google Cloud TTS Service - inglés (Estados Unidos) - en-US-Standard-D (gtts:enUSStandardD)
  Google Cloud TTS Service - inglés (Estados Unidos) - en-US-Standard-E (gtts:enUSStandardE)
  Google Cloud TTS Service - inglés (Estados Unidos) - en-US-Wavenet-A (gtts:enUSWavenetA)
  Google Cloud TTS Service - inglés (Estados Unidos) - en-US-Wavenet-B (gtts:enUSWavenetB)
  Google Cloud TTS Service - inglés (Estados Unidos) - en-US-Wavenet-C (gtts:enUSWavenetC)
  Google Cloud TTS Service - inglés (Estados Unidos) - en-US-Wavenet-D (gtts:enUSWavenetD)
  Google Cloud TTS Service - inglés (Estados Unidos) - en-US-Wavenet-E (gtts:enUSWavenetE)
  Google Cloud TTS Service - inglés (Estados Unidos) - en-US-Wavenet-F (gtts:enUSWavenetF)
  Google Cloud TTS Service - inglés (Reino Unido) - en-GB-Standard-A (gtts:enGBStandardA)
  Google Cloud TTS Service - inglés (Reino Unido) - en-GB-Standard-B (gtts:enGBStandardB)
  Google Cloud TTS Service - inglés (Reino Unido) - en-GB-Standard-C (gtts:enGBStandardC)
  Google Cloud TTS Service - inglés (Reino Unido) - en-GB-Standard-D (gtts:enGBStandardD)
  Google Cloud TTS Service - inglés (Reino Unido) - en-GB-Wavenet-A (gtts:enGBWavenetA)
  Google Cloud TTS Service - inglés (Reino Unido) - en-GB-Wavenet-B (gtts:enGBWavenetB)
  Google Cloud TTS Service - inglés (Reino Unido) - en-GB-Wavenet-C (gtts:enGBWavenetC)
  Google Cloud TTS Service - inglés (Reino Unido) - en-GB-Wavenet-D (gtts:enGBWavenetD)
  Google Cloud TTS Service - italiano (Italia) - it-IT-Standard-A (gtts:itITStandardA)
  Google Cloud TTS Service - italiano (Italia) - it-IT-Wavenet-A (gtts:itITWavenetA)
  Google Cloud TTS Service - japonés (Japón) - ja-JP-Standard-A (gtts:jaJPStandardA)
  Google Cloud TTS Service - japonés (Japón) - ja-JP-Wavenet-A (gtts:jaJPWavenetA)
  Google Cloud TTS Service - neerlandés (Holanda) - nl-NL-Standard-A (gtts:nlNLStandardA)
  Google Cloud TTS Service - neerlandés (Holanda) - nl-NL-Wavenet-A (gtts:nlNLWavenetA)
  Google Cloud TTS Service - portugués (Brasil) - pt-BR-Standard-A (gtts:ptBRStandardA)
  Google Cloud TTS Service - sueco (Suecia) - sv-SE-Standard-A (gtts:svSEStandardA)
  Google Cloud TTS Service - sueco (Suecia) - sv-SE-Wavenet-A (gtts:svSEWavenetA)
  Google Cloud TTS Service - turco (Turquía) - tr-TR-Standard-A (gtts:trTRStandardA)
  Google Cloud TTS Service - turco (Turquía) - tr-TR-Standard-B (gtts:trTRStandardB)
  Google Cloud TTS Service - turco (Turquía) - tr-TR-Standard-C (gtts:trTRStandardC)
  Google Cloud TTS Service - turco (Turquía) - tr-TR-Standard-D (gtts:trTRStandardD)
  Google Cloud TTS Service - turco (Turquía) - tr-TR-Standard-E (gtts:trTRStandardE)
  Google Cloud TTS Service - turco (Turquía) - tr-TR-Wavenet-A (gtts:trTRWavenetA)
  Google Cloud TTS Service - turco (Turquía) - tr-TR-Wavenet-B (gtts:trTRWavenetB)
  Google Cloud TTS Service - turco (Turquía) - tr-TR-Wavenet-C (gtts:trTRWavenetC)
  Google Cloud TTS Service - turco (Turquía) - tr-TR-Wavenet-D (gtts:trTRWavenetD)
  Google Cloud TTS Service - turco (Turquía) - tr-TR-Wavenet-E (gtts:trTRWavenetE)

And I’m testing with this command:

say("Adios, Carlos", "gtts:esESStandardA", "chromecast:chromecast:fc070cef4c0727c90482fabdccf82384")

it looks like you are still running the old GTTS jar

bundle:list -s |grep google

openhab> bundle:list -s |grep google
 21 | Active   |  80 | 2.7.0.v20170129-0911   | com.google.gson
 22 | Active   |  80 | 18.0.0                 | com.google.guava
 23 | Active   |  80 | 3.0.0.v201312141243    | com.google.inject

it looks like it’s actually missing… strange
did you install it from PaperUI?

it should show (on 2.4.0.S1445)

 21 x Active   x  80 x 2.7.0.v20170129-0911   x com.google.gson
 22 x Active   x  80 x 18.0.0                 x com.google.guava
 23 x Active   x  80 x 3.0.0.v201312141243    x com.google.inject
251 x Active   x  80 x 2.4.0.201811281515     x org.openhab.voice.googletts

Clean tmp & cache also (stop OH2, delete everything within C:\openHAB2\userdata\tmp\ & C:\openHAB2\userdata\cache\ but not the folders themselves)

Now I see:

openhab> bundle:list -s |grep google
 21 | Active   |  80 | 2.7.0.v20170129-0911   | com.google.gson
 22 | Active   |  80 | 18.0.0                 | com.google.guava
 23 | Active   |  80 | 3.0.0.v201312141243    | com.google.inject
203 | Active   |  80 | 2.4.0.201811291745     | org.openhab.voice.googletts

21:26:47.162 [WARN ] [.core.voice.internal.VoiceManagerImpl] - Default TTS service 'gtts' not available!

yeah, you are good.
I am still on S1445 so my timestamp is older

this has been changed from gtts to googletts
modify your default in PaperUI->Configuration->System->Voice

check again

voice voices