Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
|
@@ -376,7 +376,10 @@ class WhisperBase(ABC):
|
|
| 376 |
total_result += f'{info["subtitle"]}'
|
| 377 |
|
| 378 |
total_time += info["time_for_task"]
|
| 379 |
-
total_info += f'Input file:\t{info["input_source_file"]}\nLanguage:\t
|
|
|
|
|
|
|
|
|
|
| 380 |
|
| 381 |
if params.is_translate:
|
| 382 |
total_info += f'Translation:\t{info["transcription"]}\n\t⤷ Handled by OpenAI Whisper\n'
|
|
@@ -390,7 +393,7 @@ class WhisperBase(ABC):
|
|
| 390 |
result_str = total_result.rstrip("\n")
|
| 391 |
|
| 392 |
# Fix tab indents for info & result preview
|
| 393 |
-
total_info =
|
| 394 |
result_str = result_str.expandtabs(8)
|
| 395 |
|
| 396 |
result_file_path = [info['path'] for info in files_to_download.values()]
|
|
|
|
| 376 |
total_result += f'{info["subtitle"]}'
|
| 377 |
|
| 378 |
total_time += info["time_for_task"]
|
| 379 |
+
total_info += f'Input file:\t{info["input_source_file"]}\nLanguage:\t{info["lang"]} (probability {info["lang_prob"]}%)\n'
|
| 380 |
+
|
| 381 |
+
total_info += "Input file:\t"+{info["input_source_file"]}+"\n"
|
| 382 |
+
total_info += "Language:\t"+{info["lang"]}+"(probability "+{info["lang_prob"]}+"%)\n"
|
| 383 |
|
| 384 |
if params.is_translate:
|
| 385 |
total_info += f'Translation:\t{info["transcription"]}\n\t⤷ Handled by OpenAI Whisper\n'
|
|
|
|
| 393 |
result_str = total_result.rstrip("\n")
|
| 394 |
|
| 395 |
# Fix tab indents for info & result preview
|
| 396 |
+
total_info = total_info.expandtabs(10)
|
| 397 |
result_str = result_str.expandtabs(8)
|
| 398 |
|
| 399 |
result_file_path = [info['path'] for info in files_to_download.values()]
|