13 lines
440 B
Python
13 lines
440 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
|
|
class SynthesizeRequest(BaseModel):
|
|
text: str
|
|
target_sample_rate: int = 16000
|
|
framework: str = "piper"
|
|
model: str = "en_US-lessac-medium"
|
|
return_lc3: bool = False
|
|
language: str = "en" # Language code for XTTS
|
|
speaker: Optional[str] = None # Speaker name for XTTS
|
|
speaker_wav: Optional[str] = None # Path to speaker sample for XTTS voice cloning
|