3
« on: January 04, 2016, 10:07:47 PM »
I'm trying to get VC to respond to a given name & respond, "Hello {1}" & then a custom reply for that name.
If I do this using a payload range then all works fine.
But if I do it using a payload.xml it doesn't work. Obviously because I am doing something wrong.
I have created an xml, attached, & in the phrase put the name of the person & in the value put out the text I would like read.
But can't figure out how to tell VC to do this. If I use only the payload.xml then nothing happens.
The code I've upped has a payload list & a payload range, currently the payload range works if I keep the payload xml disabled or optional.
Is there a way to do this via the payload xml as this would be easier for future lists than have to add a logic block for each individual name.
Any chance of a pointer to get me going?
(I did also try using a payload dictation regular but again got no joy & anyway this method would be a bit more hit and miss with the names heard.)
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.2-->
<command id="533" name="Say hello to {1}" 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}&&tony</ifParams>
<then>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Ahh, hello {1}. It is my pleasure to make your acquaintance</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else />
</if>
<if ifBlockDisabled="False" ifNot="False">
<ifType>(A)==(B)</ifType>
<ifParams>{1}&&steve</ifParams>
<then>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Ahh, hello {1}. It is my pleasure to make your acquaintance</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else />
</if>
<if ifBlockDisabled="False" ifNot="False">
<ifType>(A)==(B)</ifType>
<ifParams>{1}&&karyn</ifParams>
<then>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>Ahh, hello {1}. It is my pleasure to make your acquaintance</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else />
</if>
<phrase>Jenkins Say hello to</phrase>
<payloadList>Steve, Karyn, Tony</payloadList>
</command>
Since typing the above I've tried using a payload get phrase but that's doing nothing on the Save & Execute, but here's the code for that, really not sure which way to go with this.
An example tied to two names would be brill???
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.2-->
<command id="533" name="Say hello to {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>PayloadXML.GetPhrase</cmdType>
<params>
<param>D:\VoxCommando\payloads\sayhelloto.xml</param>
<param>{1}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>{LastResult}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>Jenkins Say hello to</phrase>
<payloadList>Steve, Karyn, Tony</payloadList>
<payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="True">payloads\sayhelloto.xml</payloadFromXML>
</command>