Identifying and formatting the preannounce media id

I have not been able to get a custom preannounce sound to play. on my Voice Assistant PEs

I saved a sound file in my media/sounds folder using the media ui. I then attempted to use it in one of my automations but I have been unable to determine the correct preannounce_media_id and/or the correct format to use for it in the automation.

  • I read one post that said I would be able to see it in the URL of my browser while playing the sound file via a media player. If it’s there I can’t find it.
  • Another post suggested building a media player automation and it showed a screen shot of a ui that had a browse function. The post said I could select my file and then switch to the yaml editor to see the media id. I checked all the media player actions I could find one that has the browser ui that showed in the pic.
  • I read another post that said to go to the media ui and play it there and I would see it. No Joy…
  • In another post it was suggested that the file be put in an audio folder under www and referenced there with a path of /local/audio/ no luck with that either

Regarding the format needed to enter it in the automation, after ready multiple posts I have tried at least a dozen different ones with the most recent being:

I also tried those with 8097 as the port based on a couple other posts I read.

The sound file seems to be ok since I can play it via the media ui and a media player card.

Clearly I’m missing something in the Docs and/or posts that would tell me how to confirm the media id and then how to format it as a preannounce_media_id.

Any advice and/or direction would be greatly appreciated.
Thanks!
Tom G.

  • In another post it was suggested that the file be put in an audio folder under www and referenced there with a path of /local/audio/ no luck with that either

That works for me. Note that the www folder needs to be in the HA config directory. My media id is: http://192.168.1.200:8123/local/sounds/message-incoming-1db.mp3

action: assist_satellite.start_conversation
target:
  device_id:
    - 1970fdb95dba8ba0d6f0e7938c98ec12
data:
  start_message: Hi
  preannounce: true
  preannounce_media_id: http://192.168.1.200:8123/local/sounds/message-incoming-1db.mp3

THANKS!!!

As it turns out I was outsmarted by an upper case “A” :unamused:

I inadvertently created the folder under www as “Audio” not “audio”

Lesson Learned!

I haven’t tried what you are doing yet but when I create a script/automation that plays a file in my media directory the result looks like this, might be worth a try.

data:
  media_content_id: media-source://media_source/local/<folder>/<file.mp3>
3 Likes