LAP-DEV commited on
Commit
f7f23b8
·
verified ·
1 Parent(s): 39d0e41

Update modules/whisper/whisper_base.py

Browse files
Files changed (1) hide show
  1. modules/whisper/whisper_base.py +3 -3
modules/whisper/whisper_base.py CHANGED
@@ -254,10 +254,10 @@ 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,
258
  transcribed_segments=transcribed_segments,
259
  add_timestamp=add_timestamp,
260
- file_format=file_format,
261
  output_dir=self.output_dir
262
  )
263
 
@@ -266,7 +266,7 @@ class WhisperBase(ABC):
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",
 
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
 
 
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",