Author Topic: Mute music when activating VA listening?  (Read 931 times)

Bazmack

  • Newbie
  • *
  • Posts: 21
Mute music when activating VA listening?
« on: July 27, 2022, 01:30:51 AM »
Is it possible for voice attack to steal audio focus (temporarily mute) when saying commands when music is playing?
I press my hot key so that voiceattack starts listening but it can't hear me if music is playing is there a way for it to pause the music when the hot key for listening is pressed? Could this be done by temporarily muting the music for two seconds similar to how windows does when pressing WIN + H when native voice typing?
(II use the right mouse button as a hotkey to start VA recognition)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Mute music when activating VA listening?
« Reply #1 on: July 27, 2022, 01:34:44 PM »
You could use a command, in addition to the "Recognition Global Hotkey" option (triggered using the same shortcut).

That command could then contain either a "Set Audio Level" action to mute the relevant playback device, a two-second pause action, then another "Set Audio Level" action to unmute again, or, if your music application responds to a given keyboard shortcut to suspend playback, a keypress action that presses and releases the keys for that, the pause, then another keypress action to resume playback.

The former mutes everything (playing through the given device, at least), but will always mute everything, while the latter would only pause the music, but if it was already paused would instead start playback unintentionally.

Bazmack

  • Newbie
  • *
  • Posts: 21
Re: Mute music when activating VA listening?
« Reply #2 on: July 27, 2022, 11:14:26 PM »
Unfortunately having a second commend run stops the R click hot key from then working. And also (strangely ii have no Windows right click menu - which Iiii don't want to give up)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Mute music when activating VA listening?
« Reply #3 on: July 28, 2022, 02:09:40 AM »
Did you enable (or leave enabled) the "Do not allow button event to be passed through" option for the "When I press mouse" option of the command?

If you want to keep the normal functionality of the button (and, because of how the Windows mouse API works, allow other features to use that button), disable (uncheck) that option.