LAP-DEV commited on
Commit
d3bae98
·
verified ·
1 Parent(s): 60cd2a1

Update modules/whisper/whisper_base.py

Browse files
Files changed (1) hide show
  1. modules/whisper/whisper_base.py +1 -12
modules/whisper/whisper_base.py CHANGED
@@ -409,10 +409,6 @@ class WhisperBase(ABC):
409
 
410
  file_count += 1
411
 
412
- # Add blank line if multiple file processing
413
- if file_count > 1:
414
- total_info += f'\n'
415
-
416
  # Add filename & info as first line
417
  title_line = ""
418
  if add_timestamp_preview: title_line += "□"
@@ -429,13 +425,6 @@ class WhisperBase(ABC):
429
  total_result += title_line+temp_subtitle
430
 
431
  total_time += info["time_for_task"]
432
- total_info += f'Media file:\t{info["input_source_file"]}\nLanguage:\t{info["lang"]} (probability {info["lang_prob"]}%)\n'
433
-
434
- if params.is_translate:
435
- total_info += f'Translation:\t{info["transcription"]}\n\t⤷ Handled by OpenAI Whisper\n'
436
-
437
- if translate_output:
438
- total_info += f'Translation:\t{info["translation"]}\n\t⤷ Handled by Facebook NLLB\n'
439
 
440
  time_end = datetime.now()
441
  #total_info += f"\nTotal processing time:\t{self.format_time((time_end-time_start).total_seconds())}"
@@ -443,7 +432,7 @@ class WhisperBase(ABC):
443
  temp_file_count_text = "file"
444
  if file_count!=1:
445
  temp_file_count_text += "s"
446
- total_info += f"\nProcessed {file_count} {temp_file_count_text} in {self.format_time((time_end-time_start).total_seconds())}"
447
 
448
  result_str = total_result.rstrip("\n")
449
  result_str = self.transform_text_to_list(result_str,"□","■")
 
409
 
410
  file_count += 1
411
 
 
 
 
 
412
  # Add filename & info as first line
413
  title_line = ""
414
  if add_timestamp_preview: title_line += "□"
 
425
  total_result += title_line+temp_subtitle
426
 
427
  total_time += info["time_for_task"]
 
 
 
 
 
 
 
428
 
429
  time_end = datetime.now()
430
  #total_info += f"\nTotal processing time:\t{self.format_time((time_end-time_start).total_seconds())}"
 
432
  temp_file_count_text = "file"
433
  if file_count!=1:
434
  temp_file_count_text += "s"
435
+ total_info = f"\nProcessed {file_count} {"file" if file_count == 1 else "files"} in {self.format_time((time_end-time_start).total_seconds())}"
436
 
437
  result_str = total_result.rstrip("\n")
438
  result_str = self.transform_text_to_list(result_str,"□","■")