Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
@@ -410,10 +410,11 @@ class WhisperBase(ABC):
|
|
410 |
file_count += 1
|
411 |
|
412 |
# Add filename & info as first line
|
413 |
-
|
414 |
-
title_line += f'
|
415 |
-
|
416 |
-
if
|
|
|
417 |
|
418 |
total_result += title_line+"#NEWLINE#"+(((info["subtitle"].rstrip("\n")).replace("\t","#TAB#")).replace("\n","#NEWLINE#"))
|
419 |
total_time += info["time_for_task"]
|
|
|
410 |
file_count += 1
|
411 |
|
412 |
# Add filename & info as first line
|
413 |
+
tabbed_space = ("\t")*3
|
414 |
+
title_line += f'{tabbed_space}Media file:\t{info["input_source_file"]}'
|
415 |
+
title_line += f'\n{tabbed_space}Language:\t{info["lang"]} (probability {info["lang_prob"]}%)'
|
416 |
+
if params.is_translate: title_line += f'\n{(tabbed_space}Translation:\t{info["transcription"]} (Handled by OpenAI Whisper)'
|
417 |
+
if translate_output: title_line += f'\n{(tabbed_space}Translation:\t{info["translation"]} (Handled by Facebook NLLB)'
|
418 |
|
419 |
total_result += title_line+"#NEWLINE#"+(((info["subtitle"].rstrip("\n")).replace("\t","#TAB#")).replace("\n","#NEWLINE#"))
|
420 |
total_time += info["time_for_task"]
|