Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions faster_whisper/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1717,6 +1717,12 @@ def find_alignment(
for result, text_token in zip(results, text_tokens):
text_token_probs = result.text_token_probs
alignments = result.alignments
if len(alignments) == 0:
# No alignment available, e.g. the window was shorter than the
# encoder stride so there were no frames to align against
# (ctranslate2 returns an empty alignment for such windows).
return_list.append([])
continue
text_indices = np.array([pair[0] for pair in alignments])
time_indices = np.array([pair[1] for pair in alignments])

Expand Down
Loading