Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
@@ -378,18 +378,18 @@ class WhisperBase(ABC):
|
|
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:").ljust(
|
382 |
-
total_info += ("Language:").ljust(
|
383 |
|
384 |
if params.is_translate:
|
385 |
#total_info += f'Translation:\t{info["transcription"]}\n\t⤷ Handled by OpenAI Whisper\n'
|
386 |
-
total_info += ("Translation:").ljust(
|
387 |
-
total_info += ("").
|
388 |
|
389 |
if translate_output:
|
390 |
#total_info += f'Translation:\t{info["translation"]}\n\t⤷ Handled by Facebook NLLB\n'
|
391 |
-
total_info += ("Translation:").ljust(
|
392 |
-
total_info += ("").
|
393 |
|
394 |
time_end = datetime.now()
|
395 |
total_info += f"\nTotal processing time: {self.format_time((time_end-time_start).total_seconds())}"
|
@@ -397,7 +397,7 @@ class WhisperBase(ABC):
|
|
397 |
result_str = total_result.rstrip("\n")
|
398 |
|
399 |
# Fix tab indents for preview
|
400 |
-
result_str = result_str.expandtabs(
|
401 |
|
402 |
result_file_path = [info['path'] for info in files_to_download.values()]
|
403 |
|
|
|
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:").ljust(12)+(str("\t")).expandtabs()+str(info["input_source_file"])+"\n"
|
382 |
+
total_info += ("Language:").ljust(12)+str(info["lang"])+(str("\t")).expandtabs()+" (probability "+str(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'
|
386 |
+
total_info += ("Translation:").ljust(12)+(str("\t")).expandtabs()+str(info["transcription"])+"\n"
|
387 |
+
total_info += ("\t").expandtabs()+"⤷ Handled by OpenAI Whisper\n"
|
388 |
|
389 |
if translate_output:
|
390 |
#total_info += f'Translation:\t{info["translation"]}\n\t⤷ Handled by Facebook NLLB\n'
|
391 |
+
total_info += ("Translation:").ljust(12)+(str("\t")).expandtabs()+str(info["translation"])+"\n"
|
392 |
+
total_info += ("\t").expandtabs()+"⤷ Handled by Facebook NLLB\n"
|
393 |
|
394 |
time_end = datetime.now()
|
395 |
total_info += f"\nTotal processing time: {self.format_time((time_end-time_start).total_seconds())}"
|
|
|
397 |
result_str = total_result.rstrip("\n")
|
398 |
|
399 |
# Fix tab indents for preview
|
400 |
+
result_str = result_str.expandtabs()
|
401 |
|
402 |
result_file_path = [info['path'] for info in files_to_download.values()]
|
403 |
|