Carruto

PhonemeX – Getting Started

Offline TTS with Phoneme Access for Unity WebGL

 

PhonemeX – Getting Started Guide

Welcome to PhonemeX, an offline phoneme-based text-to-speech solution for Unity WebGL powered by Unity Sentis and custom voice models. This guide will help you get up and running in just a few minutes.

1. Import the Installer Package

Download and import `Carruto_PhonemeX_Installer_WithCore.unitypackage` into your project. After import, the Getting Started window will open automatically.

You can reopen it anytime from: Window → PhonemeX →PhonemeX  Getting Started

 

2. Install Required Unity Packages

In the Getting Started window, click each Install button to add: Sentis, Newtonsoft JSON, Editor Coroutines. If prompted, import TextMeshPro Essentials.

3. Import the PhonemeX Core

Click Import PhonemeX Core to bring in runtime code, demo scripts, and UI prefabs.

4. Download a Voice Model

Use the Model Downloader to download at least one voice model.

5. Switch to WebGL Build Platform

Set WebGL as your target platform in Build Settings.

6. Try the Demo Scene

Open the demo scene under Assets → Carruto → PhonemeX → Demo → PhonemeXDemo.unity.

7. Run the Scene

Type text, select voice, click Speak. 🎉 You’re done!

PhonemeX Demo UI

This document provides a breakdown of the demo scene controller PhonemeXDemoUI.cs, which shows how to use PhonemeX to load voice models, synthesize speech, and display phoneme data in Unity.

Key UI Elements:

– Language Dropdown (TMP_Dropdown)
– Voice Dropdown (TMP_Dropdown)
– Speaker Dropdown (TMP_Dropdown)
– Text Input Field (TMP_InputField)
– Play Button
– Phoneme Output Field

How it works:

1. Start: Loads voice manifest and sets up dropdowns.
2. Dropdown Events: Handle changes in language/voice selection.
3. OnPlayClicked: Sends model and speaker data to controller.
4. Phoneme Display: Converts and displays phoneme output.

PhonemeX – Coding Guide

This guide explains how to use PhonemeX programmatically, without the demo UI. You’ll learn how to load a model, input text, and play generated audio using just a few lines of code.

Minimal Usage (Single Script):

using UnityEngine;
using PhonemeX;
using TMPro;

public class SimplePhonemeXTest : MonoBehaviour
{
    public TMP_InputField inputField;
    private PhonemeXController controller;

    void Start()
    {
        controller = gameObject.AddComponent<PhonemeXController>();
        // Make sure you downloaded the model en_GB-alan-low using model downloader        string modelName = “phonemex_models/en_GB/alan/low/en_GB-alan-low”;        controller.SetModelName(modelName);
        controller.SetInputField(inputField);
        controller.SetSpeakerID(0);
        controller.Speak();
    }
}

Memory Tip:

Resources.UnloadUnusedAssets();
System.GC.Collect();

📬 Support

Visit https://carruto.com for updates, support, or custom integration.

© 2025 Carruto. All rights reserved.