Merge pull request #36 from luweigen/bug-chunk_completed_sentence
Browse filesfix bug of completed sentence chunking. tested on faster-whisper in e…
- whisper_online.py +1 -0
whisper_online.py
CHANGED
|
@@ -389,6 +389,7 @@ class OnlineASRProcessor:
|
|
| 389 |
fsent = sent
|
| 390 |
while cwords:
|
| 391 |
b,e,w = cwords.pop(0)
|
|
|
|
| 392 |
if beg is None and sent.startswith(w):
|
| 393 |
beg = b
|
| 394 |
elif end is None and sent == w:
|
|
|
|
| 389 |
fsent = sent
|
| 390 |
while cwords:
|
| 391 |
b,e,w = cwords.pop(0)
|
| 392 |
+
w = w.strip()
|
| 393 |
if beg is None and sent.startswith(w):
|
| 394 |
beg = b
|
| 395 |
elif end is None and sent == w:
|