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

Update modules/whisper/whisper_base.py

Browse files
Files changed (1) hide show
  1. modules/whisper/whisper_base.py +6 -5
modules/whisper/whisper_base.py CHANGED
@@ -277,11 +277,12 @@ class WhisperBase(ABC):
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)}"
 
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
+ # Just get first line:
285
+ break
286
 
287
  #result_str = f"Processing of file '{file_name}{file_ext}' done in {self.format_time(total_time)}:\n\n{total_result}"
288
  total_info += f"\nTranscription process done in {self.format_time(total_time)}"