Google TTS - broken with Google Home and Mini - works fine with normal ChromeCast devices

Google TTS has been broken for a while and several people are confirming it’s an issue.

No one is sure when it broke but it seems to have been broken for several months.

There is some discussion about it not working with SSL but I don’t use SSL and have the same symptoms as others.

“When SSL is enabled the Google Home will make a ding the very first time after HASS is restarted and a google_say command is sent to it, but it will never play the text (mp3). After that first ding, it ignores all subsequent commands without response or log. Debug shows it is receiving the commands and its state changes as a result.”

Does this work for anyone and if so, what is your config? Hassio, RPi, SSL, no SSL, etc.

thanks

Works fine here.

0.60 on a raspberry pi, no SSL at the minute but it was working with SSL before I changed to using a vpn.

Output is to chromecast audios.

The only time it stopped working for me was 59.something when I lost all my chromecasts, but I presume that was because I lost the output devices rather than a tts issue.

I think for most people it’s a base_url issue. So if you look in your logs and see what url the device is trying to play, you’ll probably find it’s wrong.

If you don’t use SSL you should delete the base_url line completely, if you do, your base url should be the bit in between https:// and the port number. (or, at least, that’s how it works for me :grinning:)

I’m using the same setup… 0.60 on an rpi

This is what I had when it was working. My http section hasn’t changed.

http:
  api_password: <password>

The first time after a restart of HASS, I get the ding, but no audio is played from the Google Home.
The logs show the content to be played and if I hit it that URL from the browser it plays the audio.

2017-12-24 11:31:53 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=media_player, service_call_id=1960165424-26, service_data=entity_id=[‘media_player.living_room_home’], media_content_type=music, media_content_id=http://10.0.0.241:8123/api/tts_proxy/296a1b0b6dbe0044aa3fb9228a4b805f7b53c6ac_en_-_google.mp3, service=play_media>

Anything sent a second time no longer even gives the ding.

I wonder if something changed with the Google Home and Mini?
I send audio to my Chromecast device (Android TV) and the audio was sent.

It seems to be an issue with only the Home and Mini

The ding is the device waking up, you won’t get a second one because then it’s already awake.

That service call looks right, what happens next in the log? For me I get “launching app”, and then the state changes as the player plays the file…

Dec 24 16:49:48 node-zero hass[7649]: 2017-12-24 16:49:48 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=media_player, service=play_media, service_data=media_content_id=http://192.168.1.3:8123/api/tts_proxy/1190dc29b0b0b52be00ebe2b8326444be8dd33c6_en_-_google.mp3, media_content_type=music, entity_id=['media_player.kitchencca'], service_call_id=1966722736-141>
Dec 24 16:49:48 node-zero hass[7649]: 2017-12-24 16:49:48 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1966722736-141>
Dec 24 16:49:48 node-zero hass[7649]: 2017-12-24 16:49:48 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1966722736-140>
Dec 24 16:49:48 node-zero hass[7649]: 2017-12-24 16:49:48 INFO (Thread-5) [pychromecast.controllers] Receiver:Launching app CC1AD845
Dec 24 16:49:49 node-zero hass[7649]: 2017-12-24 16:49:49 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.kitchencca, old_state=<state media_player.kitchencca=off; friendly_name=KitchenCCA, supported_features=21437 @ 2017-12-24T16:48:54.899528+00:00>, new_state=<state media_player.kitchencca=idle; volume_level=0.20000000298023224, is_volume_muted=False, media_content_id=http://192.168.1.3:8123/api/tts_proxy/1190dc29b0b0b52be00ebe2b8326444be8dd33c6_en_-_google.mp3, media_position=0, media_position_updated_at=2017-12-24T16:49:49.365635+00:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=KitchenCCA, supported_features=21437 @ 2017-12-24T16:49:49.367457+00:00>>
Dec 24 16:49:49 node-zero hass[7649]: 2017-12-24 16:49:49 INFO (MainThread) [homeassistant.components.http] Serving /api/tts_proxy/1190dc29b0b0b52be00ebe2b8326444be8dd33c6_en_-_google.mp3 to 192.168.1.24 (auth: False)
Dec 24 16:49:49 node-zero hass[7649]: 2017-12-24 16:49:49 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.kitchencca, old_state=<state media_player.kitchencca=idle; volume_level=0.20000000298023224, is_volume_muted=False, media_content_id=http://192.168.1.3:8123/api/tts_proxy/1190dc29b0b0b52be00ebe2b8326444be8dd33c6_en_-_google.mp3, media_position=0, media_position_updated_at=2017-12-24T16:49:49.365635+00:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=KitchenCCA, supported_features=21437 @ 2017-12-24T16:49:49.367457+00:00>, new_state=<state media_player.kitchencca=playing; volume_level=0.20000000298023224, is_volume_muted=False, media_content_id=http://192.168.1.3:8123/api/tts_proxy/1190dc29b0b0b52be00ebe2b8326444be8dd33c6_en_-_google.mp3, media_position=0, media_position_updated_at=2017-12-24T16:49:49.443750+00:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=KitchenCCA, supported_features=21437 @ 2017-12-24T16:49:49.444947+00:00>>
Dec 24 16:49:50 node-zero hass[7649]: 2017-12-24 16:49:50 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.kitchencca, old_state=<state media_player.kitchencca=playing; volume_level=0.20000000298023224, is_volume_muted=False, media_content_id=http://192.168.1.3:8123/api/tts_proxy/1190dc29b0b0b52be00ebe2b8326444be8dd33c6_en_-_google.mp3, media_position=0, media_position_updated_at=2017-12-24T16:49:49.443750+00:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=KitchenCCA, supported_features=21437 @ 2017-12-24T16:49:49.444947+00:00>, new_state=<state media_player.kitchencca=playing; volume_level=0.20000000298023224, is_volume_muted=False, media_content_id=http://192.168.1.3:8123/api/tts_proxy/1190dc29b0b0b52be00ebe2b8326444be8dd33c6_en_-_google.mp3, media_duration=1.92, media_position=0, media_position_updated_at=2017-12-24T16:49:50.162321+00:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=KitchenCCA, supported_features=21437 @ 2017-12-24T16:49:49.444947+00:00>>
Dec 24 16:49:52 node-zero hass[7649]: 2017-12-24 16:49:52 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.kitchencca, old_state=<state media_player.kitchencca=playing; volume_level=0.20000000298023224, is_volume_muted=False, media_content_id=http://192.168.1.3:8123/api/tts_proxy/1190dc29b0b0b52be00ebe2b8326444be8dd33c6_en_-_google.mp3, media_duration=1.92, media_position=0, media_position_updated_at=2017-12-24T16:49:50.162321+00:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=KitchenCCA, supported_features=21437 @ 2017-12-24T16:49:49.444947+00:00>, new_state=<state media_player.kitchencca=playing; volume_level=0.20000000298023224, is_volume_muted=False, media_content_id=http://192.168.1.3:8123/api/tts_proxy/1190dc29b0b0b52be00ebe2b8326444be8dd33c6_en_-_google.mp3, media_duration=1.92, media_position=0.65935, media_position_updated_at=2017-12-24T16:49:52.946744+00:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=KitchenCCA, supported_features=21437 @ 2017-12-24T16:49:49.444947+00:00>>
Dec 24 16:49:54 node-zero hass[7649]: 2017-12-24 16:49:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.kitchencca, old_state=<state media_player.kitchencca=playing; volume_level=0.20000000298023224, is_volume_muted=False, media_content_id=http://192.168.1.3:8123/api/tts_proxy/1190dc29b0b0b52be00ebe2b8326444be8dd33c6_en_-_google.mp3, media_duration=1.92, media_position=0.65935, media_position_updated_at=2017-12-24T16:49:52.946744+00:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=KitchenCCA, supported_features=21437 @ 2017-12-24T16:49:49.444947+00:00>, new_state=<state media_player.kitchencca=idle; volume_level=0.20000000298023224, is_volume_muted=False, media_content_id=http://192.168.1.3:8123/api/tts_proxy/1190dc29b0b0b52be00ebe2b8326444be8dd33c6_en_-_google.mp3, media_duration=1.92, media_position=0, media_position_updated_at=2017-12-24T16:49:54.069174+00:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=KitchenCCA, supported_features=21437 @ 2017-12-24T16:49:54.074778+00:00>>

here’s what a grep entity_id=media_player of my logs show when sending to a Home device

2017-12-24 12:02:43 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1959895024-41, service=google_say, domain=tts, service_data=entity_id=media_player.living_room_home, message=test>

sending to my Android TV which is like sending it to a CCA device returns

2017-12-24 12:02:27 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1959895024-39, service=google_say, domain=tts, service_data=entity_id=media_player.living_room_2, message=test>
2017-12-24 12:02:28 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.living_room_2, new_state=<state media_player.living_room_2=idle; media_position=0, app_id=CC1AD845, is_volume_muted=False, volume_level=0.0, media_duration=0.84, app_name=Default Media Receiver, media_position_updated_at=2017-12-24T12:02:28.012498-05:00, media_content_id=http://10.0.0.90:8123/api/tts_proxy/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_en_-_google.mp3, supported_features=21437, friendly_name=Living Room @ 2017-12-24T12:01:29.404534-05:00>, old_state=<state media_player.living_room_2=idle; media_position=0, app_id=CC1AD845, is_volume_muted=False, volume_level=0.0, media_duration=0.84, app_name=Default Media Receiver, media_position_updated_at=2017-12-24T12:01:29.401281-05:00, media_content_id=http://10.0.0.90:8123/api/tts_proxy/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_en_-_google.mp3, supported_features=21437, friendly_name=Living Room @ 2017-12-24T12:01:29.404534-05:00>>
2017-12-24 12:02:28 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.living_room_2, new_state=<state media_player.living_room_2=playing; media_position=0, app_id=CC1AD845, is_volume_muted=False, volume_level=0.0, media_duration=0.84, app_name=Default Media Receiver, media_position_updated_at=2017-12-24T12:02:28.118904-05:00, media_content_id=http://10.0.0.90:8123/api/tts_proxy/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_en_-_google.mp3, supported_features=21437, friendly_name=Living Room @ 2017-12-24T12:02:28.121113-05:00>, old_state=<state media_player.living_room_2=idle; media_position=0, app_id=CC1AD845, is_volume_muted=False, volume_level=0.0, media_duration=0.84, app_name=Default Media Receiver, media_position_updated_at=2017-12-24T12:02:28.012498-05:00, media_content_id=http://10.0.0.90:8123/api/tts_proxy/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_en_-_google.mp3, supported_features=21437, friendly_name=Living Room @ 2017-12-24T12:01:29.404534-05:00>>
2017-12-24 12:02:28 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.living_room_2, new_state=<state media_player.living_room_2=playing; media_position=0, app_id=CC1AD845, is_volume_muted=False, volume_level=0.0, media_duration=0.84, app_name=Default Media Receiver, media_position_updated_at=2017-12-24T12:02:28.859321-05:00, media_content_id=http://10.0.0.90:8123/api/tts_proxy/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_en_-_google.mp3, supported_features=21437, friendly_name=Living Room @ 2017-12-24T12:02:28.121113-05:00>, old_state=<state media_player.living_room_2=playing; media_position=0, app_id=CC1AD845, is_volume_muted=False, volume_level=0.0, media_duration=0.84, app_name=Default Media Receiver, media_position_updated_at=2017-12-24T12:02:28.118904-05:00, media_content_id=http://10.0.0.90:8123/api/tts_proxy/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_en_-_google.mp3, supported_features=21437, friendly_name=Living Room @ 2017-12-24T12:02:28.121113-05:00>>
2017-12-24 12:02:31 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.living_room_2, new_state=<state media_player.living_room_2=idle; media_position=0, app_id=CC1AD845, is_volume_muted=False, volume_level=0.0, media_duration=0.84, app_name=Default Media Receiver, media_position_updated_at=2017-12-24T12:02:31.711227-05:00, media_content_id=http://10.0.0.90:8123/api/tts_proxy/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_en_-_google.mp3, supported_features=21437, friendly_name=Living Room @ 2017-12-24T12:02:31.714059-05:00>, old_state=<state media_player.living_room_2=playing; media_position=0, app_id=CC1AD845, is_volume_muted=False, volume_level=0.0, media_duration=0.84, app_name=Default Media Receiver, media_position_updated_at=2017-12-24T12:02:28.859321-05:00, media_content_id=http://10.0.0.90:8123/api/tts_proxy/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_en_-_google.mp3, supported_features=21437, friendly_name=Living Room @ 2017-12-24T12:02:28.121113-05:00>>

I think that’s your answer then. TTS does work, but the home/mini won’t accept it for some reason.

journalctl -f -u home-assistant.service

Will give you your full homeassistant output as it’s happening, might help you debug further (change the name of the service to whatever yours is).

That’s what it looks like. Google must have changed something since it did work. I think it stopped working shortly after they introduced the Broadcast feature.

Can’t comment there - I don’t own any, and haven’t looked in to the platform. I would have gone with the googles but they weren’t available in the UK when I decided I wanted a voice assistant so I went with Amazon Echo dots instead (on the basis that HA can tie everything together anyway).

Like I say, if there’s any errors coming up from your journalctl output it might give you somewhere to start for a fix, if there’s literally just the line where it sends the audio and then nothing I think you’re a bit stuck tbh.

I have been using a Google Chromecast audio with my HASSIO 0.60 currently running on a RPI3 for TTS features for about 6 weeks with no issue at all. 3 days ago, I installed LetsEncrypt for more security and because I was working on custom Alexa voice control with HASSIO. AS SOON as I enabled LetsEncrypt with no other changes to HASSIO, the TTS feature of the Chromecast Audio stopped working. Just as reported above, It gives the wake up chime, but no TTS read out. I uninstalled LetsEncrypt and the TTS feature began working again. I am not running LetsEncrypt for now, so that I can use TTS. This has become an issue, because I cannot implement my Google Home Mini or custom Alexa commands, because they both require LetsEncrypt to be used. For now I am using Alexa through the emulated Hue function which limits me to On and OFF commands only. On a side note, my Squeezebox does still work with TTS with Encryption enabled.

Just migrated from Raspian to Hassio.

Been struggling all morning as well.

For tts cache folder
I tried /tmp/tts but the tts mp3 does not get written.
It plays when generated in the frontend google mini media player gui but no mp3.

I have it in /config/tts didn’t make a change on the folder permission. Works now.

My setup is no-ip and let’s encrypt.

I tried your solution and it didn’t work for me. But I just found the reason it is working for you and not for me. I followed the instructions on this page and got it working. This is also the reason that it is broken for everyone else that can’t get it to work. I found the following post on another thread. Here is a link to the post that explains it. Look for the post by “Andres_Arenas_Velez” near the bottom of the page posted on Aug 17th 2017. TTS not working with LetsEncrypt

I enabled NAT Reflection on my router, and it is now working great.

I’m late to the party on this and it’s probably unrelated, but I just moved from hassbian to a Windows PC with VirtualBox /Ubuntu/Docker and lost my TTS. I have been struggling with it for a few days until I just realized that my base_url value was incorrect. A simple thing, but I’d overlooked it.

If you are using SSL certificate or Docker, you may need to add the base_url configuration variable to your http component as follows:

#Example configuration.yaml entry
http:
  base_url: example.duckdns.org

The base_url configuration variable was added in 0.35.1, so make sure your Home Assistant version is 0.35.1 or above.

I have NAT reflection enabled
I also have set my base_url to the IP I use to access Hass externally

After a reboot of Hass, I get the Ding and then nothing. The message I sent doesn’t get spoken When I open the Google Home app, and choose the device I tried to cast to, it shows the Stop Casting option. It appears it didn’t receive the casted item and/or thinks it’s still casting. If I click Stop Casting nothing happens.

When I restart Hass, it’s the same pattern as above.

Hi,

Anyone got any update on this?
I have same issue with my google home and the TTS from Home-Assistant.
First after a reboot i hear a ding then after that nothing happens…
I’m pretty new to this so sorry if it has been answered.

Looks like it is not possible to solve this issue when you use SSL with HA for Google Home devices seen these devices have their DNS settings hardcoded. At least with my internet provider’s router I can’t change DNS settings (which would not solve the Google Home going straight to 8.8.8.8 anyway) and can’t use port mapping on the router either as the rules are only managing outbound to inbound, and not inbound to inbound.

1 Like

@littlbee Can you elaborate on this? It’s not really obvious to me what SSL has to do with DNS.

It’s got something to do with NAT reflection / hairpin / loopback I was trying to sort this out yesterday but eventually I gave up. Anyway now you have something to Google, if you get it sorted please let us know. (Hint, some people just enabled NAT hairpin in their router settings and it solved the problem so it’s worth trying that first) - didn’t work for me on my Ubiquiti Edgerouter but you might be lucky!

@aherbjornsen When SSL is switched on (for secure external access without VPN) it’s often necessary to do some port forwarding (443) to get it all working, this port forwarding seems to affect internal devices and stops TTS working on Google Home. Some people find that NAT hairpin works but it didn’t for me.

It has to do with SSL in the sense that the root URL in configuration.yaml must reflect the hostname and not internal IP. Having the hostname set and considering the Google Home has its DNS hardcoded, the GH will resolve the hostname to my external IP, and my router doesn’t allow NAT loopback (or NAT hairpinning).

@littlbee Thanks, that made it clearer. What you’re saying is that the Google Home device ignores my local DNS and goes directly to 8.8.8.8.

I did some traces on my router and see that this is correct.

Then I enabled the option “Intercept DNS port” in the router, and I now see that the Google Home device is being handed the internal address.

Unfortunately, it still does not work. I’ll try to dig deeper into this and do some further traffic dumps.