TTS.Google_Say - Can't Hear Any Announcement

Ah ok, I’m not using Home Assistant Cloud at all, so can’t help you with that.

I just bought a Google Home Mini and started using that as my TTS speaker, which works fine. No problems at all with SSL.

I’m not using my Logitech Squeezebox speaker at the moment, since it still doesn’t work with SSL. I would still love to use it though, so that I can broadcast to both my Squeezebox and Google Home Mini. Really hoping someone has a solution.

Ironically last night when I asked Google Mini to turn off my bedside lamp (Yeelight Lamp) it said an error occurred.

Edit: My Mi Home app shows the lamp as offline.

I’m just setting up the tts for the first time, but I think I’m having the same problem. My HA is setup using https and the google assistant integration seems to work fine. BTW, I’m not using the subscription service. I setup the GA integration manually following the instructions. I can control my devices with no problem. If I go to one of the GH media player devices and click the 3 dots, I can type in text in the “tts” input field and that works fine as well. But if I go to the main page and click on the services button under developer tools and fill out the fields like this:

Service Name: tts.google_say
Service Data:

{
  "entity_id": "media_player.upstairs",
  "data": {
    "message": "testing one, two, three"
  }
}

I see the popup in the lower left say “service tty.google_say called”, but nothing comes out of the speaker. My JSON above has been formatted for easy viewing, but in the input field, it’s all on one line.

If I’m trying to call it from the developer tools, is there a different way to specify it?

I haven’t actually tried it from an automation yet. I wanted to see it work from a manual call first.

I’m not an expert, but my configuration file works and looks like this:

automation: 
  - alias: 'Someone At The Front Door Daytime'
    trigger:
      platform: template
      value_template: '{{states.switch.front_door_15.attributes.device_tripped}}'
    # The Condition Syntax from https://www.home-assistant.io/docs/scripts/conditions/
    condition:
      condition: time
      # At least one of the following is required.
      after: '08:00:00'
      before: '20:00:00'
      # Text to Speech
    action:
      - service: tts.google_say
        entity_id: media_player.whole_house_doorbell
        data:
          message: 'Motion Detected At The Front Door'

I don’t know anything about the developer tools and perhaps they do formatting differently. Mine is in my Configuration.yaml file and as you can see doesn’t have the curly brackets and uses single quote marks etc.

Yeah, I’ll try it in an automation and see if the result is the same. The reason I had to use JSON in the developer tools is because they just give you one line for the data and I don’t think I could do any kind of yaml there.

But I would like to figure out if anyone is getting it to work from the developer tools and what you enter into the input fields.

Hi @brucehvn , I was in the same boat as you 10 minutes ago.
It seems there was a problem with Google TTS platform but it has been solved in 0.83.2 as confirmed in this thread.
I didn’t want to update to a new version yet so I applied the patch mentioned here.
The next step was to enter in the developers tools this JSON (no message inside data, just message alone):

{"entity_id": "media_player.upstairs", "message":"testing one, two, three"}

and everything was fine. Good luck!

Thanks timseebeck. I upgraded to 0.83.2 and indeed it does work now, though I have to use the JSON format you describe which seems odd.

Using it in automations worked even before the upgrade, but did (and does) require the documented format (message inside data)

I had one quirk which also seems to be fixed by the 0.83.2 update. I have a speaker group that I created in the Google Home app which includes all 4 of my google home devices. When I had an automation that was supposed to announce on that media player, the first message would never be announced, though I would see the media player in the home screen come alive and say “playing”. A subsequent attempt to put a second message through would speak normally. The same was true just trying it through the UI, opening that media player, and typing in the text to say. The first message would not be heard, but the next message would. But so far it’s working now with 0.83.2

Potential explanation to random playing messages?

Anyway, glad the update solved it! Happy HASSing!

If you want to integrate the fix that was made for 0.83, it’s super simple. Just edit “/lib/python3.5/site-packages/homeassistant/components/tts/google.py” under your home assistant install directory, and change “1.1.2” to “1.1.3”. That’s it.

https://github.com/home-assistant/home-assistant/commit/fcdb25eb3c8197c3b8c6f9c4637d7c34a056d467#diff-6197ea884e45903cb72208965bfa19ba

1 Like

Guess I spoke too soon. There is still some weirdness when trying to play to the media_player.all_google_homes from an automation. Even with the cached file there, GH chimes, but the text doesn’t come through. Much like what the OP was posting. Putting multiple service calls in the automation, each targeting a specific GH seems to work ok.

I just did the update to 0.83.2 and on the web front end, I open the card for the Google Home Mini in the office and enter some text.

Other than the beep, I don’t get the text played.

I tried emptying my TTS folder and trying again, but no luck. I did a refresh of the TTS folder and no files showing after the 2 attempts following the deletion of the old files, if that helps.

EDIT: Solved

The issue was my security certificates. It had expired and when I tried to manually renew, it didn’t work.

I followed these instructions and my system was still having issues with the certificates.

Further investigations found that although I followed the instructions where it said:

Our Home Assistant user needs access to files within the letsencrypt folder, so issue the following commands to change the permissions.

$ sudo chmod 755 /etc/letsencrypt/live/
$ sudo chmod 755 /etc/letsencrypt/archive/

I was still getting errors until another forum user in another thread suggested running the following:

$ sudo chmod 755 /etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem

Once I did that, I wasn’t getting errors on restart, nor did the HTTPS part in my web address become red and double scored through, and TTS began working again.

1 Like

Hi all

I know this is an old thread, but I’m getting the same issue, but with Hassio.

I have the DuckDNS addon which includes also LetsEncrypt.

In Hassio there is no /etc/letsencrypt folder and the pem files are in the ssl folder.

I’ve set both folder and files with chmod 755, but if I’m in https the tts.google_say does not work, if I am in http all is ok.

In Hassio what should I have to do?

Thanks

Hi,
have you solved your problem?
I have same issues with google home tts and ssl…

Nope.
I’m using nodered now to have Google speak.
Easy with no hassle

1 Like

By chance, did you modify your base URL somewhere along the line?

I configured SSL and set the base URL to my DuckDNS domain name, but had to change it to my local IP to authenticate with another vendor’s site. That broke parts of Google authentication. Fortunately, I was able to change the base URL back after I got an authentication key from the other vendor so everything works again.

1 Like

Solved!

I changed back the base url from ip to the duckdns domain, and it’s working now.
Thank you!

2 Likes

Would you mind giving some explanation on the NodeRed sollution?
I am new to NodeRed.
I have set up a flow for TTS but is gives me the same result. I hear the chime, but no voice.
Aantekening%202019-06-10%20200334

I would really like to make TTS work.

This is in the debug.

{"domain":"tts","service":"google_say","data":{"entity_id":"media_player.googlehome6684","message":"test"}}

I’m not using the HA service in Node red.
I’m using the node node-red-contrib-cast
It’s simpler for me.

1 Like

Hey guys,

Is there any line I can add to my current TTS announcements which will preset the volume level on my google home/mini?

Currently announcements are being played at the volume level the last use of the Home/mini was used at. In my case, I have the volume set at 10% to play music on a sleep timer going to bed, but this means that if it announces that there’s someone outside, I don’t hear it. I only am aware that my motion sensor was tripped because the bedroom light is turned on.

My current configuration reads:

  - alias: 'Someone At The Front Door Nighttime'
    trigger:
      platform: template
      value_template: '{{states.switch.front_door_15.attributes.device_tripped}}'
    # The Condition Syntax from https://www.home-assistant.io/docs/scripts/conditions/
    condition:
      - condition: time
      # At least one of the following is required.
        after: '20:00:00'
        before: '08:00:00'
      # Text to Speech
    action:
      - service: tts.google_say
        entity_id: media_player.nighttime_doorbell
        data:
          message: 'Motion Detected At The Front Door'
    # Bedroom Light On - Red at Full Brightness
      - service: light.turn_on
    #   entity_id: light.yeelight_bedside_7811dc9201bd 
        entity_id: light.yeelight_bslamp1_7811dc9201bd
        data:
          brightness: 200
          color_name: Red                 

Thanks in advance.

Sure is, something like this you’ll need to add:

  - service: media_player.volume_set
    data_template:
       entity_id: media_player.nighttime_doorbell
       volume_level: 0.7 # 70% volume
1 Like