Spaces:
Runtime error
Runtime error
Update transcription_diarization.py
Browse files
transcription_diarization.py
CHANGED
@@ -121,7 +121,7 @@ def create_combined_srt(transcription_chunks, diarization, output_path):
|
|
121 |
end_str = format_timestamp(end_time).split('.')[0].lstrip('0')
|
122 |
|
123 |
srt_file.write(f"{i}\n")
|
124 |
-
srt_file.write(f"{
|
125 |
|
126 |
with open(output_path, 'a', encoding='utf-8') as srt_file:
|
127 |
for i, (speaker, duration) in enumerate(sorted_speakers[:2], start=1):
|
|
|
121 |
end_str = format_timestamp(end_time).split('.')[0].lstrip('0')
|
122 |
|
123 |
srt_file.write(f"{i}\n")
|
124 |
+
srt_file.write(f"{current_speaker}\n time: ({start_str} --> {end_str})\n text: {text}\n\n")
|
125 |
|
126 |
with open(output_path, 'a', encoding='utf-8') as srt_file:
|
127 |
for i, (speaker, duration) in enumerate(sorted_speakers[:2], start=1):
|