Music Assistant cuts out on TTS announcement

Hope this is the correct area for this question. I am using Music Assist, and LOVING IT to death. The only issue I have is listening to by tunes then an announcement is made. The tunes are cut off, announcement made, then silence. How can I tell Music Assist to just carry on when the announcement is finished?

Greg

What action are you using for your announcements? MA has a specific action for announcements.

What device are you using.

You can set device to resume music after announcement in the esphome yaml. I thought sound was only reduced temporarily while announcing
But maybe not.

using a mix of devices. right now google nest, and a PI 4 running a browser.

Here is the yaml for the automation.

alias: Action Porch Person
description: ""
triggers:
  - type: occupied
    device_id: f21b05a5e64075b92d0b0f6abcf7ce19
    entity_id: fadba9f2bf57e9900136f3f249de58d4
    domain: binary_sensor
    trigger: device
    for:
      hours: 0
      minutes: 0
      seconds: 0
conditions: []
actions:
  - data:
      filename: www/cameras/porchperson-00.jpg
    enabled: true
    action: camera.snapshot
    target:
      entity_id: camera.frontcam
  - action: shell_command.mm_porchpersonhook
    data: {}
  - action: tts.cloud_say
    metadata: {}
    data:
      entity_id: media_player.nest_speakers_2
      message: Attention!  There is a Person On The Porch
  - delay:
      hours: 0
      minutes: 5
      seconds: 0
      milliseconds: 0
mode: single

I don’t think this is MA problem

I would guess the devices themselves are disconnecting or not resuming playback. Ma has no insight into state of device (announcing or not announcing)

You probably need to add some method for checking if device was playing music and resuming after announcement

It is guess but tts.say is media
You are effectively changing music source

Edit
Try music_assistant.play_announcement instead or assist_satellite.announce

1 Like

I will give those ideas a try and get back to you.

I’m think music_assistant.play_announcement will be better

I presume the announcement will sync across devices(in future at least) and MA can handle pause/play or ducking sound (now or in future)

how do I use music_assistant.play_announcement and specify which speaker I want it to come out of? or is ‘play_announcement’ the name of a speaker group to play out of?

If this is a Music Assistant group, how do I add the speakers I want to use to this group? When I click on Group members I get only Web (Edge on windows)

you can test in HA >> settings >> dev tools >> actions

action: music_assistant.play_announcement
data:
  entity_id: media_player.yourdevice
  url: <weblink to audio file accessible by voice device.flac>
  use_pre_announce: true # I put false and still works so not much differnce
  announce_volume: 90

I tested this just now.
music sound is reduced but continues play in background.
Announcement is played over music.

I actually tested using tts.cloud_say and got same result.
I am testing on HAVPE (esphome device) so unsure how this may change result

I just notice you are sending image, i think to the nest devices?
Try same without the image and see if result is different.