LAP-DEV commited on
Commit
b043beb
·
verified ·
1 Parent(s): 6731748

Update modules/whisper/whisper_base.py

Browse files
Files changed (1) hide show
  1. modules/whisper/whisper_base.py +5 -5
modules/whisper/whisper_base.py CHANGED
@@ -277,11 +277,11 @@ class WhisperBase(ABC):
277
  total_info = ''
278
  total_time = 0
279
  for file_name, info in files_info.items():
280
- total_result += f'{info["subtitle"]}'
281
- total_time += info["time_for_task"]
282
- #total_info += f'{info["lang"]}'
283
- total_info += f"Language {info['lang']} detected for file '{file_name}{file_ext}'"
284
- break
285
 
286
  #result_str = f"Processing of file '{file_name}{file_ext}' done in {self.format_time(total_time)}:\n\n{total_result}"
287
  total_info += f"\nTranscription process done in {self.format_time(total_time)}"
 
277
  total_info = ''
278
  total_time = 0
279
  for file_name, info in files_info.items():
280
+ if {info["path"]}.endswith(".txt"):
281
+ total_result += f'{info["subtitle"]}'
282
+ total_time += info["time_for_task"]
283
+ #total_info += f'{info["lang"]}'
284
+ total_info += f"Language {info['lang']} detected for file '{file_name}{file_ext}'"
285
 
286
  #result_str = f"Processing of file '{file_name}{file_ext}' done in {self.format_time(total_time)}:\n\n{total_result}"
287
  total_info += f"\nTranscription process done in {self.format_time(total_time)}"