I haven’t changed anything recently and Google TTS stopped working. I’ve tried aiming TTS at a Google Home, a Google Mini and my Logitech Media Server - all of which have worked in the past. The LMS was confirmed working several hours ago.
I can see in the states dev tool that the device is trying to play a URL from my Hassio installation. Ala:
The state for the Google Home, LMS, etc, becomes “playing”. I can see the URL for the TTS-generated MP3 change when I send new text. I can load this URL into a browser and hear the TTS. But none of the devices will play the file. They just stay permanently in a state of “playing” with no sound.
I’ve also confirmed that my Let’s Encrypt certificate is up-to-date.
I’ve restarted Hassio. I’ve shut-down, unplugged, and restarted the entire Raspberry Pi.
Whats your base_url set to under the http configuration?
If the mp3 manages to download it almost certain that the issue is the base_url value. I battled with this last night.
The following settings work for me:
base_url: ExternalDNSNameOfHASS ---- Don’t put https:// or specify a port
Router - Port forward 443 to 8123 on the HASS internal IP
If all else fails, I’ve been reading here on the forums that it may have to do with NAT Loopback. Try enable it if you have the setting in your Router.
I can get the TTS file to play back through a browser. Or a media player (like Windows media player).
But if I use media_player.play_media to try to play the (working) TTS mp3 on a device (Google home, Logitech Media Server) it fails. If I use Logitech Media Server’s “tune in to URL”, still no luck. Both devices go to a state of “playing”, but they stay that way forever. As if they’re playing back a long MP3.
Just to be sure, I checked ip_bans.yaml and my devices aren’t blocked there.
Just as a test, I copied the MP3 to another web server inside my local network. I forwarded a port to it so that I could test whether the issue was loopback. The MP3 played fine from the other web server. I wonder if there’s a weird header issue or similar with AIOHTTP?
Geez, that is bizarre!
I was in your shoes, the only other thing I did was enable NAT PPPOE, bounced the Router, HASS and the GH. Also cleared everything in the TTS folder and stone the crows it worked again!
So, today I rebuilt my Hassio RPi. Installed fresh and moved-over my yaml. I even switched over to using ethernet instead of wifi.
I’m having the same exact issue. TTS files are being created correctly, but will not play on any of my devices.
I also tried copying one of the created TTS files over to my WWW (local) folder. No luck playing it via a media_player.play_media. I could play from the www/local folder over HTTP to a browser. Just not on any media devices controlled by Hassio (Kodi, Google Home, Squeeze Player).
Coming back to this. I’m still having this problem. I can’t get Google or Polly TTS to work on Hassio. I’m wondering if there’s perhaps an issue with TTS_PROXY.
I’m using LetsEncrypt and my cert is up-to-date and valid (and I can access my HA from outside my local network). Loopback works on my router and I have ports 443 and 8123 forwarded to HA.
I’ve tried specifying the base_url paramater for each of the TTS platforms, too. I’ve tried playing to Chromecast, Google Home and Squeezeplay.
On Squeezeplay, I can see that the file is being created and the correct URL is sent to the device. I can play the created MP3 back in a browser by copy/pasting the URL from Squeezeplay’s playlist.
On Google devices, I never hear the alert tone that sounds before playback begins.
Did you ever find a solution to it. I am in the same boat after trying the most common troubleshooting steps.
Just for my understanding, I understand google TTS is not a free service (even Amazon and Microsoft is not). Do I need to activate it with my google account and get this account setting setup somewhere in HA configuration.
Below is my config
http:
base_url: 192.168.10.24
# Text to speech
tts:
- platform: google
cache: true
cache_dir: /config/tts
time_memory: 120
For me, it’s an issue with Let’s Encrypt. If I turn off encryption, everything works. I can’t send TTS to anything - Squeezeplayer (on another RPi and on a Windows machine), Google Home, etc.
My current workaround is that I installed HA on a spare RPi with just enough to do TTS. My main system triggers TTS via API calls. Klunky, but it’s been working for a while.
As far as I understand , SSL is disabled on my setup. (just for confirmation can you please inform how/where to confirm whether SSL is activated or not). Is it the http component configuration, for me I have only given IP address without any protocol (http/https).
I have tried most of the tips, however to no avail. I can see that google_tts say service called, probably with the text I have input in the field to be spoken, however no file gets created in the specified folder (/config/tts or /tmp).
Plus as i understand that google TTS is a free and paid tiers based service, but apparenlty looks like it needs cloud API account and login to be able to use API.
So how and what approach HassIO google tts say service takes to send the text to the cloud to be converted in speech. Is it using a free tier account. Pardon if my queries make no sense based on my limited knowledge.
I guess I feel either the text is not passed on to the TTS service, or if it does, the file never gets created in the TMP folder to be played via Google Mini Speaker.
Any guidance to troubleshoot further would be nice.