LAP-DEV commited on
Commit
f566da3
·
verified ·
1 Parent(s): 7bb1bc5

Update modules/whisper/whisper_base.py

Browse files
Files changed (1) hide show
  1. modules/whisper/whisper_base.py +5 -4
modules/whisper/whisper_base.py CHANGED
@@ -411,13 +411,14 @@ class WhisperBase(ABC):
411
 
412
  # Add filename & info as first line
413
  title_line = ""
 
414
  if file_count_total > 1 and file_count > 1: title_line += "■"
415
  if add_timestamp_preview: title_line += "□"
416
  if diarize_speakers: title_line += "□"
417
- title_line += ("\t")*3+f'Media file:\t{info["input_source_file"]}'
418
- title_line += ("\t")*3f'\nLanguage:\t{info["lang"]} (probability {info["lang_prob"]}%)'
419
- if params.is_translate: title_line += ("\t")*3f'\nTranslation:\t{info["transcription"]} (Handled by OpenAI Whisper)'
420
- if translate_output: title_line += ("\t")*3f'\nTranslation:\t{info["translation"]} (Handled by Facebook NLLB)'
421
  title_line += "■"
422
 
423
  temp_subtitle = info["subtitle"].rstrip("\n")
 
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 += "□"
418
+ title_line += f'{tabbed_space}Media file:\t{info["input_source_file"]}'
419
+ title_line += f'\n{tabbed_space}Language:\t{info["lang"]} (probability {info["lang_prob"]}%)'
420
+ if params.is_translate: title_line += f'\n{tabbed_space}Translation:\t{info["transcription"]} (Handled by OpenAI Whisper)'
421
+ if translate_output: title_line += f'\n{tabbed_space}Translation:\t{info["translation"]} (Handled by Facebook NLLB)'
422
  title_line += "■"
423
 
424
  temp_subtitle = info["subtitle"].rstrip("\n")