UnityTTS
UnityTTS copied to clipboard
Text to Speech in Unity.
Text to Speech In Unity
Important! The current model (fastspeech) does not work well with short phrases. (e.g. "hi", "how are you", etc.)
This package provides a fully functional cross platform Text To Speech engine using deep learning models integrated in Unity with C#!
You can find the example repository here.
-
Text to Speech In Unity
- Text To Speech
- Installation
- Support the project!
- Join the community!
- License
- References
Text To Speech
The model that we use for TTS is FastSpeech. The TFLite model that we used is converted from a pre-trained model found in the TensorflowTTS repository.
To prevent Unity from freezing when inferencing the TFLite model, we run the inference process in a new thread and play the audio in the main thread once it is ready.
Installation
External dependencies:
- voxell.util (UnityUtil)
- com.github.asus4.tflite (UnityTFLite)
- Clone the UnityUtil repository into your
Packages
folder. - Add TFLite package via "add package from git URL" selection in the package manager using this link: https://github.com/asus4/tf-lite-unity-sample.git?path=/Packages/com.github.asus4.tflite
- Clone this repository into your
Packages
folder. - Download the TFLite models from Google Drive and import them into Unity (place them inside the
Assets/StreamingAssets
folder). - And you are ready to go!
Support the project!
![patreon](https://teaprincesschronicles.files.wordpress.com/2020/03/support-me-on-patreon.png)
![kofi](https://uploads-ssl.webflow.com/5c14e387dab576fe667689cf/5cbed8a4cf61eceb26012821_SupportMe_red.png)
Join the community!
License
This repository as a whole is licensed under the GNU Public License, Version 3. Individual files may have a different, but compatible license.
See license file for details.
References
- Fastspeech
- MelGAN
- All TFLite model inferencing will not be possible without the help of the Unity TFLite repository.