Voice PE - Mute media players on 'listening'

Hey there,
one thing I got annoyed by when switching from Google Home to the Voice PE was that while I was talking to it, my TV, music, etc. kept on playing and it was hard for the device to understand my commands.

Google Assistants usually turn down the volume, so I thought why not muting all media players in the room while I’m talking to Assist.

It’s nothing too complicated nor has it many options - but for those who want to add that feature I made a blueprint:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Any suggestions are appreciated :slight_smile:
Have a great weekend!
Max

4 Likes

Quick Update:

  • Fixed a bug, which caused the voice assistant itself to get muted

Thank you for this blueprint! It just works! :+1:

There is just one bug I found: when you spoke a voice command to change the volume of the muted speaker, this blueprint restores the previous unchanged volume.

You’re welcome and thanks for the feedback :slight_smile:

I’ll have a look into that, thanks!

1 Like

Hey there :slight_smile:

I’ve checked multiple devices and couldn’t reproduce your issue. Can you describe your usecase a bit further? Are there maybe other scripts running which change the volume?

This blueprint doesn’t really change the volume itself, it just calls the action
Medie_Player.volume_mute()

Do you have any event listeners on that?

I have a Sonos Roam speaker in my kitchen as well as a Voice PE.

When music is playing at 30% volume and I say “Okay, Nabu. Set the volume to 40 %.” the following happens:

  1. When Voice PE recognises “Okay, Nabu.” the Sonos Speaker is muted.
  2. Voice PE recognises the command and I see that the volume of the muted speaker is changed to 40% (having an eye on the corresponding entities in Home Assistant).
  3. The Sonos speaker is unmuted and the volume goes back to 30%.

I don’t have other automations that could interfere. At least as far as I know.

Sadly I do not have a Sonos speaker to test it since all my other devices work (PC, shield, other Voice PEs). Things we could do now:

  1. You can try to edit the automation and add delays between each call, since I suspect a racing condition
  2. You could play media to the Voice PE itself and ask it to reduce its volume - so we could verify its a Sonos specific issue

For my part I will have a deeper look into the repos. Maybe there’s an issue somewhere reported.

1 Like

When the Voice PE in my kitchen is playing media, setting the volume of it via a voice command works. The playing music is not fully muted after "Okay, Nabu.“ is recognised. It is playing on low volume while Voice PE is listening.

So the behaviour is different.

The same Sonos speaker is also available as a media player via the Alexa Media Player integration. After deactivating this media player entity (I don’t need it anyways), everything works as expected.

I noticed that low volume on the Voice PE devices, it seems they have their own logic for that.

Happy to hear it has been resolved :slight_smile:

1 Like