Search Unity

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

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

  1. Boliver0482

    Boliver0482

    Joined:
    Oct 19, 2019
    Posts:
    38
    No problem Stefan. Enjoy your break. If however, you have an idea and want something tested, just let me know.


    Bob.
     
    Stefan-Laubenberger likes this.
  2. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,746
    Hi Bob

    Thank you very much for offering your help!
    I've just sent you a new version of the iOS-integration.


    So long,
    Stefan
     
  3. elupinski

    elupinski

    Joined:
    Aug 21, 2020
    Posts:
    4
    Hello,

    I'm getting a lot of compiler errors with the Speaker class. Trying to use any of the functions without declaring a public Speaker object gives compiler errors. For example, if I were to just type Speaker.Speak(), I would get errors until I did:

    Code (CSharp):
    1. public Speaker speaker;
    2. speaker.Speak(....);
    Im currently using RT-Voice alongside Pixel Crusher's Dialogue System. Their RT-Voice support unitypackage is giving a lot of errors because of this issue. Any help or guidance on resolving this issue would be much appreciated, as I don't want to meddle too much in the support package if I can help it.

    EDIT: The code error reads: "CS0120: An object reference is required for the non-static field, method or property 'Speaker.Speak(string, AudioSource, Voice, bool, float, float, float, string, bool)'

    For all other functions under the Speaker class, the error is the same. Just listing the respective function that is being called.
     
    Last edited: May 10, 2021
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,704
    I'll take a look at this shortly. The integration package may need to be updated slightly for the latest version of RT-Voice.
     
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,704
    @elupinski - Are you using an older version of RT-Voice? I just double checked that the Dialogue System's integration package works correctly with RT-Voice 2021.2.4. If possible, please back up your project first, and then try importing the latest versions of RT-Voice, Dialogue System, and the integration. After updating RT-Voice, check its README file to make sure the Package Manager correctly downloaded version 2021.2.4.
     
  6. elupinski

    elupinski

    Joined:
    Aug 21, 2020
    Posts:
    4
    Im currently using this package from their website. It was the only one I could find, as a link that I found in one of their forums was broken. Im currently running 2021.2.3 edition of RT-Voice. I'll try giving it an update and see if the issue resolves.
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,704
    The Dialogue System's latest RT-Voice Support package gets imported with Dialogue System version 2.2.16. It's in Assets / Plugins / Pixel Crushers / Dialogue System / Third Party Support.
     
  8. elupinski

    elupinski

    Joined:
    Aug 21, 2020
    Posts:
    4
    Im currently running version 2.2.9 of The Dialogue System. However, it does import the support package to that location. Everything else is in order, the bugs are originating from the Speaker class. I'm reaching out to a team member to update the package at the moment.
     
  9. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,746
    Hello

    The methods of the Speaker-class are no longer static, but the Speaker is still a singleton.
    To access a method, like "Speak", you have to use it like "Speaker.Instance.Speak".

    Please update DS to 2.2.16 to solve the issues.

    I hope this helps you further.


    Cheers
    Stefan
     
    TonyLi likes this.
  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,704
    @elupinski - I PM'ed you the "RTVoice Support" package included in DS 2.2.16.
     
    Stefan-Laubenberger likes this.
  11. elupinski

    elupinski

    Joined:
    Aug 21, 2020
    Posts:
    4
    @Stefan-Laubenberger @TonyLi I got RT-Voice updated and the new package imported into the project (thanks for PM'ing me the new package by the way!). All errors have cleared up and things seem to be good again. Thank you so much for the support!
     
    TonyLi and Stefan-Laubenberger like this.
  12. XyrisKenn

    XyrisKenn

    Joined:
    Dec 8, 2015
    Posts:
    50
    Just checking, is Mary TTS still an option in the latest release?
     
  13. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Sure, it's still an available option.
    We simply moved it to the "Extras"-folder.


    Cheers
    Stefan
     
    XyrisKenn likes this.
  14. XyrisKenn

    XyrisKenn

    Joined:
    Dec 8, 2015
    Posts:
    50
    Awesome, I found it!
    My plan is to update the Salsa-RTVoice script to use Mary TTS instead of native. Is that a plausible approach?

    [edit] it works! Speaker remains the instance and Mary is designated in Unity as the provider.
    Nicely organized and made!

    Code (CSharp):
    1. public void SpeakMary(string speakString)
    2.         {
    3.             Speaker.Instance.Speak(speakString, audioSrc, Speaker.Instance.VoiceForName("enst-camille", false));
    4.         }
     
    Last edited: May 21, 2021
    Stefan-Laubenberger likes this.
  15. cdaniel09

    cdaniel09

    Joined:
    Jun 10, 2016
    Posts:
    5
    Is there any guide for getting this running on Quest 2 or Android? I'm having some issues and not sure if my config is correct.
    Setup a test scene/project and setup OVR and created empty object with basic TTS script. RTVoice, VoiceInitializer = android

    In RTVoice I now see -- current platform is not supported - use MaryTTS etc....
    Can MaryTTS be setup in Quest/Android? what is best for this application?
    Build was fine no issues but launch fails to render.
    I've read the manuals etc. did I miss something?
     
  16. Stefan-Laubenberger

    Stefan-Laubenberger

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

    The Quest 2 has no longer a TTS installed and the only way to use RT-Voice is with an online service like MaryTTS (open-source), Azure, AWS Polly or Google Cloud.


    Cheers
    Stefan
     
  17. gamefox87

    gamefox87

    Joined:
    Aug 19, 2016
    Posts:
    57
    Hi there,

    I am interested in getting this plugin but I have a few questions. It is compatible with AWS Polly and Google Cloud APIs, but both of those have their own cost to use the API. The package after purchasing, can be used but is there a solution which allows us to use the API for free? We want to use it in our game for people to read information, mainly to increase accessibility for visually impaired.
     
  18. Stefan-Laubenberger

    Stefan-Laubenberger

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

    All those cloud services offer a free tier with afaik 1mio chars per month.
    Apart from that, you could use MaryTTS which is an open-source solution.


    Cheers
    Stefan
     
  19. AndiGXR

    AndiGXR

    Joined:
    Jun 8, 2021
    Posts:
    2
    Hello! I am having trouble running RT Voice Pro with Android and trying to open the MaryTTS demo.

    I see a lot of missing prefabs upon opening it though. How do I resolve this issue? Is there something I am missing?
     
  20. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,746
    Please also extract the Demos.unitypackage.
     
  21. AndiGXR

    AndiGXR

    Joined:
    Jun 8, 2021
    Posts:
    2
    Thank you that worked!
     
    Stefan-Laubenberger likes this.
  22. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    197
    I have Adventure Creator installed but I'm getting this error

    "The type or namespace name 'AC' could not be found (are you missing a using directive or an assembly reference?)"
     
  23. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Have you followed the README, which says:

    Please make sure that the "AdventureCreator"-folder is inside "Assets/Plugins". If not, please move it there.


    Cheers
    Stefan
     
  24. hjeeves

    hjeeves

    Joined:
    Feb 24, 2021
    Posts:
    1
    Hello:

    I'm new to Unity and RT Voice, working on a project that uses RTVoice successfully on Windows and Android. I'm tasked with getting it working on iOS. We've got:
    - Unity 2020.3.4f1
    - RTVoice 2019.4.0

    An example error (as seen in the xCode debugger for an iOS simulator):

    'voiceProvider' is null!

    Did you add the 'RTVoice'-prefab to the current scene?

    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])

    UnityEngine.Logger:Log(LogType, Object)

    UnityEngine.Debug:LogWarning(Object)

    Crosstales.RTVoice.Speaker:logVPIsNull()

    Crosstales.RTVoice.Speaker:Silence()

    The answer to the first question 'Did you ad RTVoice-prefab to the current scene' is no. To make this work for Android, an RT Package is imported into a .cs script, and that's included in the main scene. Seems to be enough for Android. How can I make this work on iOS? Or can I? Does RT Voice have to be imported into *every* scene?

    Thanks,

    Helena
     
  25. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,746
    Hi Helena

    You are using a version that's two years behind the current one.
    There are many improvements and changes, as you can see here:
    https://crosstales.com//media/data/assets/rtvoice/VERSIONS.txt

    Please update to the latest version 2021.2.7 and try it again.


    Cheers
    Stefan
     
  26. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,746
    Dear Oculus Quest developers

    Since many of you like to have TTS on their VR device, I'd like to clarify the situation.

    The Quest 1 has the "Pico"-engine installed - while it's not great, at least it offers offline TTS.
    On the other hand the Quest 2 has no TTS-engine installed:
    https://forums.oculusvr.com/developer/discussion/78403/oculus-quest-text-to-speech

    This means, Quest 2 needs either Klattersynth (which doesn't sound great), pre-generated speech audio or an Internet connection in combination with one of the supported online services, like MaryTTS (free and open-source), Azure, AWS Polly or Google Cloud.


    Cheers
    Stefan
     
  27. a1016345213

    a1016345213

    Joined:
    Jul 26, 2021
    Posts:
    3
    Hello, I am now try RT-Voice to my TTS.
    But I have found that the callback event "OnSpeakCurrentWord" is not fit when it reads Chinese sentences,the parameters called "speechTextArray" and "wordIndex" is wrong.I read the documentation but not found something for dealing with it.Please help me,thx
     
    Last edited: Jul 26, 2021
  28. korober

    korober

    Joined:
    Jan 20, 2015
    Posts:
    10
    Hi, I have 7 crashes, can you see stacktrace and try fix it? Here are screenshots from google play console with stack traces.
     
  29. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Unfortunately, we don't speak Chinese and don't know what's exactly wrong.
    Can you please tell me more? Can you give me an example sentence to explain how it should work?
    Thank you!


    Cheers
    Stefan
     
  30. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Please send us an email with your invoice and we will give you access to a fix.


    Cheers
    Stefan
     
  31. a1016345213

    a1016345213

    Joined:
    Jul 26, 2021
    Posts:
    3
    oh,can't post Chinese character ,I upload my example as a File. In addition I find SAPI can do it well but when I use the event in unity,It crashes……It made me mad aaaaaahhhhhh!
     

    Attached Files:

  32. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,746
    Please send me an email with the text (we can't write Chinese), the Unity version, RT-Voice version and the invoice.

    Furthermore, be aware that the marking of the current word is only supported under Windows Standalone and iOS - if it's even possible to support non-latin based languages for this particular feature.


    Cheers
    Stefan
     
  33. korober

    korober

    Joined:
    Jan 20, 2015
    Posts:
    10
    Thank you, done!
     
  34. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,746
    We checked the current implementation and it will only work with languages that are using spaces to divide the words.
    But we created a new callback "OnSpeakCurrentWordString" which will return the current word as string.
    This will be part of the upcoming update.
     
    unity_uCAh1YGgjxXPOw likes this.
  35. mb13admin

    mb13admin

    Joined:
    May 28, 2017
    Posts:
    18
    On Samsung, there are 2 engines Samsung TTS and Google TTS
    And Samsung TTS is the default one.
    Can RTVoice speak with Google TTS without telling users to open system settings and switch to google TTS?
    We are encountering issues that on some samsung devices, Samsung TTS speak the words incorrectly or adding some extra words when speaking
     
  36. Stefan-Laubenberger

    Stefan-Laubenberger

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

    You can get all installed Android TTS engines with "Speaker.Instance.Engines" and set the desired one with "Speaker.Instance.AndroidSpeechEngine".

    I hope this helps you further.


    Cheers
    Stefan
     
  37. mb13admin

    mb13admin

    Joined:
    May 28, 2017
    Posts:
    18
    We are also experiencing many crashes on android using RTVoice

    at com.crosstales.RTVoice.RTVoiceAndroidBridge$1.onInit (RTVoiceAndroidBridge.java:355) at android.speech.tts.TextToSpeech.dispatchOnInit (TextToSpeech.java:863) at android.speech.tts.TextToSpeech.access$800 (TextToSpeech.java:77) at android.speech.tts.TextToSpeech$Connection$SetupConnectionAsyncTask.onPostExecute (TextToSpeech.java:2226) at android.speech.tts.TextToSpeech$Connection$SetupConnectionAsyncTask.onPostExecute (TextToSpeech.java:2181) at android.os.AsyncTask.finish (AsyncTask.java:771) at android.os.AsyncTask.access$900 (AsyncTask.java:199) at android.os.AsyncTask$InternalHandler.handleMessage (AsyncTask.java:788) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:246) at android.app.ActivityThread.main (ActivityThread.java:8587) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)

    We've been reported 23 crashes last week on Samsung Galaxy Note 8, Note 10, Note 20, Galaxy S21 Ultra with Android 9, 10 and 11
    FYI: we are using built-in Google TTS with latest RTVoice version
    Can you have a look at this?

    Thank you!
     
    Last edited: Aug 20, 2021
  38. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Thank you for your report! Unfortunately, it's always the Samsung phones that cause problem with tts...:(
    Anyway, please send us your invoice via email and we will provide you with a fix.


    So long,
    Stefan
     
    Last edited: Aug 22, 2021
  39. mb13admin

    mb13admin

    Joined:
    May 28, 2017
    Posts:
    18
    Hi there,
    I'm using my personal account to raise this issue
    But my team has purchased RTVoice for our business account and I'll ask my lead dev to send you an email with an invoice attached.
    Cheers
     
  40. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    50
    Hi I recently got around to using RT-Voice and hit a dead end while trying to change the voice to male for android platforms. Is there a way to get more voices for the android? also I read up on the documentation on using third party tts like espeak and I've installed it on my pc but have no clue what files to utilize from it or how to get male voices from espeak. It would be nice if there were some in-depth guides or video to follow on how to add new voices per platforms.

    If anyone has any information on how all this TTS works with unity please let me know. I want to use more than one or similar voices throughout Andriod and iOS.

    Thank you!
     
    Last edited: Aug 26, 2021
  41. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Android has more than 200 voices, many are female (around 2/3) but there are also male voices for every language available.
    The problem is that Android does not provide the gender of a voice, so RT-Voice can't determine it either and labels it as "UNKNOWN".
    Therefore, you have to look for voices that work for your case, e.g. with our demo "01-Speech", and then use the "Speaker.Instance.VoiceForName"-method to select it.
    In English, 10 out of 32 are male voices under Android 11:
    • en-au-x-aub-local
    • en-au-x-aud-local
    • en-gb-x-gbb-local
    • en-gb-x-gbd-local
    • en-gb-x-rjs-local
    • en-in-x-end-local
    • en-in-x-ene-local
    • en-us-x-iol-local
    • en-us-x-iom-local
    • en-us-x-tpd-local
    I would not recommend eSpeak since imho it's quality is subpar.
    If you are unhappy with the built-in voices, try using a cloud provider like AWS Polly, Azure or Google Cloud.

    I hope this helps you further.


    Cheers
    Stefan


    Edit:
    We try to write a detection for the next release based on the name of the voice, but this detection won't be 100% accurate for all languages
     
    Last edited: Aug 26, 2021
  42. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    50
    Hi Stefan,

    I'm still a bit confused with what I should be doing to get the male voices. Am I supposed to enter "en-us-x-tpd-local" using a script? I'm using playmaker to handle the logic, I'm not the best programmer so I don't know C#.

    Also, I can't find the "01-Speech" demo in unity. All I found was SpeechText demo scene which has errors located in RTVoice>Extras>SpeechText>Demo.
     
    Last edited: Aug 27, 2021
  43. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,746
    You can add it to the Speak-action, like this:
    upload_2021-8-27_9-7-16.png

    The demo scenes are in the package "Demos", located in the root of the asset:
    upload_2021-8-27_9-8-44.png

    I hope this helps you further.
     
    BCrisos likes this.
  44. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    50
    Hi,

    I got the demo thank you. I still have an issue, When I wrote " en-au-x-aub-local " Inside the action I got this error:

    upload_2021-8-27_19-12-57.png

    Am I supposed to install something else for this to work?
     
  45. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,746
    Have you tried a build?
    RT-Voice uses the underlying TTS and it's therefore different per platform. This means, the voice you like to have does not exist inside the Editor - it's only available under Android.
     
  46. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    50
    I tried the build and it still gives me a female voice is there anything that I need to install? And is there a way for me to use the voices of Andriod in the editor, I need to hear how it all sounds since I'm using effects for the voices.
     
  47. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,746
    Hello again

    Maybe you are using an other version of Android? This is why I meant you should build an Android version with our "01-Speech"-demo and use the voices you like.

    Unfortunately, pre-listening to Android voices is not possible since the built-in TTS from standalone (=editor) is totally different from Android. What's even worse, Android has different voices per version, so e.g. Android 7 won't have the same ones as Android 10 and so on... It's quite a mess.

    If you like to have the same voices everywhere, you have to use either MaryTTS, which is open-source (=free), or one of the supported online providers like AWS Polly, Azure or Google Cloud, which all have free tiers for around 1 million characters.

    We also provide a free account for MaryTTS for the development phase for our customers. If you like to have one, please send us your desired username and invoice via email.


    Cheers
    Stefan
     
  48. BCrisos

    BCrisos

    Joined:
    Jan 8, 2015
    Posts:
    50
    Hello Stefan,

    I'll be moving our conversation to email and adjust my review for RT Voice. Thank you for all your help here on the forums. :)
     
    Stefan-Laubenberger likes this.
  49. AaronOjeda

    AaronOjeda

    Joined:
    Oct 31, 2017
    Posts:
    9
    Hi Stefan,

    We are trying to add Finnish support for our application. Following your advice I have download eSpeak's Finnish voice, but RTVoice does not seem to recognize it. The new voice is in the SAPI5 panel:

    sapi5panel.png

    , but it is not among the RTVoice recognized voices:

    rtvoiceVoices.png

    I have hit the reload button and reset Unity and the computer, without success. Do you know what can be happening?

    Best regards,

    Aarón.
     
  50. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,746
    Hi Aarón

    We never used the SAPI voices from eSpeak - maybe they have some incompatabilities with RTV.
    However, I would recommend using the eSpeak application, see chapter 7:
    https://www.crosstales.com/media/data/assets/rtvoice/RTVoice-doc.pdf

    The main advantages are imho that you don't have to modify the environment of the end-user and you can bundle it with your application (e.g. via an installer).

    I hope this helps you further.


    Cheers
    Stefan
     
unityunity