Merge remote-tracking branch 'upstream/main'
Browse files- whisper_online.py +7 -2
whisper_online.py
CHANGED
@@ -580,10 +580,15 @@ if __name__ == "__main__":
|
|
580 |
|
581 |
print(f"## last processed {end:.2f}s",file=logfile,flush=True)
|
582 |
|
583 |
-
beg = end
|
584 |
-
end += min_chunk
|
585 |
if end >= duration:
|
586 |
break
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
587 |
now = duration
|
588 |
|
589 |
else: # online = simultaneous mode
|
|
|
580 |
|
581 |
print(f"## last processed {end:.2f}s",file=logfile,flush=True)
|
582 |
|
|
|
|
|
583 |
if end >= duration:
|
584 |
break
|
585 |
+
|
586 |
+
beg = end
|
587 |
+
|
588 |
+
if end + min_chunk > duration:
|
589 |
+
end = duration
|
590 |
+
else:
|
591 |
+
end += min_chunk
|
592 |
now = duration
|
593 |
|
594 |
else: # online = simultaneous mode
|