Author Topic: Plugin vaProxy Spoken  (Read 3048 times)

CrossWiseRanger

  • Newbie
  • *
  • Posts: 13
Plugin vaProxy Spoken
« on: October 22, 2020, 11:54:00 AM »
Got the VATestPlugin working to include debugging.

Cannot figure out how the spoken command gets passed to the plugin.  Realized in playing with the example it does not show passing the speech.

Example: *test*; *this*; *another* -- and I say "another", where find "another" in Plugin?

Tried vaProxy.WildCardKey(); no joy.

What am I missing?  Thanks.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4757
  • RTFM
Re: Plugin vaProxy Spoken
« Reply #1 on: October 22, 2020, 12:36:19 PM »
The WildcardKey() method (note the c is lowercase) is part of the "Command" class, so you need to include that in your call, E.G.
Code: [Select]
vaProxy.Command.WildcardKey();

CrossWiseRanger

  • Newbie
  • *
  • Posts: 13
Re: Plugin vaProxy Spoken
« Reply #2 on: October 22, 2020, 02:37:06 PM »
            //string tmp1 = vaProxy.Command.Before();
              string tmp2 = vaProxy.Command.WildcardKey();
            //string tmp3 = vaProxy.Command.After();

My speech is being recognized on VA side as shown in the log.

Using only WildcardKey as above; if I say just one of the command words such as "test", tmp2 = "".

If I add Before and After, sometimes all three will come through.  But not always.

Additional thoughts on how to remedy?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4757
  • RTFM
Re: Plugin vaProxy Spoken
« Reply #3 on: October 22, 2020, 02:42:09 PM »
If you speak the word by itself, rather than as part of a phrase, you'd have to use the vaProxy.Command.Name() method instead.

You could check whether WildcardKey() returns "", and use Name() instead if it does.

CrossWiseRanger

  • Newbie
  • *
  • Posts: 13
Re: Plugin vaProxy Spoken
« Reply #4 on: October 22, 2020, 03:38:20 PM »
Bingo -- you are the man!