mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-04-13 09:39:17 +00:00
24 lines
537 B
Python
24 lines
537 B
Python
![]() |
from pydantic_settings import BaseSettings
|
||
|
|
||
|
|
||
|
class Settings(BaseSettings):
|
||
|
# API Settings
|
||
|
api_title: str = "Kokoro TTS API"
|
||
|
api_description: str = "API for text-to-speech generation using Kokoro"
|
||
|
api_version: str = "1.0.0"
|
||
|
host: str = "0.0.0.0"
|
||
|
port: int = 8880
|
||
|
|
||
|
# TTS Settings
|
||
|
output_dir: str = "output"
|
||
|
default_voice: str = "af"
|
||
|
model_path: str = "kokoro-v0_19.pth"
|
||
|
voices_dir: str = "voices"
|
||
|
sample_rate: int = 24000
|
||
|
|
||
|
class Config:
|
||
|
env_file = ".env"
|
||
|
|
||
|
|
||
|
settings = Settings()
|