TTS failing

Have had a couple of automations that ran for several years just fine using Piper for TTS using the tts.Speak action targeting the Piper entity.

Sometime in the last couple of months, the automations no longer play audio.

I’m not getting error messages when I test the automation action from the editor, and if I target my Symfonisk (Sonos) speaker for the TTS announcement, which is set up to pre-announce using a chime, I get the chime, but no TTS audio.

EDIT: It’s not just the Symfonisk speaker. Also have a Fire HD 10 tablet that was working as a TTS target, and it no longer works either.

I’ve tried removing Piper and Whisper, as I noticed I had two instances of each in my device list, and restarting HAOS, but to no avail.

I’m not sure what my next steps should be in troubleshooting. Apart from routine updates of HAOS (I run in a VM on Proxmox, but that has not changed, nor my network), there have been no significant changes I can think of that would impact this.

Maybe this issue

Unlikely, as it’s not just the Sonos speaker where TTS is failing.

I also had it working with a Fire HD10 tablet, and that no longer works either.

I mentioned the Symfonisk/Sonos speaker first because it does play the chime, but no TTS audio.

This is maybe a long shot, but I had also a number of automations failing where I used Ninja code to generate the message. While this worked perfectly fine for a very long time, this no longer worked, without any error or log messages. Once I explicitly added double quotes around the message to make a string, they worked again. This was an original automation:

  - action: tts.speak
    metadata: {}
    data:
      cache: false
      media_player_entity_id: media_player.living_room
      message: >-
        {{ ([ ' ', 'Hey! ', 'Opgepast! ', 'Aha! ' ] | random) + [ 'XXX ',
        'Mama '] | random + 'is ' + ['bijna thuis.', 'dichtbij.', 'in de
        buurt.', 'bijna hier.' ] | random }}
    target:
      entity_id: tts.google_cloud

This doesn’t work for me anymore. But the below works (Notice the extra double quotes around the message).

  - action: tts.speak
    metadata: {}
    data:
      cache: false
      media_player_entity_id: media_player.living_room
      message: >-
        "{{ ([ ' ', 'Hey! ', 'Opgepast! ', 'Aha! ' ] | random) + [ 'XXXX ',
        'Mama '] | random + 'is ' + ['bijna thuis.', 'dichtbij.', 'in de
        buurt.', 'bijna hier.' ] | random }}"
    target:
      entity_id: tts.google_cloud

Like I said, probably a long shot, because this is a different TTS provider, but the behavior for me was exactly as you describe.

I’ll see if tweaking that helps, but I’m not configuring in YAML, so it would be odd if the quote style was wrong.