|
|
|
@ -5,9 +5,7 @@ from pydantic.types import SecretStr
|
|
|
|
|
|
|
|
|
|
from local_whisper.settings import WhisperSettings
|
|
|
|
|
|
|
|
|
|
SETTING_DEFAULTS = {
|
|
|
|
|
"BASE_ASR_MODEL": "medium.en",
|
|
|
|
|
}
|
|
|
|
|
SETTING_DEFAULTS = {"BASE_ASR_MODEL": "medium.en", "DEFAULT_SAMPLE_RATE": 16000}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_setting_defaults():
|
|
|
|
@ -23,3 +21,9 @@ def test_setting_defaults():
|
|
|
|
|
else _setting_value
|
|
|
|
|
)
|
|
|
|
|
unmasked_setting == v
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_with_envvar_prefix():
|
|
|
|
|
with patch.dict(os.environ, {"WHISPER_DEFAULT_SAMPLE_RATE": "22500"}, clear=True):
|
|
|
|
|
whisper_settings = WhisperSettings()
|
|
|
|
|
assert whisper_settings.default_sample_rate == 22500
|
|
|
|
|