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
+1
View File
@@ -501,6 +501,7 @@ def transcribe(request: Request, file_path):
file_path,
beam_size=5,
vad_filter=request.app.state.config.WHISPER_VAD_FILTER,
language=request.app.state.config.WHISPER_LANGUAGE
)
log.info(
"Detected language '%s' with probability %f"