SOLVED: No Google TTS any more, are there any solid guidelines?

Tags: #<Tag:0x00007f73974105e8>

I had TTS up and running, but not any longer. I’ve read a lot of posts with ideas and suggestions, but I don’t see a definete “this is how it’s done”, and I know that HA is changing and Google is changing all the time, and the docs are way behind, but I really need some clarification.
I’ve tried both with HA without ssl active, and I’ve also tried with ssl active.
The ha is run through nabu casa, and there is no nat from the outside to the ha.

The http section looks like this:

http:
  base_url: http://hassio.domain.dk:8123
  ssl_certificate: /ssl/combined.pem
  ssl_key: /ssl/domain.pem

The tts section looks like this:

# Text to speech
tts:
  - platform: google_translate
    language: 'da'

At some point I got the ‘pling’ in the speakers and no talk, but now I don’t even get the ‘pling’.

2 Likes

Do a search for something called NAT loopback on the forums, that helps with TTS
Hopefully your router supports it

Ok, I got a little closer, there is no problem with nat loopback.

I think it’s something in my automations.
It’s definetely something that has changed If I do a say directly in a unit it work, if I do a say directly in a group it works.
But if I do it in an automation (triggered manually) I don’t get anything, even for those that I have had working previously.

This is the automations defined in the GUI and copied from the automations.yaml

- id: '1559569190265'
  alias: Entré door open - 2 mins
  trigger:
  - entity_id: binary_sensor.entre_dor
    for: 00:02
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: media_player.faellesomrader
      message: Hov, entrédøren står da vist åben!
    service: tts.google_say

EDIT: Yes it was, because the tts service has changed, it’s now: tts.google_translate_say
So with that, it works again, it would be nice if I could force the speach to go out through the google home unit itself, instead of it’s bluetooth connected speaker, as that will need to wake up first, so it will loose the first syllables.

Hi fribse,

I think I have a similar problem to yours. For a while now, my tts messages only do a ‘pling’ without text. However, I can’t seem to find a service called ‘tts.google_translate_say’. Can you please explain how I should modify my current config to use this service? Thanks for your help!

This is what I have in my configuration

tts:
  - platform: google_translate
    language: 'da'
    base_url: https://public-dns-name.dk:xxx

The host name for my HA, cannot resolve on the public DNS, so I’ve entered one that does resolve, and I have a port mapped to the HA

One of my automations looks like this:

- id: 94b0c686501c48548517091b2b0bd022
  alias: Remind Adrian of bedtime and charging phone
  trigger:
  - at: '20:45:00'
    platform: time
  condition:
  - condition: state
    entity_id: person.adrian_fribert
    state: home
  - condition: template
    value_template: '{{ is_state_attr(''device_tracker.life360_adrian_fribert'',''battery_charging'',
      false) }}

      '
  - condition: state
    entity_id: person.adrian_fribert
    state: home
  action:
  - data:
      language: da
      message: Godaften Adrian, det er sengetid, og du skal huske at sætte din telefon
        i din oplader, godnat og sov godt
    entity_id: media_player.adrians_home
    service: tts.google_translate_say
  initial_state: 'on'
2 Likes

Changing my config to match yours and using the tts.google_translate_say service instead of tts.google_say totally fixed my problem! Thanks for your quick response!

1 Like

Great, glad I could help!

I’ve copied exactly as it is here and it is not working

@Palmer_Duckworth You did change the URL to your own, right?

I still have this in my config:

tts:
  - platform: google_translate
    language: 'da'
    base_url: !secret tts-public-url

And the tts-public-url is of course stored in my secrets.yaml, and is in the form of https://url-to-site:port
And then I’ve created a nat in the router for that port to home assistant.

Can you explain the base_url ?
My tts was working until mid Aug. then after HA update it stopped. I can’t figure it out.
I have been using tts.google_translate_say

Well, I have a domain (pointing to my fixed IP), and I’ve opened a port in my firewall.
So the secret I’ve entered points to “https://my-domain-url:port”

Check out 3 solutions to No Google TTS any more, are there any solid guidelines on this thread