News:

Would you like to say "Thanks!" for extra support or new features that we provided? Donations are gratefully accepted.

Main Menu

TTS Dual Result Output

Started by eugekiller, January 09, 2016, 03:54:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

eugekiller

Ok So i have this thing i am working on tells me my home temperature and forecast for the day. I can get result for thermostat and the weather now how to make TTS to do dual result. I want it to say both the result tat it has.

Please let me know if it is possible.

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<commandGroup open="True" name="Try" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="467" name="time-related friendly chitchat" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="See http://voxcommando.com/mediawiki/index.php?title=Custom_DateTime_codes for explanation of special date/time variables.">
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>,4,5,6,7,8,9,10,11,&amp;&amp;,{DtCustom.%H},</ifParams>
      <then>
        <action>
          <cmdType>XJson.SetVol</cmdType>
          <params>
            <param>40</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>File.Read</cmdType>
          <params>
            <param>Nest\Nest_dev_status.txt</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegEx</cmdType>
          <params>
            <param>shared".*?"{1}".*?"current.temperature".(.*?),</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>PY.ExecString</cmdType>
          <params>
            <param>result=round({Match.1}*1.8+32)</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>WUnder.GetCurrent</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>Good morning. {LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.SpeakSync</cmdType>
          <params>
            <param>Good morning, Eugene. {LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>XJson.SetVol</cmdType>
          <params>
            <param>100</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>,12,13,14,15,16,17,&amp;&amp;,{DtCustom.%H},</ifParams>
      <then>
        <action>
          <cmdType>XJson.SetVol</cmdType>
          <params>
            <param>40</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>File.Read</cmdType>
          <params>
            <param>Nest\Nest_dev_status.txt</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegEx</cmdType>
          <params>
            <param>shared".*?"{1}".*?"current.temperature".(.*?),</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>PY.ExecString</cmdType>
          <params>
            <param>result=round({Match.1}*1.8+32)</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>WUnder.GetCurrent</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>Good afternoon, Eugene. {LastResult}{result}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.SpeakSync</cmdType>
          <params>
            <param>Good afternoon Eugene. {LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>XJson.SetVol</cmdType>
          <params>
            <param>100</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>,18,19,20,21,22,&amp;&amp;,{DtCustom.%H},</ifParams>
      <then>
        <action>
          <cmdType>XJson.SetVol</cmdType>
          <params>
            <param>40</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>File.Read</cmdType>
          <params>
            <param>Nest\Nest_dev_status.txt</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegEx</cmdType>
          <params>
            <param>shared".*?"{1}".*?"current.temperature".(.*?),</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>PY.ExecString</cmdType>
          <params>
            <param>result=round({Match.1}*1.8+32)</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>WUnder.GetCurrent</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.SpeakSync</cmdType>
          <params>
            <param>{LastResult}. Hope you're enjoying your evening.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>XJson.SetVol</cmdType>
          <params>
            <param>100</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>,23,0,1,2,3,&amp;&amp;,{DtCustom.%H},</ifParams>
      <then>
        <action>
          <cmdType>XJson.SetVol</cmdType>
          <params>
            <param>40</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>File.Read</cmdType>
          <params>
            <param>Nest\Nest_dev_status.txt</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegEx</cmdType>
          <params>
            <param>shared".*?"{1}".*?"current.temperature".(.*?),</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>PY.ExecString</cmdType>
          <params>
            <param>result=round({Match.1}*1.8+32)</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>WUnder.GetCurrent</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>{LastResult}. Go to bed !!!</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.SpeakSync</cmdType>
          <params>
            <param>{LastResult}. Are you still awake?</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>XJson.SetVol</cmdType>
          <params>
            <param>100</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <phrase>whats up</phrase>
    <phrase optional="true">the</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">Nest\thermoList.xml</payloadFromXML>
  </command>
</commandGroup>


For example you do the {LastResult} can you do something like {LastTwoResults} LOL or some other way that can help me

jitterjames

I'm not really sure what you are asking to be honest but I think you just want to use the TTS.SpeakSync action twice.

- first get Nest temperature
- then use speaksync to read it
- then get weather info
- then use speaksync to read it.

but if that's not what you mean you'll have to try to rephrase your question.

eugekiller

ye i guess i can do that.. But what about the message that pops up can i get dual?

jitterjames

#3
Please try looking at the existing actions that are available on your own sometimes. We do have other things to do with our time.

http://voxcommando.com/mediawiki/index.php?title=Actions#AddText