Integrate Kokoro TTS as tts-1-kokoro model

- Added kokoro>=0.9.2 and soundfile to requirements.txt
- Created kokoro_wrapper class for 24kHz decoder-only TTS
- Added tts-1-kokoro endpoint with full voice mapping
- Mapped 32 Kokoro voices (11 female American, 9 male American, 4 female British, 4 male British, 4 Spanish, etc.)
- Added OpenAI-compatible aliases (alloy, echo, fable, onyx, nova, shimmer)
- Lightweight 82M parameter model, Apache licensed

Voices:
- American English (lang_code 'a'): 20 voices
- British English (lang_code 'b'): 8 voices
- Supports 9 languages total (a, b, e, f, h, i, j, p, z)

🦝 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Russell Ballestrini 2025-11-09 13:37:48 -05:00
parent 1a27597d94
commit d48fa6b29c
3 changed files with 196 additions and 3 deletions

View file

@ -20,7 +20,9 @@ omegaconf # Required by Silero TTS
langdetect
pyyaml
# Kokoro TTS - fast decoder-only architecture
# Install from Hugging Face transformers
# Lightweight decoder-only TTS, 82M params, 24kHz output
kokoro>=0.9.2
soundfile # Required by Kokoro for audio output
transformers>=4.35.0
# Hugging Face Hub for model downloads
huggingface-hub[cli]