from pydantic_settings import BaseSettings class Settings(BaseSettings): """Voice service configuration.""" # Service host: str = "0.0.0.0" port: int = 3008 debug: bool = False # Claude API anthropic_api_key: str = "" anthropic_base_url: str = "" claude_model: str = "claude-sonnet-4-5-20250514" # Agent Service agent_service_url: str = "http://agent-service:3002" # STT (faster-whisper) whisper_model: str = "base" whisper_language: str = "zh" # TTS (Kokoro) kokoro_model: str = "kokoro-82m" kokoro_voice: str = "zf_xiaoxiao" # Device (cpu or cuda) device: str = "cpu" # Twilio twilio_account_sid: str = "" twilio_auth_token: str = "" twilio_phone_number: str = "" # Audio audio_sample_rate: int = 16000 audio_channels: int = 1 # Session session_ttl: int = 60 # seconds before disconnected sessions are cleaned up heartbeat_interval: int = 15 # seconds between pings heartbeat_timeout: int = 45 # seconds before declaring dead connection class Config: env_file = ".env" settings = Settings()