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