News:

HOT TIP! Commands and groups can be copied and pasted directly from your command editor to the forum, and vice versa. This makes sharing command XML on the forum much easier!

Main Menu

New Here

Started by Dominique, July 07, 2014, 06:39:00 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

danderson

Hi Kalle , I have a question,,Regarding integrating denise with vox .  The Our Groceries is a great use for RoboB and it works perfectly with TTS voice . And the command for that is : (for example)
TTS Speak                Are you sure you want to add {1} to your grocery list?
And I think ,{1} is the key information to speak , (the one item) however , if I replace this with :
http://127.0.0.1:8000/Agent?function=AgentSpeak&Auth={M:botpass.botpass}&Text=Are you sure you want to add {1} to your grocery list?   
When she gets to the {1} she reads the entire grocery list. I have failed to find where that one item is stored for her to speak..

jitterjames

You really need to post the xml of the command you have tried to create so we can see what you have done.  It will save everyone a lot of time.

http://voxcommando.com/mediawiki/index.php?title=XML_on_the_forum

danderson

Ok ,,Thanks for showing me that , ..
This code works perfect:

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.0.1.0-->
<command id="873" name="Add Item dictionary" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>RoboB.Select</cmdType>
    <params>
      <param>OurGroceries</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>RoboB.ElementByID</cmdType>
    <params>
      <param>importItemsList</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>RoboB.SetText</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>RoboB.ElementParent</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>RoboB.Submit</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>RoboB.Wait</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>Are you sure you want to add {1} to your grocery list?</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Don't forget, Remember, I need, We need, We are all out of</phrase>
  <phrase>to</phrase>
  <phrase>buy</phrase>
  <phrase optional="true">some</phrase>
  <payloadDictation>payloadDictation: Spelling</payloadDictation>
</command>


However , This one does not ,, but I think it should !?!?


<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.0.1.0-->
<command id="873" name="Add Item dictionary" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>RoboB.Select</cmdType>
    <params>
      <param>OurGroceries</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>RoboB.ElementByID</cmdType>
    <params>
      <param>importItemsList</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>RoboB.SetText</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>RoboB.ElementParent</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>RoboB.Submit</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>RoboB.Wait</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Scrape</cmdType>
    <params>
      <param>http://127.0.0.1:8000/Agent?function=AgentSpeak&amp;Auth={M:botpass.botpass}&amp;Text=Are you sure you want to add {1} to your grocery list?</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Don't forget, Remember, I need, We need, We are all out of</phrase>
  <phrase>to</phrase>
  <phrase>buy</phrase>
  <phrase optional="true">some</phrase>
  <payloadDictation>payloadDictation: Spelling</payloadDictation>
</command>



dan


Kalle

Hi Dan, I've tested your second command code "alone" and it seems to work with "Denise".
So I can say the commandstructure is correct - to find the issue, please post your "Command Group".
Two things:
1. Please test the command first with the LogicalCommand Builder in VC by typing a item like Tomatos in the "Test payloads" in the field {1} see picture. In this way you can test the command.
2. You use a question for "Denise" - "Are you sure ..." which makes no sense for the Command "Add Item dictionary" with confirm option, because this command will only execute when you has confirmed it. So the correct syntax for "Denise" is normaly: "{1}, was added to your list" and you must have a other command which is triggered by the confirm event - see the second picture. So if you say YES the "Add Item dictionary" execute otherwise nothing will happens. The confim option is sometimes a bit difficult to understand, but we have tutorial videos on youtube how it works.

Kalle
***********  get excited and make things  **********

jitterjames

Quote from: danderson on September 08, 2014, 11:36:08 PM
Ok ,,Thanks for showing me that , ..
This code works perfect:

Both xml you posted are simply wrong.  Where did you get the first one?

Kalle

Upps, why or what is wrong? I have the same code for add items and you've created it long time ago  ::hmm
***********  get excited and make things  **********

nime5ter

Just what you mentioned above, Kalle.

1. The TTS of the working command confirms that an item was added to the list. This command is not the one that asks for user confirmation. That happens in a separate command

Also:

2. The working command doesn't use Dictation "spelling". That, of course, is up to a user's judgement, so maybe this was changed on purpose if regular dictation wasn't working.

But this version of the command, even with those corrections, is not the updated xml that everyone has been told to use, so one thing that is confusing is: where did this version come from? We'd like to know because we are trying to keep users from using outdated xml as much as possible.

Also the proper OurGroceries xml groups prioritize the command in the other command group -- the one that uses the groceries.xml payload file rather than a dictation payload. That command is very important to how these commands function, so it would be good to make sure that Dan has correctly copied both, updated command groups if he wants to use the Our Groceries commands.
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

Kalle, you just explained what is wrong.  I am agreeing with you that it is wrong.  VC should not ask for confirmation after the confirmation has already been given.  Dan said that his first XML worked perfectly, but I don't see how that is possible, because it is wrong, and I want to know where he got this screwed up command from.

Kalle

Ahh ok, that makes it clear for me and that is why I told Dan to post the whole command group.
***********  get excited and make things  **********

nime5ter

Yes, that would definitely be helpful, but there are 2 command groups.

We also would like to verify where Dan got the xml that he posted above. If it was copied directly from somewhere, we need to find where it is from so that we can correct the problem.
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)

danderson

Ok,,I do apologize for the error , I pasted the wrong line in the wrong command when I posted it . And sorry for not checking it ,before posting . I do have the correct command group and it works fine , but when I would replace TTS voice with the scrape function for denise , she would read the entire list every time she came to a {1} . However I have figured out my problem , and now all works just fine ....Perhaps my incorrect post should be deleted .
Progress so far ...
https://www.youtube.com/watch?v=G9gTKVJ0-fk&feature=youtu.be

Kalle

Good to hear that your problem is solved, but it would be nice you post us how you solved it, maybe a other user has the same problem.

Thanks
Kalle
***********  get excited and make things  **********

danderson

Well I never knew what I was doing wrong in the first place , I simply deleted both command groups and reinstalled the two groups then did the same thing as before only this time it worked , so probably I just made a mistake the first time (unknown) . I'm new to this scripting language , so I'm still getting use to it. I wish there were more tutorials on the "if" "then" statements . I did add the "close groceries" command . Does anyone else on this forum deal with denise and vox ?

Dan

nime5ter

There are no video tutorials on the logic block that I'm aware of. A description of each of the logic types/operators is on the wiki, though. http://voxcommando.com/mediawiki/index.php?title=Logic_Block

It's more important to understand fully how payloads and other variables work. Once you're comfortable with those, the basic logic that is available in VC should hopefully make more sense.
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)

Kalle

Yes, I use "Denise" and VC all the time and also with OurGroceries. Everything works fine, because I use it instead as TTS.Speak which is very simple.
***********  get excited and make things  **********