Skip to content

Commit

Permalink
Merge pull request #205 from prashanthellina/v3-fix-diarization
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bain authored Apr 30, 2023
2 parents 31a9ec7 + 601c911 commit e24ca9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions whisperx/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,8 @@ def get_raw_text(word_row):
"end": srow["end"],
"text": text,
"words": word_list,
# "word-segments": wseg,
# "char-segments": cseg
"word-segments": wseg,
"char-segments": cseg
}
)

Expand Down
6 changes: 6 additions & 0 deletions whisperx/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ def cli():

# >> Write
for result, audio_path in results:
# Remove pandas dataframes from result so that
# we can serialize the result with json
for seg in result["segments"]:
seg.pop("word-segments", None)
seg.pop("char-segments", None)

writer(result, audio_path, writer_args)

if __name__ == "__main__":
Expand Down

0 comments on commit e24ca9e

Please sign in to comment.