Author Topic: Correct practice for 'Dictation'  (Read 767 times)

Pannam

  • Newbie
  • *
  • Posts: 14
Correct practice for 'Dictation'
« on: November 28, 2020, 05:07:27 AM »
I have a pretty simple command to rotate the knob of a heading indicator from 1 to 360

Heres what I have done for when I say
SET COURSE [1..360]

SEQUENCES

Set Text [crs] to '{CMD}'
Say, 'SET COURSE {TXTNUM:crs}'
Set decimal [SIMCONNECT!NAV OBS!1] value to the converted value of {TXTNUM:crs}
Execute external plugin,'SPAD.neXt VoiceAttack Plugin'


It works fine, I have 3 question
1 Is this the correct way of setting this up?
2 If I were to add some text to numbers SET COURSE CENTER 60 or 0 in front of it,  SET COURSE 002, How would I do it?
3 If I were to add decimal value ?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Correct practice for 'Dictation'
« Reply #1 on: November 28, 2020, 10:50:08 AM »
Using a predefined phrase should be the most reliable option, though it can generate a large amount of phrase variations (especially if you add optional sections), which will affect profile loading times, and if there are enough of them it can cause VoiceAttack or the speech recognition engine itself to run out of memory.

Dictation or wildcards can be alternatives, however they are not nearly as consistent (as the speech recognition engine needs to recognize everything you may possibly say, without context).


One thing that can be done more efficiently in this specific command is to do away with the text variable by using the "{CMD}" token as the input for "{TXTNUM:}", E.G.
Code: [Select]
Say, 'SET COURSE {TXTNUM:"{CMD}"}'
Set decimal [SIMCONNECT!NAV OBS!1] value to the converted value of {TXTNUM:"{CMD}"}
Execute external plugin,'SPAD.neXt VoiceAttack Plugin'


Adding text or other prefixes can be done using dynamic command sections (press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer for more information on this feature), E.G. "set course [0;00;center][1..360]"; Anything but the digits will be discarded by the "{TXTNUM:}" token, and the decimal conversion would ignore the leading zeroes (there is no functional difference between "00360" and "360", for example)


If you need a decimal value, you can try splitting it into two dynamic sections (as numeric ranges cannot directly generate non-integer numbers), E.G. "set radio [118..136].[0..39,25]", which the "{TXTNUM:}" token should correctly return with the decimal point.

As VoiceAttack will automatically insert spaces between dynamic command sections, the speech recognition engine may not recognize this as reliably as regular decimal numbers. To use numbers without spaces, you'd have to define all possible combinations manually, E.G. "set radio [118.0;118.25;118.50;118.75;119.0;119.25]" etc...