Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
|
@@ -413,13 +413,15 @@ class WhisperBase(ABC):
|
|
| 413 |
if file_count > 1:
|
| 414 |
total_info += f'\n'
|
| 415 |
|
| 416 |
-
# Add filename as
|
| 417 |
add_tabs = 0
|
| 418 |
title_line = ""
|
| 419 |
if add_timestamp_preview: add_tabs += 1
|
| 420 |
if diarize_speakers: add_tabs += 1
|
| 421 |
title_line = (add_tabs*"\t")+f'Media file: {info["input_source_file"]}\n'
|
| 422 |
title_line += (add_tabs*"\t")+f'Language: {info["lang"]} (probability {info["lang_prob"]}%)\n'
|
|
|
|
|
|
|
| 423 |
|
| 424 |
total_result += title_line+info["subtitle"]
|
| 425 |
total_time += info["time_for_task"]
|
|
|
|
| 413 |
if file_count > 1:
|
| 414 |
total_info += f'\n'
|
| 415 |
|
| 416 |
+
# Add filename & info as first line
|
| 417 |
add_tabs = 0
|
| 418 |
title_line = ""
|
| 419 |
if add_timestamp_preview: add_tabs += 1
|
| 420 |
if diarize_speakers: add_tabs += 1
|
| 421 |
title_line = (add_tabs*"\t")+f'Media file: {info["input_source_file"]}\n'
|
| 422 |
title_line += (add_tabs*"\t")+f'Language: {info["lang"]} (probability {info["lang_prob"]}%)\n'
|
| 423 |
+
if params.is_translate: title_line += f'Translation: {info["transcription"]} (Handled by OpenAI Whisper)\n'
|
| 424 |
+
if translate_output: title_line += f'Translation: {info["translation"]} (Handled by Facebook NLLB)\n'
|
| 425 |
|
| 426 |
total_result += title_line+info["subtitle"]
|
| 427 |
total_time += info["time_for_task"]
|