Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
@@ -417,18 +417,7 @@ class WhisperBase(ABC):
|
|
417 |
title_line += f'{tabbed_space}Media file:"\t{info["input_source_file"]}'
|
418 |
title_line += f'\n{tabbed_space}Language:\t{info["lang"]} (probability {info["lang_prob"]}%)'
|
419 |
if params.is_translate: title_line += f'\n{tabbed_space}Translation:\t{info["transcription"]} (Handled by OpenAI Whisper)'
|
420 |
-
if translate_output: title_line += f'\n{tabbed_space}Translation:\t{info["translation"]} (Handled by Facebook NLLB)'
|
421 |
-
|
422 |
-
dl_code = ""
|
423 |
-
for temp_file in files_to_download.items():
|
424 |
-
dl_file = str(temp_file[0].split("_")[0])
|
425 |
-
dl_type = str(temp_file[0].split("_")[1])
|
426 |
-
dl_link = str((temp_file[1])["path"])
|
427 |
-
if dl_file == file_name:#
|
428 |
-
if dl_code != "": dl_code+=" "
|
429 |
-
dl_code += "["+dl_type+"]("+dl_link+")"
|
430 |
-
title_line += f'{tabbed_space}Download file:\t{dl_code}'
|
431 |
-
|
432 |
title_line += "#NEWLINE#"
|
433 |
|
434 |
total_result += title_line+(((info["subtitle"].rstrip("\n")).replace("\t","#TAB#")).replace("\n","#NEWLINE#"))
|
|
|
417 |
title_line += f'{tabbed_space}Media file:"\t{info["input_source_file"]}'
|
418 |
title_line += f'\n{tabbed_space}Language:\t{info["lang"]} (probability {info["lang_prob"]}%)'
|
419 |
if params.is_translate: title_line += f'\n{tabbed_space}Translation:\t{info["transcription"]} (Handled by OpenAI Whisper)'
|
420 |
+
if translate_output: title_line += f'\n{tabbed_space}Translation:\t{info["translation"]} (Handled by Facebook NLLB)'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
title_line += "#NEWLINE#"
|
422 |
|
423 |
total_result += title_line+(((info["subtitle"].rstrip("\n")).replace("\t","#TAB#")).replace("\n","#NEWLINE#"))
|