Kokoro-FastAPI/api/src/core/config.py
remsky ce0ef3534a Add initial implementation of Kokoro TTS API with Docker GPU support
- Set up FastAPI application with TTS service
- Define API endpoints for TTS generation and voice listing
- Implement Pydantic models for request and response schemas
- Add Dockerfile and docker-compose.yml for containerization
- Include example usage and benchmark results in README
2024-12-30 04:17:50 -07:00

23 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()