Author Topic: What am I doing Wrong?  (Read 1278 times)

0 Members and 1 Guest are viewing this topic.

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
What am I doing Wrong?
« on: May 25, 2014, 06:55:34 PM »
for some reason confirmation is not working for me. VC does the commands and do not wait for my confirmation. here is the sequence:
I say good morning, triggering the morning routine command.
this commend say if I want weather forecast, then trigger the weather.confirmation this command requires confirmation ... if confirmed it will give the weather forecast by triggering weather.info
then the first command morning routine will say if I want to take a bike ride then trigger bixi.confirmation this command requires confirmation .... if confirmed triggers bixi.recommendation

All TTS is done with Sync ...

I can't figure why VC is not waiting for my confirmation ... just trigger the commands one after the other ...  :bonk :bonk :bonk

here is the main commands:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.5.1-->
<command id="428" name="Morning Routine" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>VC.TriggerEvent</cmdType>
    <params>
      <param>Greetings</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.TriggerEvent</cmdType>
    <params>
      <param>feedback</param>
      <param>GN-006</param>
      <param>1</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>500</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.TriggerEvent</cmdType>
    <params>
      <param>Weather.Confirmation</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>2000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.TriggerEvent</cmdType>
    <params>
      <param>feedback</param>
      <param>GN-007</param>
      <param>1</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.TriggerEvent</cmdType>
    <params>
      <param>Bixi.Confirmation</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType />
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Good Morning</phrase>
</command>

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.5.1-->
<command id="454" name="Weather Confirmation" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>VC.TriggerEvent</cmdType>
    <params>
      <param>Weather.Info</param>
      <param>Weather</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>500</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.TriggerEvent</cmdType>
    <params>
      <param>Weather.Recommedations</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>Weather.Confirmation</event>
</command>

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.5.1-->
<command id="1032" name="Bixi Confirmation" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>VC.TriggerEvent</cmdType>
    <params>
      <param>Bixi.Recommendation</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>Bixi.Confirmation</event>
</command>
When Voice command gets tough, use hand gestures

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: What am I doing Wrong?
« Reply #1 on: May 25, 2014, 07:04:15 PM »
Commands triggered by events don't require confirmation. You'd need to use VC.TellVox instead of VC.TriggerEvent.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: What am I doing Wrong?
« Reply #2 on: May 25, 2014, 08:05:17 PM »
Commands triggered by events don't require confirmation. You'd need to use VC.TellVox instead of VC.TriggerEvent.

does that means they ignore the need for confirmation? if so, how can I make VC do a question like scenario? the idea behind the confirmation when it asks me if I want weather forecast, I can say yes or cancel ... same for the bixi thing ..

When Voice command gets tough, use hand gestures

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: What am I doing Wrong?
« Reply #3 on: May 25, 2014, 08:39:50 PM »
As I said, you simply need to use VC.TellVox actions where currently you're using VC.TriggerEvent actions.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.5.1-->
<commandGroup open="True" name="hadood needs help" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="442" name="Morning Routine" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>Greetings</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>feedback</param>
        <param>GN-006</param>
        <param>1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>500</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TellVox</cmdType>
      <params>
        <param>Weather confirmation</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>2000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>feedback</param>
        <param>GN-007</param>
        <param>1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TellVox</cmdType>
      <params>
        <param>Bixi confirmation</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Good Morning</phrase>
  </command>
  <command id="454" name="Weather Confirmation" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>Weather.Info</param>
        <param>Weather</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>500</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>Weather.Recommedations</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Weather.Confirmation</event>
    <phrase>Weather confirmation</phrase>
  </command>
  <command id="1032" name="Bixi Confirmation" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>Bixi.Recommendation</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Bixi.Confirmation</event>
    <phrase>Bixi confirmation</phrase>
  </command>
</commandGroup>

But I think you're going to run into bigger problems trying to trigger a bunch of commands that initiate TTS.SpeakSyncs action while at the same time several of them require confirmation.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: What am I doing Wrong?
« Reply #4 on: May 25, 2014, 09:17:08 PM »
Another option would be to not use the built in confirmation at all.  Instead you could store the next prosed event in a variable and have a command similar to a confirm command that when executed will triggere the eventname contained in the variable.

pseudo code example:

TTS.Speak  "would you  like to hear the news"
result.setvar  nextEventProposed = auto.readnews

then have a command with phrases such as "yes please, go ahead".  This command when executed would trigger an event using {var.nextEventProposed} as the event name.  It gets a bit more complicated if you need to trigger events with payloads at this point, but there are ways you could manage it.