Added WHISPER_LANGUAGE env variable. If set to a country's ISO2, constrains Whisper's stt to that language. Detects language as normal if unset

This commit is contained in:
nathaniel
2025-04-27 05:58:06 +01:00
parent 852d9dcbe9
commit 1efa708f83
3 changed files with 8 additions and 0 deletions

View File

@@ -2510,6 +2510,11 @@ WHISPER_VAD_FILTER = PersistentConfig(
os.getenv("WHISPER_VAD_FILTER", "False").lower() == "true",
)
WHISPER_LANGUAGE = PersistentConfig(
"WHISPER_LANGUAGE",
"audio.stt.whisper_language",
os.getenv("WHISPER_LANGUAGE", None).lower(),
)
# Add Deepgram configuration
DEEPGRAM_API_KEY = PersistentConfig(