2024-12-30 04:17:50 -07:00
|
|
|
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"
|
2024-12-31 01:52:16 -07:00
|
|
|
output_dir_size_limit_mb: float = 500.0 # Maximum size of output directory in MB
|
2024-12-30 04:17:50 -07:00
|
|
|
default_voice: str = "af"
|
2024-12-31 01:52:16 -07:00
|
|
|
model_dir: str = "/app/Kokoro-82M" # Base directory for model files
|
2024-12-30 04:17:50 -07:00
|
|
|
model_path: str = "kokoro-v0_19.pth"
|
|
|
|
voices_dir: str = "voices"
|
|
|
|
sample_rate: int = 24000
|
|
|
|
|
|
|
|
class Config:
|
|
|
|
env_file = ".env"
|
|
|
|
|
|
|
|
|
|
|
|
settings = Settings()
|