deepfake_detection / app /config.py
VoiceGuard Bot
Deploy optimized VoiceGuard with Abhishtagatya model
1c5dd00
Raw
History Blame Contribute Delete
838 Bytes
"""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()