You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
local-whisper/local_whisper/settings.py

23 lines
560 B
Python

from pydantic import BaseSettings, Field
class WhisperSettings(BaseSettings):
"""Whisper Application Settings.
All environment varaibles supplied should be prefixed with "WHISPER_".
"""
base_asr_model: str = Field(
default="medium.en", description="The base whisper model to host."
)
default_sample_rate: int = Field(
default=16000,
description="The default sample rate used to resample the audio if necessary",
)
class Config:
env_prefix = "WHISPER_"
whisper_settings = WhisperSettings()