Overview
LocalVoice is a powerful Unreal Engine plugin that enables 100% offline, real-time Text-to-Speech (TTS) synthesis directly inside your game. Operating entirely locally using state-of-the-art ONNX technology, it runs fully asynchronously on background threads to ensure zero game stuttering or frame drops. Whether you need dynamic NPC dialogue or system narrations, LocalVoice delivers fast, high-quality audio generation without requiring an internet connection.
How To Use
Step 1: Configure Project Settings
Go to Plugins and disable NNERuntimeORT plugin
Go to Edit > Project Settings
Find the Local Voice TTS category
Set your target directory path pointing to your models folder in Content
Step 2: Install Model Files
Take the model folder provided in link below
If the button does not work: https://drive.google.com/file/d/1OHWXqeNjvOgYtmp4YYZiN5_GHG_ZIKru/view?usp=sharing
2. Place it directly inside your designated models directory
Step 3: Initialize the Model (Persistent Workflow)
At the beginning of your interaction call the Initialize Text To Speech async node
Pass the exact name of the model folder as an argument
Note: This preloads the model into the RAM, keeping it ready for instantaneous use until explicitly unloaded
Step 4: Generate Speech
Use Text To Speech async node
Pass the same model name and your target text string
The output pin provides a ready-to-play SoundWaveProcedural
Note: Once the model is initialized, this node will generate voice instantly on demand for subsequent calls until the model is unloaded
Step 5: Unload the Model
When the interaction sequence completely ends, call Unload Text To Speech with the respective model name. This safely frees up system memory and clears the cache
Single-Node Generation
If you do not want to manage manual initialization and cleanup states, you can use the all-in-one approach:
Single Text To Speech: This node handles everything automatically in a single block. It initializes the model on the fly, generates the audio, and immediately unloads the model from memory once finished.
Note: The initial model loading time take approximately 1.5 seconds in both workflow approaches
Adding Custom Models
Obtain a compatible ONNX voice model and its corresponding JSON configuration file
Create a dedicated folder for the model
Drop that folder directly into your project's configured models directory
Technical Notes
Asynchronous Architecture: Heavy tensor calculations and audio synthesis run on backround worker threads, keeping the game completely unblocked
Smart Path Resolution: Unreal's robust package system handlers to seamlessly translate virtual path (/Game/) to physical Windows storage paths.
Procedural Sound Waves: Directly generates SoundWaveProcedural objects, making them instantly plug-and-play with standard Unreal Audio Components.
Third-Party Notices
Sherpa-ONNX
This plugin utilizes sherpa-onnx for underlying model interface
License: Apache License 2.0
The full license text is included within the plugin files
Amy Voice Model
The default voice model (amy) included with the plugin package is subject to open-source distribution terms
Licens: MIT License
The full license text is included within the plugin files