Search Unity

RT-Voice - Run-time text-to-speech solution

Discussion in 'Assets and Asset Store' started by Stefan-Laubenberger, Jul 10, 2015.

  1. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    374
    Oh, sorry.
    Downloadable demo.

    I am a "fan" customer of your products and wanted to try this one to see if it meets my needs.

    Thanks!
     
  2. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Ok, I see...
    Please send me the your invoice and we will provide you with a fix :)
     
  3. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hmm, the demo maybe needs an update ;)
    We will update it soon.

    However, please be assured it works.
    If you have any additional questions, don't hesitate to ask.


    Edit:
    I just run the Windows demo with 2020.1.5 and it works fine. Have you the correct credentials (=api key) for Google Speech API?
     
  4. chibixi

    chibixi

    Joined:
    May 11, 2017
    Posts:
    11
    Hi @Stefan-Laubenberger! Sorry for the late reply! I ended up testing this out and it did indeed create the wav file but I got an error on the line Crosstales.RTVoice.Util.WavMaster.ToAudioClip(path) with the following error message: Detected format code '3' IEEE, but only PCM and WaveFormatExtensable uncompressed formats are currently supported. No sound ends up getting played.

    The file was generated as generatedClip.wav file (with the correct contents) in my Library folder on my Mac in the right place (Application.persistentDataPath) so I'm not sure how to fix the error since it seems to be in the right format. Thanks!
    Jenny
     
    Last edited: Oct 17, 2020
  5. chibixi

    chibixi

    Joined:
    May 11, 2017
    Posts:
    11
    Hi @Stefan-Laubenberger, Is there a way to generate an audio clip using the Speak method with RT Voice sound data on iOS? Or is that only available on Android too? I was using
    Code (CSharp):
    1. Crosstales.RTVoice.Speaker.Instance.Speak(text, Source, voices.Voice, false,1,1,1,"",true);
    and trying to get the data stored in the Source after the generation was complete.

    My goal is to be able to get an AudioClip with the sound data generated from RT Voice and wasn't sure how to do that on iOS, is the only way to use an online service like MaryTTS or Azure or Google Cloud voice and to get the data from the wav file generated? Or is there another way? And also is there any sample code you can provide for using one of the online services?
     
  6. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hello Jenny

    We have to find a solution for the problem you experiencing. We switched from AIFF to WAV on macOS - maybe we have to go back...

    About your second post: MaryTTS is built into the Speaker-component and is read to use. For the other providers, please take a look in the folder "3rd party" - there are custom providers for AWS Polly etc.
    They can be used like the standard provider, just add valid credentials.

    I hope this helps you further.


    Cheers
    Stefan
     
  7. chibixi

    chibixi

    Joined:
    May 11, 2017
    Posts:
    11
    Thanks @Stefan-Laubenberger! How would I enable calling MaryTTS and getting the generated audio into an AudioClip in Unity? Is there a code snippet I can refer to? Thanks so much for the quick response!
     
  8. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    You could use it like that:
    Code (CSharp):
    1. string audioFile =  Application.persistentDataPath + "/myAudioFile"; //path and file (without extension)
    2.  
    3. Crosstales.RTVoice.Speaker.Instance.Speak(text, Source, voices.Voice, false,1,1,1,audioFile,true);
    Is that answering your question?
     
  9. chibixi

    chibixi

    Joined:
    May 11, 2017
    Posts:
    11
    Thanks @Stefan-Laubenberger !

    I tried out that code on iOS and got an error saying that the file couldn't be found when I used the following:
    Code (CSharp):
    1.  
    2.  
    3. string audioFile = Application.persistentDataPath + "/myAudioFile"; //path and file (without extension)
    4. Crosstales.RTVoice.Speaker.Instance.Speak(text, Source, voices.Voice, false,1,1,1,audioFile,true);
    5. path = audioFile + ".wav";
    6.  
    7. private void onSpeakAudioGenerationComplete(Crosstales.RTVoice.Model.Wrapper wrapper)
    8. {
    9.           Source.clip = Crosstales.RTVoice.Util.WavMaster.ToAudioClip(path);
    10.           Source.Play();
    11. }
    12.        
    Do you know if I'd need to set up my own MaryTTS server for this to work on iOS? And also where is the MaryTTS server config set up? Is that on the RTVoice prefab object in the scene?

    Thanks again for your quick replies!
     
  10. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    To use MaryTTS, enable it on the RT-Voice-prefab:
    upload_2020-10-18_19-34-49.png

    You have to setup your own MaryTTS-server - there is a description in our "Documentation"-folder.
    We also provide access to our test-server during the development phase of your product. If you like to have access, send me the desired username and invoice via email.
     
  11. chibixi

    chibixi

    Joined:
    May 11, 2017
    Posts:
    11
    Thanks @Stefan-Laubenberger ! I emailed you the username and will add the RTVoice prefab set up, thanks!
     
  12. Olkan

    Olkan

    Joined:
    Nov 17, 2016
    Posts:
    13
    Hello,

    Could you please help me with this?

    How could i add more than one RTVoice dynamically to a scene?
    I need to be able to have multiple speakers running at the same time.
     
  13. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi Olkan

    You don't need multiple instances of RT-Voice.
    Just call "Speak" whenever you need to and use the returned UID to differentiate every speech.

    I hope this helps you further.


    Cheers
    Stefan
     
  14. Olkan

    Olkan

    Joined:
    Nov 17, 2016
    Posts:
    13

    Hi Stefan,
    Thank you for the fast reply :)

    Got it. Used the UID, Thanks
     
    Last edited: Oct 22, 2020
    Stefan-Laubenberger likes this.
  15. sheenakawai

    sheenakawai

    Joined:
    Jun 19, 2019
    Posts:
    2
    Hello Stefan,
    I would like to ask why OnReady is called twice when the program starts.

    Thanks
     
  16. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    Are you using the latest version 2020.4.3 of RT-Voice?


    So long,
    Stefan
     
  17. sheenakawai

    sheenakawai

    Joined:
    Jun 19, 2019
    Posts:
    2
    Hi Stefan
    Updated to version 2020.4.3, which solved my problem.

    Thank you.
    Sheena
     
    Stefan-Laubenberger likes this.
  18. Zhl749831455

    Zhl749831455

    Joined:
    Oct 29, 2020
    Posts:
    2
    • Hello I used the plugin in Unity2019 on Linux playform.There was always an
      error message that"No OS Voices found -- TTS Not Possible!".please tell me how to
      solve the problem. Thanks
     
  19. chgeorgiadis

    chgeorgiadis

    Joined:
    Jan 30, 2018
    Posts:
    51
    After a long time i have to resume for my Android problem: my problem is i have two avatars, one male and one female, on different scenes and when i run it on Android the gender voices are.. random. ( i am using it along with Salsa) How can i fix that? For now i am using :

    Code (CSharp):
    1. Speaker.Speak(speakText.text, audioSrc, Speaker.VoiceForGender(Crosstales.RTVoice.Model.Enum.Gender.MALE, "en", 0));
    and the similar for female:

    Code (CSharp):
    1.  Speaker.Speak(speakText.text, audioSrc, Speaker.VoiceForGender(Crosstales.RTVoice.Model.Enum.Gender.FEMALE, "en", 0));
    So i actually can not define the corresponding gender voice and it's kind of random. :( (on Windows works fine)
     
  20. npeiffer

    npeiffer

    Joined:
    Sep 8, 2017
    Posts:
    2
    We're using RT-Voice 2020.4.3 in Unity 2018.4.28f. When building to an iPad running iOS 14.1, no voices are returned when calling:

    Code (CSharp):
    1. var voices = Speaker.Instance.VoicesForCulture("en", true);
    We were able to log this warning, which appears to be triggered in the method Crosstales.RTVoice.Provider.VoiceProviderIOS:SetVoices(String):
    "warning: Voice-string contains wrong number of elements!"

    Are there any known issues with RT-Voice and iOS 14.1?
     
  21. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Have you installed eSpeak? For more, please see chapter 7 of the documentation:
    https://www.crosstales.com/media/data/assets/rtvoice/RTVoice-doc.pdf
     
  22. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    Are you waiting for the "OnVoiceReady"-callback before calling "Speak"?
    However, Android also doesn't provide the gender, so we have to guess it depending on the name and most likely, RT-Voice can't determine the gender under Android and it ends up as "Unknown"...
    Blame Android for that :)


    Cheers
    Stefan
     
    chgeorgiadis likes this.
  23. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    We weren't aware of any issues under iOS 14.
    However, we did an improvement of the provider, please send us your invoice via email and we will give you access to the latest version.


    So long,
    Stefan
     
  24. chgeorgiadis

    chgeorgiadis

    Joined:
    Jan 30, 2018
    Posts:
    51
    Is there any work around for android? I have a specific text for speech. a) generated audio? b) if i'll use google cloud speech for text-to-speech can i define the gender ?

    Also, if i want to use it in a specific device could i use the 01-Speech demo, note two voices that i want and "hardcoded" to Speak in the name?

    Thank you!
     
    Last edited: Oct 29, 2020
  25. npeiffer

    npeiffer

    Joined:
    Sep 8, 2017
    Posts:
    2
    Stefan pointed me to this post, which fixed our issue with iOS not returning any voices:

    https://forum.unity.com/threads/rt-...o-speech-solution.340046/page-27#post-6393718

    Thanks for the quick responses, Stefan.
     
    Stefan-Laubenberger likes this.
  26. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Yes, you could pre-generate all necessary speeches.
    The Google Cloud provider has the correct genders.

    I hope this helps you further.
     
    chgeorgiadis likes this.
  27. Zhl749831455

    Zhl749831455

    Joined:
    Oct 29, 2020
    Posts:
    2
    Hello

    Stefan

    I installed GeSpeaker on my computer according to your suggestion.However when I ran the program, I found that it didn't play Chinese. When I click play menu,it said"Chinese later later later......".Then, I chose the Mandarin option,there was an error message that “Could not speak the text”.I took a screenshot of the error message.I want to know if the plugin can not Support Chinese playback on Linux platform.

    Thanks!
     

    Attached Files:

  28. chgeorgiadis

    chgeorgiadis

    Joined:
    Jan 30, 2018
    Posts:
    51
    Yes thank you! i will try asap. Is that possible to add voices to an android mobile device in order to define which one to use by name? (just for the device of course) And then i will define the corresponding gender names/avatars.
     
  29. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    You're right, the old eSpeak-version doesn't work with Chinese (despite it claims it has the voices).
    Therefore, please install eSpeak-NG:
    https://github.com/espeak-ng/espeak-ng

    Then wait until version 2020.4.4 of RT-Voice is released - the new version will add support for eSpeak inside the Editor ;)
    This should hopefully be the case in a few hours...


    Cheers
    Stefan



    Edit:
    The new version 2020.4.4 is in the store!
     
    Last edited: Oct 30, 2020
  30. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    I'm not totally sure that I understand you correctly, but there is the method "VoiceForName" in the Speaker.
    Does that help?
     
  31. masai2k

    masai2k

    Joined:
    Mar 2, 2013
    Posts:
    45
    Hi,
    I would use the new timepoints option for Google TTS. Do you intend to implement timepoints in a future version of RT VOICE? Or could you help me to add this option to Google TTS?

    thanks
    Massimo
     
  32. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi Massimo

    Are you talking about the cloud or the Android-provider?


    Cheers
    Stefan
     
  33. masai2k

    masai2k

    Joined:
    Mar 2, 2013
    Posts:
    45
  34. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
  35. Boliver0482

    Boliver0482

    Joined:
    Oct 19, 2019
    Posts:
    45
    Hello. Has something changed I've missed, having issues upgrading to the latest version. Or am I being a muppet (most likely scenario)?

    Following updating via the instructions in the manual, I get the following for any use of the Speaker method....

    An object reference is required for the non-static field, method, or property 'Speaker.Silence(string)'


    For example, this is returned for...

    Speaker.Silence();


    or on...
    Speaker.Speak(messageTTSText, source1, Speaker.VoiceForName(AppManager.Instance.selectedVoiceForOtherPlane));


    With the bits I've put in bold throwing the error.

    I've attempted the upgrade and rolled back a few times now.

    Thanks.
     
  36. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    We removed all static methods and properties in version 2020.4.0.
    Therefore, you have to use the static "Instance" property, e.g.:

    Speaker.Instance.Silence();

    I hope this solves the issues.


    Cheers
    Stefan
     
  37. Boliver0482

    Boliver0482

    Joined:
    Oct 19, 2019
    Posts:
    45
    Fixed - Quick and on the money as always. Thanks.
     
    Stefan-Laubenberger likes this.
  38. davidmorenocode

    davidmorenocode

    Joined:
    Nov 3, 2020
    Posts:
    1
    Hola, tengo una duda, soy nuevo con esto.

    Mi desarrollo es en WebGl, quisiera saber que al ser web, debo aun asi tener un servicio en tts de google o algo parecido, o si únicamente al comprar el plugin este ya incluye las voces y no tengo que pagar otro servicio.
     
  39. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hola David

    Desafortunadamente, no hablo español, así que usé un traductor.

    RT-Voice funciona en WebGL con diferentes proveedores:
    1. MaryTTS (open-source)
    2. Google TTS: https://assetstore.unity.com/packages/slug/115170?aid=1011lNGT
    3. WebGL Speech: https://assetstore.unity.com/packages/slug/81861?aid=1011lNGT
    Para 2 y 3, se debe comprar el activo correspondiente.

    Espero que eso responda a su pregunta.


    Saludos
    Stefan
     
  40. dam54

    dam54

    Joined:
    Sep 21, 2013
    Posts:
    12
    Hello, I just purchased RT_Voice, latest version 2020.4.4, and was going through the demos when I encountered the following missing package errors in the Loudspeakers demo. I had installed the Common/UI as directed, is there something else I'm missing? Thanks!
    RTVoiceError.JPG
     
  41. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    You need the Unity Standard Assets to get rid of the issues.


    Cheers
    Stefan
     
  42. dam54

    dam54

    Joined:
    Sep 21, 2013
    Posts:
    12
    Thanks for the super quick response!

    I did have the Unity Standard Assets package installed, and I even reimported it with no luck.

    After your response, I deleted the entire folder and then imported it again and all is well!

    Thanks!
     
    Stefan-Laubenberger likes this.
  43. liujsinzer

    liujsinzer

    Joined:
    Jun 13, 2020
    Posts:
    1
    I only see Voices(2) on Speaker(script) on inspector , How can I use other Voice , and Custom Voice provider , I donot know How to use , and I am not Speak english .wait your answer , thank you!
     
  44. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    You have two options:
    1. Add additional voices (see chapter 6 of the documentation)
    2. Add a provider like MaryTTS, AWS Polly, Azure or Google Cloud. They are located in the "3rd party"-folder.
    I hope this helps you further.

    Cheers
    Stefan
     
  45. Boliver0482

    Boliver0482

    Joined:
    Oct 19, 2019
    Posts:
    45
    Checked the documentation and it not listed, but thought may be worthwhile asking. As the various Siri voices on iOS generally sound better than the others, is it possible to use these with RTV Pro? Many Thanks,
     
  46. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    Unfortunately, I don't own an iOS device, so I can't verify it atm.
    Therefore my temporary wisdom: if the voices show up in a build, you can use them, otherwise not ;)
    I will check it asap but I can't give an ETA.


    Cheers
    Stefan
     
  47. Boliver0482

    Boliver0482

    Joined:
    Oct 19, 2019
    Posts:
    45
    Thanks Stefan,

    They don’t appear for me. Was just wondering if I had been doing something wrong. Presume just apple being apple and preventing things for no apparent reason.

    Cheers,
     
    Stefan-Laubenberger likes this.
  48. TDF_Dev

    TDF_Dev

    Joined:
    May 21, 2019
    Posts:
    2
    Hi.

    I have some questions about this asset.
    First of all, I would like to know the types of languages supported.

    And I'd like to know which plugin to use.
    Among other assets in the Asset Store, I had to pay for it using Google TTS.
    If I use this asset, is there anything I have to pay per transaction?
    If so, where can I find information about the amount I have to pay?


    Thank you.
     
  49. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    Thank you for your interest in RT-Voice!

    Here are the answers to your questions:
    1. All languages are supported as long as there is a voice available. For an overview of some of the more prominent voice providers, see chapter 17 of the documentation.
    2. Our asset uses per default the free available voices of the build platform. If you want to have the exact same voices everywhere, you have to use an online provider. RTV supports MaryTTS, which is open source and therefore free of charges. There are also the options to use AWS Polly, Azure or GoogleTTS, which have different cost models. Most offer thousands (if not millions) of characters on their free-tier. For more information, please check the services you like to use.
    I hope this helps you further.


    Cheers
    Stefan
     
  50. masai2k

    masai2k

    Joined:
    Mar 2, 2013
    Posts:
    45
    Hi Stefan,
    I have problems with pitch in GoogleTTS: the default range for this TTS is 0, and the range is from -10 (or less) to -10(or more). But the Pitch wrapper Clamp the pitch value from 0 to 2. I modify these values by myself, but I suppose other users had the same problem. And by the way, the default pitch value is 0, not 1 as the default RT voice pro value. So every time I start one GoogleTTS voice, it has a little increment in the pitch value (from 0 to 1).

    Thanks
    Massimo