feature-requests icon indicating copy to clipboard operation
feature-requests copied to clipboard

Mute action for microphone component (voice assistant context)

Open Littleislandbrewing opened this issue 1 year ago • 1 comments

Describe the problem you have/What new integration you would like Is it possible to create a mute action for the microphone component pls?

Please describe your use case for this integration and alternatives you've tried: Im trying to make a voice assistant that uses my whole house speaker system for audio prompts and want the sonos to say "Yes" on wake word detection - Problem is that the pipeline has already started and the VA detects the word "Yes" and fails the intent.

What would be handy is when the wakeword is detected the mic has the ability to mute for a second and then re-enable, the automation would look something like this:

  on_wake_word_detected:
    - microphone.mute
         id: microphone
    - homeassistant.service:
        service: tts.speak
        data:
          media_player_entity_id: media_player.whole_house
          message: Yes?
          entity_id: tts.piper    
    - delay: 2s
    - microphone.unmute
         id: microphone
...

Additional context Voice Command: "Hey Jarvis" Sonos TTS reply: "Yes?" Command: "Turn off The lights" Sonos TTS reply" Sorry I couldnt understand that"

This is obviously because "Yes turn off the lights" is not an intent HA can understand. Muting the Mic during the reply would help

The ESP log:

[10:57:33][D][voice_assistant:410]: State changed from STOPPING_MICROPHONE to AWAITING_RESPONSE
[10:57:33][D][voice_assistant:517]: Event Type: 4
[10:57:33][D][voice_assistant:545]: Speech recognised as: "Yes, turn on the lights."
[10:57:33][D][voice_assistant:517]: Event Type: 5
[10:57:33][D][voice_assistant:550]: Intent started
[10:57:33][D][voice_assistant:517]: Event Type: 6
[10:57:33][D][voice_assistant:517]: Event Type: 7
[10:57:33][D][voice_assistant:573]: Response: "Sorry, I couldn't understand that"
'''




<!-- LEAVE THIS LINE AS-IS AND DON'T DELETE IT, OTHERWISE THE FEATURE REQUEST WILL BE CLOSED AUTOMATICALLY. -->

Littleislandbrewing avatar Jan 30 '24 03:01 Littleislandbrewing

I'll second this one. No one else sees this as a necessity??

Aepx avatar Apr 16 '24 23:04 Aepx

FYI, esphome developers are experimenting with software mute switch and much more in the related experimental voice-kit repo:

  • https://github.com/esphome/voice-kit

  • https://github.com/esphome/voice-kit/pull/26

Hedda avatar Aug 15 '24 14:08 Hedda