mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
FIX: STT default whisper trascription language
FIX: STT default whisper trascription language Fix the transcripcion language used by default whisper, setting as WHISPER_LANGUAGE if it is setted in env var, even if a language is detected in the file's metadata. It is understood that if a language is set as an environment variable for transcriptions, this should be the preferred one and the one that should be used for that purpose. It would be advisable to add this variable as configurable in UI
This commit is contained in:
parent
d21a2581a6
commit
0613563644
1 changed files with 1 additions and 1 deletions
|
|
@ -561,7 +561,7 @@ def transcription_handler(request, file_path, metadata):
|
|||
file_path,
|
||||
beam_size=5,
|
||||
vad_filter=request.app.state.config.WHISPER_VAD_FILTER,
|
||||
language=metadata.get("language") or WHISPER_LANGUAGE,
|
||||
language=metadata.get("language",None) if WHISPER_LANGUAGE=="" else WHISPER_LANGUAGE,
|
||||
)
|
||||
log.info(
|
||||
"Detected language '%s' with probability %f"
|
||||
|
|
|
|||
Loading…
Reference in a new issue