Improvements to parsing of WHISPER_LANGUAGE environment variable (Setting as empty string now equivalent to unsetting/removing WHISPER_LANGUAGE). Resolved crash caused when unset

This commit is contained in:
nathaniel 2025-05-01 22:03:49 +01:00
parent ef7acfbf3d
commit cc14aacaaa

View File

@ -2510,7 +2510,7 @@ WHISPER_VAD_FILTER = PersistentConfig(
os.getenv("WHISPER_VAD_FILTER", "False").lower() == "true", os.getenv("WHISPER_VAD_FILTER", "False").lower() == "true",
) )
WHISPER_LANGUAGE = os.getenv("WHISPER_LANGUAGE", None).lower() WHISPER_LANGUAGE = os.getenv("WHISPER_LANGUAGE", "").lower() or None
# Add Deepgram configuration # Add Deepgram configuration
DEEPGRAM_API_KEY = PersistentConfig( DEEPGRAM_API_KEY = PersistentConfig(