Author Topic: Dynamic number recognition variable [NUM] instead of [1..100]  (Read 2729 times)

kgw279

  • Guest
To best describe the request, i'll detail my desired command.

I open Scripture references online and would like to say: "Open Bible to Matthew chapter 3"

I have accomplished this using dynamic commands [matthew,mark,luke,john,etc...] and [1..100]  but this creates thousands of commands in the background.

is there a better/more efficient/clever way to do this?  if not, what feature requests might make this application more powerful?

one thought i had was to have a dynamic Number recognition variable, so instead of a dynamic command with 100 possibilites [1..100], there is just one [NUM], and when a number is recognized in that CMDSEGMENT location, the variable is set.

so it might look like "Open [matthew,mark,etc.] chapter [NUM].

could this be better done with pre-fix/suffix?

thanks for you help!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4778
  • RTFM
Re: Dynamic number recognition variable [NUM] instead of [1..100]
« Reply #1 on: March 14, 2017, 03:08:18 PM »
The Microsoft Speech Recognition engine, which VoiceAttack uses, is used to match what you say to a list of possible phrases.

A command name like Open Bible to [matthew,mark,luke,john] chapter [1..100] is just convenient shorthand to generate every possible variation;
E.G.
Open Bible to matthew chapter 1
Open Bible to matthew chapter 2
Open Bible to matthew chapter 3
...
Open Bible to matthew chapter 100
Open Bible to mark chapter 1
...
Open Bible to mark chapter 100
Etc...


Without this list, the speech engine has to deduce what you might be trying to say, from all the possibilities in the English language. Understandably, this method is much less accurate than matching to a known phrase.


You can do this using wildcards. This means the speech engine will partially match a phrase, and anything that doesn't belong to that phrase is output to a token.

E.G. Open Bible to [matthew,mark,luke,john] chapter *
When you say "open bible to matthew chapter twenty", the speech engine, if well trained and with some luck, will recognize "open bible to matthew chapter ", and you can use the "{CMD_AFTER}" token to retrieve "20".

As this relies on the aforementioned freeform recognition, it may not be accurate enough in practice.

As an alternative, you can split up you command into Open Bible to [matthew,mark,luke,john] and chapter [0..100]. In this example that should mean it generates four variations for the first command, and 100 for the second, totaling 104 phrases.


All that said, Gary has stated before that phrase variations only perceptibly affect the profile load time, not speech engine performance, so if you can stand to wait for the profile to load in, it's not necessary to change anything.


could this be better done with pre-fix/suffix?
No. Prefix/Suffix is just a different kind of shorthand. It'll generate just as many variations.

Gangrel

  • Caffeine Fulled Mod
  • Global Moderator
  • Full Member
  • *****
  • Posts: 216
  • BORK FNORK BORD
Re: Dynamic number recognition variable [NUM] instead of [1..100]
« Reply #2 on: March 14, 2017, 06:29:07 PM »
*gets flashbacks*

kgw279

  • Guest
Re: Dynamic number recognition variable [NUM] instead of [1..100]
« Reply #3 on: March 14, 2017, 09:30:31 PM »
thanks pfeil!  those are some great suggestions i'll try out... and if nothing else, the profile loading really hasn't slowed down yet. :)