About Home Assistant and Google Home Mini TTS (Text-to-speech)

Hi Team,

When sending a TTS message to my google home, the device turn on and makes a bip that I think it means that got the order from HA, but it never reproduces the audio.

I went through all the related topics in this forum, the HA components information, etc but no luck. I tried with HTTPS (I have my Let´s Encript certificate due to DuckDNS module) and also with HTTP, same results and nothing in the log file. I am also using my local Raspberry Pi IP address instead of resolving by DNS.

I can find the mp3 files correctly created on \HASSIO\config\tts. Does someone know which is the route I need to put in the browser to try to open the mp3 file a listen it in my computer to confirm that the file is accessible by the Google Home Mini?

Thanks!!

Ok, I can hear the audio now when browsing this URL http://10.0.0.13:8123/api/tts_proxy/fbb2bb52c4600f755a59df196a21255ef9206844_es_-_google_translate.mp3

But why the google home mini cannot? :frowning:

I have the same issue. I spoke to Google support.

They told me the issue is with my ISP using a private NAT.

It works, finally!! Im about to cry xD.

Use the IP address instead of the domain name:

Text to speech

tts:

  • platform: google_translate
    language: es
    service_name: google_say
    base_url: http://10.0.0.13:8123 #tengo certificado valido, no necesito poner la URL HTTP pero estoy probando. Ademas tb pongo la IP para no hacer resolucion DNS.

I hope it helps.

I will try now HTTPS.

HTTPS does not work. I saw similar issues in the forum. I am using HTTP for TTS and HTTPS for the rest but it does not work. The solution could be to use HTTPS for TTS too. For doing that I would need to resolve mi duckdns domain name internally with an internal DNS. Unless the Home Mini has a hosts file like in Windows :slight_smile: has it?

As far as I know the Google mini will use the Google DNS and not the internal one. I would need to block it in the firewall. Best thing is using Wireshark to see what is really happening.

Ask your ISP to give you a public IP address, even if it changes you can use Duck DNS. In Spain I am using Pepephone and they give you this possibility.

They won’t do that. I live in an area not served by broadband so have built a 3G mast for internet and been running with that for a few years now.

I’ve just instructed a company to install a gigabit fibre to the property. The distance is 7km and the install cost is huge. The monthly charge is in excess of $1000/m!

At least I’ll have a decent connection then though.

I had this same issue with DuckDNS and LetsEncrypt messing up with Google TTS. For me the solution was to just add port forwarding 8123->8123 to my router and after that both Chrome Cast and Sonos speaker were able to access the generated mp3. You can have that dns name just like it should be with this solution.

Edit:

My config:

http:
  base_url: https://mydomain.duckdns.org:8123
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
tts:
  - platform: google_translate
    service_name: google_say

I already have that redirect but I will compare my config with yours to see if it could be something else…

mine (which works for me)

  http:
    base_url: mydomain.duckdns.org
    ssl_certificate: /etc/letsencrypt/live/mydomain.duckdns.org/fullchain.pem
    ssl_key: /etc/letsencrypt/live/mydomain.duckdns.org/privkey.pem
  tts:
    - platform: google_translate
      service_name: google_say

note that I dont have https or the port in the base URL.

On my router I have portforwarding outside:80->ha:80 and outside:443->ha:8123

1 Like

I am currently testing also Alexa and then I will get back to this. Thanks I keep you posted!

Local or public ip?

1 Like

@Henrik1986 Really? :sweat_smile:

1 Like

Mine is kinda working. My Google Home makes the chime, but nothing after that. Am I missing something?
config.yaml

tts:
  - platform: google_translate
    cache: true
    cache_dir: /tmp/tts
    time_memory: 300
    base_url: http://10.0.0.30:8123
    service_name: google_translate_say

automation

- alias: "Porch Alert PIR"
  trigger:
  - entity_id: binary_sensor.porch_pir
    platform: state
    to: 'on'
  condition:
    condition: time
    after: '06:00'
    before: '18:00'
  action:
  - service: tts.google_translate_say
    entity_id: media_player.dining_room_speaker
    data:
      message: 'Someone is at the front door.'