Author Topic: Как озвучить символы кириллицы, если они п  (Read 3182 times)

0 Members and 1 Guest are viewing this topic.

Вячеслав

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Нужна помощь,
1. элемент TTSMS.Speak {1} не правильно интерпретирует ASCII (Win-1251) полученные в payload {1}
Т.е. если строка константа, например TTSMS.Speak привет то русские символы озвучиваются правильно, а если строка получена как payload 1, например TTSMS.Speak {1} где {1}=привет
то озвучивает не верно. Пробовал в UTF-16, UTF-8, Win-1251 ничего не помогает. Один вариант в ASCII lat. передавать транслитерацией. Но это не удобно.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
I don't think there is any problem with VoxCommando or the way it handles TTSMS or payloads.

Maybe you are trying to edit XML using another program.  You must use VoxCommando's tools to edit your commands and payloadXML files.

When testing commands with payloads you must say the command.  Clicking the test button when editing a commands will not work because it will not know what payload to use.

Here is a command group using payload lists and payload XML which works correctly.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.3.4-->
<commandGroup open="True" name="tts ms test in russian" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="154" name="скажи {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTSMS.Speak</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>скажи</phrase>
    <payloadList>привет, до свидания</payloadList>
  </command>
  <command id="158" name="Повторяю {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTSMS.Speak</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Повторяю</phrase>
    <payloadFromXML phraseOnly="True" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">tts payload.xml</payloadFromXML>
  </command>
</commandGroup>

The payloadXML file used by this group is attached below.

I will upload a video in a few minutes to demonstrate that this is working correctly.  You can also find examples of correctly formatted commands and payloads in the Russian Kodi configuration that comes with VoxCommando.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
If the problem is that you want to automatically generate payload files from a text file instead of using the program's editor, that is also possible.

Here is an example.

The first command reads a text file ("Простой список слов.txt"), and creates a payload xml file.
The second command uses the payload xml file.

To test the command, you must edit the file path in the first command, so that it knows where the file Простой список слов.txt is located on your computer.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.3.5-->
<commandGroup open="True" name="Автоматически создавать PAYLOAD XML файлы" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="82" name="Автоматически создавать PAYLOAD XML файл" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>File.Read</cmdType>
      <params>
        <param>C:\Users\ваш путь файла...\Простой список слов.txt</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>(.+)\t(.+)</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.MatchToXML</cmdType>
      <params>
        <param>Разговорник.xml</param>
        <param>True</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Автоматически создавать файл</phrase>
  </command>
  <command id="91" name="Как сказать {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTSMS.Speak</cmdType>
      <params>
        <param>{PF.1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{PF.1} на английском:</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.AddText</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Как сказать</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">Разговорник.xml</payloadFromXML>
  </command>
</commandGroup>

You can copy XML code from the forum and paste it directly into your tree in the VoxCommando editor. Do not try to edit the "voicecommands.xml" file manually. This usually causes errors.

The text file "Простой слов.txt список.txt" is attached to this forum message.
« Last Edit: March 07, 2017, 09:52:04 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)

Вячеслав

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Я совсем недавно пользуюсь этой программой и даже не знаю как редактировать xml или использовать собственные xml  :(
Данные payload в виде строки, я получаю из TCP.Server (Client-> Crestron controller)


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
I do not understand the question. I hope someone who speaks Russian and knows how to use VoxCommando can help you.