Google TTS - wont talk

What am I missing for my setup??
When testing my google mini will “beep” but then not say anything. If I look in the cache folder the mp3 is there and if I play it on my PC it plays fine. Just nothing comes out of the mini.

http:
  base_url: https://mybase.duckdns.org
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

tts:
  - platform: google_translate
    service_name: google_say
    cache: true
    cache_dir: /config/www/tts
    time_memory: 300
    base_url: https://mybase.duckdns.org

Try putting your HA server’s local IP address for the base_url: , including the port. Thats how I have mine setup and it works.

eg:

tts:
  - platform: google_translate
    service_name: google_say
    cache: true
    cache_dir: /config/www/tts
    time_memory: 300
    base_url: http://192.168.0.14:8123

Also, I only have the base_url: in my config, none of the other stuff

@sparkydave is correct. The TTS service is just telling a cast device to play whatever is in the cache folder, which is under the base_url. There’s a very good chance that the google home can’t get to your external address from inside your router, at least that’s my case.

I see that you have your http config set up for SSL. This actually ends up being to your detriment because unless you can hit your DNS name from inside your network, you can’t access the site due to the certificates matching your domain and not your IP.

I recommend setting up a reverse proxy like NGINX, and having that handle the SSL for you, while redirecting to your un-encrypted HA instance. This way you get the best of both worlds, from the outside, you can hit your NGINX proxy, and still get to HA, and from the internal network, you can use http://your_ip:8123, and have all your cast devices be able to access the website for serving up TTS files.

Mine died in 0.98 and never spoke again.
I’ve been relying on Node Red TTS since…
I tried many things and am at the point of creating a new VM for HA to get it working again…

Hope it’s not my issue you’re seeing…

@SteveDinn this sounds like it is exactly my issue. Do you know of a guide for setting this up?

not much of a guide, but simply use this:

tts:
  - platform: google_translate
    service_name: google_say

nothing else… Tts always works…

fwiw, these are my http: settings

base_url: !secret base_url
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
ip_ban_enabled: true
login_attempts_threshold: 10

with secret base_url in the form of:

base_url: https:/mydomain.duckdns.org:portnumber

The HA NGINX guide is here:

Depending on your set up, you can install NGINX in a number of ways, so I’d recommend googling and reading up. After that, remove the certificate stuff from your Home Assistant config. If you’re still having trouble, my NGINX config is here:

Son of a …
I have the Nginx Proxy Manager addon installed and just forgot to configured it for HA. I have it configured for other links.
Using this add on setting up Nginx is just a few clicks.
Once I did that TTS works as expected.

Thanks

1 Like

I spent the afternoon working on this. It was less than intuitive. The default behavior created the mp3 files in the /config/tts directory, which is not accessible to the speakers. So moving it to the /confg/www director seemed to help.

I’m running v101.3 on Hassio/HassOS with a Pi3 broadcasting to Sonos. It took a while to find the right cache directory setting and base URL to make things work. But now I can use the tts.google_translate_say as well as the ‘Text to speak’ option on the Sonos media play panels in the UI.

For the tts.google_translate_say service, I was also able to send a string directly to the speaker.

entity_id: media_player.kitchen
message: 'I want ice cream!'

Here is the relevant section from my configuration.yaml file:

tts:
  - platform: google_translate
    base_url: https://my-ha-hostname.duckdns.org:my-external-port
    cache_dir: /config/www

Making it public in the www folder works great.

dap35’s solution worked well for me (a few other nginx solutions looked too complicated, and another suggestion about disabling the cache just didn’t work). Interestingly, I didn’t need the cache_dir change, and I’ve ommited a port on my base_url (https points to 443 which I have port forwarded from my router to 8123 on the internal address).

tts:
  - platform: google_translate
    base_url: https://my.domain

Works for me!

i’m using nginx as reverse proxy and hass.io on default port (http). I solved all tts problem by adding:

tts:
  - platform: google_translate
    base_url: http://my_internal_ip:8123