Merge pull request #205 from prashanthellina/v3-fix-diarization

This commit is contained in:
Max Bain
2023-04-30 21:08:45 +01:00
committed by GitHub
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__":