Skip to content

Comments

Fix list index out of range in word timestamps#1157

Merged
MahmoudAshraf97 merged 3 commits intoSYSTRAN:masterfrom
MahmoudAshraf97:fix_word_timestamps
Nov 20, 2024
Merged

Fix list index out of range in word timestamps#1157
MahmoudAshraf97 merged 3 commits intoSYSTRAN:masterfrom
MahmoudAshraf97:fix_word_timestamps

Conversation

@MahmoudAshraf97
Copy link
Collaborator

This fixes #1118

Copy link

Copilot AI left a comment

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
@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