Author Topic: Execute a command with the listening override prefix only ?  (Read 1382 times)

LeNawax

  • Newbie
  • *
  • Posts: 5
Execute a command with the listening override prefix only ?
« on: October 24, 2020, 03:36:28 PM »
Hello everyone,

I am creating an "AI" and I would like to be able to do 2 things :

- To call its name (and only its name) to execute a command where it responds : "yes ?" and starts the listening mode.
AND
- To use that same name as a listening override prefix.

My profile being in non listening mode continuously, this would looks like that :

- Me : "Open the doors"
Nothing happens because voiceattack doesn't listen.
- Me : "Computer, open the doors"
The doors open (easy so far)
And now :
- Me : "Computer"
- Computer : "yes ?"
And the computer starts listening all the future phrases until I change the listening mode again (or by a countdown).

I tried to use "Computer" as a listening override prefix but when I simultaneously create a command with a "When I say : Computer", Voiceattack expects me to say the prefix first and the spoken command then. Result :"Computer computer". But I would like to say it once and not twice...

I tried "Computer*" and use the {CMDAFTER} but voiceattack doesn't understand what I say after Computer, instead of "open doors", it easily understands other nonsenses.

Could someone help me here please ? ...

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Execute a command with the listening override prefix only ?
« Reply #1 on: October 24, 2020, 03:39:42 PM »
That should be possible. Put the "Make VoiceAttack Start Listening" action at the top of the action list of your "computer" command, which will allow it to be recognized even while listening is suspended.

LeNawax

  • Newbie
  • *
  • Posts: 5
Re: Execute a command with the listening override prefix only ?
« Reply #2 on: October 25, 2020, 02:32:46 AM »
By adding Computer to the listening override prefix, and adding a command "Computer*" with "Start Listening" in first line, it does work but I still have to say Computer twice : "Computer" to override, and again "Computer" to execute the spoken command and to start listening.

If I don't enable the listening override prefix, the command "Computer*" is executed with one spoken"Computer", but then I can't say "Computer*, any command existing in my list" (like "Computer*, open doors"), cause that would mean using this :
 
Execute command, '{CMD_AFTER}' (by name)

,but the recognition of VoiceAttack is very poor in that case and it doesn't sucess to execute existing commands, it always tries to execute unexisting commands cause it doesn't understand what I am saying after "Computer*".

LeNawax

  • Newbie
  • *
  • Posts: 5
Re: Execute a command with the listening override prefix only ?
« Reply #3 on: October 25, 2020, 03:27:43 AM »
I tried to make "Computer" as a prefix with "Make VoiceAttack Start Listening" in first action.
I think this trick doesn't work with prefix, only with full commands... It works with prefix too, my bad.
And the problem is the same as {CMDAFTER}, the recognition of composite commands is very poor, VA doesn't understand anything when I use a prefix....

And the other problem is that prefix can't be executed alone, by speaking their phrase, they need to be followed by a full command.


OK ! I have resolved the problem : VA allows us to create a prefix and a full command with the same spoken phrase at the same time ! That's great ! A prefix "Computer" that starts listening, and a full command "Computer" that makes VA say : "yes ?".

Now the return of another problem : Poor recognition. VA hardly ever understand  prefix + full command ! But if my full command is now a suffix, it works... weird ! But I can't change my full commands into suffix, that would be a big work and I couldn't execute them alone after that... This is a vicious circle
« Last Edit: October 25, 2020, 04:18:37 AM by LeNawax »

LeNawax

  • Newbie
  • *
  • Posts: 5
Re: Execute a command with the listening override prefix only ?
« Reply #4 on: October 25, 2020, 04:18:43 AM »
Totally resolved :

I returned on the first way : adding a full command "computer" with "Make VoiceAttack Start Listening" in first action. And adding "computer" to the listening override prefix... And it works ... it seems the problem was about the confidence level, VA has problems to understand me (surely cause my english is bad). Until now it wasn't working. Well, thank you Pfeil then, I've already tried your solution but it seems you were right !

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Execute a command with the listening override prefix only ?
« Reply #5 on: October 25, 2020, 06:32:41 AM »
Yes...the prefix/suffix system has nothing to do with the "Override listening if my spoken command begins with" option.

Prefix/suffix commands are solely intended to make it simpler to have multiple combinations of different phrase sections, thus they require one of each to be spoken. Arguably that system is somewhat obsolete, as in many cases dynamic command sections in full commands can be used instead.