This is the Unity3d port of Piper text-to-speech (TTS) library. It provides fast, local, and high-quality speech generation for multiple languages. Inference is done by using Unity Sentis.
Supports only Windows x86-64.
https://github.com/Macoron/piper.unity/assets/6161335/7ab818f0-acd6-46cf-ab5b-09c847aca2dc
"en_US-lessac-medium" model tested on English text
https://github.com/Macoron/piper.unity/assets/6161335/fd6a5826-23e7-4dca-acdd-00469d71c882
"ru_RU-ruslan-medium" model tested on Russian text
.onnx
model file, such as en_US-lessac-medium.onnxAssets
folder. Sentis should automatically transform it into model assetAssets/Piper/Samples/PiperSample
scene in Unity EditorPiper
GameObject and set PiperManager.Model
field to previously downloaded model You can find more piper models here. Each model comes with a model card describing the training dataset and license (for example en_US-lessac-medium model card).
You would also need to set correct the "voice" (language code) and sample rate for the model. This can be find in json located near the model, like in en_US-lessac-medium.onnx.json.
piper.unity is released under the GPLv3 license.
It uses eSpeak NG compiled libraries and data which are under GPLv3 license.
It also uses Piper Phonemization fork compiled library which is under MIT license.
Models aren't included in this repository. Please contact the original model's creators to learn more about their licenses.