feat: add kokoro-onnx as lightweight TTS backend#261
Open
DiarmuidKelly wants to merge 3 commits intombailey:masterfrom
Open
feat: add kokoro-onnx as lightweight TTS backend#261DiarmuidKelly wants to merge 3 commits intombailey:masterfrom
DiarmuidKelly wants to merge 3 commits intombailey:masterfrom
Conversation
Author
|
Add kokoro-onnx service as an alternative to PyTorch-based Kokoro: - New service on port 8881 with OpenAI-compatible /v1/audio/speech endpoint - ONNX Runtime parallelises across all CPU cores (vs single-core PyTorch) - int8 quantised model uses 88MB vs 310MB full model - Lower memory footprint, faster CPU inference Files added: - voice_mode/services/kokoro_onnx/server.py - FastAPI server - voice_mode/templates/scripts/start-kokoro-onnx.sh - Service script - tests/test_kokoro_onnx.py - 18 unit tests Usage: voicemode service start kokoro-onnx # Configure: VOICEMODE_TTS_BASE_URLS=http://127.0.0.1:8881/v1
- Add voicemode service install kokoro-onnx command - Create installer.py with automatic dep install and model download - Add kokoro-onnx health check support in CLI - Update docs with automatic installation option - Add inference time comparison (PyTorch ~30s+ vs ONNX <10s) - Add GPU acceleration notes (CUDA, DirectML, ROCm) - Add installer tests
- Add voicemode service install kokoro-onnx command - Create installer.py with automatic dep install and model download - Add comprehensive unit tests for installer (32 tests total) - Pin kokoro-onnx to ~=0.5.0 (compatible release) - Add real TTFA benchmarks: ONNX 1.6s vs PyTorch 7.8s - Add GPU acceleration notes (CUDA, DirectML, MIGraphX)
efd3384 to
2b67539
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #262
Changes
voice_mode/services/kokoro_onnx/package with FastAPI servervoicemode service install kokoro-onnxcommandConfiguration
Test plan