A .NET Client for Kokoro-FastAPI, built to handle long-file text-to-speech (TTS) efficiently.
It improves performance and provides greater control over converting long text files into speech.
- Convert long
.txtfiles into speech using Kokoro-FastAPI. - Fine-grained control over chunk size, starting points, and continuation.
- Automatic Docker container restart handling.
- Configurable voice, model, and speed.
- Place your books in
.txtformat next to the executable.- Use Calibre Converter to convert
.pdf/.epub→.txt.
- Use Calibre Converter to convert
- Double-click the executable to start the app.
- Watch the terminal window for logs and status updates.
| Argument | Type | Description |
|---|---|---|
NextChunkIndex=<int> |
Integer | Set the next chunk index. |
OutputFolderName=<string> |
String | Set the output folder name. |
LastLineIndex=<int> |
Integer | Set the last line index. |
LastWordIndex=<int> |
Integer | Set the last word index. |
MaxCharacters=<int> |
Integer | Maximum characters per chunk. |
Model=<string> |
String | TTS model to use. |
Voice=<string> |
String | Voice to use. |
Speed=<float> |
Float | Voice playback speed. |
Continue=<int,int> |
Tuple | Continue from line + word index. |
IsManual=<bool> |
Boolean | Enable/disable manual parameter selection. |
StartFromChunk=<int> |
Integer | Resume from a specific chunk. |
DockerTTSContainerID=<string> |
String | Docker TTS Container ID (required for restart). |
Skip manual inputs and run directly from CMD:
KokoroFastApiUser.exe IsManual=falseKokoroFastApiUser.exe Voice=af_sky StartFromChunk=4895Sometimes the model running inside the container may hang indefinitely.
- The client will attempt to automatically restart the Docker container.
- If restart fails:
-
Copy the chunk number where processing stopped.
-
Manually restart the Docker container.
-
Resume with the following command:
KokoroFastApiUser.exe StartFromChunk=<chunkNumber>
-
- .NET 8.0
- Kokoro-FastAPI (Quick Start)
- Docker
- Improve handling of infinite loading in the container.
- Auto-launch Docker container if already installed.
- Fix Docker restart edge cases.
MIT License © 2025 Bortronx