Author Topic: The Human Touch - Kalles video & trying to understand payloads  (Read 1448 times)

0 Members and 1 Guest are viewing this topic.

SteveB69

  • Contributor
  • ***
  • Posts: 72
  • Karma: -1
    • View Profile
The Human Touch - Kalles video & trying to understand payloads
« on: December 22, 2015, 10:42:07 PM »
Hi Kalle

This topic is aimed at you although of cause anyone else is welcome...

Thanks for your video tutorials on you tube, I love VC & am y=trying to get to gips with it, as a non coder it's a bit of a puzzle at times. Your video the Human Touch, I have watched it several times but I am stuck at certain points, any chance you could help?

1. 2.29min. What is the payload list you have placed under VoxCommando - Listen used for, does this have any part of VC giving you different answers>? I'm not following the point of optional phrases?

2. In the edit command, you don't mention the other 2 logic commands you added, why do these both have {1} in them, would they not pick up from Good Afternoon being {2}?

3. Edit Commands again, why does logic command 2 & 3 have 2 different sayings available?

4. I've created a payload & added it to the command tree. My payload has a phrase "Good Morning" & a value of "well good morning back"

Now when I say Hey Jeniffer Good Morning VC recognises & runs the command but no TTS happens.
When I say Hey Jeniffer Good Afternoon / Evening VC comes up with command unrecognised?

Any thoughts...

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<command id="409" name="Good Day" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>VC.On</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;Good Morning</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>{1}Good Morning Steve</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;Good Afternoon</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>{1}Good Afternoon Steve</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;Good Evening Steve</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>{1}Good Evening Steve</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <phrase>Hey Jenniffer</phrase>
  <payloadList optional="true">Good Morning, Good Afternoon, Good Evening</payloadList>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\personality.xml</payloadFromXML>
</command>
Chances are I've searched the forum, searched the wiki & scoured You Tube but I'm just to thick to work it out without help!

SteveB69

  • Contributor
  • ***
  • Posts: 72
  • Karma: -1
    • View Profile
Re: The Human Touch - Kalles video & trying to understand payloads
« Reply #1 on: January 02, 2016, 01:09:41 AM »
Is it possible someone could do me a basic script to get me going on personalisation.
If I could get something that branches off at least twice I'm sure I can figure it out from there...

1. Good Morning Jenny, start listening

2. VC replies Good Morning Steve, how are you?

3. I reply "I'm fine how are you"

4. VC replies "I'm fine, did you sleep well Steve"

5. I reply, "Yes not bad" or "No awful"

6. VC responds accordingly.

or if we go back to 2

6. I reply "I'm in a bad mood"

7. VC replies "Oh I'm sorry to hear that, is there anything I can do to help?"

8. I reply "Yes, tell me a joke" or I reply "Yes, what's the weather like"

9. VC responds accordingly.

I've made a start on this but I'm not getting far on it. I'm finding that the responses work outside of this commands so a response that is only meat to work within this conversation come up whenever I say them.
The code below is along similar lines to what I'm referring to but it's not doing anything correctly. (Yeah I know my fault)

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.2-->
<command id="168" name="Listen" enabled="true" alwaysOn="True" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>VC.On</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;good morning</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>{1} Steve, Weather, Choices?</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;good evening</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>{1} Steve, Choices?</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType />
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;good afternoon</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>{1} Steve, Choices?</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="True" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;hi</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>{1} callah, nice to hear you. | {1} callah, nice to meet you.</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <payloadList optional="true">jenny, good morning, good afternoon, good evening, Jenny</payloadList>
  <phrase>start listening, pay attention, wake up</phrase>
</command>

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.2-->
<command id="347" name="human touch" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;no thanks</ifParams>
    <then>
      <action>
        <cmdType>VC.Standby</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="True">payloads\humantouch.xml</payloadFromXML>
</command>

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.2-->
<command id="426" name="Choices" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;weather</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>Weather Loading</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>Launch.OpenURL</cmdType>
        <params>
          <param>http://www.bbc.co.uk/weather/bn15</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;choices</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>choices Loaded</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <phrase optional="true">What's the, like</phrase>
  <phrase>Yes, show, the, weather</phrase>
  <payloadList optional="true">choices, weather, wever</payloadList>
  <payloadList optional="true">weather</payloadList>
  <phrase optional="true">please, like</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\humantouch.xml</payloadFromXML>
</command>

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.2-->
<command id="359" name="weather today" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)Contains(B)</ifType>
    <ifParams>{LastSpoken}&amp;&amp;no, no thanks</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>OK - I'm gone</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)Contains(B)</ifType>
    <ifParams>{LastSpoken}&amp;&amp;yes, yes please</ifParams>
    <then>
      <action>
        <cmdType>TTS.SpeakSync</cmdType>
        <params>
          <param>I think this is a good choice, I take a look on the current weather for you.</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>WUnder.GetCurrent</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.Pause</cmdType>
        <params>
          <param>1000</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>TTS.SpeakSync</cmdType>
        <params>
          <param>The current weather in your region,  {LastResult}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <phrase>yes, no, oh yes</phrase>
  <payloadDictation optional="true">payloadDictation: Regular</payloadDictation>
  <payloadList>thanks,that would be nice, weather, conditions, condition, this can't, do it, not interested</payloadList>
  <payloadDictation optional="true">payloadDictation: Regular</payloadDictation>
</command>

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.2-->
<command id="420" name="I'm Gone" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType />
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{1}&amp;&amp;no thanks</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>I'm gone</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <payloadList>no thanks, no ta</payloadList>
</command>
Chances are I've searched the forum, searched the wiki & scoured You Tube but I'm just to thick to work it out without help!