My google tts is not working

Hi. My HASS.IO Google tts is not working.

My Hass.Io is running on Docker on Raspberry pi 3 model B and installed DuckDNS addon.

My configuration is as follows

  ssl_certificate: /.../fullchain.pem
  ssl_key: /.../privkey.pem

  - platform: google_translate
    service_name: google_say
    language: ja
    cache: true
    cache_dir: /.../tts

The ISP I use has limited ports that can be opened and cannot access 80, 443 and 8123 ports from outside.
Access from the outside is forwarded port 12345 to the 8123 by the router.

My voice mp3 files are cached and will play properly in Japanese when played with an audio player.

What’s wrong with my configuration?

I’m sorry for my poor English

1 Like

If you trigger a sound on the media player, you should be able to grab the full URL from the attributes in the states list on that device. Take that and plug it into your browser. If you get sound, you’re on your way to success. If you don’t, then you have an issue with your base_url, most likely.

1 Like

Thank you arretx for your reply.

The base_url in tts, even if the local IP or DuckDNS url is written, even if “https” is changed to “http” or nothing is written, there is no improvement, and it will silence after the beep .
And no matter what I do, the following error occurs.

“Error 404 on load URL

"Error on init TTS: No TTS from google_translate for "

I don’t understand the cause of these error

Hi arretx.

I checked the media player “media_content_id” from the developer tool STATES. I found that the URL refers to the Duckdns domain of base_url. I think it will work if I can redirect media_content_id to a local IP address.

Is my perception correct?

I understand you are trying to play an MP3 sound with TTS? Yes
I’m not sure if this is the same problem that I had, but I was trying to get Google TTS to play an MP3 sound as a door chime. It would’t work and after 4hrs I realised that the location of the file and the filename it self is case sensitive. My file name was “Classic-doorbell-sound.mp3” and it wouldn’t work because my file name didn’t have a capital C at the start, as soon as I changed it to make it match the file system it worked.

Your setup all looks correct though, it’s the same as mine.
Here is my yaml for the automation that calls the sound:

- id: '1558173150098'
  alias: Garage Door Bell Chime
  - event_data: {}
    event_type: doorbird_door_bell_doorbell_1
    platform: event
  condition: []
  - data:
      media_content_id: # the capital is required because linux is case sensitive and my file name has a capital
      media_content_type: music
    entity_id: media_player.garage_speaker
    service: media_player.play_media

The only other difference is in
I have 1 extra thing

  time_memory: 300

But I don’t think that is affecting you at all.

Hi Egglec.
Thank you for your reply.

I changed tts componet configuration as follows

  platform: google_translate
  language: 'ja'

Then a media_content_id was created on media player and the content was the URL of a voice mp3 file as follows, but my Google home is silens.



The media_content_id is changing every time tts on media player.
I tried copy url and paste to chrome browser then it’s can play voice.
Why can play on browser but can’t play on google home?

I’m sorry for my poor English.
Does my English make sense?

I think likely a this problem cause is SELF-SIGNED CERTIFICATE .

Maybe, DuckDNS is create self-signed certificate and establish SSL for local network, but Google tts is reject self-signed certificate.

How do I solve this problem?

I solved the problem!
I installed NGINX Home Assistant SSL proxy add-on. As a result, the local network is no longer SSL with a self-signed certificate. So now Google tts is working properly.
thank you all.

  - platform: google_translate
    service_name: google_say
    language: 'ja'
    cache: true
    cache_dir: /.../tts


Check out 3 solutions to My google tts is not working on this thread

Thanks a lot for this suggestion!!! It solved so many issues I was having internally !!! Just installed the proxy add-on and everything started to work automagically !

1 Like

Thank you for sharing your solution. Had the same problem and could fix it :-).