Wei Lu commited on
Commit
a60c64c
·
1 Parent(s): 8f32dea

fix bug of completed sentence chunking. tested on faster-whisper in en language

Browse files
Files changed (1) hide show
  1. 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: