![]() |
VOOZH | about |
dotnet add package KokoroSharp-android --version 0.5.7-android
NuGet\Install-Package KokoroSharp-android -Version 0.5.7-android
<PackageReference Include="KokoroSharp-android" Version="0.5.7-android" />
<PackageVersion Include="KokoroSharp-android" Version="0.5.7-android" />Directory.Packages.props
<PackageReference Include="KokoroSharp-android" />Project file
paket add KokoroSharp-android --version 0.5.7-android
#r "nuget: KokoroSharp-android, 0.5.7-android"
#:package KokoroSharp-android@0.5.7-android
#addin nuget:?package=KokoroSharp-android&version=0.5.7-android&prereleaseInstall as a Cake Addin
#tool nuget:?package=KokoroSharp-android&version=0.5.7-android&prereleaseInstall as a Cake Tool
https://github.com/user-attachments/assets/82a32382-2e9b-4233-a66f-987b2802717e
KokoroSharp is a fully-featured inference engine for Kokoro TTS, built entirely in C# with ONNX runtime. It enables developers to perform flexible and fast text-to-speech synthesis utilizing multiple speakers and languages.
Supports languages/accents:
[American English, British English, Spanish, French, Italian, Brazilian/Portuguese].With a custom phonemization solution, these additional languages are also supported:
[MandarinChinese, Japanese, Hindi].(phonemes -> tokens) conversion.KokoroTTS tts = KokoroTTS.LoadModel(); // Load or download the model (~320MB for full precision)
KokoroVoice heartVoice = KokoroVoiceManager.GetVoice("af_heart"); // Grab a voice of your liking,
while (true) { tts.SpeakFast(Console.ReadLine(), heartVoice); } // .. and have it speak your text!
// Note: Language detection is automated based on what the loaded voice supports.
Above is a simple way to get started on the highest level. For more control, check out the example Program, which covers more advanced parts like job scheduling, voice mixing, and long-term, speaker-agnostic playback queuing.
KokoroTTS.LoadModel("path/to/model"), or downloaded automatically with KokoroTTS.LoadModel(). Check out the various overloads of KokoroTTS.LoadModel for background loading.KokoroSharp prioritizes a smooth developer experience by logging potential misuse instead of throwing exceptions. Wherever possible, the library attempts to automatically resolve issues to minimize disruptions.
All communication with the AI model and playback devices happens on background threads, letting the main thread focus on rendering the UI in peace. The library is carefully designed with thread-safety in mind.
The voices folder are automatically copied to your build path when you build and are ready to be accessed. Same with the mentioned espeak backends. Developers may opt to remove them when shipping their apps.
Mind that LoadVoicesFromPath exists as an option, in case developers want to implement their custom voice-loading logic when shipping a project that utilizes KokoroSharp for text-to-speech synthesis.
In addition, the built-in tokenization (text -> tokens) is NOT mandatory, and can be bypassed for platforms like Android/iOS, given developers provide pre-phonemized input with their phonemization solution of choice.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.5.7-android | 257 | 4/28/2025 |