Author Topic: Commands with Prefix not recognized any more  (Read 2156 times)

fac851

  • Newbie
  • *
  • Posts: 7
Commands with Prefix not recognized any more
« on: August 10, 2023, 12:37:48 PM »
I've just installed VoiceAttack on a new system and imported my profiles, everything functions except for commands with a Prefix.

F.i:
In profile - Spoken Command I have defined:
Up (prefix - Scroll)

When I say: "Scroll up"
the log states: Unrecognized: "Scroll up"

So it types the command exactly as I said it, but states it doesn't recognize it???

Commands without a prefix work fine.



Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Commands with Prefix not recognized any more
« Reply #1 on: August 10, 2023, 12:51:20 PM »
You have a 'Scroll' prefix, but do you also have an 'Up' suffix?

Also - I like your avatar :)

fac851

  • Newbie
  • *
  • Posts: 7
Re: Commands with Prefix not recognized any more
« Reply #2 on: August 10, 2023, 12:59:01 PM »
Command "Up" with prefix "Scroll".

This has been working fine for years. I've installed a newer version of VoiceAttack on my new system, maybe I'm missing something?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Commands with Prefix not recognized any more
« Reply #3 on: August 10, 2023, 01:03:14 PM »
Composite commands (prefixes/suffixes) require two parts - a prefix and a suffix.  You have to have a command that is defined as a prefix (when I say = 'Scroll') and another command defined as a suffix (when I say = 'Up'). 

I don't know what you have in your setup that would make it work (maybe you had a full command 'Scroll up' at one time?), but a command defined as a prefix definitely needs a command defined as a suffix in order to work at all.

Just to be sure, if you edit your 'Scroll' command, the command type is set to 'Command Prefix' and not 'Full Command'?

fac851

  • Newbie
  • *
  • Posts: 7
Re: Commands with Prefix not recognized any more
« Reply #4 on: August 10, 2023, 01:26:53 PM »
I've attached a screenshot

fac851

  • Newbie
  • *
  • Posts: 7
Re: Commands with Prefix not recognized any more
« Reply #5 on: August 10, 2023, 01:29:12 PM »
and another screenshot

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Commands with Prefix not recognized any more
« Reply #6 on: August 10, 2023, 01:55:26 PM »
Right - your 'Up' command is set also as a prefix.  It needs to be a suffix.  Change the Command Type to 'Command Suffix'.  You will also need to change 'Down', 'Down Ten' and 'Up Ten' to command suffix.

fac851

  • Newbie
  • *
  • Posts: 7
Re: Commands with Prefix not recognized any more
« Reply #7 on: August 11, 2023, 02:19:53 AM »
Now I have set the Command Type to 'Command suffix', on the profile page under 'Spoken Command' it now says:
'Up (suffix - Scroll)'.
I still have the same problem.
It seems that now 'Scroll' is the suffix instead of the prefix, how do I make 'Up' the suffix and 'Scoll' the prefix? I have re-read the manual, but it is not clear to me.

Anyway it was working before for many years, the VoiceAtttack version on my old system was 1.7.7 now I'm using 1.10.6.  Something must have changed for prefix/suffix commands?
I can try making a new profile or just convert the prefix commands into full commands...

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: Commands with Prefix not recognized any more
« Reply #8 on: August 11, 2023, 02:25:53 AM »
Do you have an actual command named "Scroll"?

In "(suffix - Scroll)", "Scroll" refers to the prefix/suffix group name, which affects how prefix/suffix commands are used to create a command phrase (I.E. only those in the same group are combined with one another), but otherwise does not form part of a command phrase.

If you want to be able to say "scroll up" in this context, you need a command with the phrase "scroll" as a prefix, to form the first half of the phrase "scroll up" (the second half being the "up" command)


I will note that unless you actually want to have a set of actions that is common to all suffix commands within your "Scroll" group, there is little reason to make it a prefix/suffix command.

Having the full command "scroll up" could achieve the same end result, and have less overhead.

fac851

  • Newbie
  • *
  • Posts: 7
Re: Commands with Prefix not recognized any more
« Reply #9 on: August 11, 2023, 02:38:13 AM »
Ok, I fixed it!
I needed to define a separate command for the prefix (a command without any sequence assigned).
(In the old version there was no need to do this.)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: Commands with Prefix not recognized any more
« Reply #10 on: August 11, 2023, 02:41:39 AM »
Prefix/suffix commands have always required one of each. That is how that feature is designed.

fac851

  • Newbie
  • *
  • Posts: 7
Re: Commands with Prefix not recognized any more
« Reply #11 on: August 11, 2023, 04:27:02 AM »
Ok thank you, now I understand. I have always used Prefix for the wrong reason: I thought would require less overhead because would reduce the search to the Prefix category instead of searching the whole list. But that's not the case.
I will change them into Full commands.

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: Commands with Prefix not recognized any more
« Reply #12 on: August 11, 2023, 10:55:00 AM »
Ok thank you, now I understand. I have always used Prefix for the wrong reason: I thought would require less overhead because would reduce the search to the Prefix category instead of searching the whole list. But that's not the case.
I will change them into Full commands.

The entire list of recognizable voice command phrases for your active profile are parsed when the profile is switched to and loaded, and again anytime we reload the profile or apply changes to a profile.  This also occurs for any profiles whose commands are included in the active profile.  Commands in profiles set as Global Profiles in VoiceAttack options are parsed when VoiceAttack launches.

Thankfully, even as it applies to full commands, we don't need to concern ourselves with overhead except for profile load time and the time it takes to apply a change to a profile (or reload that profile).  When we have profiles with hundreds of thousands of voice commands, typically through dynamic phrase options which include many ways to say individual commands, we can start to see longer load times as it relates to profile loading described above.

As an example, my AVCS4 BMS Radios profile has about 4 million total derived command variations, and it takes upwards of 20 seconds to load.  This tradeoff is acceptable given the amount of functionality it provides to that game, and to accomplish a goal of "any way you say it" levels of recognition including most ways I could imagine to say a given command as well as potential homophones which could be errantly produced by recognition to ensure commands fire the first time we say a phrase for a radio command, etc.

For these reasons, prefix/suffix composite commands are excellent for organizational purposes as well as making use of the {PREFIX} or {SUFFIX} tokens for additional evaluations within the actions of these commands.

This way, we can put all the common prefix commands into a single command, and then create suffix commands which require them, ("Engines", "Cargo Bay Doors", etc.).  If we want to alter the beginning of these phrases, we can do so in the common prefix command used by all of these suffixes rather than having to edit a number of 'full' commands.

If we had two FULL commands,
"[Open;Close] [the;] Cargo Bay Doors"
and..
"[Open;Close] [the;] Options Menu"

...and we want to change them to include the word "Shut", we'd have to edit both of them to read [Open;Close;Shut]...

But, by having these in a single prefix, we can more easily make such an edit in a single command, the prefix.
Prefix command:
"[Open;Close;Shut] [the;]"

Suffix commands:
"Cargo Bay Doors"
"Options Menu"

...this makes more sense for a larger profile with many, many commands, but you get the idea.

Hope that helps!