Author Topic: TTS  (Read 4696 times)

0 Members and 2 Guests are viewing this topic.

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
TTS
« on: February 04, 2015, 07:03:37 PM »
When opening Media Browser Classic the following is heard:

"Connected to Megabytes Classic"

It seems "MB" is read as megabytes.

Where can I locate how to change this? Thanks.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: TTS
« Reply #1 on: February 04, 2015, 07:14:57 PM »
Ha ha ha. That's funny. You should use Bridget. She says it right. :)

That is the "connect to to client" (typo!) command in the MB3 Events command group. (You can always use the Search function in the tree editor to locate specific commands, btw -- so, searching actions for "Connected to" would have pointed the way.)

As you will see, it is using payload {3}, passed to it via the event MB3.Session.Set.

Two solutions (apart from leaving it because it's hilarious):

If you only use MB Classic, replace  {3} with the phrase Media Browser Classic in the TTS.Speak action.

If you use more than one client, you should add a Results.Replace above the TTS line, and then change {3} to {LastResult}, otherwise it will not identify your other clients correctly.
« Last Edit: February 04, 2015, 07:21:17 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: TTS
« Reply #2 on: February 04, 2015, 11:03:48 PM »
@nime5ter

It looks like I may not have this correct.
« Last Edit: February 05, 2015, 11:19:15 AM by lja »

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: TTS
« Reply #3 on: February 05, 2015, 01:54:40 AM »
I don't use MB, but this command Might work for you

Connected to
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="804" name="Connect to client" 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>{3}&amp;&amp;MB</ifParams>
    <then>
      <action>
        <cmdType>Results.RegEx</cmdType>
        <params>
          <param>MB\W(.*?)$</param>
          <param />
          <param>{3}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>connected to Media Browser {match.1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>connected to {3}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
</command>

You will have to add the events and or phrases to this command from the original command 

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS
« Reply #4 on: February 05, 2015, 07:54:47 AM »
@nime5ter

It looks like I may not have this correct.

@Lja. Please post XML for your commands and not pngs. You have been here long enough to know this already. Xml is easier for everyone, including you!
http://voxcommando.com/mediawiki/index.php?title=XML_on_the_forum

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: TTS
« Reply #5 on: February 05, 2015, 07:59:30 AM »
Thanks PegLeg. Looks like a great solution.

As some of our users are not comfortable using regular expressions, here is the alternative method I was suggesting:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="1152" name="connect to client" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Results.SetLastResult</cmdType>
    <params>
      <param>{3}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.Replace</cmdType>
    <params>
      <param>MB</param>
      <param>Media Browser </param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>Connected to {LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>MB3.Session.Set</event>
</command>
« Last Edit: February 05, 2015, 08:51:20 AM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: TTS
« Reply #6 on: February 05, 2015, 11:20:18 AM »
I don't use MB, but this command Might work for you

Connected to
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="804" name="Connect to client" 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>{3}&amp;&amp;MB</ifParams>
    <then>
      <action>
        <cmdType>Results.RegEx</cmdType>
        <params>
          <param>MB\W(.*?)$</param>
          <param />
          <param>{3}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>connected to Media Browser {match.1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>connected to {3}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
</command>

You will have to add the events and or phrases to this command from the original command

Thanks. Appreciated.

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: TTS
« Reply #7 on: February 05, 2015, 11:21:54 AM »
@Lja. Please post XML for your commands and not pngs. You have been here long enough to know this already. Xml is easier for everyone, including you!
http://voxcommando.com/mediawiki/index.php?title=XML_on_the_forum

Sorry Sir.

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: TTS
« Reply #8 on: February 05, 2015, 11:35:57 AM »
Thanks PegLeg. Looks like a great solution.

As some of our users are not comfortable using regular expressions, here is the alternative method I was suggesting:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="1152" name="connect to client" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Results.SetLastResult</cmdType>
    <params>
      <param>{3}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.Replace</cmdType>
    <params>
      <param>MB</param>
      <param>Media Browser </param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>Connected to {LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>MB3.Session.Set</event>
</command>

Thanks @nime5ter. TTS was spelling the word "classic". Making the changes under Results.Replace adjusted this.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="1153" name="connect to client" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Results.SetLastResult</cmdType>
    <params>
      <param>{3}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.Replace</cmdType>
    <params>
      <param>MB-Classic</param>
      <param>Media Browser Classic</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>TTS.Speak</cmdType>
    <params>
      <param>Connected to {LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>MB3.Session.Set</event>
</command>

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS
« Reply #9 on: February 05, 2015, 12:17:06 PM »
That Anna is a real piece of work.  All you really need to do is remove the dash after MB but since this only applies to MB-Classic it doesn't really matter how you do it.

The exact spelling of all possible client names I am seeing are as follows:

"MB-Classic"
"XBMC"
"Dashboard"
"Media Browser Theater"
"Android"

I know there are others but I don't have access to them.