Author Topic: lja's special echo thread  (Read 8647 times)

0 Members and 1 Guest are viewing this topic.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: lja's special echo thread
« Reply #30 on: February 11, 2018, 11:50:00 AM »
You will also need to set environment variables...

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: lja's special echo thread
« Reply #31 on: February 11, 2018, 11:52:35 AM »
And this is the XML I am using in VC.  You don't necessarily need to have it the same as this, I have some extra experimental stuff in there to treat movie commands differently.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.1-->
<command id="47" name="event to voice command" 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>{1}&amp;&amp;play movie</ifParams>
    <then>
      <action>
        <cmdType>VC.TriggerEvent</cmdType>
        <params>
          <param>Play.Movie</param>
          <param>{1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <action>
    <cmdType>TTS.Speak2Wav</cmdType>
    <params>
      <param>OK</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.TellVox</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>LastActionSuccess</ifType>
    <ifParams>&amp;&amp;</ifParams>
    <then />
    <else>
      <action>
        <cmdType>TCP.WebServer.SetResponse</cmdType>
        <params>
          <param>Jarvis does not understand {1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <action>
    <cmdType>TTS.GetLastText</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{LastResult}&amp;&amp;{Var.LastTTS}</ifParams>
    <then />
    <else>
      <action>
        <cmdType>TCP.WebServer.SetResponse</cmdType>
        <params>
          <param>{LastResult}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <event>EchoToVC</event>
</command>

horstdog

  • Jr. Member
  • **
  • Posts: 6
  • Karma: 1
    • View Profile
    • 1Home1PC
Re: lja's special echo thread
« Reply #32 on: February 11, 2018, 02:42:38 PM »
James, This is great, Thank you so much.