mirror of
https://github.com/m-bain/whisperX.git
synced 2025-07-01 18:17:27 -04:00
Update alignment.py
This commit is contained in:
@ -99,7 +99,8 @@ def align(
|
||||
interpolate_method: str = "nearest",
|
||||
return_char_alignments: bool = False,
|
||||
print_progress = False,
|
||||
combined_progress = False
|
||||
combined_progress = False,
|
||||
total_segments = 0
|
||||
) -> AlignedTranscriptionResult:
|
||||
"""
|
||||
Align phoneme recognition predictions to known transcription.
|
||||
@ -118,9 +119,6 @@ def align(
|
||||
model_lang = align_model_metadata["language"]
|
||||
model_type = align_model_metadata["type"]
|
||||
|
||||
total_segments = len(list(transcript))
|
||||
transcript = iter(transcript)
|
||||
|
||||
# 1. Preprocess to keep only characters in dictionary
|
||||
for sdx, segment in enumerate(transcript):
|
||||
# strip spaces at beginning / end, but keep track of the amount.
|
||||
|
Reference in New Issue
Block a user