LAP-DEV commited on
Commit
03c6c73
·
verified ·
1 Parent(s): c2e225f

Update modules/whisper/whisper_base.py

Browse files
Files changed (1) hide show
  1. modules/whisper/whisper_base.py +10 -0
modules/whisper/whisper_base.py CHANGED
@@ -248,6 +248,16 @@ class WhisperBase(ABC):
248
  file_format=file_format,
249
  output_dir=self.output_dir
250
  )
 
 
 
 
 
 
 
 
 
 
251
 
252
  files_info[file_name] = {"subtitle": subtitle, "time_for_task": time_for_task, "path": file_path, "lang": file_language}
253
 
 
248
  file_format=file_format,
249
  output_dir=self.output_dir
250
  )
251
+
252
+ #Add srt
253
+ file_name, file_ext = os.path.splitext(os.path.basename(file))
254
+ subtitle, file_path = self.generate_and_write_file(
255
+ file_name=file_name,
256
+ transcribed_segments=transcribed_segments,
257
+ add_timestamp=add_timestamp,
258
+ file_format="srt",
259
+ output_dir=self.output_dir
260
+ )
261
 
262
  files_info[file_name] = {"subtitle": subtitle, "time_for_task": time_for_task, "path": file_path, "lang": file_language}
263