From 289eadfc766dc54f67024b38d5b1161c7a739e1c Mon Sep 17 00:00:00 2001 From: liupeng Date: Mon, 13 Jan 2025 20:26:27 +0800 Subject: [PATCH] fix a merge error. --- whisperx/alignment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whisperx/alignment.py b/whisperx/alignment.py index 3a560ee..39e48e5 100644 --- a/whisperx/alignment.py +++ b/whisperx/alignment.py @@ -230,7 +230,7 @@ def align( continue text_clean = "".join(segment_data[sdx]["clean_char"]) - tokens = [model_dictionary[c] for c in text_clean] + tokens = [model_dictionary.get(c, -1) for c in text_clean] f1 = int(t1 * SAMPLE_RATE) f2 = int(t2 * SAMPLE_RATE)