Using tts.cloud_say to speak to Google Home speakers WITHOUT chirping every time

Synopsis: My HA “speaks” to my home frequently, announcing things, playing chimes, etc. At the beginning of every transmission is a “boop blip beep” from the Google device before HA starts speaking. This example shows you a way around the boop, so your HA can just start talking or playing sounds immediately, with no “boop” first.

The boop happens when HA opens a Media Player connection to your Google device. (or other media speaker for that matter) The device is simply notifying you that something is about to happen. By default, once the Media Player finishes, there is a short timeout, then HA closes the connection.

The way around the boop is to keep an HA Media Player open all the time. In my case, I have two speakers in my home which are the “voice” of my HA, and I never use them for any other media, so I can just keep a channel open to them all the time, and they never (well, RARELY) boop.

Yes, this is a little network traffic, yes, it’s a workaround, blah blah, but if you want what I wanted, a clean way to speak to your house with HA and no outside vendor noises, here’s how you do it with an automation:

alias: 'Alerts | Keep Media Player Open'
description: ''
trigger:
  - platform: time_pattern
    minutes: /5
condition: []
action:
  - service: media_player.volume_set
    target:
      entity_id: media_player.yourspeakername
    data:
      volume_level: 0.5
  - wait_template: ''
    timeout: '2'
    continue_on_timeout: true
  - service: media_player.play_media
    target:
      entity_id: media_player.yourspeakername
    data:
      media_content_id: http://path.to.yourfile/silence.mp3
      media_content_type: music/mp3
mode: single

Edit for your instance, of course, but basically after much experimentation, I found that if you run the above on a 5 minute cycle, the session never times out, and the speaker never makes a sound.

The file “silence.mp3” is just literally a 1 second MP3 file that is silent, I found by googling “1 second silent mp3” and away she goes.

With this running in the background, when you do need to speak/beep/play something to your speaker, just play with media player service as normal, and the speaker will just start. No beep.

Enjoy and please let me know if this works for you! It may be that I just solved a problem for exactly one person (me) but I am willing to bet this annoys other people too. :slight_smile:

2 Likes

Nice :grinning:

Maybe closing the connection once a day could avoid the boop, f.e.by adding a condition :

condition:
  - condition: not
    conditions:
      - condition: time
        after: '01:00:00'
        before: '01:10:00'

I’m showing photos on my Nest Hub. When your automatisation runs, I get a casting icon on the screen. Then there is a delay of 1 minute before I get my photos back on the screen.
Is there a setting/way to reduce/disable this ?