Struggling to get TTS working with Google Nest

Hi there

I’m struggling to get Google text to speech working on a Google Nest with my Home Assistant…

I’ve setup a simple automation as per below to trigger the TTS, the first time the automation ran my Google Nest made a beep but nothing was played, I checked in the tts directory and it created the first mp3 file but when I ran the automation again after that it now doesn’t create any of the mp3’s nor does it play these.

I am not sure if it is perhaps because I’m using Duckdns / SSL?

TTS Configuration in configuration.yaml (tried it with base_url removed which also didn’t work)

# Text to speech
tts:
  - platform: google_translate
    base_url: http://192.168.88.11:8123/
#  base_url: https://192.168.88.11:8123/ #tried this
#  base_url: https://xyz.duckdns.org:8123/ #tried this

My test automation

alias: Test TTS 1
description: ''
trigger:
  - platform: state
    entity_id: light.bedroom_lamp
    to: 'On'
condition: []
action:
  - service: tts.google_translate_say
    data:
      entity_id: media_player.googlehome7067
      message: The lamp is on
      cache: true
      language: English
mode: single

DuckDNS config


lets_encrypt:
  accept_terms: true
  certfile: fullchain.pem
  keyfile: privkey.pem
  algo: sdf67sdf67
token: 5cb45869-5636-4b07-9230-4h55g42def2c
domains:
  - xxx.duckdns.org
aliases: []
seconds: 300

Any ideas from the clever people on the forum?

Thanks in advance

If you’re doing SSL directly in HA, then http://192.168.88.11:8123/ isn’t going to work. Try it in a browser…

The base_url there has to work from a browser on your network, without any warnings or errors.

A couple of things to look at; First I suspect you need to use an external link, mine is as follows. You should first confirm that’s working.

tts:
  - platform: google_translate
    base_url: https://xxxxxxxxxx.duckdns.org

Then make sure you expose the appropriate domains in your “google_assistant:” config. I am not aware you can use Automations as that did not work for me (but I haven’t tried it lately). I use scripts instead.

Thanks for the reply.

I have tried using the external link before (base_url: https://xxx.duckdns.org:8123) but had the HA port 8123 at the end, perhaps that is part of the problem as I see you don’t have the port number in your example? The internet link for my HA is down currently so I cannot test this.

I don’t have anything in my google_assistant_configuration.yaml file relating to the server IP could you perhaps share that line of the file with me?

Thanks for help

The documentation for this is here Google Assistant - Home Assistant

My config is below, but you need to create the information I removed and replaced with ??.

google_assistant: 
  project_id: ??
  service_account:
     private_key: "-----BEGIN PRIVATE KEY-----??"
     client_email: "??"
  report_state: true
  exposed_domains:
    - switch
    - light
    - media_player
    - climate
    - fan
    - lock
    - script
    - scene
  entity_config:
    media_player.zone_11:
      name: Kitchen Audio
      aliases:
        - Kitchen_Audio
      room: Kitchen
    media_player.zone_12:
      name: Dining Room Audio
      aliases:
        - Dining_Audio
        - Dining_Room_Audio
      room: Dining Room
    media_player.zone_13:
      name: Living Room Audio
      aliases:
        - Living_Audio
        - Living_Room_Audio
      room: Living Room    
    media_player.zone_14:
      name: Master Bedroom Audio
      aliases:
        - Master_Audio
        - Master_Bedroom_Audio
      room: Master Bedroom    
    media_player.zone_15:
      name: Porch Audio
      aliases:
        - Porch_Audio   
      room: REAR_PORCH
    media_player.zone_16:
      name: Garage Audio
      aliases:
        - Garage_Audio
      room: Garage
    light.living_room:
      expose: false
      room: LIVING_ROOM

Thanks @VikingBlod but that’s the config to link Google Home to Home Assistant it won’t have any impact with TTS.

Paul, your right, sorry to mis-lead you. I assume then you can control Home Assistant from Google Home without issue.

When I am debugging these types of things I use the Developer Tools and will try to execute my commands from there. Another thing to consider is to try a different Google Home. I have one in the Bedroom that doesn’t always announce.

No need to apologize…

Yeah I can control HA from GA without issue, this TTS is definitely SSL related, I’m busy looking at a reverse proxy option, will post back any findings.

I’ve also been using the developer option for testing since your comment above about it not working from an automation.

I am using the NGINX that is available as a AddOn in Home Assistant. It’s been working well.

Yup that’s what I’m going to try.

I managed to get this working by changing over to Nginx reverse proxy but now I get an error “401: unauthorized” when I try run some add-ons like ESPHome, File Editor etc…

Sigh, so much trouble just to get a Google Nest to work :smiley:

image

1 Like