Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix list index out of range in word timestamps #1157

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

MahmoudAshraf97
Copy link
Collaborator

This fixes #1118

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (2)

faster_whisper/transcribe.py:1889

  • This line assumes that the 'tokens' key is always present in the dictionary. Add a check to ensure the 'tokens' key exists before modifying it to avoid a potential KeyError.
following["tokens"] = previous["tokens"] + following["tokens"]

faster_whisper/transcribe.py:1905

  • This line assumes that the 'tokens' key is always present in the dictionary. Add a check to ensure the 'tokens' key exists before modifying it to avoid a potential KeyError.
previous["tokens"] = previous["tokens"] + following["tokens"]
@MahmoudAshraf97 MahmoudAshraf97 merged commit f830c6f into SYSTRAN:master Nov 20, 2024
3 checks passed
@MahmoudAshraf97 MahmoudAshraf97 deleted the fix_word_timestamps branch November 20, 2024 10:37
Equipo45 pushed a commit to Equipo45/faster-whisper that referenced this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IndexError: list index out of range in add_word_timestamps function
1 participant