Search Unity

[RELEASED] Android TTS Plugin

Discussion in 'Assets and Asset Store' started by Takohi, Sep 26, 2014.

  1. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
    We are glad to present you our second Android plug-in that enhances control over Android devices with TextToSpeech enabled.

    TextToSpeech allows you to make any Android device speak from a chain of characters. Android is an amazing system that can give you full control of voice synthesizing and this plugin will allow you to use all these controls from any Unity project in the easiest way.

    Now imagine how your games or applications can be so much cooler with this feature allowing you or the player to synthesize custom text. Moreover, many languages are available: English, Chinese, French, Japanese, German, Korean, Italian...
    In your game or application project, you will be easily able to:
    • Know if the device has TTS capabilities or not
    • Synthesize a voice from any chain of characters (string) or adding to a queue
    • Adding a silence between two synthesizing
    • Write the synthesized result in a WAV file in order to be used later in any Unity project
    • Stop at any moment the playback
    • Get the supported languages on the device
    • Set the language
    • Set the pitch
    • Set the speech rate
    • Specify the audio stream type to be used when speaking text (Music, Alarm, DTMF, Notification, Ring, System)
    • Be notified when the playback was played.
    Each function can be used with only one line in your code.
    Code (CSharp):
    1. TTSManager.Speak("I can hear the towels from your closet waiting for reconfort.", true);
    You can check how easy it is to use this plugin by checking the documentation and all available functions here:
    http://www.takohi.com/data/unity/assets/android_tts/documentation/

    You can also download and run a demo on your Android device by downloading this APK:
    http://www.takohi.com/data/unity/assets/android_tts/unity-android-tts-plugin-demo.apk
    The source code of this demo is included in the package.

    The price: 2$.
    The asset is available on the asset store here.

    If you have any suggestion or any question, please feel free to ask!
     
  2. Chopan

    Chopan

    Joined:
    Apr 25, 2013
    Posts:
    7
    Hi, does this plugin uses the native Android TTS Speaker? Is it compatible with spanish?
     
  3. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
  4. Chopan

    Chopan

    Joined:
    Apr 25, 2013
    Posts:
    7
    I've bought it, works perfect, thank you!
     
  5. nogard230

    nogard230

    Joined:
    Jul 21, 2014
    Posts:
    8
    Hi, guys!
    How add Portuguese(Brasil), English(United kingdom)and Hindi(Indian) languages?
    I'm using googles tts. Thanks.:)
     
  6. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
  7. SachinG

    SachinG

    Joined:
    Jul 24, 2015
    Posts:
    2
    Hey Takohi,

    It is a good plugin as I can see... I have couple of questions,
    1. Do you have a plugin for IOS and Win also ?
    2. How can I add a child's voice in this ?
     
  8. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
  9. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    Good afternoon . Bought Today Your active . I seem to be hum Great plugin .

    The problem is that I'm struggling to make it work in my application .
    Would you help me?

    I am making use of ngui buttons and actions through a playmaker . As your plugin does not support playmaker 'll need to write my code.

    Considering it. I'll need to be in Portuguese . From that point I start my code.
     
  10. Saddamjit_Singh

    Saddamjit_Singh

    Joined:
    Dec 4, 2015
    Posts:
    22
    Hello all,

    I have downloaded this plugin.But unable to use it.
    My motive is to set french language in my game.

    Can someone help .
    if (_localeStrings != null && _localeStrings.Length > 0)
    {
    TTSManager.SetLanguage(TTSManager.GetAvailableLanguages() [2]);
    }
     
  11. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
  12. Saddamjit_Singh

    Saddamjit_Singh

    Joined:
    Dec 4, 2015
    Posts:
    22
    Here is my approach-

    1.Firstly i want to check the languages available.
    For that i use TTSManager.GetAvailableLanguages in Debug.Log in start function and it is not giving the names of languages available.

    2.Then initialize

    3.Then what is lacole and how to use it

    4.i want french language. Does it require internet connection?
     
  13. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
    What do you see?
    How are you testing?
     
  14. Saddamjit_Singh

    Saddamjit_Singh

    Joined:
    Dec 4, 2015
    Posts:
    22
    Fixed.
    Sorry
    Thanks
     
  15. Phtevenz

    Phtevenz

    Joined:
    Jan 23, 2016
    Posts:
    2
    Hello,

    I want to use this TTS on my android device. I took a look at the documentation and the readme in the asset package and also took a look at the demo scene.

    I still do not know how to use it, can you give me a short overview on the steps needed to use?

    Currently i did following:

    -Created empty game object in unity.
    -Attached the script "TTS Demo Scene Manager" to this object

    If i hit start now, it shows a blue screen with "Initialized : false"

    I also made a Button in there with this script attached and activated "onclick"

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class speakOnClick : MonoBehaviour {
    6.  
    7.     public string speakText;
    8.     // Use this for initialization
    9.     void Start () {
    10.         TTSManager.SetLanguage (TTSManager.GERMAN);
    11.         if (speakText.Length <= 0)
    12.             speakText = "leerer Text!";
    13.     }
    14.    
    15.     // Update is called once per frame
    16.     void Update () {
    17.    
    18.     }
    19.  
    20.     public void speakThis(){
    21.         Debug.Log ("TTS speaking : " + speakText);
    22.         TTSManager.Speak (speakText,true);
    23.     }
    24. }
    25.  
    26.  

    Two things on this :

    It doesnt speak but does show on Debug.Log (Volume is on MAX )
    i want to get rid of the blue screen in the camera view.


    Can someone help me on this please?


    Thanks
     
  16. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
    Do you run it on a Android device?
    Because it is a Android plugin so it won't work in Unity editor.

    Did you make sure the function is called when you clicked on the button?
     
  17. Phtevenz

    Phtevenz

    Joined:
    Jan 23, 2016
    Posts:
    2
    Hello

    Thank you for your quick reply.

    It turned out i should not delete the example folder that came with the import, it works fine now.

    The blue screen shows as an overlay in my app, I commented out the OnGui() method in your code and now it seems to work without this overlay
     
  18. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Hi Takohi,
    i'm using your plugin and works very well but i'm looking a way use the speech result in unity (as audio clip) without storing it on the device (wav). Is there a way to do this on the fly? Could be a very useful feature.
    Thanks

    Max
     
  19. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
    Hello and thank you for using TTS!
    I already got this suggestion and as far as I know, I don't think this is possible. But I will keep investigate it and if I find a way to do that, I will definitively release a new update.

    Sorry for any inconvenience
     
  20. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Thanks for your reply.
    my workflow is:
    - Android Speech Recognizer Plugin to convert user voice to text
    - Analize the text and elaborate a text reply
    - Android TTS Plugin to Synthesize the reply
    - send the reply audio clip to Salsa to make the avatar speak.
    Now all is working ( there are not inconvenience...Do not be sorry) but i would like to optimize the process is some way.
    Another feature that could speedup the process would be to store the file on mp3/ogg (is it possible?) instead than wav.
    Thanks again
    Max
     
    Last edited: Apr 11, 2016
  21. baekd

    baekd

    Joined:
    Dec 11, 2016
    Posts:
    1
    ohio.
    I have galaxy s5(android 6.0.0 mashmelo) and unity versions is 5.4.2 ,android sdk is installed ,jdk too
    but...
    I want to AR system+TTS , when I found trackable image, I want to speak something
    so I was success 1 weeks ago.
    but now! it doesn't work any more...AR system is perfectly OK. TTS doen't work.
    also, the code is totally same , I didn't touch anything . just use "TTSManager.Speak("hi",true); '
    only use this.....then and I used vibrate android SDK in asset store free version and then,
    At once ,.well vibrate and speak hi! ...but that was last time . Since use vibrate sdk, TTS doesn't work..
    The most important is that your tts sample apk works well, finally , I changed my phone to Galaxy s6, and desktop, also unity version(5.4~>5.3) but it doesn't work too... : ( what's going on my precious tts system?? ) In my phone default tts setting page, sample speaking is well , google version/Samsung version both are good.

    in unity editor , adding debug log behind tts code, it is fine.
    can you tell me something , or whatever useful advice?
    what's your opinion of this problem?
     
    Last edited: Dec 11, 2016
  22. Aelcyx

    Aelcyx

    Joined:
    Jun 13, 2014
    Posts:
    12
    I'm using Unity 5.5.0f3 (64-bit) and I upon downloading TTS, I get the error, "TTSManager does not exist in the current context." Is there a certain .NET setting or plugin setting I need to use? Or is it just not compatible with Unity 5.5? Thanks.
     
  23. johnchoi313

    johnchoi313

    Joined:
    Jan 19, 2015
    Posts:
    8
    Hi Takohi Games,

    I really like the potential of this asset, but immediately upon importing, I'm getting this error:

    "Assets/Takohi/Examples/AndroidSpeechRecognizerPlugin/AndroidSpeechRecognitionDemoSceneManager.cs(6,10): error CS0246: The type or namespace name `SpeechRecognizerManager' could not be found. Are you missing an assembly reference?"

    Any ideas what's going on?
     

    Attached Files:

  24. Traleski

    Traleski

    Joined:
    Oct 30, 2014
    Posts:
    2
    Hello Takohi, i recently purchased your plugin and i'm having a minor problem with it.
    When i try to include android on the platform settings (ttsunityplugin) it doesn't build because it's "Unable to convert classes into dex format."

    I tried finding a solution for this but it is mostly related to duplicated .jar on the project and there's nothing duplicated here so i'm not sure what i can do about it.
     
  25. Hadid

    Hadid

    Joined:
    Jun 12, 2015
    Posts:
    6
    Hi Takohi, does the plugin support hebrew? i tried the hebrew code from the oracle documentation but it still gives english
     
  26. newcoder17

    newcoder17

    Joined:
    Dec 9, 2017
    Posts:
    103
    Hi,
    Does this allow you to choose between different voices eg male and female dynamically as it is running? I need to have 2 or 3 different voices in my app.

    Thanks
     
  27. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    127
    this plugin doest work, even in Android build ;/ BTW,
     
  28. tholmgren2017

    tholmgren2017

    Joined:
    Jul 11, 2017
    Posts:
    2
    I'm seeing a lot crash on Unity and Google Play Console for the following:
    com.takohi.unity.plugins.tts.TTSManager$1.onInit (TTSManager.java:26)

    How can I fix this?
     
  29. dianaukou3019002002

    dianaukou3019002002

    Joined:
    Apr 15, 2020
    Posts:
    2
    Hi, I purchased this tts plugin yesterday and it is not work and demo.apk also not work I even can't insert text to the text field in the demo. I'm typing letters but no text appers in the text field, can you help me?
     
  30. dianaukou3019002002

    dianaukou3019002002

    Joined:
    Apr 15, 2020
    Posts:
    2
    this is text of my script
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    public class ScTalk1 : MonoBehaviour {

    // Use this for initialization
    void Start () {
    TTSManager.SetLanguage (TTSManager.ENGLISH);
    TTSManager.Speak ("this is text to speak by tts plugin",true);
    }
    // Update is called once per frame
    void Update () {


    }
    }
     
  31. specularpro

    specularpro

    Joined:
    Nov 8, 2017
    Posts:
    6
    Has anyone tried this on a Quest 2? Is this still supported? The link to the apk is down, is it up anywhere else?