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.
@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…
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.
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.
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).
I cannot seem to get my tts working. I want to send a message from home assistant to Xiaomi gateway running OpenWRT. I have succesfully mananged to get mpd working and can control it from home assistant but cannot send tts…
How can I install this ultimate tts inside home assistant? (even though I have setup node-red I haven’t used node red ever, but was hoping to get on with it)
So after a lot of trouble I have managed to get it working, there were couple of problems, for anyone that will need to do it (some of these observations are maybe specific to the Xioami Gateway…)
config now looks like this
# Google
tts:
- platform: google_translate
language: en
cache: true
cache_dir: /config/www # use folder that is accesible to everyone on the network
time_memory: 300
# base_url: http://192.168.1.25:8123 # this one didn't work even though everyone recommended....
base_url: https://<your-public-ip>.duckdns.org # use base url without port
In Xiaomi Gateway I had installed mpd and mpd-mini so I deleted both and reinstalled only mpd and configured like this:
Thank you, configuring base_url was the solution for me. Do you know if it is possible to setup the base_url for local media as well? I think that, for the same reason that you describe, my local media is not working on my chromecast audio.