Author Topic: Wildcard Command Segment  (Read 2329 times)

MalcomR

  • Newbie
  • *
  • Posts: 44
Wildcard Command Segment
« on: June 25, 2023, 09:11:52 PM »
I am probably missing something simple here but I would like to do the following

[blah;blah2;] [commandversion1;commandversion2] [cmdseg2]

When I speak commandversion1 anything I'd like to have comseg2 contain whatever is spoken following commandversion1 or commandversion2.  I tried putting [*;] for cmdseg2 but it always shows as not set.

Is what I am trying to do even possible with VoiceAttack and if so how?

Thanks.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4790
  • RTFM
Re: Wildcard Command Segment
« Reply #1 on: June 26, 2023, 02:23:58 AM »
Command segment information is available for predefined command phrases. Wildcard phrases are, by definition, not predefined.

There are, however, specific tokens for use with wildcards: "{CMD_BEFORE}", "{CMD_WILDCARDKEY}", and "{CMD_AFTER}.

MalcomR

  • Newbie
  • *
  • Posts: 44
Re: Wildcard Command Segment
« Reply #2 on: June 26, 2023, 10:42:53 AM »
Great.   Thank you. I remember them now - missed them when reading about tokens.

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 291
  • Upstanding Lunatic
    • My AVCS Homepage
Re: Wildcard Command Segment
« Reply #3 on: June 26, 2023, 11:53:55 AM »
I tried putting [*;] for cmdseg2 but it always shows as not set.

The proper syntax to use a wildcard in the example phrase above which allows you to say anything AFTER the predefined phrase options would be like this:

Code: [Select]
[blah;blah2;] [commandversion1;commandversion2]*

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4790
  • RTFM
Re: Wildcard Command Segment
« Reply #4 on: June 26, 2023, 12:35:14 PM »
More of an aside, but wildcards can be used in dynamic command sections, with the exact same caveat that they can only appear at the start and/or the end of the assembled phrase.

E.G.
"I choose [option a;option b;option *]"
"[I'd like;get me;*] something"
"[something;something else;*] for [Larry;Curly;*]"
are valid, because the sections containing wildcards would result in said wildcards appearing only at the start and/or beginning of the assembled phrase, I.E. "I choose option *", "* something", and "* for *"

Something like "[do;perform] [something;*] for me" isn't, because that'd result in "do * for me", I.E. the wildcard would be within the phrase, which is not valid.


In the specific example of "[blah;blah2;] [commandversion1;commandversion2] [*;]", you'd be defining the following combination of predefined and wildcard phrases:
Code: [Select]
blah commandversion1 *
blah commandversion1
blah commandversion2 *
blah commandversion2
blah2 commandversion1 *
blah2 commandversion1
blah2 commandversion2 *
blah2 commandversion2
commandversion1 *
commandversion1
commandversion2 *
commandversion2

so you'd be able to speak either "commandversion1" by itself, or "commandversion1 something else", for example.

Depending on how well the speech recognition system is trained and able to recognize dictation for you, that may be undesirable, as one may be more easily recognized than the other.


If you'd like to gain more insight into which phrases will be generated based on your input, have a look at this topic.