Author Topic: Need help constructing NATO alphanumeric commands. I have made some progress.  (Read 251 times)

slo_mo

  • Newbie
  • *
  • Posts: 1
(.vap is attached)

I am trying to create a VA command so all NATO alphanumeric characters are captured after a spoken keyword. For example saying "keypad: six nine whiskey tango" would output "69wt" to my helicopter's keypad in DCS.

But have run into two problems.

1. The "keypad" command (attached .vap) as it exists now can only handle numbers that are *more* than 1 digit. It outputs both "ten" and "one zero" correctly. It *doesn't* recognize any single digits inputs (0-9). I'm assuming it's because I took code that parses 10 digit grid MGRS codes and the original creator never intended single digits. How can this be fixed?

2. I don't know how to combine the "NATO Alphabet" command with the "Keypad *" command. This will allow a user to interchange numbers and the nato alphabet. Again the goal is to say "keypad:  six nine whiskey tango" and output "69wt".  The condition requiring Num5 to be pressed would be eliminated here.

The cool part I don’t want to loose about this "Numpad *" command is that it parses all numbers (over 9, see above) beautifully. It will take a 10 digit coordinate spoken very quickly. Also it is flexible - I can say "five-hundred twenty one", OR "five two one" and it recognizes it great. I'd like to retain this functionality in the combined command.

So is this possible, or am I stretching the limits of VoiceAttack?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4780
  • RTFM
1. The "keypad" command (attached .vap) as it exists now can only handle numbers that are *more* than 2 digits. It outputs both "ten" and "one zero" correctly. It *doesn't* recognize any single digits inputs (0-9). I'm assuming it's because I took code that parses 10 digit grid MGRS codes and the original creator never intended single digits. How can this be fixed?
Normally the Microsoft SAPI speech recognition system transcribes single digits as words, E.G. rather than "1", it will transcribe "one".

The "{TXTWORDTONUM:}" token is specifically intended to work around this.


2. I don't know how to combine the "NATO Alphabet" command with the "Keypad *" command. This will allow a user to interchange numbers and the nato alphabet. Again the goal is to say "keypad:  six nine whiskey tango" and output "69wt".  The condition requiring Num5 to be pressed would be eliminated here.
Not sure how you intend to combine them, but this command doesn't have enough in common with the previous command to just copy its contents or something like that.
If you want to use the wildcard command for NATO alphabet input, you're going to need to build a parser that accommodates that.


These are more advanced commands, and will require a good understanding of VoiceAttack's advanced features.

I assume you've had a good look at the documentation already, but just in case: press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer.

These topics may also be of use, in addition to the official documentation:
Control flow (If, Else, ElseIf, Loop, Jump) basics
Variables and tokens summed up