Author Topic: NEW FEATURE: "User Defined PTT" Gets Pressed ONLY At User Defined Threshold!  (Read 3946 times)

Tzeff_NL

  • Newbie
  • *
  • Posts: 17
What's this feature?

Answer:
The user can define a key (in this case a Push-To-Talk key) to automatically and instantly be pressed and held down when the user speaks louder than when he/she's issuing random commands to voice attack.
The PTT key will immediatly be released the moment the user stops talking loudly.

WHY this new Feature?
1 - It's VERY usefull and sometimes faster to have voice attack to do multiple keystrokes by voice
2 - BUT! Some of us don't have an "Always Open" microphone because we don't want to annoy our teammates with voice commands that are meant only for VA to hear
3 - AND! *Activating your Push-To-Talk key by voice command is too slow when you want to quickly talk to teammates during multiplayer games!

With this New Feature Voice Attack will make it appear as if your Microphone is "always open"....while in fact it's not!  The user can determine the threshold. This way he can decide to either whisper or talk in a normal voice to VA but speak in a much louder voice to his teammates!  8)
« Last Edit: April 08, 2021, 09:35:42 AM by Tzeff_NL »

Tzeff_NL

  • Newbie
  • *
  • Posts: 17
Does this suggestion make any sense? Especially for those who play with the MIC always ON??

iceblast

  • Sr. Member
  • ****
  • Posts: 372
You can use this. When you hit your push to talk button, it turns down the sound really low, and allows you to say a command, and then return the volume back to whatever you had it set to before.

You could even add a command to mute the mic for the game, and unmute it after your done. Though, that might depend on the game your playing.

Code: [Select]
Set integer [Volume] value to the converted value of {STATE_SYSVOL}
Start Loop While :  Keyboard Key 'F22' Is Pressed
    Pause a variable number of seconds [0.1]
    Set default playback device volume to [4]
    Pause a variable number of seconds [0.1]
End Loop
Set default playback device volume to [{INT:Volume}]


Voice Recognition is hard enough as it is, but for it to judge the difference in the volume of a spoken voice. I think it would be really hit and miss. Basically frustrating.

You could always add a second mic, and have the second mic be the game mic, and have it mute, and unmute when sending commands to VA. :) Probably the most depend solution.

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Most of this functionality can already  be handled by one method or another.  For example:
What you propose is similar to a Push-to-Mute button, where you have a Push-To-Talk button in-game to speak with teammates, but you never  want VoiceAttack to be listening when you are talking to them - and you don't mind VoiceAttack listening the rest of the time.  This sort of stuff can be achieved right now in VoiceAttack easily enough.

The method for this would be to set up two commands, one with the first action "Start VoiceAttack Listening", and the other with a "Stop VoiceAttack Listening" - each can be a 'function' command with the 'When I say' phrase disabled (uncheck the box).  In the examples below, I gave each command a descriptive name surrounded by extra parentheses to help it stand out against my other voice commands, and to eliminate any similarity to any current or future voice command(s).  VoiceAttack users often refer to these types of commands as 'function' commands, since they perform actions yet cannot be called by voice, with the 'When I say' option unchecked.

The actual key/button you set for both of these commands should be the same button, one handles 'press' actions and one handles 'unpress' actions - this button/key should match your in-game Push-To-Talk button for this example, to be inline with the concept you described in your first post.

The first command ("Start VoiceAttack listening") should have the 'When I press a button' options set to:
'Shortcut is invoked only when all buttons are released'


...and of course the action at the very top of this command should be 'Start VoiceAttack listening'


The second command ("Stop VoiceAttack listening") should have the 'When I press a button' options blank:

...and the action inside this command should be 'Stop VoiceAttack listening'

With the button for each of these set to your in-game push-to-talk button used for team chatter, when you push this button VoiceAttack stops listening, allowing you to freely talk with others, and when you release it, VoiceAttack begins listening again, allowing you to issue all your voice commands with keypress macros, etc.

Since Stop/Start VoiceAttack listening has a sound effect, you may want to disabled this in VoiceAttack Options, under the Audio tab, you can uncheck the box for all Notification Sounds, or even change the SFX for 'Feature On Sound' or 'Feature Off Sound' as desired:


If anyone has any questions on the 'Push-to-Mute' example method above or PTT mode options in general, I'm happy to help!  I've been working with VA for many years, and I have some advanced PTT scripts (including Push-To-Mute options) in my public "AVCS" profile(s).  You can also find help in the VA Discord chat: voiceattack.com/discord

Best wishes and good luck!!