Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
|
@@ -412,8 +412,16 @@ class WhisperBase(ABC):
|
|
| 412 |
# Add blank line if multiple file processing
|
| 413 |
if file_count > 1:
|
| 414 |
total_info += f'\n'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 415 |
|
| 416 |
-
total_result += info["subtitle"]
|
| 417 |
total_time += info["time_for_task"]
|
| 418 |
total_info += f'Media file:\t{info["input_source_file"]}\nLanguage:\t{info["lang"]} (probability {info["lang_prob"]}%)\n'
|
| 419 |
|
|
|
|
| 412 |
# Add blank line if multiple file processing
|
| 413 |
if file_count > 1:
|
| 414 |
total_info += f'\n'
|
| 415 |
+
|
| 416 |
+
# Add filename as firstline
|
| 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"]
|
| 426 |
total_info += f'Media file:\t{info["input_source_file"]}\nLanguage:\t{info["lang"]} (probability {info["lang_prob"]}%)\n'
|
| 427 |
|