We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6197f08 commit cf576e5Copy full SHA for cf576e5
whisper_timestamped/transcribe.py
@@ -905,6 +905,9 @@ def filter_tokens(tokens):
905
assert len(segment_logprobs) == len(segment_tokens), f"Inconsistent number of segments: logprobs ({len(segment_logprobs)}) != tokens ({len(segment_tokens)})"
906
907
whisper_segments = transcription["segments"]
908
+ # See issue 64: some segments may have empty text
909
+ if any(not s["text"] for s in whisper_segments):
910
+ whisper_segments = [s for s in whisper_segments if s["text"]]
911
l1 = len(whisper_segments)
912
l2 = len(timestamped_word_segments)
913
if l1 != l2 and l1 != 0:
0 commit comments