From d5e37cc8c0a619cdd074f2d9d8fb3f5e85382448 Mon Sep 17 00:00:00 2001 From: jhj0517 <97279763+jhj0517@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:32:42 +0900 Subject: [PATCH] Fix language key bug --- modules/whisper/base_transcription_pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/whisper/base_transcription_pipeline.py b/modules/whisper/base_transcription_pipeline.py index bf3b445..0a2f083 100644 --- a/modules/whisper/base_transcription_pipeline.py +++ b/modules/whisper/base_transcription_pipeline.py @@ -492,7 +492,7 @@ def validate_gradio_values(params: TranscriptionPipelineParams): params.whisper.lang = None else: language_code_dict = {value: key for key, value in whisper.tokenizer.LANGUAGES.items()} - params.whisper.lang = language_code_dict[params.lang] + params.whisper.lang = language_code_dict[params.whisper.lang] if params.whisper.initial_prompt == GRADIO_NONE_STR: params.whisper.initial_prompt = None