mirror of
https://github.com/m-bain/whisperX.git
synced 2025-07-01 18:17:27 -04:00
Merge pull request #205 from prashanthellina/v3-fix-diarization
This commit is contained in:
@ -450,8 +450,8 @@ def align(
|
|||||||
"end": srow["end"],
|
"end": srow["end"],
|
||||||
"text": text,
|
"text": text,
|
||||||
"words": word_list,
|
"words": word_list,
|
||||||
# "word-segments": wseg,
|
"word-segments": wseg,
|
||||||
# "char-segments": cseg
|
"char-segments": cseg
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -203,6 +203,12 @@ def cli():
|
|||||||
|
|
||||||
# >> Write
|
# >> Write
|
||||||
for result, audio_path in results:
|
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)
|
writer(result, audio_path, writer_args)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Reference in New Issue
Block a user