Skip to content

Commit

Permalink
Fix incorrect attribute access
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumekln committed Mar 16, 2023
1 parent 2007adf commit cce6b53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions faster_whisper/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,8 @@ def merge_punctuations(alignment: List[dict], prepended: str, appended: str):
following = alignment[j]
if previous["word"].startswith(" ") and previous["word"].strip() in prepended:
# prepend it to the following word
following["word"] = previous.word + following.word
following["tokens"] = previous.tokens + following.tokens
following["word"] = previous["word"] + following["word"]
following["tokens"] = previous["tokens"] + following["tokens"]
previous["word"] = ""
previous["tokens"] = []
else:
Expand Down

0 comments on commit cce6b53

Please sign in to comment.