Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
@@ -411,7 +411,7 @@ class WhisperBase(ABC):
|
|
411 |
|
412 |
# Add filename & info as first line
|
413 |
title_line = ""
|
414 |
-
tabbed_space = ("\t")*
|
415 |
if file_count_total > 1 and file_count > 1: title_line += "■"
|
416 |
if add_timestamp_preview: title_line += "□"
|
417 |
if diarize_speakers: title_line += "□"
|
@@ -430,9 +430,16 @@ class WhisperBase(ABC):
|
|
430 |
|
431 |
time_end = datetime.now()
|
432 |
#total_info += f"Total processing time:\t{self.format_time((time_end-time_start).total_seconds())}"
|
433 |
-
total_info = f"Processed {file_count} {'file' if file_count == 1 else 'files'} in {self.format_time((time_end-time_start).total_seconds())}"
|
434 |
|
435 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
result_str = self.transform_text_to_list(total_result,"□","■") #Transform to gr.Dataframe format
|
437 |
result_file_path = [info['path'] for info in files_to_download.values()]
|
438 |
|
|
|
411 |
|
412 |
# Add filename & info as first line
|
413 |
title_line = ""
|
414 |
+
tabbed_space = ("\t")*3
|
415 |
if file_count_total > 1 and file_count > 1: title_line += "■"
|
416 |
if add_timestamp_preview: title_line += "□"
|
417 |
if diarize_speakers: title_line += "□"
|
|
|
430 |
|
431 |
time_end = datetime.now()
|
432 |
#total_info += f"Total processing time:\t{self.format_time((time_end-time_start).total_seconds())}"
|
|
|
433 |
|
434 |
+
total_info = ""
|
435 |
+
if params.is_translate or translate_output:
|
436 |
+
total_info = "Translation: Enabled"
|
437 |
+
if diarize_speakers:
|
438 |
+
if total_info != "": total_info += "\n"
|
439 |
+
total_info += "Diarization: Enabled"
|
440 |
+
if total_info != "": total_info += "\n"
|
441 |
+
total_info += f"Processed {file_count} {'file' if file_count == 1 else 'files'} in {self.format_time((time_end-time_start).total_seconds())}"
|
442 |
+
|
443 |
result_str = self.transform_text_to_list(total_result,"□","■") #Transform to gr.Dataframe format
|
444 |
result_file_path = [info['path'] for info in files_to_download.values()]
|
445 |
|