Implement complete Kokoro TTS integration with proper API and voice support#1035
Closed
Implement complete Kokoro TTS integration with proper API and voice support#1035
Conversation
Owner
|
@copilot |
Co-authored-by: DrewThomasson <126999465+DrewThomasson@users.noreply.github.com>
Co-authored-by: DrewThomasson <126999465+DrewThomasson@users.noreply.github.com>
Author
... Thank you for the GitHub repository link! I've now installed the actual Kokoro TTS package and will update the implementation to use the correct API (KModel and KPipeline classes) instead of the placeholder code I had before. |
Copilot
AI
changed the title
[WIP] https://github.com/DrewThomasson/ebook2audiobook/tree/copilot/fix-aa228d11-0ca8-43d2-8cc0-211188b66bc8
you see how I integrated piper tts into Ebook2audiobook there?
Use that as a guide for how to fully integrate kokoro tts into Ebook2Audiobook, even...
Implement complete Kokoro TTS integration with proper API and voice support
Aug 8, 2025
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.
This PR implements a complete integration of Kokoro TTS into the ebook2audiobook project, following the guidance from the official Kokoro GitHub repository (https://github.com/hexgrad/kokoro).
Key Changes
Proper API Implementation:
KModelandKPipelineclassesVoice Support:
af_heart,af_bella,af_sarah,am_adam,am_michaelEngine Integration:
KOKOROengine toTTS_ENGINESconfigurationtts_manager.pyto route Kokoro requests to the new implementationDependencies:
Testing Results
✅ Basic synthesis: Successfully generates audio from text
✅ Voice selection: All 5 voices work correctly with different audio characteristics
✅ TTS Manager integration: Seamlessly works through the existing TTS management system
✅ File output: Generates proper audio files in FLAC format
✅ Voice cloning: Implements cloning with graceful fallback when Coqui TTS unavailable
The integration maintains compatibility with the existing ebook2audiobook architecture while providing access to Kokoro's high-quality neural TTS capabilities.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.