Author Topic: Realtime audio effects in TTS plug-in  (Read 3139 times)

0 Members and 1 Guest are viewing this topic.

TEOCOSMO

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Realtime audio effects in TTS plug-in
« on: May 14, 2016, 01:07:07 AM »
   Здравствуйте. Вы наверное в курсе, что для голосового управления в играх таких, как Elite Dangerous или Star Citizen, многие используют VoxCommando или Voice Attack. Многие докупают к ним Voice Packs с уже записанными ответами, к примеру http://hcsvoicepacks.com/ Но ничто не сравниться со свободой в генерации фраз с помощью TTS плагинов к этим программам. И те, кто хочет погружаться в атмосферу игры, вначале генерируют эти фразы в программах для чтения вслух, к примеру TextAloud, конвертируют их в .wav и обрабатывают с добавление звукового эффекта в звуковых редакторах, к примеру Sound Forge. Но это очень не удобно, к примеру если захочется добавить или изменить фразы, приходиться делать всё снова и снова.
   Было бы очень здорово, и это было бы вашим огромным преимуществом над Voice Attack, добавить в плагин TTS эффекты в реальном времени, такие как Reverb, Echo и т.п. Я видел пример такой возможности здесь: 
https://www.vocalware.com/index/demo
   Вы уже и так дали нам огромное количество возможностей и вариантов использования VoxCommando, за что вам огромное спасибо. Лично я купил VoxCommando, так как он потрясающий!

   Hello. You probably know that the voice control in games such as Elite Dangerous and Star Citizen, many use VoxCommando or Voice Attack. Many of them buy more Voice Packs with recorded answers, for example http://hcsvoicepacks.com/ But nothing compares with the freedom to generate phrases by using TTS plugin to these programs. And those who want to plunge into the atmosphere of the game, first generate these phrases to read aloud programs, such as TextAloud, convert them into .wav and treated with the addition of sound in a sound editor, such as Sound Forge. But this is not very convenient, for example if you want to add or change a phrase, have to do everything all over again.
   It would be very cool, and it would be your great advantages over Voice Attack, add in plug-in TTS realtime audio effects, such as Reverb, Echo, etc. I have seen an example of this possibility here:
https://www.vocalware.com/index/demo
   You already gave us so many possibilities and use cases VoxCommando, for which many thanks to you. Personally, I bought VoxCommando, as it is amazing! I apologize if there are errors in the text, I translated the text through a translator.
« Last Edit: May 14, 2016, 02:23:33 AM by TEOCOSMO »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Realtime audio effects in TTS plug-in
« Reply #1 on: May 14, 2016, 10:03:58 AM »
Hi TEOCOSMO and welcome to VoxCommando.

Thanks for your positive feedback and your suggestion.

It sounds like it might be quite a challenge for me to implement this TTS reverb idea, but I will look into it to see if there is anything I can do.

If you can find a commandline program that will play .wav files with an audio effect then you can use the TTS.Speak2Wav action and then Launch to play it with effects.

http://voxcommando.com/mediawiki/index.php?title=Plugin_TTS#Speak2Wav

http://voxcommando.com/mediawiki/index.php?title=Actions#RawParam
« Last Edit: May 14, 2016, 11:23:39 AM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Realtime audio effects in TTS plug-in
« Reply #2 on: May 14, 2016, 05:18:16 PM »
Here is an example, which uses the soX command line utility.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.7-->
<commandGroup open="True" name="TTS effects with soX" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="203" name="Add echo to TTS" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Speak2Wav</cmdType>
      <params>
        <param>Target acquired.</param>
        <param>tts-effects\tts.wav</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Launch.Hidden</cmdType>
      <params>
        <param>{Path.PFx86}\sox-14-4-2\sox.exe</param>
        <param>"{Path.VC}\tts-effects\tts.wav" -t waveaudio gain 8 pad 0 1 echo 0.8 0.88 60 0.4</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>add echo</phrase>
  </command>
  <command id="196" name="Add reverb to TTS" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Speak2Wav</cmdType>
      <params>
        <param>You are feeling very sleepy</param>
        <param>tts-effects\tts.wav</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Launch.Hidden</cmdType>
      <params>
        <param>{Path.PFx86}\sox-14-4-2\sox.exe</param>
        <param>"{Path.VC}\tts-effects\tts.wav" -t waveaudio gain 1 pad 0 1 reverb</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>add reverb</phrase>
  </command>
</commandGroup>

soX can be downloaded here: https://sourceforge.net/projects/sox/files/sox/

The command line parameters for soX are not simple, but there are a lot of Russian Star Citizen and Elite Dangerous players so maybe all of you can help one another.

Here is some documentation for soX: http://sox.sourceforge.net/sox.html

It is a popular tool, so maybe there are Russian resources online also.
« Last Edit: May 14, 2016, 05:20:39 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)

TEOCOSMO

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Realtime audio effects in TTS plug-in
« Reply #3 on: May 15, 2016, 11:08:07 AM »
Thank you very much, it can serve as a good temporary solution!