references #202, attempt to fix speaker diarization failing in v3

This commit is contained in:
Prashanth Ellina
2023-04-30 17:33:24 +00:00
parent a903e57cf1
commit 601c91140f
2 changed files with 8 additions and 2 deletions

View File

@ -450,8 +450,8 @@ def align(
"end": srow["end"],
"text": text,
"words": word_list,
# "word-segments": wseg,
# "char-segments": cseg
"word-segments": wseg,
"char-segments": cseg
}
)

View File

@ -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__":