Update modules/whisper/whisper_base.py
Browse files- modules/whisper/whisper_base.py +11 -14
modules/whisper/whisper_base.py
CHANGED
@@ -413,20 +413,17 @@ class WhisperBase(ABC):
|
|
413 |
if file_count > 1:
|
414 |
total_info += f'\n'
|
415 |
|
416 |
-
# Add filename as column
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
total_result += result_fixed
|
428 |
-
else:
|
429 |
-
total_result += f'{info["subtitle"]}'
|
430 |
|
431 |
total_time += info["time_for_task"]
|
432 |
total_info += f'Media file:\t{info["input_source_file"]}\nLanguage:\t{info["lang"]} (probability {info["lang_prob"]}%)\n'
|
|
|
413 |
if file_count > 1:
|
414 |
total_info += f'\n'
|
415 |
|
416 |
+
# Add filename as first column (first line only)
|
417 |
+
line_count = 0
|
418 |
+
result_fixed = ""
|
419 |
+
temp_lines = {info["subtitle"]}.splitlines()
|
420 |
+
for temp_line in temp_lines:
|
421 |
+
line_count += 1
|
422 |
+
if line_count==1:
|
423 |
+
result_fixed += info["input_source_file"]+"\t"+temp_line
|
424 |
+
else:
|
425 |
+
result_fixed += "\t"+temp_line
|
426 |
+
total_result += result_fixed
|
|
|
|
|
|
|
427 |
|
428 |
total_time += info["time_for_task"]
|
429 |
total_info += f'Media file:\t{info["input_source_file"]}\nLanguage:\t{info["lang"]} (probability {info["lang_prob"]}%)\n'
|