Spaces:
Sleeping
Sleeping
File size: 838 Bytes
f68a33a 1c5dd00 f68a33a 1c5dd00 f68a33a 1c5dd00 f68a33a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | """VoiceGuard Configuration Module."""
import os
from pydantic_settings import BaseSettings
from functools import lru_cache
class Settings(BaseSettings):
"""Application settings loaded from environment variables."""
# Server
HOST: str = "0.0.0.0"
PORT: int = 7860
DEBUG: bool = True
# API Key Authentication (required by hackathon)
API_KEY: str = "sk_voiceguard_2026_secret"
# Audio Processing
TARGET_SAMPLE_RATE: int = 16000
MIN_DURATION: float = 1.0 # seconds
MAX_DURATION: float = 60.0 # seconds
MAX_FILE_SIZE: int = 10 * 1024 * 1024 # 10 MB
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
@lru_cache()
def get_settings() -> Settings:
"""Get cached settings instance."""
return Settings()
settings = get_settings()
|