Rodrigo 2023-12-10
Merge remote-tracking branch 'upstream/main'
@657464576bd51b6fc6bdb73667bd6592ed86288a
whisper_online.py
--- whisper_online.py
+++ whisper_online.py
@@ -580,10 +580,15 @@
 
             print(f"## last processed {end:.2f}s",file=logfile,flush=True)
 
-            beg = end
-            end += min_chunk
             if end >= duration:
                 break
+            
+            beg = end
+            
+            if end + min_chunk > duration:
+                end = duration
+            else:
+                end += min_chunk
         now = duration
 
     else: # online = simultaneous mode
Add a comment
List