Search Unity

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

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

  1. hosanWon

    hosanWon

    Joined:
    Jan 7, 2020
    Posts:
    1
    Hello Stefan. I have question.

    It's a really good job to buy your assets.
    I am making an android car game.
    I have problem. Speaker.Speak --> Expensive. There is Lek.
    I found what you wrote earlier. that
    ----------------------------------------------------------------------------------------------------------------------------------------------------------
    Hello again

    RTV hasn't a built-in cache; we tried this for a long time, but the requirements of our customers make this an extremely difficult task...

    However, there is nothing holding you back from rolling your own solution. If you take a look at the API, you will see that the "Speak"-call has a parameter called "outputFile":
    https://www.crosstales.com/media/da...ass_crosstales_1_1_r_t_voice_1_1_speaker.html

    You can use those files to populate your cache. E.g. every text has an id, so you look up the file with its id; if it's there, play it. If not, call "Speak" with id as "outputFile".


    I hope this helps you further.
    ----------------------------------------------------------------------------------------------------------------------------------------------------------
    I want to do that. I tried all day, but I couldn't.
    I don't know how to used That
    Can you Help me Some Example source code Please
     
  2. Stefan-Laubenberger

    Stefan-Laubenberger

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

    We're currently working on a port of our powerful caching system from DJ.
    But this will need some time - please send me your invoice and I can give you access to the latest version as soon as it's ready.


    So long,
    Stefan
     
  3. ickydime

    ickydime

    Joined:
    Nov 20, 2012
    Posts:
    110
    I think it is amazing you guys have kept up with this product for 5+ years. Well done :)

    I'm curious if you have any recommendations on a library that does Speech to Text? We are thinking we would use your library for TTS but need a second library to do the reverse. Unless this asset has some support for that as well?
     
  4. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi ickydime

    Thank you for the kind words!
    If you're happy with the product, don't forget to write a review ;)

    I assume you mean "speech recognition"? RTV doesn't offer this functionality, but a partner publisher has a solution that may fit your needs:
    https://assetstore.unity.com/packages/add-ons/machinelearning/google-cloud-speech-recognition-vr-ar-mobile-desktop-pro-72625

    I hope this helps you further.


    Cheers
    Stefan
     
  5. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    We bought your package and it works beautifully. One problem we have however is that if someone with a Samsung phone tries to change the voice/language of the TTs then his options will be different from another phone which has the google engine as his default?

    Is there any way on android in RTVoice to set the engine to Google's and get its voices to use?
     
  6. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Unfortunately, Samsung uses (on some phones) their own TTS - the Google engine isn't even installed...
    There are two oprions:
    1. "force" your affected users to install the Google engine
    2. Use an online service like AWS etc.

    I hope this helps you further.


    Cheers
    Stefan
     
  7. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    Do you mean that if it is installed then voices will appear regardless of the default engine?
     
  8. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    @Laubenberger I checked this and if I changed my preferred engine in screen reader settings to Google, then I have many options, otherwise on Samsung I have English and another language.

    As I looked, the android text to speech engine allows you to send your preferred engine in the constructor. Do you allow us to do that in RTVoice in any way? If not is it possible to add something to the next version so we can try to use Google's engine if available ?
     
  9. Stefan-Laubenberger

    Stefan-Laubenberger

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

    RTV uses the default engine on purpose; however we test if we can expose the engines and let the user choose the desired one. But I can't promise anything right now.


    Cheers
    Stefan
     
  10. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    @Stefan-Laubenberger Many thanks
    That would be great in general and help us save costs by not having to use the cloud providers most of the times
     
  11. ickydime

    ickydime

    Joined:
    Nov 20, 2012
    Posts:
    110
    I'm trying to get Mandarin characters to work. I can get Pinyin to work. I'm using AWS so it may be related to that or perhaps the way the characters are being sent to AWS (most likely).

    Should Mandarin characters work or just Pinyin?
     
  12. Olkan

    Olkan

    Joined:
    Nov 17, 2016
    Posts:
    13
    Hello there!
    Tried to change the voice from the default to female voice by using
    Code (CSharp):
    1. Speaker.VoiceForGender(Crosstales.RTVoice.Model.Enum.Gender.FEMALE)
    Its always playing with the default voice.

    Tried also the Test-Drive on the RTVoice prefab... it is working fine and showing the femail voice as well.
    upload_2020-6-27_13-11-4.png
     
  13. Stefan-Laubenberger

    Stefan-Laubenberger

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

    We added support for all installed TTS engines under Android. If you like to have access to the latest beta, please send us an email with the invoice.


    Cheers
    Stefan
     
  14. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi ickydime

    Unfortunately, I don't know much about the various Chinese writing styles and signs.
    Is it possible that you can provide some example texts? This way I would be able to try it on my own.


    Cheers
    Stefan
     
  15. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Are you waiting for the "OnVoicesReady"-callback before using the "Speak"-method?
    You can find an example in chapter 5.2.7 of the documentation:
    https://www.crosstales.com/media/data/assets/rtvoice/RTVoice-doc.pdf


    Cheers
    Stefan
     
  16. rizawerx

    rizawerx

    Joined:
    May 30, 2013
    Posts:
    38
    Hi,
    Quick questions...I'm using windows 10 and will create offline app. So is there any license fee to use windows TTS ? Can I use this plugin offline?
    Thank you
     
  17. Stefan-Laubenberger

    Stefan-Laubenberger

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

    No, there is no license fee for all built-in voices under Windows.
    It may defer for 3rd party voices from Cereproc etc.

    I hope this answers your question.


    Cheers
    Stefan
     
  18. jason416

    jason416

    Joined:
    Nov 8, 2018
    Posts:
    31
    I've been having an issue in iOS. I can't seem to stop the AVAudioSession without it throwing this warning:

    [AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session.

    What I have tried:
    Speaker.Silence()
    Speaker.Pause()
    SpeechText.Silence()
    AudioSource.Stop()
    AudioListener.pause()

    This occurs with Native iOS voices, Amazon Polly and Google.

    Has anyone run into this and solved it?
     
  19. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi Jason

    Unfortunately, I never saw this error before.
    However, since you experience the error with the non-native providers, like AWS and Google, I bluntly blame Unity for this issue :)
    The reason is that other providers are using only Unity-based audio stuff, so I currently can't imagine, what else would cause the problem...
    Which Unity version are you using?


    Cheers
    Stefan
     
    Last edited: Jul 5, 2020
  20. jason416

    jason416

    Joined:
    Nov 8, 2018
    Posts:
    31

    Hi Sefan,

    I'm on 2018.4.22 LTS.

    Well I guess I can live with that warning for now.

    On a related note I was also having issues getting Amazon and Google voices to start up again after De-Activating the AVAudioSession. But I finally found a work-around if anyone else is having this issue...

    The issue was that after re-enabling the AVAudioSession (for example to start Audio Ducking of other apps) the cloud providers would not start speaking again. The solution I found is to call UnityEngine.AudioSettings.Reset(AudioConfiguration);

    I could not determine what actually was causing this issue and I'm pretty sure this solution works by accident. It also has the side effect of interrupting any other music playing so it's not perfect but at least the voices start up again.
     
    Stefan-Laubenberger likes this.
  21. masai2k

    masai2k

    Joined:
    Mar 2, 2013
    Posts:
    45
    Hi,
    I just installed RT Voice PRO on my Mac, and I receive 2 errors:

    Assets/Plugins/crosstales/RTVoice/Scripts/Provider/VoiceProviderMacOS.cs(31,54): error CS1729: 'BaseVoiceProvider' does not contain a constructor that takes 1 arguments

    Assets/Plugins/crosstales/RTVoice/Scripts/Provider/VoiceProviderMacOS.cs(41,13): error CS0103: The name 'speakerObj' does not exist in the current context

    What I have to do to solve these issues??

    Massimo
     
  22. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Thank you for reporting this issue!

    We fixed the problem in the current beta version; please send us the invoice via email and we will give you access to the fixed version.


    So long,
    Stefan
     
  23. SirCodeWarrior

    SirCodeWarrior

    Joined:
    Sep 18, 2019
    Posts:
    16
    Hi @Stefan-Laubenberger, I bought RT-Voice, and really like it.
    I am experimenting to build a Mac OSX app with basic RT-Voice in Windows env. My RT-Voice's app in Windows is working the way I wanted, and would like to build it for Mac OS X. When I changed my Build Setting's Target Platform to Mac OS X, I get these 3 errors:
    Assets\Plugins\crosstales\RTVoice\Scripts\Provider\VoiceProviderMacOS.cs(31,54): error CS1729: 'BaseVoiceProvider' does not contain a constructor that takes 1 arguments
    Assets\Plugins\crosstales\RTVoice\Scripts\Provider\VoiceProviderMacOS.cs(41,13): error CS0103: The name 'speakerObj' does not exist in the current context
    Assets\Plugins\crosstales\RTVoice\Scripts\Speaker.cs(2230,33): error CS7036: There is no argument given that corresponds to the required formal parameter 'obj' of 'VoiceProviderMacOS.VoiceProviderMacOS(MonoBehaviour)'

    I searched in the forum thread and Google, but no luck finding answer.

    I am using Unity 2020.1

    Is there any tutorial or instruction for creating Cross Platform app?

    Thanks!
     
  24. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi SirCodeWarrior :)

    Please update to the latest version from the store.


    Cheers
    Stefan
     
    SirCodeWarrior likes this.
  25. SirCodeWarrior

    SirCodeWarrior

    Joined:
    Sep 18, 2019
    Posts:
    16
    Stefan-Laubenberger likes this.
  26. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    first impressions are WOW! this is amazing! we will see if my brain can keep up with implementing it.

    i posted on your tutorial youtube video about what I am trying to do

    I am trying to build a twitch chat tts, i have bought this and twitch irc by voodoo.

    Everything is working very well.

    I will do a video in a few days of what i am trying to do. This is on linux cinnamon mint 20.

    I am trying to integrate and implement cereproc natural voices.

    I have their sdk and a sample voice called heather.voice. I have no idea how to integrate cereproc voices into this workflow. I will try to figure it out and bug them if I can interface with marytts.
     
  27. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi Chris

    Just let me know if you need any assistance.


    Cheers
    Stefan
     
  28. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    Problem 1: how to i integrate crosstales rt voice pro and twitch irc so that
    it can read what comes up in the chat box and also what i type and send. see video below to see the problem visually.
    This should be very easy to do.

    problem 2: how do i integrate cereproc with unity / rt voice pro / mary tts.
    i see that rt voice pro has an alternative option to mary tts and espeeak. How do i plug cereproc into that?

    problem 3: when i compile the project and run it outside the editor i do not get any voices coming out.
    is this something to do with the error?

    error MissingReferenceException: The object of type 'AudioClip' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.

    here is a wip video.
     
  29. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Here are the answers to your questions:

    1. It's along video and we don't know Twitch IRC... :) Can you point me to the exact problem? You can simply call Speaker.Speak("text") whenever you like.
    2. You are using Cereproc under Linux, right? If that's the case, I'm afraid you would need your own custom provider. I can help you guide in the right direction. Personally, I would recommend using a cloud service like AWS Polly, Azure or Google on Linux - I know it's hard but they sound best ;)
    3. What's your provider for the build? MaryTTS or eSpeak?

    Cheers
    Stefan
     
  30. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    1. i will try to use Speaker.Speak("text") to solve this problem thanks for the tip!
    2. I will try to bug Cereproc to help me integrate with you.
    3. For the build i was using mary tts because the voices are better using your test server. i will test with espeak and also with a local mary tts server.
     
  31. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    some problems:

    1. I added the line Speaker.speak(ChatText.text);
    to twitch irc and get an error.

    //Receive message from server
    void OnServerMessage(string message)
    {
    ChatText.text += "<b>SERVER:</b> " + message + "\n";
    Speaker.speak(ChatText.text);
    Debug.Log(message);
    }

    ERROR
    Assets/TwitchIRC/Example/Scripts/TwitchIrcExample.cs(43,9): error CS0103: The name 'Speaker' does not exist in the current context

    normally i would declare something along the lines of using rtvoicepro; // to access functionality

    normally i would create a public game object and drag that in to enable crossover functionality.

    3. espeak works, connecting to your test server does not work on a standalone build, how do i access my local mary tts server?

    i can access my local server marytts in firefox via http://localhost:59125/
    When iput that in as the address i get this error.

    System.Net.WebException: Could not find a part of the path "/home/useri5/july 2020 tts 1/localhost:59125:59125/voices". ---> System.Net.WebException: Could not find a part of the path "/home/useri5/july 2020 tts 1/localhost:59125:59125/voices". ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "/home/useri5/july 2020 tts 1/localhost:59125:59125/voices".
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00164] in <fb001e01371b4adca20013e0ac763896>:0
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in <fb001e01371b4adca20013e0ac763896>:0
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean useAsync) [0x00000] in <fb001e01371b4adca20013e0ac763896>:0
    at System.Net.FileWebStream..ctor (System.Net.FileWebRequest request, System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare sharing, System.Int32 length, System.Boolean async) [0x00000] in <14e3453b740b4bd690e8d4e5a013a715>:0
    at (wrapper remoting-invoke-with-check) System.Net.FileWebStream..ctor(System.Net.FileWebRequest,string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool)
    at System.Net.FileWebResponse..ctor (System.Net.FileWebRequest request, System.Uri uri, System.IO.FileAccess access, System.Boolean asyncHint) [0x00026] in <14e3453b740b4bd690e8d4e5a013a715>:0
    --- End of inner exception stack trace ---
    at System.Net.FileWebResponse..ctor (System.Net.FileWebRequest request, System.Uri uri, System.IO.FileAccess access, System.Boolean asyncHint) [0x000a5] in <14e3453b740b4bd690e8d4e5a013a715>:0
    at (wrapper remoting-invoke-with-check) System.Net.FileWebResponse..ctor(System.Net.FileWebRequest,System.Uri,System.IO.FileAccess,bool)
    at System.Net.FileWebRequest.GetResponseCallback (System.Object state) [0x00074] in <14e3453b740b4bd690e8d4e5a013a715>:0
    --- End of inner exception stack trace ---
    at System.Net.WebClient.OpenRead (System.Uri address) [0x000a1] in <14e3453b740b4bd690e8d4e5a013a715>:0
    at System.Net.WebClient.OpenRead (System.String address) [0x00016] in <14e3453b740b4bd690e8d4e5a013a715>:0
    at (wrapper remoting-invoke-with-check) System.Net.WebClient.OpenRead(string)
    at Crosstales.RTVoice.Provider.VoiceProviderMary.getVoicesInEditor () [0x000b1] in /home/useri5/july 2020 tts 1/Assets/Plugins/crosstales/RTVoice/Scripts/Provider/VoiceProviderMary.cs:611
    UnityEngine.Debug:LogError(Object)
    Crosstales.RTVoice.Provider.VoiceProviderMary:getVoicesInEditor() (at Assets/Plugins/crosstales/RTVoice/Scripts/Provider/VoiceProviderMary.cs:665)
    Crosstales.RTVoice.Provider.VoiceProviderMary:.ctor(String, Int32, String, String) (at Assets/Plugins/crosstales/RTVoice/Scripts/Provider/VoiceProviderMary.cs:45)
    Crosstales.RTVoice.Speaker:initProvider() (at Assets/Plugins/crosstales/RTVoice/Scripts/Speaker.cs:2205)
    Crosstales.RTVoice.Speaker:ReloadProvider() (at Assets/Plugins/crosstales/RTVoice/Scripts/Speaker.cs:2076)
    Crosstales.RTVoice.EditorExtension.SpeakerEditor:OnInspectorGUI() (at Assets/Plugins/crosstales/RTVoice/Editor/Extension/SpeakerEditor.cs:182)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /home/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

    How do i access marytts as a local server?
    do i have to put it somewhere specific for the apllication to see it?
     
  32. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    I solved problem number 1 by putting twitchirc into the namespace Crosstales.RTVoice.Demo

    namespace Crosstales.RTVoice.Demo
    {
    public class TwitchIrcExample : MonoBehaviour
    {
    public Text VoiceText;
    Speaker.Speak(VoiceText.text);
    }
    }
     
  33. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Sorry for the delay, but I was traveling and couldn't answer sooner.

    Here are some details to your questions:

    1) As mentioned at the beginning of chapter 5 in the docs, you have to use "using Crosstales.RTVoice;" in your scripts to gain access to our classes

    3) You have to separate the url and the port:
    upload_2020-8-1_1-54-42.png

    I hope this helps you further.


    Cheers
    Stefan
     
  34. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    Thanks for your patience and support it really is helping! i have been looking into cereproc (because i love their accented voices) and they offer a cloud based service much like azure / aws / google could you help me with integrating that into rtvoice pro? https://api.cerevoice.com/v2/ it has a low use free tier for developers who own the sdk. (which costs 60 pounds)
     
  35. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi Chris

    The CereProc-API looks fairly easy and similar to the MaryTTS-provider.
    We have planned to add it as an official provider in the future, but I can't give you an ETA atm.

    If you're in a hurry and want to do it yourself, take a look at "VoiceProviderExample.cs" - you could create a copy and fill in the modified code from the MaryTTS-provider.


    So long,
    Stefan
     
  36. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    Ok, my current problem is that all the speech kicks in at once, how do i pause it speaking after each line
    i put in do and while from the dialog example but it didnt know what playing or running was in the current context.

    Code (CSharp):
    1. do
    2.                   {
    3.                      yield return null;
    4.                   } while (!playingB && Running);
    5.  
    6.                   //wait until played
    7.                   do
    8.                   {
    9.                      yield return null;
    10.                   } while (playingB && Running);
    11.  
    Assets/TwitchIRC/Example/Scripts/TwitchIrcExample.cs(86,29): error CS0103: The name 'playing' does not exist in the current context

    How do i make sure it pauses after each message rather saying it all at once? i will just put a few seconds pause in for now.
     
  37. Stefan-Laubenberger

    Stefan-Laubenberger

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

    You have to wait for the "OnSpeakComplete"-callback before you fire-up the next line.
    Please take a look at the example in chapter 5.2.7 of the documentation:
    https://www.crosstales.com/media/data/assets/rtvoice/RTVoice-doc.pdf

    I hope this helps you further.


    Cheers
    Stefan
     
  38. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    Problem = five instant server messages at the same time speaking at the same time

    Attempted solution 1: results in losing all but the first message.
    Q. Do I have to put them all into a string table then read them off?

    Code (CSharp):
    1. using System;
    2. using System.Collections.Generic;
    3. using System.Collections;
    4. using Irc;
    5. using UnityEngine;
    6. using UnityEngine.UI
    7.  
    8.  
    9. private bool isSpeaking =false;
    10.  
    11.  
    12.   void OnServerMessage(string message)
    13. {
    14.  
    15.      if (!isSpeaking)
    16.             {
    17.               isSpeaking = true;
    18.               StartCoroutine ("Pause1",message);
    19.               Debug.Log("OnServerMessage " + message);
    20.             }
    21.  
    22. }
    23.  
    24.  
    25. IEnumerator Pause1(string message1)
    26.         {
    27.        // if (!isSpeaking)
    28.        //    {
    29.             isSpeaking =true;
    30.             ChatText.text += "<b>SERVER:</b> " + message1 + "\n";
    31.             VoiceText.text = "<b> " + message1 + ":</b> " + "\n";
    32.             ListenText.text = VoiceText.text;
    33.             Speaker.Speak(VoiceText.text);
    34.  
    35.             yield return new WaitForSeconds (3);          
    36.             Debug.Log("wait is over");
    37.             isSpeaking = false;
    38.         //   }
    39.         }
    40.  
     
  39. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    I would create a queue of strings and enqueue the new messages and use a separate loop to dequeue them.
     
  40. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    Current problem I cant get subsequent messages to be spoken from the server.
    UPDATE: I think i might have been overthinking this as by putting Speaker.Speak(message); in various places in the irc code seems to solve the problem without having to go too deep into rtvoice pro.


    When i use direct chat to talk to stream it all works fine. Multiple chat inputs = multiple voice output.

    Getting messages back from server it doesnt give me any voice. its a bit weird.

    At the moment I am using Speaker.Speak(message);
    this works for first messages but subsequent messages are not spoken.

    Do I need to release the Speaker? for future speech?

    Can you show me how to check if voice is ready. Then check if Speaker if finished before moving on.

    I have had a look at the dialog example.

    I am struggling to follow the code.

    Would it be a while loop?
    While (!Speaker.OnSpeakComplete)
    {
    //wait till Speaker is finished?
    }

    is it something to do with these? is it something to do with Speaker.OnSpeakComplete?

    Speaker.OnVoicesReady
    Speaker.OnSpeakStart
    Speaker.OnSpeakComplete

    I understand that I should be using onEnable() and OnDisable() to initialise and shutdown event listeners. i dont really understand what we are doing with speakStartMethod and speakCompleteMethod

    Code (CSharp):
    1. public void OnEnable()
    2.       {
    3.          // Subscribe event listeners
    4.          Speaker.OnSpeakStart += speakStartMethod;
    5.          Speaker.OnSpeakComplete += speakCompleteMethod;
    6.       }
    7.  
    8. public void OnDisable()
    9.       {
    10.          // Unsubscribe event listeners
    11.          Speaker.OnSpeakStart -= speakStartMethod;
    12.          Speaker.OnSpeakComplete -= speakCompleteMethod;
    13.       }
    14.  
    15. // I dont really understand why we using model or wrapper
    16.  
    17. private void speakStartMethod(Model.Wrapper wrapper)
    18.   {
    19.          if (wrapper.Uid.Equals(uidSpeakerA))
    20.     {
    21.  
    22.     }
    23. }
    24.  
    25. private void speakCompleteMethod(Model.Wrapper wrapper)
    26.   {
    27.          if (wrapper.Uid.Equals(uidSpeakerA))
    28.     {
    29.  
    30.     }
    31. }
     
    Last edited: Aug 5, 2020
  41. Stefan-Laubenberger

    Stefan-Laubenberger

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

    It would maybe better if we discuss this issue via email.

    However, for your case, I think you only need "Speaker.OnVoicesReady".
    You should start calling "Speaker.Speak" after OnVoicesReady is called.
    I would not rely on the "Dialog"-example; this is what I would do:
    1. Use the Queue-class and store all incoming messages.
    2. Use "OnVoicesReady" to start a co-routine to process the messages
    3. Inside the routine, use a while loop and dequeue message after message (but only if "Speaker.isSpeaking == false"). Don't forget to yield with something like "WaitForSeconds(0.5f)".
    That's basically all you have to do.


    Cheers
    Stefan
     
  42. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    Another problem I have is when i build an unity project in linux then run it i cannot seem to check if it is connecting to the internet. For example i make it with your test mary tts server but i dont think when i build it standalone that it connects to anything. Is there some setting i need to make sure it can actually connect?
     
  43. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    You can't use our MaryTTS-server in builds; you have to use your own server or request a test-account on our server (by sending us your invoice).
     
  44. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    Thanks for that information i thought it was a problem on my end.

    I meant to suggest something, I use atavism and they provide a ubuntu virtualbox linux server. Maybe thats something you could do provide a virutal box marytts server for people to use that would distance reliance on your test server. So should i request a test account with you? I will try to setup a test server on another machine.
     
  45. ludm80

    ludm80

    Joined:
    Mar 10, 2020
    Posts:
    6
    Hello and thank you for your asset.
    I have followed the basic setup on this video:
    , it works well when playing in Unity Editor. But I am working on a Oculus Quest app and it does not work when I press the button. I havent set a voice name to have the one by default on Oculus (I hope there's one).
    I get this error :
    Code (CSharp):
    1. MissingReferenceException: The object of type 'AudioClip' has been destroyed but you are still trying to access it.
    2. Your script should either check if it is null or you should not destroy the object.
    I don't know how to solve this, is there someting to set in RTVoice ->Android Settings ->Engine or something else ?
     
  46. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Please send us your invoice and desired user name to gain access to our MaryTTS-test server.


    Cheers
    Stefan
     
  47. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Can you please add "Debug.Log(Speaker.Engines.CTDump());"? This should display all available speech engines in Logcat.
    Then choose an engine and set it with "Speaker.AndroidSpeechEngine".

    I hope this helps you further.


    Cheers
    Stefan
     
  48. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    Another question.
    How do i change the parameters of the marytts voice to make it default to a faster and higher pitch?

    using just the rtvoice prefab.

    My problem is that i have created a real time chat tts so i dont want to use pre written text.




    P.S.
    I set up a local virtual box on a separate computer on my lan to test stuff out. I dont want marytts working on ths same computer as the main program (localhost)

    I have setup a virtual box running mint 20 installed marytts used ifconfig to get ip address, applied bridged network to virtualbox i put the ip address in to rtvoice as the marytts server. It all seems to be working pretty good. :)
     
    Last edited: Aug 7, 2020
  49. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    You can use the "Speaker.Speak"-call like this:
    Code (CSharp):
    1. string yourText = "Test"; //your texts
    2. string yourDesiredVoice = "cmu-rms-hsmm"; //name of the MaryTTS voice
    3. float yourRate = 1.2f; //can be between 0 - 3
    4. float yourPitch= 1.5f; //can be between 0 - 2
    5.  
    6. Speaker.Speak(yourText, null, Speaker.VoiceForName(yourDesiredVoice), true, yourRate, yourPitch);
    I hope this helps you further.


    Cheers
    Stefan
     
    Feartheway likes this.
  50. ludm80

    ludm80

    Joined:
    Mar 10, 2020
    Posts:
    6
    Thank you Stefan,

    I have added "
    using Crosstales;
    " to be able to use
    CTDump()

    Result is com.svox.pico
    But the problem was the following: it was trying to load a fr-FR voice, I had this error in the Android Logact window :
    Error SVOX Pico Engine Failed to load textana resource for fr-FR

    So I have set the language in English and it works:
    public string Culture = "en";

    Speaker.Speak(Text.text, null, Speaker.VoiceForCulture(Culture));
     
    Stefan-Laubenberger likes this.