TextToSpeech

TTS technology  reads aloud texts on computers, tablets and smartphones. It basically converts texts into spoken voice or audio by reading any string of text characters to form sentences.

Want to turn your words into human-like relatable voices? That is the power of TTS or Text to Speech Function.

Although this assistive technology was initially built for the visually impaired, it is now used to aid in learning languages. TTS helps children and foreign language learners in reading and correct speech pronunciation.

For your unity application, this TTS powered by OrukaUnity is geared up to fit for unity-based developments. It is a plug-in that allows the ease of using native text-to-speech feature for iOS and Android.

Features of OrukaUnity’s TTS include the following:

  • Volume, rate and pitch adjustments
  • Can switch TTS engines for voice language and settings for android

System Requirements include

  • iOS7 or higher
  • Android 1.6 or higher + TTS Engine

How to Use

  1. Demo for Easy TTS in Android and iOS

Sample Code  for EASY TTS using C#

  • public class DemoEasyTTS : MonoBehaviour { private string stringToEdit = “Test”; void OnGUI () { stringToEdit = GUI.TextField (new Rect (Screen.width/2-100, Screen.height/2-100, 200, 50), stringToEdit,200); if (GUI.Button (new Rect (Screen.width/2-50, Screen.height/2-20, 100, 40), “Speak”)) { EasyTTSUtil.SpeechAdd(stringToEdit); } } void Start(){ EasyTTSUtil.Initialize (EasyTTSUtil.UnitedStates); } void OnApplicationQuit() { EasyTTSUtil.Stop (); } }

The additional features allows to switch to other TTS engine in order to change option of Voice Setting and Language for the inputed text in Android which depends on the installed TTS engine.

  • EasyTTSUtil.Initialize(language, engine)
    • language – use the ISO 639-1 language code.
    • engine – is the package name of the installed TTS engine.​
  • EasyTTSUtil.GetEnginePkgArray() – allows access to the list of TTS names installed in the device
  • EasyTTSUtil.OpenTTSSetting() – opens a screen for voice setting of the device:

Sample Code for Android Additional Feature using C#

public class DemoEasyTTS_SelectEngine : MonoBehaviour
{
 
    private string stringToEdit = "Test";
    private bool selecting = false;
    private string engineName = "";
    private string enginePkg ="";
 
    void OnGUI ()
    {
        stringToEdit = GUI.TextField (new Rect (Screen.width / 2 - 100, Screen.height / 2 - 100, 200, 50),
          stringToEdit, 200);
        if (GUI.Button (new Rect (Screen.width / 2 - 50, Screen.height / 2 - 20, 100, 40), "Speak")) {
            EasyTTSUtil.SpeechAdd (stringToEdit);
        }
        if (GUI.Button (new Rect (Screen.width / 2 - 50, Screen.height / 2 +100, 100, 40), "SelectList")) {
            selecting = true;
        }
        if (GUI.Button (new Rect (Screen.width / 2 - 50, Screen.height / 2 +300, 100, 40), "OpenTTSSetting")) {
            EasyTTSUtil.OpenTTSSetting ();
        }
 
        if (selecting) {
 
            string[] nameArray = EasyTTSUtil.GetEngineNameArray ();
 
            int selected = -1;
            selected = GUILayout.SelectionGrid (selected, nameArray, 1);
            if (selected != -1) {
 
                string[] pkgArray = EasyTTSUtil.GetEnginePkgArray ();
                enginePkg = pkgArray [selected];
                engineName = nameArray [selected];
                EasyTTSUtil.Initialize(EasyTTSUtil.UnitedStates,enginePkg);
                selecting = false;
            }
        }
        if (engineName == null) {
            engineName = "null";
        }
        GUI.TextField (new Rect (Screen.width / 2 - 50, Screen.height / 2 + 200, 100, 40), engineName);
 
    void Start(){
        EasyTTSUtil.Initialize (EasyTTSUtil.UnitedStates);
        engineName = EasyTTSUtil.GetDefaultEngineName ();
    }
 
    void OnApplicationQuit ()
    {
        EasyTTSUtil.Stop ();
    }
}

EasyTTSReadMe.txt is also provided with information on how to use the TTS package and detailed description.

Simple Text Style

SIMPLE TEXT STYLE is a complete substitute for default Unity fonts. It is designed to work similarly to the default Unity fonts but with extra stunning features to suit the needs for UI design. The use of this assets helps in the ease of the following:

Features

  • Can add projected text shadows
  • Can high quality outline
  • Can easily add Gradients to text
  • Can add Detail texture
  • Can tweak text resolution
  • Supports unity 4.3 sprite layer ordering
  • Can support undo, redo and multi-object editing

How to:

For Demo1 

This demo is about generating textStyleSetting and creating your own SimpleTextStyle

  1. Open Demo1.unity 
  2. In Unity, Navigate to InternalScript folder in Project section
  3. Right click on SimpleTextStyleSetting.cs and choose Generate “SimpleTextStyleSetting”
  4. Once generated, change the default generated filename (choose whatever filename you like that suits for your gameObject)

Now, you have your own generated SimpleTextStyle setting. You can now add your own SimpleTextStyle

  1. In your current scene, create UI>Text
  2. Put SimpleTextStyle to the GameObject (How to:)
    1. Drag the SimpleTextStyle script to the UI text you just created and you now have the script for your gameObject
    2. OR
    3. Navigate to Inspector, add a component below
    4. Choose Script and add the SimpleTextStyle script 
  3. For the setting, choose SimpleTextStyleSetting  (You can just drag the script and drop it to the Setting field in component)
  4. For the last step, tap the generated TextStyleSetting and modify some fields you want to edit whatever you edited (Font, style, size, colour, etc), the text on the UI will also take effect.

Easy right? 😉 

For Demo2 

This demo is about changing all style setting by theme or language setting.

  1. Open Demo2.unity 
  2. In Unity, Navigate to InternalScript folder in Project section
  3. Right click on SimpleTextStyleSettingLocator.cs and choose Generate “SimpleTextStyleSettingLocator”
  4. Once generated, tap the generated file and Navigate to Inspector
  5. As you can in our sample, we add HeaderEN as our Def Setting (You Can as well create your own SimpleTextStyleSetting from Demo1)
  6. Add the Key List size then the Setting List
  7. When changing the setting, call SimpleTextStyleSettingLocator.SetKey (string key) method

Okay cool! Easy right? 😉 

SimpleLocalization — An Asset to Reach the Global Community

Imagine your applications and developments being used by millions around the globe. That’s possible through Localization. This simply means that the global market is right within our reach! This SimpleLocation powered by OrukaUnity is not just your typical Unity asset.

The major highlight of this asset is its ‘simplicity’ which will only take you a few clicks to generate  localized data. Anchored from the idea of minimalism, this asset is your quick help to your localization needs.  This will solve your needs for multiple language in just a few clicks without the hassle of reviewing other’s codes or the depths of hardcore implementation process. See for yourself!

KEY FEATURES

Multiple Language Assurance

Power up your Unity applications and reach multiple users from different countries through this SimpleLocalization Asset by OrukaUnity. This powerful asset can help you automatically translate your content without spending much time and effort.

Available Localization

This asset can localize string in script, uGUI Text, TextMesh, TestMeshPro in an easy way! Steps are even available below.

TSV File supported

Aside from The TSV file, this asset can generate EnumLocalizationID and EnumLocalizationLanguage in just one click!

Clean Code

Guaranteed clean code is given that’s easy to understand and editable. Aside from the ease of use, this clean code will not take much of your time since it will only be short, precise and concise.

Continuous Development

You can expect that this product will be continuously developed to suit the needs of the developers. Since this product is entirely owned by the seller, quick fixes, improvements and updates are easy.

Full Customer SupportThe assurance of getting a full assistance from our customer support is guaranteed all throughout the process. There’s no need to worry about setup and maintenance since customer support will be provided for a smooth transition.

HOW TO USE

In order to correctly use this asset, follow the steps and examples.

Preparation

  1. Create a TSV sheet file. In creating the TSV file, make sure you take note of the following:  
    1. Use a number and increment it.
     
    1. Use a unique variable name.
     
    1. Prepare a localize support name. (Note:  It is important to note that in TSV, new line and tab can’t be used. However, this can be replaced the use of \n.)
     
    1. Next, go to Unity tool>Project View>Click Generate Button.
     
    1. Once TSV file is generated, EnumLanguageSetting and EnumLocalizeName will be created. Remember that EnumLanguageSetting is used in ChangeSetting and EnumLocalizeName is used to getText.

How to Use

  1. Void ChangeSetting (EnumLaungageSetting settingLanguage).

If setting is not changed, default will be mostly left register language in TSV sheet.

2. String GetText (EnumLocalizeName id) or string GetText (string idStr).

Getting localized text depends on setting and TSV sheet. In order to get the desired localization, set parameters first. You can use the ID defined in the TSV which is also the throw System to create the Enum file. It would be better to use Enum than String for ease of change and type safe.