Author Topic: Multiple instances with different TTS Languages  (Read 1280 times)

0 Members and 1 Guest are viewing this topic.

flashguy

  • Jr. Member
  • **
  • Posts: 4
  • Karma: 0
    • View Profile
Multiple instances with different TTS Languages
« on: December 03, 2015, 07:49:55 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Multiple instances with different TTS Languages
« Reply #1 on: December 03, 2015, 08:17:14 AM »
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.

Code: [Select]
<?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

  • Jr. Member
  • **
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Multiple instances with different TTS Languages
« Reply #2 on: December 03, 2015, 08:59:05 AM »
nime5ter, you're the man!

Thanks for the fast feedback. Works like a charm.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Multiple instances with different TTS Languages
« Reply #3 on: December 03, 2015, 09:18:24 AM »
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)