LAP-DEV commited on
Commit
989c57c
·
verified ·
1 Parent(s): cd7e0c3

Update modules/whisper/whisper_base.py

Browse files
Files changed (1) hide show
  1. modules/whisper/whisper_base.py +4 -4
modules/whisper/whisper_base.py CHANGED
@@ -254,26 +254,26 @@ class WhisperBase(ABC):
254
  ## Add 1st file as txt
255
  file_name, file_ext = os.path.splitext(os.path.basename(file))
256
  subtitle, file_path = self.generate_and_write_file(
257
- file_name=file_name+"_txt",
258
  transcribed_segments=transcribed_segments,
259
  add_timestamp=add_timestamp,
260
  file_format="txt",
261
  output_dir=self.output_dir
262
  )
263
 
264
- files_info[file_name] = {"subtitle": subtitle, "time_for_task": time_for_task, "path": file_path, "lang": file_language}
265
 
266
  ## Add 2nd file as srt
267
  file_name, file_ext = os.path.splitext(os.path.basename(file))
268
  subtitle, file_path = self.generate_and_write_file(
269
- file_name=file_name+"_srt",
270
  transcribed_segments=transcribed_segments,
271
  add_timestamp=add_timestamp,
272
  file_format="srt",
273
  output_dir=self.output_dir
274
  )
275
 
276
- files_info[file_name] = {"subtitle": subtitle, "time_for_task": time_for_task, "path": file_path, "lang": file_language}
277
 
278
  total_result = ''
279
  total_info = ''
 
254
  ## Add 1st file as txt
255
  file_name, file_ext = os.path.splitext(os.path.basename(file))
256
  subtitle, file_path = self.generate_and_write_file(
257
+ file_name=file_name,
258
  transcribed_segments=transcribed_segments,
259
  add_timestamp=add_timestamp,
260
  file_format="txt",
261
  output_dir=self.output_dir
262
  )
263
 
264
+ files_info["txt_file"] = {"subtitle": subtitle, "time_for_task": time_for_task, "path": file_path, "lang": file_language}
265
 
266
  ## Add 2nd file as srt
267
  file_name, file_ext = os.path.splitext(os.path.basename(file))
268
  subtitle, file_path = self.generate_and_write_file(
269
+ file_name=file_name,
270
  transcribed_segments=transcribed_segments,
271
  add_timestamp=add_timestamp,
272
  file_format="srt",
273
  output_dir=self.output_dir
274
  )
275
 
276
+ files_info["srt_file"] = {"subtitle": subtitle, "time_for_task": time_for_task, "path": file_path, "lang": file_language}
277
 
278
  total_result = ''
279
  total_info = ''