Search Unity

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

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

  1. jamesstephenbrown

    jamesstephenbrown

    Joined:
    Dec 10, 2015
    Posts:
    5
    I'm finding this asset really easy to use. I have only one issue, and that is it doesn't seem to have the capacity to check what the current word is from a script, this would be a useful feature as I would like to have certain words trigger other functions.

    Otherwise, if it does have this capacity, please point me in the right direction.
     
  2. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
    Hi James

    RT-Voice has a callback for words, called "OnSpeakCurrentWord", but it only works under Windows and iOS.
    The other platforms unfortunately don't support the detection of words.

    I hope this helps you further.


    Cheers
    Stefan
     
  3. jamesstephenbrown

    jamesstephenbrown

    Joined:
    Dec 10, 2015
    Posts:
    5

    Thanks Stefan, I found OnSpeakCurrentWord, but I don't see how to "get" the current word as a string - that's all I'm after, is there a way to use OnSpeakCurrentWord to get access to the string being played.

    Thanks,
    James
     
  4. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Please take a look at our demos "03" and "04" to see how it works.
    If you need more details, let me know.


    Cheers
    Stefan
     
  5. jamesstephenbrown

    jamesstephenbrown

    Joined:
    Dec 10, 2015
    Posts:
    5
    Hi Stefan, sorry about this, I've had a look at the demos and they appear incredibly complex, I am just looking for a code reference that I can put in a script to access when a particular string is being spoken something like...

    Code (CSharp):
    1. if (Speaker.currentWord == "foo") {
    2.     Bar(); // do something
    3. }
    Is there some way to do this?

    Thanks,
    James
     
  6. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
    Sure, here is a simple example:
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.UI;
    3. using Crosstales.RTVoice;
    4.  
    5. /// <summary>Simple word detection.</summary>
    6. public class DetectWord : MonoBehaviour
    7. {
    8.     public string Text = "Text with the word foo to detect.";
    9.  
    10.     #region MonoBehaviour methods
    11.  
    12.     public void Start()
    13.     {
    14.         Play();
    15.     }
    16.  
    17.     public void OnEnable()
    18.     {
    19.         Speaker.OnSpeakCurrentWord += speakCurrentWordMethod;
    20.     }
    21.  
    22.     public void OnDisable()
    23.     {
    24.         Speaker.OnSpeakCurrentWord -= speakCurrentWordMethod;
    25.     }
    26.  
    27.     #endregion
    28.  
    29.  
    30.     #region Public methods
    31.  
    32.     public void Play()
    33.     {
    34.         Speaker.SpeakNative(Text);
    35.     }
    36.  
    37.     #endregion
    38.  
    39.  
    40.     #region Callback methods
    41.  
    42.     private void speakCurrentWordMethod(Crosstales.RTVoice.Model.Wrapper wrapper, string[] speechTextArray, int wordIndex)
    43.     {
    44.         Debug.Log("Word spoken: " + speechTextArray[wordIndex]);
    45.        
    46.         if (speechTextArray[wordIndex].Equals("foo")) {
    47.             Debug.LogWarning("Special word found => do some magic...");
    48.         }
    49.     }
    50.  
    51.     #endregion
    52. }
    53.  
    I hope this helps you further, please let me know.
     
  7. jamesstephenbrown

    jamesstephenbrown

    Joined:
    Dec 10, 2015
    Posts:
    5
    Thanks Stefan! That's fantastic
     
  8. bhermer

    bhermer

    Joined:
    Jun 24, 2013
    Posts:
    16
    Hi, Sorry if this has been answered, I am using the standard version, just bought the upgrade, are there any catches to upgrading, or can I just import over the standard version?
     
  9. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
  10. bhermer

    bhermer

    Joined:
    Jun 24, 2013
    Posts:
    16
    Hi, I upgraded to Pro, it compiles fine for android, in xcode I am getting a compile error, the crosstales folder is missing, any ideas?


    clang: error: no such file or directory: '/Volumes/ESD-USB/IOS_LITE/Libraries/crosstales/RTVoice/Plugins/iOS/RTVoiceIOSBridge.mm'

    clang: error: no input files

    I can see the file in unit @ rtvoice/wrapper/ios
     
  11. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
    Thank you for upgrading!

    About the error: have you deleted the build directory before building? It seems the Xcode-project references some old references...
     
  12. bhermer

    bhermer

    Joined:
    Jun 24, 2013
    Posts:
    16
    That got it, thanks, I always use Append cos of the hassle of resetting everything (this build is locked to 2017.1) but it works now.
     
    Stefan-Laubenberger likes this.
  13. sosdaaan

    sosdaaan

    Joined:
    Nov 22, 2018
    Posts:
    1
    hi I have Question!!

    I want to change the character to another model. Is there a way?
     
  14. Stefan-Laubenberger

    Stefan-Laubenberger

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

    What do you mean?


    Cheers
    Stefan
     
  15. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    710
    Hi,
    Can RTvoice support Arabic?
     
  16. Stefan-Laubenberger

    Stefan-Laubenberger

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

    It should work as long as you have Arabic voices on your device.


    Cheers
    Stefan
     
  17. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    710
    Thanks for reply
     
  18. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    279
    @Stefan-Laubenberger Really sad to see the deprecation of the standard version. Apart from it no longer being a dll, are there any actual advantages to the Pro version? I'm guessing the old version will continue working for a little while longer, although I guess integrations with other assets like SALSA will break as they too upgrade their own codebase.

    I'm not sure I can currently justify, or afford, to essentially pay for the asset again (it was €37.52 and I'm having to pay the same again for the upgrade). I understand your reasoning, and respect that you need to earn a living, but would you at least reconsider the Dec 2018 cut-off for the upgrade path for current users?

    It seems a little harsh to not only deprecate the asset but to also jettison your old customers after just a few months. I'm especially saddened as I've only heard about this today because of coming to the asset store page in order to grab the URL - I was about to recommend the asset to someone, something I'll now find harder to wholeheartedly do.
     
    cybersoft likes this.
  19. Stefan-Laubenberger

    Stefan-Laubenberger

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

    There are many new things already implemented, like support for AWS Polly and Amplitude. And there is much more in the pipeline, like Azure Speak, IBM Watson and so on.
    Apart from that, the main advantages over the DLL version it's the better integration on all platforms.

    RT-Voice has thousands of hours put into it, so the price is imho a real bargain. We announced the deprecation three months ago and want to start 2019 without the DLL versions in the store.

    We wanted to offer all our customers the upgrade-path "forever" but Unity has no such functionality in their backend. As soon as you deprecate an asset, the upgrade-path is gone... We left it only in the store to give our customers a chance to upgrade for the reduced price.

    I hope you can understand our point of view.


    Cheers
    Stefan
     
  20. Rodlyl

    Rodlyl

    Joined:
    Apr 8, 2018
    Posts:
    1
    On ios, this code (VoiceProviderIOS.cs):

    #if UNITY_IOS || UNITY_EDITOR
    if (wrapperNative != null)
    {
    onSpeakCurrentWord(wrapperNative, speechTextArray, wordIndex);
    wordIndex++;
    }
    #endif

    causes this log warning message ocassionally:

    Word index is larger than the speech text word count: #/#

    Changing the code to the following seems to fix it (it mimics another call to the same method):

    onSpeakCurrentWord(wrapperNative, speechTextArray, wordIndex - 1);
     
  21. Stefan-Laubenberger

    Stefan-Laubenberger

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

    This can happen if RTV can't split the text correctly... If you encounter such a phrase, please send it to me so I can analyze it.
    Thanks!


    Cheers
    Stefan
     
  22. cybersoft

    cybersoft

    Joined:
    Feb 12, 2014
    Posts:
    82
    I bought (not the PRO) version six months ago and I am a little disappointed because I have to buy a new version now. I wanted this DLL version only for some tests not for production. Shame, If I new that this asset would be depreciated after some months I did not buy it at all.
     
  23. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
    I know this isn't popular for the non-PRO users, but finally, we want to deliver the best assets and we also have to put some food on the table...

    However, the upgrade path is 30% reduced during Cyberweek Sale - it won't get cheaper than that :)
     
  24. cybersoft

    cybersoft

    Joined:
    Feb 12, 2014
    Posts:
    82
    Thank you for your reply but there is something not obvious.

    I know there is an upgrade path and for some people that is great but I have to pay more barely after 6 months (only 2 tests made) and I am not sure if I wanted to continue.

    This is in my opinion a little unfair and this is not only my voice. You have great products but your policy now is wrong because of time! You only give us 3 months for decision: abandon asset or pay more.

    What about people that bought your asset some days before your decision to depreciate it? Are they satisfied?
     
  25. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
    Look I understand your point, but I hope you also know the "normal procedure" for an asset upgrade: just remove the old version from the store... This way, you would have to pay the full price for PRO.

    This means, we are the exception and give our customers the possibility to get PRO for 50% of the PRO-price (and another 30% for the current sale).
    If someone needs and loves our asset, that's something they are willing to pay and if not, the standard version still works with the current Unity versions...
     
  26. jamesstephenbrown

    jamesstephenbrown

    Joined:
    Dec 10, 2015
    Posts:
    5
    Hi there,

    I've suddenly had an issue pop out of nowhere my console is throwing up an error "Detected code '256', but only PCM..."(pictured) and the voice will no longer speak.

    I'm using the voice Veena, is there an issue because I'm building for WebGL?

    Thanks,
    James
     

    Attached Files:

  27. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
    Hi James

    I don't recognize the voice Veena... For WebGL, you can only use MaryTTS or AWS Polly as a provider - what are you using?


    Cheers
    Stefan
     
  28. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    196
    I am not sure how this works, but i want to use it on isolated not connected to the internet windows 7 machine. So can i possibly download anything to have it work fully offline or is it working offline out of the box ?
     
  29. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
    Yes, there are many voices available for the supported platforms. For more, please see chapter 6 of the documentation:
    https://www.crosstales.com/media/data/assets/rtvoice/RTVoice-doc.pdf
     
  30. helferapp

    helferapp

    Joined:
    May 17, 2016
    Posts:
    12
    AWS Polly and WebGL

    Hi Stefan,
    I'm not sure about RTVoice, WebGL and AWS Polly. Just starting up with Polly first time.

    At your documentation I can find:
    2.5.8.AWS Polly
    • Platforms: all except WebGL

    At at this forum you write: "For WebGL, you can only use MaryTTS or AWS Polly as a provider".

    What is the truth?

    I build a new unity program with just your asset.
    At AWS_Demo scene I added my AWS Cognito Credential and all works fine (within unity editor, platform "Standalone").

    Then I changed to platform "WebGL":
    After that I'm getting some errors when I run the program inside the editor:

    Detected format code '0' , but only PCM and WaveFormatExtensable uncompressed formats are currently supported.
    UnityEngine.Debug:AssertFormat(Boolean, String, Object[])
    Crosstales.RTVoice.Util.WavMaster:ToAudioClip(Byte[], Int32, String) (at Assets/Plugins/crosstales/RTVoice/Scripts/Util/WavMaster.cs:63)
    Crosstales.RTVoice.Provider.<playAudioFile>c__Iterator0:MoveNext() (at Assets/Plugins/crosstales/RTVoice/Scripts/Provider/BaseCustomVoiceProvider.cs:287)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

    and

    Exception: 115 bit depth is not supported.
    Crosstales.RTVoice.Util.WavMaster.ToAudioClip (System.Byte[] fileBytes, Int32 offsetSamples, System.String name) (at Assets/Plugins/crosstales/RTVoice/Scripts/Util/WavMaster.cs:91)
    Crosstales.RTVoice.Provider.BaseCustomVoiceProvider+<playAudioFile>c__Iterator0.MoveNext () (at Assets/Plugins/crosstales/RTVoice/Scripts/Provider/BaseCustomVoiceProvider.cs:287)
    UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)


    When I compile the WebGL app and run your AWS-Demo in a browser (Chrome), I'm getting

    Uncaught RuntimeError: memory access out of bounds
     
  31. helferapp

    helferapp

    Joined:
    May 17, 2016
    Posts:
    12
    WebGL and MaryTTS

    Because I had no success with Polly I tried MaryTTS.
    Success in the Editor: Mary speaks in the Editor, even in WebGL platform.

    Compiling and publishing to a website I get the same error: memory access out of bounds

    Digging deeper I found the warning:
    The Web Audio autoplay policy will be re-enabled in Chrome 71 (December 2018). Please check that your website is compatible with it. https://goo.gl/7K7WLu
    _JS_Sound_Init @ blob:http://localhost:50935/9ae98360-0464-4d0b-b0f3-301c9bfd91b9:2


    Google write there:
    Key Point: If an AudioContext is created prior to the document receiving a user gesture, it will be created in the "suspended" state, and you will need to call resume() after a user gesture is received.

    Does RTVoice create AudioContext before the user clicks a button?
     
  32. helferapp

    helferapp

    Joined:
    May 17, 2016
    Posts:
    12
    RTVoice and
    Web Speech API
    I just read about Web Speech API https://w3c.github.io/speech-api/
    The SpeechSynthesis Interface would be a good solution for WebGL without using AWS Polly or MaryTTS.

    Do you think about implementing this as provider in RTVoice?

    Best regards
    Stefan
     
  33. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
    Hi Stefan

    I will take a look at all your posts about AWS Polly and MaryTTS, but it needs more time.
    Meanwhile, please see our demo:
    https://www.crosstales.com/media/data/assets/rtvoice/webgl/

    It seems everything works with MaryTTS.

    Do you have your own MaryTTS-server or an account from our test-server?


    So long,
    The other Stefan :)
     
  34. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
    P.S: about Web Speech API - it's only for browsers, so it's not something we currently plan to support, since it's RT-Voices main goal to run on all platforms... But you could implement your own provider if you like ;)
     
  35. helferapp

    helferapp

    Joined:
    May 17, 2016
    Posts:
    12
    No, I'm just using your demo with your MaryTTS server.

     
  36. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
    You have to have your own MaryTTS server or an account on our server. Builds won't work with our demo in the package.
     
  37. unity_pa91M1t9t45VxQ

    unity_pa91M1t9t45VxQ

    Joined:
    Dec 29, 2018
    Posts:
    1
    Hi,
    I've just bought Salsa and RT Voice Pro recently and I've been trying to figure out how to input text files in real-time, after building from unity.
    Is it possible for RT Voice Pro to read in .txt files in real-time?
    Thanks.
     
  38. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Sure, that's possible.
    Simply read your text-files with the UnityWebRequest-class and feed it to RT-Voice.


    Cheers
    Stefan
     
  39. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    715
    Hi

    I would like to know how it works with other languages (Indian languages)? In my game, I have three Buttons (English, Hindi, Gujarati). When the user clicks on the button that changes the language. Can you show a similar thing in some demo?

    Best regards,
    Play_edu
     
    Last edited: Jan 4, 2019
  40. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
    Hi Play_edu

    You can use our demo scene "01-Speech" as an example.
    However, you have to make sure that the desired voices/languages are available on your system.

    Cheers
    Stefan
     
  41. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    839
    So about WebGl sound i got no os voice found -tts not possible
    any idea how fix please ?

    any chance to see support of Accapela ?

    thanjk's
     
    Last edited: Jan 8, 2019
  42. Stefan-Laubenberger

    Stefan-Laubenberger

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

    You need your own MaryTTS-server or use AWS Polly for WebGL.
    We offer for testing purposes an account on our own MaryTTS-server - just send me your desired username and the invoice.

    About Accapela: this is currently not planned, but we will consider this as as a possible solution in the future.


    Cheers
    Stefan
     
  43. sexton_unity

    sexton_unity

    Joined:
    Dec 17, 2018
    Posts:
    1
    I bought RT-Voice Pro yesterday to add TTS to a Windows app. Just a simple speak text on a mouse click. I am very disappointed with the several second delay. I tried both Speak and SpeakNative and there was no difference. Definitely not worth $70 because of such poor performance. BTW the demo apps perform the same way.
     
  44. Stefan-Laubenberger

    Stefan-Laubenberger

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

    I'm sure the performance can't be that awful! There is probably something wrong in the setup.
    Please send me an email and we will figure something out.


    So long,
    Stefan
     
  45. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,008
    Hi, I've downloaded today's version and I am having a problem with the Playmaker actions in Unity 2018.2.20f1

    I can only get the default first voice (Alex) to speak, even though I'm carefully copying the names of my voices...

    The voices work in the inspector, but not via Playmaker.

    Screen Shot 2019-01-14 at 9.54.23 PM.png
     
    Last edited: Jan 15, 2019
  46. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Hmm, that's strange...

    Some questions:
    1. Did it work with the last RTV-version and if so, what was the previous version?
    2. What happens if you only use "Heather" as name?
    3. Does it work with an Mac internal voice, like "Fiona"?

    So long,
    Stefan
     
  47. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,008
    1. I have upgraded Unity a few times, and it has been several projects since I last downloaded RT-Voice (not sure, but I have missed a few versions)
    2-3. Even voices that are single words (Fiona) do not play that voice, everything falls back to Alex which is the voice it plays when I've misspelled the name.

    Screen Shot 2019-01-15 at 6.46.17 AM.png

    In the screengrab above, I can hear the Fiona voice by clicking on the [SPEAK] button in the RT-Voice inspector, but using the playmaker action I hear the Alex (default, alphabetical) voice. (Suggests an issue with the PM action)

    Thank you for your time.
     
  48. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,282
    Ok, I found the problem. PlayMaker 1.9.0 stops all threads at startup. This is why RT-Voice displays this message:
    upload_2019-1-15_17-46-0.png

    However, the simplest solution is to attach the following script "RTVReload.cs" to an object in the scene.

    Please also use the new PlayMaker-package, make sure you're using RTV 2019.1.0 and let me know if if fixes the issue.

    Thank you!
     

    Attached Files:

    wetcircuit likes this.
  49. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,008
    I upgraded my Playmaker and swapped out the new PM actions. RT-Voice works again! :D

    (I also tried the RTVReload script on a GO, but that seemed to prevent the new PM actions from working… maybe I misunderstood how to use it. It worked once I disabled this component.)

    :cool: Thank you again for the outstanding support!
    ⭐️⭐️⭐️⭐️⭐️
     
    Stefan-Laubenberger likes this.
  50. bradbecker

    bradbecker

    Joined:
    Dec 26, 2014
    Posts:
    96
    so... just came back to a project using RT-Voice to find out it's been deprecated and there's no upgrade path available to RT-Voice Pro. Am I missing something? A forced paid upgrade is one thing, but not offering an upgrade at all to deprecated customers seems a little bait-and-switch-y. Even a $10 discount would be a friendly gesture.