News:

There is now a ChangeLog page on the wiki
New developments are added at the bottom of the page.

Main Menu

Multiple instances with different TTS Languages

Started by flashguy, December 03, 2015, 07:49:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

flashguy

Hi,
I would like to run one instance of voxcommando where i can change the TTS Language via Events. Is this somehow possible? An option would also be to have two instances with different TTS Languages.

I have a home automation system and some things need to be said in english and I want features like news and weather to be spoken in German.

Any help is appreciated

nime5ter

Welcome flashguy,

If it's just the TTS voices you'd like to change, and not the speech recognition language, I think you should be able to use the standard action TTS.SetVoiceName or TTS.SetVoiceNum (http://voxcommando.com/mediawiki/index.php?title=Plugin_TTS#SetVoiceName)

To adapt the example below, replace the TTS voice names in the payload list with your own. You should be able to include both German and English TTS names/voices.

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<commandGroup open="True" name="Change TTS voice with an event" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="365" name="I'd like to speak to {1} now" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <params>
        <param>OK. I'll let {1} speak now.</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>changeTTS</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>I'd like to speak to</phrase>
    <payloadList>Paul, Bridget, Anna</payloadList>
    <phrase optional="true">now</phrase>
  </command>
  <command id="332" name="change TTS voice" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.SetVoiceName</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Hello, this is {1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>changeTTS</event>
  </command>
</commandGroup>
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)

flashguy

nime5ter, you're the man!

Thanks for the fast feedback. Works like a charm.

nime5ter

Or the woman, as the case may be. ;-)

Cheers. Happy to help.
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)