Author Topic: Can a command triggered by an event require confirmation?  (Read 1269 times)

0 Members and 1 Guest are viewing this topic.

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Can a command triggered by an event require confirmation?
« on: July 05, 2015, 07:16:16 PM »
I have one command that is triggered by the event xxx. This command tell the use the command was almost understood as bla bla, and then triggers a custom event "Confirm.low.confidence".


Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.5.2-->
<command id="718" name="Low confidence" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>choices</param>
      <param>Eu acho que entendi você pedir:</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>append_random_response("{Var.choices}")</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>append_random_response("{1}")</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>choices2</param>
      <param>Você confirma?</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>append_random_response("{Var.choices2}")</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>say_appended_response()</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.TriggerEvent</cmdType>
    <params>
      <param>Confirm.low.confidence</param>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>VC.Reco.TooLow</event>
</command>

 Then, I have another command that has the sole purpose of allowing the user to respond if he wants this previously almost understood command to be executed.
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.5.2-->
<command id="622" name="Confirma a execução?" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>VC.TellVox</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>Confirm.low.confidence</event>
</command>

The problem I'm having is that this second command is not obeying to the "Must confirm" checkbox when it is triggered by the event "Confirm.low.confidence"

As a test only, I have added a phrase to the second command and when I say that phrase, the "must confirm" setting does work with a confirmation OSD being showed (according to the respective setting in the options).

Shouldn't the "must confirm" setting work even if a command is triggered by an event?

Thanks!

« Last Edit: July 05, 2015, 07:18:41 PM by marcusvdt »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Can a command triggered by an event require confirmation?
« Reply #1 on: July 05, 2015, 07:21:29 PM »
If you do a little searching on the forum, or read the wiki, you will find that commands triggered by events do not require confirmation.

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: Can a command triggered by an event require confirmation?
« Reply #2 on: July 05, 2015, 07:55:22 PM »
If you do a little searching on the forum, or read the wiki, you will find that commands triggered by events do not require confirmation.

Thanks. I searched the forum before I posted that question, but I'm probably not doing it right.

Thanks for taking your time to teach me how I should try to find the supporting information myself instead of asking for support. I always forget that lesson, so forgive me.