News:

There is a soft-mute function which we use with the commands like "What song is this?" There is one for system volume, one for each of: MediaMonkey, XBMC, iTunes, MediaPortal.

Main Menu

Can a command triggered by an event require confirmation?

Started by marcusvdt, July 05, 2015, 07:16:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

marcusvdt

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".


<?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.
<?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!


jitterjames

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

Quote from: jitterjames 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.

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.