import logging from pydantic import BaseModel from pydantic_settings import BaseSettings from typing import Optional, Literal logger = logging.getLogger(__name__) class ModelSettings(BaseSettings): asr_model: str = "distil-whisper/distil-large-v3" class InferenceConfig(BaseModel): task: Literal["transcribe", "translate"] = "transcribe" batch_size: int = 24 chunk_length_s: int = 30 sampling_rate: int = 16000 language: Optional[str] = None model_settings = ModelSettings() logger.info(f"asr model: {model_settings.asr_model}")