Search Unity

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

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

  1. ravinderg

    ravinderg

    Joined:
    May 1, 2017
    Posts:
    9
    Hi Stefan,

    Thanks for your replay, I did installed the RTVoice-2.7.2b2 version .
    I observed this things after my testing:

    1.Before build the windows project and ran the unity it's works fine without any issues, whatever the text i passed and spoke the same text as expected (I hope string converted to audio file and play the audio, in this way i can not find the audio files inside the project but functionality works as expected ).

    2.After build the windows project and ran the unity i faced issues ( In this way i found the audio files inside the project, I ran the app multiple times then multiple files are created)

    Below is the respective screenshots:

    In this file i found the issue Assets\crosstales\RTVoice\Plugins\Scripts\Provider\VoiceProviderWindows.cs

    upload_2017-5-10_19-20-4.png


    upload_2017-5-10_19-20-39.png


    Can you please check the above issue and let me know the information.

    Thanks
    Ravi
     
  2. rgonsalv

    rgonsalv

    Joined:
    Sep 29, 2016
    Posts:
    47
    I have seen a similar issue with desktop Windows if I have the debugger attached to the Unity Editor. We're one minor version behind on RT-Voice and still running Unity 5.4. I'll report back if I see it once we upgrade (after our next product release!).

     
  3. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Where exactly did you add the breakpoint? I tried it with Unity 5.3.7 and MonoDevelop and it worked without any problems.

    Cheers
    Stefan
     
  4. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Thank you for helping!

    So long,
    Stefan
     
  5. McSwan

    McSwan

    Joined:
    Nov 21, 2013
    Posts:
    129
    Hi,
    rtvoice is working great but I was wondering how I change to a specific OS voice ?
    "rtvoice prefab" has hazel and zira in there, but my os has other voices, like Catherine and James. How do I get rtvoice to pick them up ?
    Also, when I install my app on different computer the voice changes. - I figure it must be using the default os voice. I am writing a interactive robot salesman program and the robots voice changes from female to male when install on different windows machines. I have complete control over the install environment, so could control this.

    upload_2017-5-11_10-29-12.png

    These voices seem to be available in the Microsoft OS.

    upload_2017-5-11_10-29-43.png
    I haven't looked much at Mary yet, is it difficult to setup?
     
  6. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Windows 8/10 has actually two different TTS-systems on board.
    Here they (two screenshots from my Windows 10 machine) - this is the "old" SAPI-TTS-config window:

    upload_2017-5-11_9-32-51.png

    The new WSA (UWP)-window:
    upload_2017-5-11_9-33-58.png

    Please take a look at the names: "David Desktop" and "David Mobile".

    So, this means, if you're building for standalone, the settings from the first window are used (Desktop).
    If you build for WSA (UWP) the voices from the second window are available (Mobile).

    So, what's your build target?


    About MaryTTS - it's very easy to setup and work with. It has a tutorial on their page and I would say you need max. 1 day to get it up and running.


    Cheers
    Stefan
     
  7. ravinderg

    ravinderg

    Joined:
    May 1, 2017
    Posts:
    9
    Hi Stefan ,

    I added the breakpoint in this class file Assets\crosstales\RTVoice\Plugins\Scripts\Provider\VoiceProviderWindows.cs and method name is

    public override IEnumerator Speak(Model.Wrapper wrapper)
    {
    // I did set the breakpont in this method so i faced issues in line 365 else case, i already shared the screenshot.
    }

    I am using Unity 5.6.0f3 version and windows UWP.

    Thanks
    Ravi
     
  8. Stefan-Laubenberger

    Stefan-Laubenberger

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

    So, you're getting this error inside Unity while in Play-mode?
    Be aware: you can't debug WSA from within Unity - it's always using the standalone-provider (VoiceProviderWindows) instead of VoiceProviderWSA...
    You have to create a build and run it in debug-mode from VS.

    Can you tell me why you're debugging at all - is there a problem with RT-Voice on WSA (UWP)?


    Cheers
    Stefan
     
  9. McSwan

    McSwan

    Joined:
    Nov 21, 2013
    Posts:
    129
    HI thanks - I tried wsa but there was a lot issues just getting it to compile so I thought I'd try mary.
    I ran the mary install and it looks like it made a local server.
    I can access it in ie so I know it's running


    upload_2017-5-12_16-25-25.png upload_2017-5-12_16-26-31.png

    I set up mary in rtvoice. I think it's correct?
    Anyway, I get an error, a blank one and no sound comes out.

    upload_2017-5-12_16-28-33.png
     
  10. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    You have to fill the field "Mary TTS Port" in RT-Voice (Speaker), which is 59125.

    I hope it works after that change, please let me know.


    Cheers
    Stefan
     
  11. vertexxx

    vertexxx

    Joined:
    May 11, 2016
    Posts:
    4
    Hi,

    I'am running RTVoice 2.7.0 on a Windows 10 machine with Unity 5.6.0f3.
    The problem is, that RTVoice can't find any voices:

    So Speaker.Voices.Count returns 0.

    When I run Assets\crosstales\RTVoice\Plugins\Windows>RTVoiceTTSWrapper.exe --voices
    I get
    Can you please help me?

    UPDATE
    I doesn't read your post before about WIndows Defender (because I wonder what should this have to do with TTS :)).
    After turning off Windows Defender, RTVoice starts instantly and runs fine. Speaker.Voices.Count returns 2.

    UPDATE2
    Adding Assets/crosstales directory to Windows Defender exclusions is a good workaround until RTVoice will rollout an official patch.
     
    Last edited: May 18, 2017
  12. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Thank you for the tips!
    Just send me an email if you need the new wrapper.


    Cheers
    Stefan
     
  13. knguyen-mimbus

    knguyen-mimbus

    Joined:
    Apr 12, 2016
    Posts:
    2
    Hello,

    I bought RTVoice on the asset store. The asset is amazing :) and it correctly works in French and in English as far as I know.
    The TTS was functionning very well but suddenly, a problem occured the day after I bought it...

    Before using the method Speaker.Speak (or SpeakNative) my game freezes for a while then it normally runs but I have to wait like 5 seconds for the TTS to begin... It happens systematically every time we call the speak method.

    Do you have any idea of how I can resolve this problem ? It does not happen on every computer with the same project though.

    Best regards,
    Kevin
     
  14. Stefan-Laubenberger

    Stefan-Laubenberger

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

    The problem is well-known and solved:
    https://forum.unity3d.com/threads/r...to-speech-solution.340046/page-8#post-3074296

    Just send me an email with the invoice.


    So long,
    Stefan
     
  15. vertexxx

    vertexxx

    Joined:
    May 11, 2016
    Posts:
    4
    Thanks for releasing the new version without Defender problems :)

    I have another problem with the sound volume. When I use

    RTVoiceTTSWrapper.exe --speakToFile "Hello" C:\Users\Oliver\Desktop\tts.wav 100 100

    to generate a voice sound at maximum volume, this is the waveform:



    As you can see, the peak amplitude of the waveform is under 0.5. I would expect a peak amplitude of under 1.0.
     

    Attached Files:

  16. Stefan-Laubenberger

    Stefan-Laubenberger

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

    The correct call would be:
    --speakToFile [text] [fileName] [rate] [volume] [voice] Speaks a text to a file with an optional voice.

    => RTVoiceTTSWrapper.exe --speakToFile "Hello" C:\Users\Oliver\Desktop\tts.wav 1 100

    rate: -10 to 10
    volume: 0 to 100

    Anyway, this won't adjust the amplitude.
    The file is generated by Windows at max. volume, which is unfortunately not very loud...

    We will try to create an audio normalizer to push the generated audio files nearly to 1.0, but I can't promise anything.


    So long,
    Stefan
     
  17. vertexxx

    vertexxx

    Joined:
    May 11, 2016
    Posts:
    4
    Thanks :) Fixes the Defender bug.

    Normalization would be nice, but I know this is hard. Thank you for trying it!
     
  18. Saikat_2016

    Saikat_2016

    Joined:
    Dec 21, 2016
    Posts:
    10
    Dear Sir,

    I already buy your "RT- Voice" from Unity Assets Store.

    Your project is work fine....in my side, but I need some specific language support for speaking purpose Like English (Indian) and also need following features like...
    Requird

    i. Play Speak and Highlight the Current Speaking Text in Unity

    ii. Pause Speak(At Runtime, when play I start at last pause state)

    iii. Stop Speak

    iv. Voice Speed (0-10)

    v. Pitch

    vi. Volume(0-10)

    Play Pause is working on the basis of a Toggle Button in Unity
    I am very thankful if you help me...

    Saikat Patra

    Junior Game Developer
     
  19. Stefan-Laubenberger

    Stefan-Laubenberger

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

    You can already handle all those things with RT-Voice, but I try to answer your questions:
    1. Highlighting the current word works only under Windows and iOS. Anyway, to see an example how it works, please take a look at the demo scene "03-Simple_Native".
    2. You can't combine "highlighting the current word" and pause, since we need the underlying TTS to give us the current word and this must run in native mode... Anyway, you can add an AudioSource to the "Speaker.Speak"-call and do with the generated text whatever you want (= all audio effects, pitch etc.)
    3. To stop a speech, simply call "Speaker.Silence"
    4. There is a parameter "rate" for the "Speaker.Speak"-call
    5. There is a parameter "pitch" for the "Speaker.Speak"-call
    6. There is a parameter "volume" for the "Speaker.Speak"-call
    4-6 can also be modified inside Unity if the result of the speech is generated audio (= AudioSource).

    For more information, please take a look at the documentation, API and the demo scenes.
    I hope this helps you further.


    Cheers
    Stefan
     
  20. kbunity_lobrino

    kbunity_lobrino

    Joined:
    Feb 2, 2017
    Posts:
    3
    Hey Stefan,
    I've been using this asset for awhile now. It works great on Windows but when I tried it on Android its not working and there was no error. Any suggestions on how can I make it work. By the way I used Speaker.Speak().
     
  21. Stefan-Laubenberger

    Stefan-Laubenberger

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

    What exactly are the errors/warnings from the build or run?
    Did you set the "Minimum API Level" to "Android 4.0.3", like this:
    upload_2017-6-6_10-29-19.png

    So long,
    Stefan
     
  22. Saikat_2016

    Saikat_2016

    Joined:
    Dec 21, 2016
    Posts:
    10
    You told that Highlighting text is not possible in Android but my project running on Android and Windows...Please tell how is it possible in Android...I am in trouble....
    Also I need pause and resume speech features....if there is any solution then please tell me.....
    I have an idea to Pause and Resume the speech i.e At first, I convert all strings in to Audio file(synthesize file) then I play the audio file....but how it is possible i don't know....How to synthesizeToFile word-by-word I don't know.....
    I want default language is Indian English how can I install(windows 7) and get the language

    Please Please help me....
     
    Last edited: Jun 8, 2017
  23. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    I'm here to help ;)

    So, word highlighting on Android is not possible... There is no API-callback from Android which would provide such a function. :(
    The only "solution" is splitting the string into words and calling the Speak-method for every single word, like

    Code (CSharp):
    1. Speaker.Speak("Hi");
    2. Speaker.Speak("there!");
    3. Speaker.Speak("How");
    4. Speaker.Speak("are");
    5. Speaker.Speak("you?");
    The other question about pause and resume: you have to add an AudioSource to the "Speak"-call. This way, you can call pause and resume on the AudioSource:

    Code (CSharp):
    1. Speaker.Speak("Hi there, how are you?", AS); //AS is an instance of AudioSource
    2.  
    3. AS.Pause(); //stop speech
    4.  
    5. //wait or do your stuff...
    6.  
    7. AS.UnPause(); //resume speech
    But this breaks the "mark words"-mechanic under Windows and you will probably ending up using the first solution for Windows and Android.

    The third question:
    Follow the chapter 6 of the documentation.
    There is a voice for Indian-English available: MSSpeech_TTS_en-IN_Heera.msi
    You can then use this language by using it like that:

    Code (CSharp):
    1. // Windows only
    2. Speaker.Speak("Hi there, how are you?", AS, Speaker.VoiceForName("Heera"));
    3.  
    4. // or incl. Android
    5. Speaker.Speak("Hi there, how are you?", AS, Speaker.VoiceForCulture("en-IN"));
    I hope this helps, please let me know.


    So long,
    Stefan
     
  24. Saikat_2016

    Saikat_2016

    Joined:
    Dec 21, 2016
    Posts:
    10
    Thanks a lot....I try to implement and reply you.... Very soon...
     
  25. ManivannanAshokkumar

    ManivannanAshokkumar

    Joined:
    Jun 12, 2017
    Posts:
    1
    Hi Stefan,
    Can you tell me if it supports WebGL.
    Thanks
     
  26. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
  27. Ezzra

    Ezzra

    Joined:
    Dec 9, 2015
    Posts:
    25
    Hi Stefan,

    RTVoice is working great for me on Windows standalone and iOS. I am now creating an android build of my app in Unity. When I build I get the following error relating to AndroidManifest.XML

    Error: [Temp/StagingArea/AndroidManifest-main.xml:3, /Users/user/Documents/Unity3D/Grammaralive_Build 2-0(2-38)/GrammarAliveProGit3/Temp/StagingArea/android-libraries/RTVoiceAndroidBridge/AndroidManifest.xml:3] Main manifest has <uses-sdk android:minSdkVersion='9'> but library uses minSdkVersion='15'

    I tried to change the build Player Settings -> Other Settings -> Minimum API Level to 9 but it makes no difference. I actually want to set the minimum API level to either 15 or 19.

    Can the RTVoice setting be changed from the default of 9? How do I access the RTVoice AndroidManifest.XML?

    Thanks,

    Errol.
     
  28. Stefan-Laubenberger

    Stefan-Laubenberger

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

    RTV needs a minimum API-Level of 15.
    Did you set a Level of 9 in your project or in other libraries? The error implicates this...


    Cheers
    Stefan
     
  29. Ezzra

    Ezzra

    Joined:
    Dec 9, 2015
    Posts:
    25
    Hi Stefan,

    Sorry, my fault as I misread the error message. It was referring to another library that set the minSDKlevel to 9. Problem resolved, thanks.

    Regards,

    Errol.
     
  30. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    No problem, I'm happy it's working now!

    So long,
    Stefan
     
  31. bagelbaker

    bagelbaker

    Joined:
    Jun 5, 2017
    Posts:
    67
    Hi,

    We're interested in this plugin but mainly for the generating sound asset part. I've glossed over the docs and this thread and I see there's a way to generate an audio asset by inputing the proper parameters to Crosstales.RTVoice.Speaker.Speak(). Would it be easy for us to write our own script that parses a dialogue file and calls the this Speak() function to batch create placeholder audio assets? We would then use them in Wwise during the development phase. Once we get the real voice overs, we'd only have to replace the placeholder files.

    Now that I looked more into the docs, we can just loop through through dialogues lines, call Speak() then subscribe to SpeakAudioGenerationComplete OnSpeakAudioGenerationComplete in order to wait for completion before continuing the loop?

    Cheers!
     
  32. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Thank you for your interest in "RT-Voice"!

    Yes it's easy and I would do it the same way :)
    Additionally, we will add an extra function like this in the next major release (estimated in July) to simplify the task.

    If you own Dialogue System there is already a function to generate all dialogs as audio files with RT-Voice... Just saying ;)

    I hope this helps you further.


    So long
    Stefan
     
    TonyLi likes this.
  33. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    Damn, wish I'd seen this before I got back from Unite.

    Anyhow, I'm getting the freeze/hang problem when doing text to speech which is caused by windows defender/ antivirus.
    I updated to the latest asset store version but this is still happening with my customers. Is there a new solution / update that fixes it?
     
  34. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Grml, I'm still in lost in Amsterdam :)

    The two versions of the wrapper-exes (32 and 64bit) should not cause any problems with Windows Defender!

    Did you follow the chapter 8 in the documentation to upgrade it:

    https://www.crosstales.com/media/data/assets/rtvoice/RTVoice-doc.pdf


    This is the the information from the 64bit version "RTVoiceTTSWrapper.exe":
    upload_2017-6-30_17-52-12.png


    And this from the 32bit version "RTVoiceTTSWrapper_x86":
    upload_2017-6-30_17-56-47.png

    Do they match your and your customers versions?


    Cheers
    Stefan
     
  35. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    I'm using the 64 bit version and the copyright information is correct. The customers are using my latest release of the code which upgraded the RTVoiceTTSWrapper and I've just checked the game folders and it is correct. Could other antivirus systems cause this problem?
     
  36. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Sorry, I meant the version and the size, not the copyright.
    Is it the same?

    About the anti-virus - here are actual scans with Metadefender:

    https://www.metadefender.com/#!/res...xZWVTb0xWNE5XQmtaeEhqSUVOVlc/regular/analysis

    https://www.metadefender.com/#!/res...5R2xxZnZFRU4tU3lRbDVmd1ZORWI/regular/analysis

    Please verify the version - there should be no lags.


    Cheers
    Stefan
     
  37. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    This is the detail from the shipped production code ....

    upload_2017-6-30_22-12-54.png
     
  38. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hmm, that's the actual version.
    Unfortunately, there seems not much we can do... :(

    Have you more detailed information about the customer machines? Is it a problem that occurs always on your side (even on your development machine)?
    Because until now nobody else had this problem since 2.5+ and we have quite a few customers...
     
  39. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    I can try to get some details from affected customers. I have been unaffected by the problem even before the fix was released so I can't reproduce it. We have over 15,000 users and we have had a handful of people who upgraded to our latest release but are still hitting the problem (people who bothered to report it .... actual instances of the problem may be higher or they just disabled voice announcements as we published a workaround in our previous version)
     
  40. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    It would be nice if you could gather some details.
    What is a typical length (in words) of your voice announcements?
     
  41. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    We are a racing game so a typical announcement would be something like 'Lap time 39.5, position 1"
     
  42. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Ok, this means it's a short text and doesn't need much time to generate.
    Just to get a better feeling: you said you've got 15'000 users and a "handful" experience this lags, right?
    Do you know their specs, are those old/low-performance PCs?

    My idea: if you detect a slow machine, switch from the Speak-call to SpeakNative. It uses the same parameters and is faster. But you lose the functions for an AudioSource, like effects and 3D-positional audio.
    Here are the details:

    https://www.crosstales.com/media/da...ass_crosstales_1_1_r_t_voice_1_1_speaker.html
     
    wstelzle and HamFar like this.
  43. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    We don't actually need positional audio or effects for announcements. Does speaknative avoid using the wrapper exe and therefore circumvent the issue?
    It's difficult for us to judge how many people actually have this problem as the majority knew about the problem in our previous release and disabled the announcements, so those that are hitting it tend to be new users, which is why I think we are seeing lower volumes as opposed to the whole user base hitting it at once which was what happened when we first released the voice announcements feature.
     
  44. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    No, SpeakNative also needs the exe, but it doesn't generate audio files (which then have to be loaded into Unity). This makes it quicker.
    To avoid the wrapper-exe, you have to use MaryTTS.

    But I'm really interest in the reasons for the lags since our exe is very simple and should never cause any noticeable delays... :confused:
     
    Last edited: Jul 1, 2017
    wstelzle likes this.
  45. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    Would using MaryTTS also work on OSX as well as Windows? .... just looking at how I can move to a position of safety for my next update until we work out what is happening.
     
  46. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Yes, MaryTTS works on ALL platforms, but you have to setup a server somewhere.
     
    wstelzle likes this.
  47. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    hmm, I think I would rather use native, running servers we already do but I don't want to add more complexity just for voice announcements.
     
  48. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    We're currently developing a MaryTTS-service for our users.
    It's in alpha-stage, but we would like to offer you for your game an account which is free as long until we release the final product in a few months. Until then, we could together analyze the problems of your customers with the wrapper-exe.
    If you're interested, send me a PM or email with your invoice.


    So long,
    Stefan
     
    wstelzle likes this.
  49. HamFar

    HamFar

    Joined:
    Nov 16, 2014
    Posts:
    89
    @Stefan-Laubenberger Hi Stefan, I have purchased the PRO version and have imported everything in a fresh Unity 5.5 project. I dragged in an empty scene the "TextFileSpeaker" prefab first, which then warned me that I also needed to drag in the "RTVoice" prefab! However, there is no public field in the Inspector for assigning a text file to be spoken. Where do I place the text file containing the words I wanna be spoken? Thanks
     
    wstelzle likes this.
  50. wstelzle

    wstelzle

    Joined:
    Jun 11, 2015
    Posts:
    7
    @Stefan-Laubenberger Dear Stefan, We purchased the pro version in order to enable text-to-speech for VR/AR content. Can we not use this when we build/deploy a project to an Android device?
     
    HamFar likes this.