Skip to content

Commit

Permalink
Merge pull request #494 from mvoggu/main
Browse files Browse the repository at this point in the history
fix: ZeroDivisionError when --print_progress True
  • Loading branch information
m-bain committed Sep 27, 2023
2 parents 2a11ce3 + a0b6459 commit 07fafa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion whisperx/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def align(
return_char_alignments: bool = False,
print_progress: bool = False,
combined_progress: bool = False,
total_segments: int = 0
) -> AlignedTranscriptionResult:
"""
Align phoneme recognition predictions to known transcription.
Expand All @@ -120,6 +119,7 @@ def align(
model_type = align_model_metadata["type"]

# 1. Preprocess to keep only characters in dictionary
total_segments = len(transcript)
for sdx, segment in enumerate(transcript):
# strip spaces at beginning / end, but keep track of the amount.
if print_progress:
Expand Down

0 comments on commit 07fafa3

Please sign in to comment.