Search Unity

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

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

  1. AaronOjeda

    AaronOjeda

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

    Thanks for your answer. I think that is what I did, I installed eSpeak application with the default voices plus the Finnish one.

    However now I have installed a different Finnish voice from HARPO software and it is recognized by RTV. Just letting you know in case it is helpful.

    Cheers,
    Aarón.
     
    Stefan-Laubenberger likes this.
  2. Wumbus

    Wumbus

    Joined:
    Sep 23, 2020
    Posts:
    1
    Hello,

    We’ve been trying to get RT-Voice working in an IOS version of an application after having successfully gotten Android and Windows versions working. With IOS however there is a huge delay (about 3-4 seconds) between calling the Speaker.Speak() method and TTS actually speaking, alongside a big spike in CPU usage (from about 20% idle to 100-120% trying to speak). Any thoughts as to why this might be?

    We are currently using Unity version 2020.1.3f1 with RT-Voice version 2.7.1.
     
  3. SirCodeWarrior

    SirCodeWarrior

    Joined:
    Sep 18, 2019
    Posts:
    16
    Hi @Stefan-Laubenberger,

    I found your RT-Voice ~2 year ago, it is the best speech library for cross-platforms app I found, and easy to implement, so I bought it. I have been experimenting RT-Voice Pro using in local speech/voice from whatever OS that this app is running from.

    I am currently building a simple math app for a teacher. This app has 2D quizz screen that allow student to pick a homework file that contains 10 questions, and each question contains about 5 numbers for the students to perform some basic add, subtract, etc.

    The program will read the number one at a time, and there is a user specified pause time between numbers and questions.

    I am using RT-Voice Pro version 2021.2.4, Unity 2021.1.15f1. I am developing in Windows 10 Pro 21H1.

    My program reads(speaks) the numbers without problem, but at random situation, so far, as the 2nd file it will stop "speaking" the number, I had to restart the program. I couldn't figure out where the problem occur, and there is no error.
    This program is a "summary" or extract of how my code was written, if needed, I can email you my entire file. Please let me know if I did it properly.
    Question:
    - For the Speaker.Instance.Speak method, do I need to define the AudioSource? For my case, I don't know what source I need to attach to.
    - Do I need to use the SpeakStartMethod and SpeakCompleteMethod?
    - Do I need to add any event to trigger the RemoveSpeakerWrapper()?​

    Do you happen to have an "intermediate" level video to show how to use the method and events I mentioned above?

    If needed, I can email you directly my entire file for the quizz part.

    I am sorry for the long message.

    Thank you very much for your time.

    Code (CSharp):
    1. namespace xyz.UI
    2. {
    3.     public class Quizz_Screen
    4.     {
    5.         void Start()
    6.         {
    7.             Speaker.Instance.OnSpeakStart += SpeakStartMethod;
    8.             Speaker.Instance.OnSpeakComplete += SpeakCompleteMethod;
    9.  
    10.             coroutineRetrieveQuestion = StartCoroutine(RetrieveQuestion(mode));
    11.         }
    12.  
    13.         IEnumerator RetrieveQuestion(int mode)
    14.         {
    15.             for (int ques = 0; ques < 10; ques++)
    16.             {
    17.                 int [] numberToRead = new int[]  { 99,  -8, +2, +7, -5};    // These number are read from file that student selected.
    18.                 for (int i = 0; i < 5; i++)
    19.                 {
    20.                     yield return SpeakAndWait((status) => { speakStat = status; }, numberToRead[i], 0f, 1f);
    21.                     yield return new WaitForSecondsRealtime(1.0f);    // Pause between numbers.
    22.                 }
    23.                 // Pause and wait for user to enter answer.
    24.                
    25.                 // Pause before moving to next question
    26.                 yield return new WaitForSecondsRealtime(WoNaEr_UI_System.currentWaitPauseQuestionClear);
    27.             }
    28.         }
    29.  
    30.         void RemoveSpeakerWrapper()
    31.         {
    32.             // Unsubscribe event listeners
    33.             Debug.Log($"In RemoveSpeakerWrapper, SpeechCount: {Speaker.Instance.SpeechCount}");
    34.             Speaker.Instance.OnSpeakStart -= SpeakStartMethod;
    35.             Speaker.Instance.OnSpeakComplete -= SpeakCompleteMethod;
    36.  
    37.             Debug.Log($"End of RemoveSpeakerWrapper, SpeechCount: {Speaker.Instance.SpeechCount}");
    38.         }
    39.  
    40.         void OnDestroy()
    41.         {
    42.             // Unsubscribe event listeners
    43.             Debug.Log("In Quizz's OnDestroy");
    44.             Speaker.Instance.OnSpeakStart -= SpeakStartMethod;
    45.             Speaker.Instance.OnSpeakComplete -= SpeakCompleteMethod;
    46.         }
    47.  
    48.         private void SpeakStartMethod(Wrapper wrapper)
    49.         {
    50.             if (wrapper.Uid.Equals(uidSpeaker))
    51.             {
    52.                 Debug.Log($"speakStartMethod - Speaker : {wrapper}");
    53.                 //isSpeaking = true;
    54.             }
    55.  
    56.         }
    57.  
    58.         private void SpeakCompleteMethod(Wrapper wrapper)
    59.         {
    60.             if (wrapper.Uid.Equals(uidSpeaker))
    61.             {
    62.                 Debug.Log("speakCompleteMethod - Speaker : " + wrapper);
    63.                 //isSpeaking = false;
    64.             }
    65.         }
    66.  
    67.         private IEnumerator SpeakAndWait(Action<bool> speakStat, string text, float waitSeconds = 0f, float speechRate = 1f, bool readAsCardinal = false)
    68.         {
    69.             Speak(text, speechRate, readAsCardinal);
    70.  
    71.             // Wait until Speaker is not Busy, not Speaking, then remove the Speaker and exit this method.
    72.             do
    73.             {
    74.                 Debug.Log("In isSpeaking && startedReading loop -> " + ", Speaker.Instance.isBusy: " + Speaker.Instance.isBusy +
    75.                           ", Speaker.Instance.isSpeaking = " + Speaker.Instance.isSpeaking +
    76.                           ", Speaker.Instance.areVoicesReady = " + Speaker.Instance.areVoicesReady);
    77.                 yield return null;
    78.             } while (Speaker.Instance.isBusy || Speaker.Instance.isSpeaking);
    79.  
    80.             RemoveSpeakerWrapper();
    81.  
    82.             Debug.Log("Wait for " + waitSeconds + " sec...");
    83.             yield return new WaitForSeconds(waitSeconds);
    84.             Debug.Log("Right after the WaitForSeconds for " + waitSeconds + " secs...");
    85.  
    86.             speakStat(true);
    87.  
    88.         }
    89.  
    90.         private void Speak(string textToRead, float speechRate = 1f, bool readAsCardinal = false)
    91.         {
    92.             if (string.IsNullOrEmpty(textToRead))
    93.                 return;
    94.  
    95.             Voice voice = Speaker.Instance.VoiceForName(voiceName);
    96.             float volume = 1f;
    97.  
    98.             Debug.Log("Speech rate: " + speechRate);
    99.             //Debug.Log("[" + culture + "]" + "Say : " + textToRead + ", Dictionary Voice: " + currentVoices + ", " + currentVoices[culture] );
    100.  
    101.             // For more "Say-as" SSML options refer to [https://docs.microsoft.com/en-us/cortana/skills/speech-synthesis-markup-language#say-as-element]
    102.             if (readAsCardinal)
    103.                 textToRead = "<say-as interpret-as=\"cardinal\">" + textToRead +"</say-as>";
    104.             else
    105.                 textToRead = "(" + textToRead + ")";
    106.  
    107.             Debug.Log("textToRead: " + textToRead);
    108.             uidSpeaker = Speaker.Instance.Speak(textToRead, null, voice, speakImmediately, speechRate, voicePitch, volume);
    109.             Debug.Log("=================> done reading textToRead: " + textToRead + ", Speaker.Instance.isBusy: " + Speaker.Instance.isBusy + ", Speaker.Instance.isSpeaking = " + Speaker.Instance.isSpeaking);
    110.         }
    111.  
    112.         public void StopQuizz()
    113.         {
    114.             // Stop button pressed, so stop everything.
    115.             StopSpeaking();
    116.             WoNaEr_UI_System.stoppedQuizzPriorCompletion = true;
    117.             Debug.Log($"=====> Stopped at question: {WoNaEr_Main_Screen.stoppedAtQuestion}");
    118.  
    119.             StopCoroutine(coroutineRetrieveQuestion);
    120.         }
    121.  
    122.         private void StopSpeaking()
    123.         {
    124.             Debug.Log("In Quizz's StopSpeaking");
    125.             Speaker.Instance.Silence(uidSpeaker);
    126.             //Speaker.OnSpeakStart -= speakStartMethod;
    127.             //Speaker.OnSpeakComplete -= speakCompleteMethod;
    128.         }
    129.  
    130.     }
    131. }
     
  4. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Please contact us via email, it would be easier to help you.
    Thank you!


    So long,
    Stefan
     
    SirCodeWarrior likes this.
  5. Stefan-Laubenberger

    Stefan-Laubenberger

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

    RT-Voice 2.7.1 is from April 2017 and no longer supported.
    Please update to the latest version from the store.


    Cheers
    Stefan
     
    Wumbus likes this.
  6. SirCodeWarrior

    SirCodeWarrior

    Joined:
    Sep 18, 2019
    Posts:
    16
    Hi Stefan, I have send you an email and attached the main speech file. thank you sir!
     
    Stefan-Laubenberger likes this.
  7. rini_rini

    rini_rini

    Joined:
    Jun 21, 2021
    Posts:
    1
    When TTS operates on a specific model such as "G8 ThinQ", it automatically reads by attaching "Speak" to the front and back of the text. How should we solve this problem?

    I'm in Korea.

    The code used is as follows.

    Speaker.Instance.Speak(strGetQuestion, null, Speaker.Instance.VoiceForName(strVoiceName));
     
  8. Stefan-Laubenberger

    Stefan-Laubenberger

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

    When you enable "Auto Clear Tags" on the instance, the "speak" should vanish:
    upload_2021-9-14_10-50-34.png


    Does that work for you?


    Cheers
    Stefan
     
  9. makmakka

    makmakka

    Joined:
    Sep 20, 2015
    Posts:
    1
    Hi,
    does RTvoicePro support Azure Neural Voices ?
    thanx,
    m
     
  10. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Yes, you can see all supported voices in chapter 17 of the documentation:
    https://www.crosstales.com/media/data/assets/rtvoice/RTVoice-doc.pdf

    The neural voices are currently in the code but disabled due further testing.


    Edit:
    We will add more than 170 Azure neural voices to the upcoming release


    Edit 2:

    Here is the new list of supported Azure voices in the upcoming release 2021.3.2:
     

    Attached Files:

    Last edited: Sep 17, 2021
  11. vlad_lu

    vlad_lu

    Joined:
    Jul 13, 2018
    Posts:
    2
    Hi. I have an error that looks like this. it always stops my game after some point of typing.
    upload_2021-9-26_13-18-29.png

    I have no idea how to fix it. I did not edit the RTVoice scripts. Also, I tried restarting unity, reimporting everything, and restarting the computer. :D
    What else can I do to try to fix it?
     
  12. Stefan-Laubenberger

    Stefan-Laubenberger

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

    I've sent you an email with a fix.


    Cheers
    Stefan
     
  13. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    @makmakka The new version supports all current Azure neural voices :)
     
  14. greatUnityGamer

    greatUnityGamer

    Joined:
    Aug 11, 2013
    Posts:
    182
    Hi i just bought this awesome asset but i have a question. I have 24 Voices in my Windows 10 system. American English , British English, Japanese, French, Brazilian Porguguese, Spanish etc. ANd Both Female and Male. ANd when i go to RT-Voice in Unity only a few are available to select and most the male ones are not there!!!!! Why?

    PS. No I dont have Expensive Paid Voices just the Free voices from Microsoft and other free voices i found around.

    Here's a picture of what i mean. as you can see my system has Male voice versions of all of these but only fremale are listed. i'm wondering why?
     

    Attached Files:

    Last edited: Oct 3, 2021
  15. greatUnityGamer

    greatUnityGamer

    Joined:
    Aug 11, 2013
    Posts:
    182
    HI again, i wanted to edit the voice to say things with different pitch/intonation etc because the video promotional video showed that. But the pDF doesnt say how to do it but so i wanted to look at the Demos to see if they showed how. But i cant open the demos because i get error about the type namespace "Model" could not be found. ANd not just that, other namespaces nof found either like.

    By the way i discovered how to make speak with TTS with a script on my character using this:


    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using Crosstales.RTVoice;

    public class SpeakingScript : MonoBehaviour
    {

    //Attach this Script to the Character who will speak and the character must have
    //An audioSource

    // Start is called before the first frame update
    void Start()
    {
    this.GetComponent<AudioSource>();
    Speaker.Instance.Speak("hello world", this.GetComponent<AudioSource>());
    }

    // Update is called once per frame
    void Update()
    {

    }
    }

    ***************
    But that's all i know how to do, i dont know how to change intonation and voices etc
     
  16. Stefan-Laubenberger

    Stefan-Laubenberger

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

    I wrote you an email.

    About the missing voices - it's most likely the problem described in this post:
    https://forum.unity.com/threads/rt-...o-speech-solution.340046/page-29#post-6979943


    Cheers
    Stefan
     
  17. FaberVi

    FaberVi

    Joined:
    Nov 11, 2014
    Posts:
    146
  18. Stefan-Laubenberger

    Stefan-Laubenberger

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

    FMOD is currently not supported but you could use the generated audio to feed it into it instead of the AudioSource.


    Cheers
    Stefan
     
  19. JayadevHaddadi

    JayadevHaddadi

    Joined:
    Nov 9, 2020
    Posts:
    12
    Hi Stefan,

    I cant seem to find answer to this question:

    Is there support for on the different platforms to have your text to speech without internet, i.e. "offline-mode"?

    Thanks
     
  20. Stefan-Laubenberger

    Stefan-Laubenberger

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

    RT-Voice works offline on all standalone platforms (incl. UWP), iOS and Android. Those systems have different TTS-engines, so the voices aren't the same, but imho you can find matching voices and use our "VoiceAlias"-component.
    There is only "Klattersynth" that has the same "voices" for all systems in offline mode, but honestly, it's not good enough for most cases.

    I hope this helps you further.


    Cheers
    Stefan
     
  21. hotpeperoncino

    hotpeperoncino

    Joined:
    Apr 11, 2019
    Posts:
    18
    Hi. Can I have RTVoiceTTSWrapper.exe source ? (on Windows)
    I want to investigate my error.

    i use my own TTS via SAPI, it can be listed in --voices option. but it occurs error when --speakToFile. (not found error)
     
  22. Stefan-Laubenberger

    Stefan-Laubenberger

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

    You are using your own TTS? Why do you use RT-Voice then?
    Anyway, please just post here the exact error message - I'm pretty sure it will help to solve the issue.


    Cheers
    Stefan
     
    Last edited: Nov 26, 2021
  23. hotpeperoncino

    hotpeperoncino

    Joined:
    Apr 11, 2019
    Posts:
    18
    Thank you for your reply. I recorded a video to show my error



    The resolution of video can be 4K to read messages.

    Technically to say, I try to use RT Voice as SAPI frontend.
    The voice engine is VOICEVOX which is freely distributed. it is for Japanese. And SAPI for VOICEVOX is just OSS.
    I think it is special situation for you, so i think i have to solve for myself. Thanks

    The list is shown, so --voice option is successful.
    But red message is shown, which displays "TTS not found error", maybe when finding TTS engine method causes error.
     
    Last edited: Nov 29, 2021
  24. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Can you please enable "Auto Clear Tags" on the "Speaker"-component and try it again?
    If it doesn't work, please try our other implementation "SAPI Unity" located in the "Extras"-folder.

    It would be nice if you could let me know if it helped you further.


    Cheers
    Stefan
     
    Last edited: Nov 29, 2021
  25. Dragonic8926

    Dragonic8926

    Joined:
    Mar 10, 2014
    Posts:
    34
    Hello, I have a little issue with RTVoice when I load a new scene.

    I have the RTVoice prefab in the first scene, loaded with the "Don't destroy" option. Here everything work without issue.

    When I load a new scene, I can see that Speaker.Instance.Silence() doest not work anymore. Also I added a listener to Speaker.Instance.OnSpeakCompleted on the first scene, not working anymore in the new one.

    I tried so many things to make this work on the new scene (Pause/Unpause, Mute/Unmute, Delete/CreateInstance, Speak with AudioSource defined, ...), but still have the same issue for now. I need a little help for this ^^' !

    Unity 2018.4.28f1
     
    Last edited: Dec 9, 2021
  26. Stefan-Laubenberger

    Stefan-Laubenberger

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

    We're here to help, but maybe it would be easier to do it via email.
    Is that an option?


    So long,
    Stefan
     
  27. SI_007

    SI_007

    Joined:
    Aug 10, 2015
    Posts:
    84
    Hi there!

    I have recently purchased RT-Voice and I am attempting to use it with AWS Polly. Unfortunately, the AWS Polly setup documentation is currently out of date, as the process does not entirely match (ex: should I check "basic flow").

    I first attempted to add the Policy Code as suggested, but it resulted in a syntax error. Therefore, I "replaced" the default policy code with the one in the documentation. I'm not sure if this was appropriate.

    Afterwards, I obtained and inserted the identity pool ID in the AWS prefab. Yet, when clicking on a voice in the demo, I receive the following error:
    WebException: The remote server returned an error: (400) .
    System.Net.HttpWebRequest+<GetResponseFromData>d__240.MoveNext () (at <0463b2ef957545c0a51b42f372cd4fbb>:0)

    Would it be possible to obtain an updated version of the setup documentation for AWS Polly?

    Thanks!
    Pascal
     
  28. SI_007

    SI_007

    Joined:
    Aug 10, 2015
    Posts:
    84
    On another topic, I would like to know if the issues with the Cereproc voices have been resolved?

    Since the discussion you had with Shayk2012 was moved to email exchanges, I am unsure if Cereproc voices work as expected with RT-Voices (i.e., without the 10 seconds delay each time the text is changed). If it does works, might there be additional documentations for such a setup?

    Thank you!
    Pascal
     
  29. Stefan-Laubenberger

    Stefan-Laubenberger

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

    I wish you a great 2022!

    About AWS Polly: unfortunately, I'm not a keen user myself and was happy to get it working years back;)
    It's possible the manual is outdated, but I don't know if I get the time and nerves to do it all over again. Basically. "all" you have to do is activate AWS Polly and obtain the Cognito Credentials.
    It's important that the endpoint and credentials match:
    upload_2022-1-6_13-51-27.png

    Typical Cognito Credentials for the example above would look like that:
    eu-central-1:a70a1373-5095-4413-9780-eb3fa893f89b

    Btw, this is not a working key :p

    Your error is most likely due wrong credentials or a non active AWS Polly.


    About Cereproc. the issue still existst and is a well known problem, e.g.:
    https://www.avsim.com/forums/topic/589633-cereproc-voices-have-5-7-sec-delay/

    Unfortunately, I can't fix this in RT-Voice, maybe v5 of the voices would work better, but I can't say for sure.

    I hope this helps you further.


    Cheers
    Stefan
     
  30. SI_007

    SI_007

    Joined:
    Aug 10, 2015
    Posts:
    84
    Hi Stefan,

    Thanks for your reply and best wishes for 2022. I have changed the Cognito credential and endpoint to match with AWS, but I am now encountering some issues. Firstly, a bright red text on screen shows "No OS voices found - TTS not Possible!", for a second and then disappears. Since it didn't pause the program, I selected a name to speak (i.e., Amy). This resulted in 2 errors and paused the program.

    The first error:

    WebException: The remote server returned an error: (403) .
    System.Net.HttpWebRequest+<GetResponseFromData>d__240.MoveNext () (at <0463b2ef957545c0a51b42f372cd4fbb>:0)

    Following with references to this script below:

    Crosstales.RTVoice.AWSPolly.VoiceProviderAWS.callAmazon (Amazon.Polly.Model.SynthesizeSpeechRequest request, Amazon.Polly.Model.SynthesizeSpeechResponse& response) (at Assets/Plugins/crosstales/RTVoice/3rd party/AWS Polly/Scripts/VoiceProviderAWS.cs:552)
    Crosstales.RTVoice.AWSPolly.VoiceProviderAWS+<>c__DisplayClass71_0.<speak>b__0 () (at Assets/Plugins/crosstales/RTVoice/3rd party/AWS Polly/Scripts/VoiceProviderAWS.cs:655)


    The second error:

    Could not speak the text: Wrapper {Uid='3d62c16e-204f-40ec-a19a-3640b8ecef0c', Text='Amy', Source='True', Voice='Amy (en-GB, FEMALE)', SpeakImmediately='True', Rate='1', Pitch='1', Volume='1', OutputFile='', ForceSSML='True', isPartial='False', Created='1/6/2022 2:43:44 PM'}
    UnityEngine.Debug:LogError (object,UnityEngine.Object)
    Crosstales.RTVoice.AWSPolly.VoiceProviderAWS/<speak>d__71:MoveNext () (at Assets/Plugins/crosstales/RTVoice/3rd party/AWS Polly/Scripts/VoiceProviderAWS.cs:680)
    UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)

    I think you will need to look into this issue in order to ensure that RT-Voice still works with AWS-Polly. If it no longer works, using the new setup process of AWS, then it's important to mention it in the documentation.

    Regarding Cereproc, this is truly unfortunate. Until this issue is resolved, the mention which states that RT-Voice works great with 3rd party asset like Cereproc should be removed in the documentation.

    Which "best in class / neural voice quality type" would you recommend being used with RT-Voice?

    Thanks!
    Pascal
     
  31. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Both errors imply that the provided credentials are wrong or AWS Polly is inactive for it.
    I just verified it on my side and everything works - so ith has to be that.

    The problem with Cereproc is that it works without any problems for some users and others have delays.
    Afaik the problem with the delay is only for v4 voices and v5 should work, but we don't own any voices from them.
    However, it technically still works, even with the delay - many customers use them to generate audio files for their game (to prevent any lags). I will think about an update of the descripttion.

    Imho, "Azure" delivers outstanding neural voices, but AWS and Google are also great.
    Please test them in our demo applications (best experience is with the standalone builds).
     
  32. SI_007

    SI_007

    Joined:
    Aug 10, 2015
    Posts:
    84
    Hi Stefan,

    Thank you for your message. I tried modifying or creating a new AWS ID, but without success, as the same error keeps coming back. The issue seems so vast (as it could be just about anything in AWS) that I have opted to gamble on one of the Cereproc voice (Caitlin - Irish English). It actually works, without any noticeable delays in the demo. I'll take that as a "win". ;)

    I will definitely take a look at Azure later on as well, if only to compare it with Cereproc.

    Thanks again for your help!
    Pascal
     
    Stefan-Laubenberger likes this.
  33. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    I just bought this, for now I just want the most basic of speaking, I have used this line of code:
    Speaker.Instance.Speak(currentMessage, audioSource, Speaker.Instance.VoiceForCulture("en"));

    And I added RTVoice prefab, unfortunately it doesnt speak. If I tick "active" on espeak then it starts speaking (shouldnt it work without that?) and then I get many errors like this

    Could not start process: System.ComponentModel.Win32Exception (0x80004005): ApplicationName='espeak', CommandLine='-v "en" -w "C:\Users\radia\AppData\Local\Temp\TYNEPUNK\Genocide Dolphins\rtvoice_f4fc82d5-8228-46c2-b73a-0845063538cb.wav" -z -m "my text etc"', CurrentDirectory='', Native error= The system cannot find the file specified.

    So, can it be used without espeak? or needs espeak? (i dont care about quality for now just want it speaking). And if it needs espeak why are there all them errors? I hope to slot this in as a last minute thing in a demo but I dont have long.

    What is the simplest way to get this to speak with built in windows voices? without error :)
     
  34. Stefan-Laubenberger

    Stefan-Laubenberger

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

    First of all, I wish you a great 2022!

    eSpeak is normally not needed under Windows and you don't need the prefab in the scene.
    Do you wait for the "OnVoicesReady"-callback before calling anything from RT-Voice?
    Have you tried our demos? Do the work for you without an errors?


    So long,
    Stefan
     
  35. Da_Neel

    Da_Neel

    Joined:
    Dec 29, 2013
    Posts:
    15
    I need help with broken prefab links in demo packages. I can't find how to use AudioSources with this asset
     
  36. Stefan-Laubenberger

    Stefan-Laubenberger

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

    I've sent you an email.


    So long,
    Stefan
     
  37. Murble

    Murble

    Joined:
    Aug 7, 2019
    Posts:
    14
    I have two problems which both cause me to not be able to use this.

    The first problem is one I have a major issue with, I can't add the RTVoice prefab to my scene in order to use the asset. Whenever I try to, it causes Unity to freeze up and load forever. It doesn't crash or throw any errors, it just loads forever. I tried all four different methods to add the RTVoice prefab to the scene that are listed in the documentation, but all result in an infinite load. Currently I have had it loading for over 50+ minutes now. I felt it was strange that no one else seems to have this problem, so I thought it may be my desktop. So, I tried doing it on my Laptop and it worked perfectly. Unfortunately, my laptop is horrible and outdated, so doing any kind of development on that is a no.

    Since I can't manage to import any prefabs and use the asset, I wanted to try and see if I can use the demo you have on the store, which leads to my second problem. The second one being something that was said earlier, where I have voices installed but they aren't showing up.
    I checked both the UWP and SAPI-5 panels and it shows that there are voices. However, for the SAPI-5 voices, which I believe you said is the ones used, I do have all of Amazon Polly's voices installed. So my list of voices looks like this:
    upload_2022-1-19_15-40-2.png
    I don't know if possibly having these voices installed on my computer caused it to have trouble finding voices or what, but I clearly have the voices available. I believe this may be what is also causing the issue with problem number 1 since I only have the voices installed on my desktop, which is the one having errors. My laptop which doesn't have them installed is once again able to add the RTVoice prefab to my scene and use the asset as is.

    I am currently about to try and remove all the Amazon Polly voices from my Desktop and see if that works.
     
  38. Murble

    Murble

    Joined:
    Aug 7, 2019
    Posts:
    14
    Removing Amazon Polly from Windows worked. I guess if you add Amazon Polly to your voices it somehow causes this asset to not work.
    Sucks I have to make the choice between the two, but oh well.
     
  39. Stefan-Laubenberger

    Stefan-Laubenberger

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

    I apologize for the hassle with the loading of the voices! I don't get the issue - we wait max. 7 seconds to load the voices... :(

    Can you please try it with the "SAPI Unity"-package from the "Extras"-folder?
    Maybe it works with the Amazon voices.


    So long,
    Stefan
     
  40. unity_FpeB9W73Zv5iZA

    unity_FpeB9W73Zv5iZA

    Joined:
    Jan 30, 2021
    Posts:
    3
    Hi in webgl speech synthesis, the pause and unpause is not implemented and working.
    Any solution?
     
  41. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    Hi can I write a text in runtime and save as an audio file to my hard drive with this asset?
     
  42. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Afaik, this is currently not possible - I asked the author of "WebGL Speech Synthesis" and await his response.


    Cheers
    Stefan
     
  43. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Short answer: Yes :)

    The Speak-call allows you to specify a destination for the generated audio:
    https://www.crosstales.com/media/da...ass_crosstales_1_1_r_t_voice_1_1_speaker.html

    We also provide dedicated solutions like the "AudioFileGenerator" to do bulk operations.

    I hope this helps you further.


    Cheers
    Stefan
     
  44. radezorack_unity

    radezorack_unity

    Joined:
    Jul 2, 2021
    Posts:
    1
    I'm using https://assetstore.unity.com/packag...ss-platform-offline-speech-recognition-203101 to turn my speech to text, but it stops working when I send text to RTVoice LiveSpeaker.SpeakNativeLive

    I'm on Mac and developing for iOS IPad.

    Any thoughts? Here's a portion of debug after it stops.

    Code (CSharp):
    1. <postRequest>d__5:MoveNext()
    2. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    3.  
    4. Word spoken: {0, 4}
    5. Crosstales.RTVoice.Provider.VoiceProviderIOS:WordSpoken(String)
    6.  
    7. Word spoken: {5, 4}
    8. Crosstales.RTVoice.Provider.VoiceProviderIOS:WordSpoken(String)
    9.  
    10. Word spoken: {10, 2}
    11. Crosstales.RTVoice.Provider.VoiceProviderIOS:WordSpoken(String)
    12.  
    13. Word spoken: {13, 3}
    14. Crosstales.RTVoice.Provider.VoiceProviderIOS:WordSpoken(String)
    15.  
    16. Word spoken: {17, 4}
    17. Crosstales.RTVoice.Provider.VoiceProviderIOS:WordSpoken(String)
    18.  
    19. Word spoken: {22, 5}
    20. Crosstales.RTVoice.Provider.VoiceProviderIOS:WordSpoken(String)
     
  45. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Unfortunately, I don't know the asset you are using. However, what exactly do you mean by "stops working" - what is no longer functioning? RTV or the other asset?

    Cheers
    Stefan
     
    Last edited: Jan 29, 2022
  46. SI_007

    SI_007

    Joined:
    Aug 10, 2015
    Posts:
    84
    Hi Stefan,

    I would like to know how to find the name of the voice(s) on a character (which somehow seems to be different from the name under Data-Voices, in the speaker script).

    FYI: I am using RT-Voice with Dialogue System. I am trying to use the "name" as preference in the RT Voice Actor script, in order to point it towards a CereVoice voice. Inserting the name of the CereVoice (CereVoice Caitlin - English (Ireland) (en-GB, FEMALE)) as preference results in the default male voice being selected.


    I also just noticed something in editor mode. If I try to "Test-Drive" the Cerevoice in the Speaker script, it results in the following error (even thought the voice works perfectly at launch):

    Could not speak the text: 400
    20220131 13:42:44.391 INFO: Loading voice from C:\Program Files (x86)\CereProc\CereVoice Caitlin 6.1.0\cerevoice_caitlin_6.1.0_24k_cerewave.voice
    20220131 13:42:44.729 INFO: Voice load successful
    Could not speak: System.NullReferenceException: Object reference not set to an instance of an object.
    at System.Speech.Internal.Synthesis.VoiceSynthesis.Speak(Prompt prompt)
    at Crosstales.RTVoice.TTSWrapper.speak(String speechText, SpeechSynthesizer speechSynthesizer)
    UnityEngine.Debug:LogError (object)
    Crosstales.RTVoice.Provider.VoiceProviderWindows:SpeakNativeInEditor (Crosstales.RTVoice.Model.Wrapper) (at Assets/Plugins/crosstales/RTVoice/Scripts/Provider/VoiceProviderWindows.cs:994)
    Crosstales.RTVoice.Speaker/<>c__DisplayClass223_0:<speakNativeInEditor>b__0 () (at Assets/Plugins/crosstales/RTVoice/Scripts/Speaker.cs:2320)
    System.Threading.ThreadHelper:ThreadStart ()

    Thanks!
    Pascal
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,702
    Stefan - For context, to decide which voice to use, the Dialogue System is given a gender, age range, and optional name. It loops through Speaker.Instance.Voices or Speaker.Instance.VoicesForCulture(culture) to find the best match of the Voice's Gender, Age, and name (if specified). Then it calls Speaker.Instance.Speak() with that voice.
     
  48. Stefan-Laubenberger

    Stefan-Laubenberger

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

    To get the desired voice, "Catlin" should be enough (as name).

    About the error: I hope it's not another CereProc issue :(
    The voice seems to be 32bit, so you may have to force RT-Voice to use 32bit.
    Please send us an email with your inovice and we will give you access to the newest version which allows this configuration.
    Alternatively, you could try it with the "SAPI Unity"-provider in the "Extras"-folder.

    Regards.
    Stefan
     
  49. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Thank you for your reply!

    I'm not sure why Pascal doesn't get the right voice. I think the name is too specific - this is why our "Speaker.Instance.VoiceForName" is not "exact" by default, meaning, it uses "contains" to select the voice for a given name. Therefore, simply "Catlin" should return the correct voice. Many voices don't have a gender - is it possible that your loop misses it? Maybe it's safer to just use "Speaker.Instance.Voices" as base for your loop.


    All the best,
    Stefan
     
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,702
    Thanks for the info. I've updated the integration to allow gender to be unspecified and to check if the voice "contains" the name instead of an complete match. (@StudioIncorrect - The updated integration is on the Dialogue System Extras page and will also be in DS version 2.2.25.)