Add all 54 Kokoro TTS voices and 9 language support

- Expanded from 8 to 54 voices across 9 languages
- American English: 21 voices (11 female, 10 male)
- British English: 8 voices (4 female, 4 male)
- Spanish: 3 voices (1 female, 2 male)
- French: 1 voice (1 female)
- Hindi: 4 voices (2 female, 2 male)
- Italian: 2 voices (1 female, 1 male)
- Japanese: 5 voices (4 female, 1 male)
- Portuguese: 3 voices (1 female, 2 male)
- Chinese: 7 voices (4 female, 4 male)
- Updated backend to support all language codes (a,b,e,f,h,i,j,p,z)
- Added comprehensive voice documentation
This commit is contained in:
2025-12-09 11:14:28 +00:00
parent 7ef969314b
commit 5c7b339bdf
4 changed files with 248 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ class TTSService:
Caches pipelines to avoid reloading.
Args:
lang_code: Language code (a, b, f, j)
lang_code: Language code (a, b, e, f, h, i, j, p, z)
Returns:
KPipeline instance for the language
@@ -51,7 +51,7 @@ class TTSService:
Raises:
ValueError: If language code is not supported
"""
supported_langs = ['a', 'b', 'f', 'j']
supported_langs = ['a', 'b', 'e', 'f', 'h', 'i', 'j', 'p', 'z']
if lang_code not in supported_langs:
raise ValueError(
f"Unsupported language code: {lang_code}. "