Author Topic: Crash when entering a command  (Read 1306 times)

galinette

  • Newbie
  • *
  • Posts: 5
Crash when entering a command
« on: September 16, 2020, 04:17:37 PM »
Hi!

I'm trying to create the following command:
I N S [Gauche;Droite;] [Nord;Sud;Est;Ouest;Plus;Moins;][0..360][0..360][0..360][0..360][0..360][0..360][0..360][Valider;Effacer;]
But each time I try and click "Done", VA crashes.

After some tests, it appears that this compound command is expanded to every possible combination, so a crash is expected...

What are the workarounds? I could break this large command in many small commands (one for north, one for every number, etc...) but they should execute only if the phrase begins with I N S, which I can't capture if it's broken into many commands.

Basically, I want to be able to enter latitude and longitude values in a system.

Thanks for help!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Crash when entering a command
« Reply #1 on: September 16, 2020, 04:29:12 PM »
That input is generating too many phrase variations (literally billions of them), and VoiceAttack is running out of memory, which causes it to crash.

For numeric input with this level of complexity, you'll need to split it up to limit both the amount of phrases per command, and the total amount of phrases.

You'd probably want to use one command for the preamble (E.G. "I N S [Gauche;Droite;] [Nord;Sud;Est;Ouest;Plus;Moins;]"), and another for the numeric input (E.G. "[0..360]", which you can then reuse for all seven digits).

Alternatively you could try dictation, noting that recognition will be less accurate than with predefined commands.


The "Wait For Spoken Response" action has a maximum of 250 phrase variations for performance reasons, so that's not an option in this case.

galinette

  • Newbie
  • *
  • Posts: 5
Re: Crash when entering a command
« Reply #2 on: September 17, 2020, 11:15:19 AM »
How does dictation work?

Another idea, could I replace the number sequence by a wildcard "*", and process that wildcard in a script which would loop over all the digits, and issue a keystroke for each?


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Crash when entering a command
« Reply #3 on: September 17, 2020, 12:14:17 PM »
Dictation consists of a set of features, including the explicit dictation mode, and wildcards in commands.

Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer, which has information on VoiceAttack's features, including the subsections on "Dictation (Speech to Text)" (starting at page 65 for v1.8.7+) and "Wildcards" (starting at page 18 for v1.8.7+)


You can try to use wildcards for your entire command, however dictation relies on the speech recognition engine accurately recognizing what you're saying without and context or real reference, which is a difficult task for any speech recognition engine; The documentation therefore notes that this feature is "somewhat unsupported", as results may not be reliable.


Getting digits one-by-one using another command is likely the most reliable way of getting this type of input, with dictation mode in second place by quite some margin.

galinette

  • Newbie
  • *
  • Posts: 5
Re: Crash when entering a command
« Reply #4 on: September 17, 2020, 01:40:41 PM »
The difficulty for splitting the command is, I need digits in another context. Digits should trigger different keystrokes depending on context (ie prefix). Maybe I can try to set a kind of context variable in the first command, then the digit script triggers different keystrokes depending on context.

galinette

  • Newbie
  • *
  • Posts: 5
Re: Crash when entering a command
« Reply #5 on: September 17, 2020, 01:53:34 PM »
I am trying the command:
INS [Nord;Sud] *

The command is well recognized with numbers afterwards. I can retrieve them with {CMD_AFTER}

However, it seems I can't check Nord vs Sud : {CMDSEGMENT:0 to 2} all return "Not Set"

Are command segments not available with wildcards?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Crash when entering a command
« Reply #6 on: September 17, 2020, 01:58:36 PM »
That'd be another way wildcards are "somewhat unsupported".

Though, in this case you have two unique options, so you can check whether "{CMD_WILDCARDKEY}" contains either "nord" or "sud"

galinette

  • Newbie
  • *
  • Posts: 5
Re: Crash when entering a command
« Reply #7 on: September 19, 2020, 03:07:40 AM »
Ah thanks! I'll try this, and also the "context variable" approach.