

Fix: Omitting the last chunk problem in comp_unaware mode
@a432dbb5c7bbabf3c424245beef064a6019ce504
--- whisper_online.py
+++ whisper_online.py
... | ... | @@ -573,10 +573,15 @@ |
573 | 573 |
|
574 | 574 |
print(f"## last processed {end:.2f}s",file=logfile,flush=True) |
575 | 575 |
|
576 |
- beg = end |
|
577 |
- end += min_chunk |
|
578 | 576 |
if end >= duration: |
579 | 577 |
break |
578 |
+ |
|
579 |
+ beg = end |
|
580 |
+ |
|
581 |
+ if end + min_chunk > duration: |
|
582 |
+ end = duration |
|
583 |
+ else: |
|
584 |
+ end += min_chunk |
|
580 | 585 |
now = duration |
581 | 586 |
|
582 | 587 |
else: # online = simultaneous mode |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?