mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-08-05 16:48:53 +00:00

- Refactored TTS model initialization methods in tts_gpu.py and tts_cpu.py - Added custom logger configuration in main.py - Deprecated text_processing router -> development route
14 lines
452 B
Python
14 lines
452 B
Python
from pydantic import BaseModel, Field
|
|
|
|
class PhonemeRequest(BaseModel):
|
|
text: str
|
|
language: str = "a" # Default to American English
|
|
|
|
class PhonemeResponse(BaseModel):
|
|
phonemes: str
|
|
tokens: list[int]
|
|
|
|
class GenerateFromPhonemesRequest(BaseModel):
|
|
phonemes: str
|
|
voice: str = Field(..., description="Voice ID to use for generation")
|
|
speed: float = Field(default=1.0, ge=0.1, le=5.0, description="Speed factor for generation")
|