Skip to content

Commit e24ca9e

Browse files
authored
Merge pull request #205 from prashanthellina/v3-fix-diarization
2 parents 31a9ec7 + 601c911 commit e24ca9e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

whisperx/alignment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,8 @@ def get_raw_text(word_row):
450450
"end": srow["end"],
451451
"text": text,
452452
"words": word_list,
453-
# "word-segments": wseg,
454-
# "char-segments": cseg
453+
"word-segments": wseg,
454+
"char-segments": cseg
455455
}
456456
)
457457

whisperx/transcribe.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,12 @@ def cli():
203203

204204
# >> Write
205205
for result, audio_path in results:
206+
# Remove pandas dataframes from result so that
207+
# we can serialize the result with json
208+
for seg in result["segments"]:
209+
seg.pop("word-segments", None)
210+
seg.pop("char-segments", None)
211+
206212
writer(result, audio_path, writer_args)
207213

208214
if __name__ == "__main__":

0 commit comments

Comments
 (0)