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

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

And change my test to:

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

well… it should work now … :slight_smile: does it?

:frowning: no, the same:

21:35:37.520 [INFO ] [smarthome.event.ItemStateChangedEvent] - Test changed from ON to OFF
21:35:37.557 [INFO ] [.smarthome.model.script.default.rules] - Try to say Bye!
21:35:38.845 [INFO ] [smarthome.event.ItemStateChangedEvent] - chromecast_chromecast_fc070cef4c0727c90482fabdccf82384_control changed from NULL to PLAY
21:35:38.847 [INFO ] [smarthome.event.ItemStateChangedEvent] - Google_Home changed from NULL to PLAY
21:35:47.636 [INFO ] [smarthome.event.ItemStateChangedEvent] - network_pingdevice_192_168_0_24_latency changed from 620.0 to 615.0
21:35:47.637 [INFO ] [smarthome.event.ItemStateChangedEvent] - network_pingdevice_192_168_0_24_lastseen changed from 2018-11-29T21:34:47.006+0100 to 2018-11-29T21:35:47.628+0100
21:36:07.789 [INFO ] [.smarthome.model.script.default.rules] - END BYE
21:36:07.790 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:fc070cef4c0727c90482fabdccf82384' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Waiting for response timed out
21:36:20.653 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:fc070cef4c0727c90482fabdccf82384' changed from OFFLINE (COMMUNICATION_ERROR): Waiting for response timed out to ONLINE

you are close… something is wrong with your chromecast (no clue what)

otherwise, the Voice & TTS setup looks good
try to send the output to the Web Audio to test if this part works (open a web browser to PaperUI and use your PC audio output)

say("Adios, Carlos", "googletts:esESStandardA", "webaudio")

Yes, this part is working…

I have the Simple Mode in Item Linking and the Control and Volume Channels in the Chromecast.

If I have Spotify in the Chromecast, I can stop and resume the music from the OpenHab.

So… I don’t know…

(Thanks for your time, by the way!)

1 Like

You can probably get it working by setting the IP of the machine running openHAB in the Chromecast Binding callback URL.

2 Likes

I wish, but not:

openhab> log:display
21:55:28.509 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Test' received command OFF
21:55:28.510 [INFO ] [smarthome.event.ItemStateChangedEvent] - Test changed from ON to OFF
21:55:28.541 [INFO ] [.smarthome.model.script.default.rules] - Try to say Bye!
21:55:29.882 [INFO ] [smarthome.event.ItemStateChangedEvent] - Google_Home changed from NULL to PLAY
21:55:35.649 [INFO ] [smarthome.event.ItemStateChangedEvent] - network_pingdevice_192_168_0_24_latency changed from 341.0 to 877.0
21:55:35.652 [INFO ] [smarthome.event.ItemStateChangedEvent] - network_pingdevice_192_168_0_24_lastseen changed from 2018-11-29T21:54:34.701+0100 to 2018-11-29T21:55:35.642+0100
21:55:58.812 [INFO ] [.smarthome.model.script.default.rules] - END BYE
21:55:58.812 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:fc070cef4c0727c90482fabdccf82384' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Waiting for response timed out

Captura

Is the Chromecast allowed to connect to that IP and port? Cause that is how the TTS with a Chromecast works. openHAB will serve the audio file using the webserver and openHAB instructs the Chromecast to download it from that IP/port. Firewall rules and username/password authentication may be blocking it.

3 Likes

Yes, I think so. I’ve tried with other program to send the audio to the chromecast: chromecast-audio-stream and works.

But maybe I need to do something with OpenHab?

can you use another host on your LAN to access that URL? (http://192.168.0.15:8080)
for example: your mobile phone

maybe? your firewall on Windows is blocking access to the openHAB2 web service

check also:

bundle:list -s |grep chrome

:open_mouth:

Thats it! Thank you both!

I love you :blush: I was so frustrated with this. I deactivated the firewall and now is working. Now I have to add in some way this rule exception.

2 Likes

de nada :slight_smile:

(mark Wouter’s post as the one with the solution plz to close this thread)

image

1 Like

Sorry write this question in a solved post, but it’s related.

I don’t want to open the openHAB port and I’ve read in the post Securing access to openHAB with OpenHAB Cloud how to communicate with my openHAB instance with openHAB Cloud. This is already running, I put a switch that I can control with the Home app. Can I use the Cloud secure connection to send the audio to my Google Home?