Update modules/utils/subtitle_manager.py
Browse files
modules/utils/subtitle_manager.py
CHANGED
@@ -32,7 +32,7 @@ def get_srt(segments):
|
|
32 |
output += f"{segment['text']}\n\n"
|
33 |
return output
|
34 |
|
35 |
-
def get_csv(segments):
|
36 |
output = "Line;Start time;End time;Text;\n"
|
37 |
for i, segment in enumerate(segments):
|
38 |
if segment['text'].startswith(' '):
|
@@ -60,7 +60,7 @@ def get_txt(segments):
|
|
60 |
return output
|
61 |
|
62 |
|
63 |
-
def parse_srt(file_path
|
64 |
"""Reads SRT file and returns as dict"""
|
65 |
with open(file_path, 'r', encoding='utf-8') as file:
|
66 |
srt_data = file.read()
|
|
|
32 |
output += f"{segment['text']}\n\n"
|
33 |
return output
|
34 |
|
35 |
+
def get_csv(segments,diarization: bool = False):
|
36 |
output = "Line;Start time;End time;Text;\n"
|
37 |
for i, segment in enumerate(segments):
|
38 |
if segment['text'].startswith(' '):
|
|
|
60 |
return output
|
61 |
|
62 |
|
63 |
+
def parse_srt(file_path):
|
64 |
"""Reads SRT file and returns as dict"""
|
65 |
with open(file_path, 'r', encoding='utf-8') as file:
|
66 |
srt_data = file.read()
|