Author Topic: TTS Dual Result Output  (Read 1512 times)

0 Members and 1 Guest are viewing this topic.

eugekiller

  • Jr. Member
  • **
  • Posts: 35
  • Karma: 0
    • View Profile
TTS Dual Result Output
« on: January 09, 2016, 03:54:21 PM »
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.

Code: [Select]
<?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
« Last Edit: January 09, 2016, 03:57:08 PM by eugekiller »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS Dual Result Output
« Reply #1 on: January 09, 2016, 04:02:59 PM »
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

  • Jr. Member
  • **
  • Posts: 35
  • Karma: 0
    • View Profile
Re: TTS Dual Result Output
« Reply #2 on: January 09, 2016, 04:20:58 PM »
ye i guess i can do that.. But what about the message that pops up can i get dual?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS Dual Result Output
« Reply #3 on: January 09, 2016, 04:26:03 PM »
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
« Last Edit: January 10, 2016, 08:06:20 AM by jitterjames »