Update modules/whisper/whisper_base.py
Browse files
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
|
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[
|
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[
|
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 = ''
|