Spaces:
Runtime error
Runtime error
Commit
•
883359b
1
Parent(s):
3911645
Update app.py
Browse files
app.py
CHANGED
@@ -174,11 +174,11 @@ def Transcribe_V2(num_speakers, speaker_names, audio="temp_audio.wav"):
|
|
174 |
for (i, segment) in enumerate(segments):
|
175 |
# print(f"{i}, {segment["speaker"]}, {segments[i - 1]["speaker"]}, {}")
|
176 |
if not len(conversation):
|
177 |
-
conversation.append([GetSpeaker(segment["speaker"]), segment["text"].lstrip())
|
178 |
elif conversation[-1][0] == GetSpeaker(segment["speaker"]):
|
179 |
conversation[-1][1] += segment["text"].lstrip()
|
180 |
else:
|
181 |
-
conversation.append([GetSpeaker(segment["speaker"]), segment["text"].lstrip())
|
182 |
# if i == 0 or segments[i - 1]["speaker"] != segment["speaker"]:
|
183 |
# if i != 0:
|
184 |
# conversation.append([GetSpeaker(segment["speaker"]), segment["text"][1:]]) # segment["speaker"] + ' ' + str(time(segment["start"])) + '\n\n'
|
|
|
174 |
for (i, segment) in enumerate(segments):
|
175 |
# print(f"{i}, {segment["speaker"]}, {segments[i - 1]["speaker"]}, {}")
|
176 |
if not len(conversation):
|
177 |
+
conversation.append([GetSpeaker(segment["speaker"]), segment["text"].lstrip()])
|
178 |
elif conversation[-1][0] == GetSpeaker(segment["speaker"]):
|
179 |
conversation[-1][1] += segment["text"].lstrip()
|
180 |
else:
|
181 |
+
conversation.append([GetSpeaker(segment["speaker"]), segment["text"].lstrip()])
|
182 |
# if i == 0 or segments[i - 1]["speaker"] != segment["speaker"]:
|
183 |
# if i != 0:
|
184 |
# conversation.append([GetSpeaker(segment["speaker"]), segment["text"][1:]]) # segment["speaker"] + ' ' + str(time(segment["start"])) + '\n\n'
|