assets
[Sentis] Fix ONNX Model Import: Kokoro-82M TTS Failures
Solution
Unity 2023.2.x - Unity 6.3.x
Published Sun, Mar 8
Unity Sentis encountered import errors when processing the Kokoro-82M Text-to-Speech (TTS) ONNX model, specifically reporting non-support for critical ONNX operations including ConcatFromSequence, Loop, SequenceEmpty, and SplitToSequence.
Sentis now supports the Kokoro-82M Text-to-Speech (TTS) model through updated support for sequence-based ONNX operators.
- Open the
Package Managerand update Sentis to version 2.1.0 or later to ensure compatibility withLoopandSequenceoperations. - Import your ONNX file into the
Projectwindow to allow the Sentis importer to generate aModelAssetautomatically. - Use your text processing library to convert raw text into tokenized phoneme IDs before passing them to the Sentis runtime.
- Initialize a
Workervia theWorkerFactoryusing theComputePrecompiledorGPUComputebackend for optimal performance. - Execute the
Modeland extract the resultingTensorFloatdata into anAudioSourceusingSetData.
Additional Tips
- Monitor the
Profilerto manage the memory footprint of the Kokoro model during runtime as sequence operations can be memory intensive. - Verify that your ONNX file uses Opset 13 or higher for optimal compatibility with the Sentis importer.
TL;DR
The Kokoro-82M Text-to-Speech (TTS) ONNX model is now fully supported by Sentis through enhanced operator compatibility, enabling high-quality neural speech synthesis within the engine.
Related Posts Haven't quite found a solution to your problem? We think these posts might help you.
[Audio] Resolve Import Failures for Converted OGG Assets[2D Sprites] Master Dynamic Visual Depth Control[Canvas System] Duplicated UI Assets: Awake Initialization Skip
Content inspired by a Unity discussion post.