From a60c64c8315ef9573353dcae4d0dc2a9ee4a0b61 Mon Sep 17 00:00:00 2001 From: Wei Lu Date: Tue, 28 Nov 2023 18:51:36 +0200 Subject: [PATCH] fix bug of completed sentence chunking. tested on faster-whisper in en language --- whisper_online.py | 1 + 1 file changed, 1 insertion(+) diff --git a/whisper_online.py b/whisper_online.py index 8efbbab..82b3e09 100644 --- a/whisper_online.py +++ b/whisper_online.py @@ -389,6 +389,7 @@ class OnlineASRProcessor: fsent = sent while cwords: b,e,w = cwords.pop(0) + w = w.strip() if beg is None and sent.startswith(w): beg = b elif end is None and sent == w: