News:

If you have an Android device, check out VoxWav!

Main Menu

TTS

Started by lja, February 04, 2015, 07:03:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lja

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

#1
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.
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

#2
@nime5ter

It looks like I may not have this correct.

PegLegTV

I don't use MB, but this command Might work for you

Connected to
<?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

Quote from: lja on February 04, 2015, 11:03:48 PM
@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

#5
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:

<?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>
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

Quote from: PegLegTV on February 05, 2015, 01:54:40 AM
I don't use MB, but this command Might work for you

Connected to
<?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

Quote from: jitterjames on February 05, 2015, 07:54:47 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

Quote from: nime5ter 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:

<?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.

<?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

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.