Skip to content

Commit

Permalink
fixed failure_threshold
Browse files Browse the repository at this point in the history
-fixed `failure_threshold` aborting alignment regardless of actual failure count for `Aligner` and `align()`
  • Loading branch information
jianfch committed Jan 14, 2025
1 parent 3d0e14d commit ee64fd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stable_whisper/non_whisper/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def _load_text(
self._pad_mask = self._get_pad_mask(self.options.align.presplit)
self._total_words = len(self._all_word_tokens)
self._remaining_len = sum(len(w.word) for w in self._all_word_tokens)
self.failure_count = self._total_words * (self.failure_threshold or 1)
self.failure_count = 0
self.max_fail = self._total_words * (self.failure_threshold or 1)

def _compute_timestamps(
Expand Down

0 comments on commit ee64fd3

Please sign in to comment.