TTS Error with Google - configuration is not valid

Setting your internal URL to an external one isn’t a solution is it? Perhaps just a workaround?

This is the error appearing in the logs:

2023-07-09 17:21:45.401 ERROR (Thread-9) [homeassistant.components.cast.media_player] Failed to cast media https://**.***.tech/api/tts_proxy/aaf4c61ddcc5e8a2dabede0f3b482cd9aea****_en_-_google_translate.mp3 from internal_url (https://**.***.tech). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

External URL is set to use HA Cloud:

image

Just upgraded to 2023.7.2, and this issue still seems to present. Pretty strange?

Same issue here.

same here :frowning:

I just removed the base_url: line in TTS config and restarted.
That fixed the TTS service in my case.

1 Like

That doesn’t work. What did you do to confirm it was working?

Tested automations that have text to speach announcements to google nest mini devices.

I also wanted to jump in here and add to to chorus that this has stopped working.
Commenting out the base_url indeed allows HA to stop complaining when I try to reboot/reload, however automations that I have to have the google mini talk don’t work with the line commented.

tts:
  - platform: google_translate
    cache: true
    cache_dir: /tmp/tts
    time_memory: 300
    #base_url: https://mydomain.duckdns.org
    service_name: google_say

Any luck getting this fixed?
I am having the same issue. I commented out the config file with the below example and my config file compiles without any errors.

tts:
  - platform: google_translate
      #base_url: https://testing.duckdns.org:9999
    service_name: google_say

I tried tts.speak Text-to-speech (TTS) - Home Assistant and that works but I can’t get it it work correctly with node red as I have some more complex automations. I also can not figure how to get it working with templates. Any ideas?

That fixed it for me too. tnx.

1 Like

These constant changes are really going on my nerves. I had to comment out the base_url as well and now, the whole system is not talking to me anylonger… I am really fed up and already considering not to update HA anymore, once I get it back working… For me it was just running fine, all devices and automations were working perfectly… And then this crap again… FCK !! - So is there a working solution to this problem, as I can’t figure out from previous posts, what to do step by step to get the google voice back talking… ?

2 Likes

I’m assuming people who have “fixed” this, are not longer using the Local Network setting under the “Home Assistant URL”?

I’d say thats more a workaround then a fix? Routing all of your local traffic via the internet seems a bit silly to me?

snervante e questa volta sono anche infastidito da queste situazioni che minano il mio lavoro.

Removing the base_url does allow HA to load without error, however the TTS doesn’t actually work without it.

Well, it actually worked when trying to play the media in the web browser where HA is displayed, but it did not work when I attempted to play the media on my google speaker.

Any solution?

The possible reason this won’t work on an internal URL is because it only works over a secure connection. If you have not set up a valid SSL certificate for your internal URL then your media player is likely to reject playing the downloaded audio file.

I have my Home Assistant configured using a domain name I own, and use Cloudflare DNS challenge to generate a valid SSL/TLS certificate then have my router point an internal DNS record to my HA server.

I’ve not tested this yet since this bug was reported, but suspect this might be why the internal URL isn’t working for some.

I don’t think you really read or comprehended the replies here. It’s clear it has been working perfectly fine for many of us until suddenly it wasn’t.

You can also see from config examples above where the base_url has needed to be commented out, the url used is https.

And you haven’t tested it yet yourself :wink: Sorry bud but that was triggering in the same way that someone will post on a Microsoft forum “my PC is on fire and now my cat has 3rd degree burns” and someone will reply “try sfc /scannow”

1 Like

Recently upgraded to version 2023.7.3, and problem still seems to be there? Strange?

Ok, here’s what fixed it for me.

System → Network → Home Assistant URL. My WAN URL was no longer listed here.
For both the Internet and Local Network options I had to set these to my https://xxxx.duckdns.org address (didn’t accept my actual local IP in the local network field).

Leave external_url commented out in the TTS section of your configuration.yaml

1 Like

Putting an external URL in your local network means all HA requests now go via the internet… even when on your loca network…

Any idea if this is fixed in 2023.8?