Repository navigation
Fix merge by gap in the transcript resizer dialog - #1658
Conversation
Segments are stored in milliseconds but were passed to stable_whisper divided by 100, so every gap looked ten times longer and merge by gap did not merge segments closer than the threshold. Same conversion as the plugin fix in chidiwilliams#1564.
|
The red Found by a defect-hunting pipeline I build and run (Dev-next-gen), using Claude Code with Anthropic's Claude Opus 5.5. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1658 +/- ##
==========================================
+ Coverage 83.56% 83.68% +0.12%
==========================================
Files 116 116
Lines 13851 13851
==========================================
+ Hits 11574 11591 +17
+ Misses 2277 2260 -17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
In the transcript resizer dialog, Merge with "Merge by gap" at the default 0.2 s does not merge segments that are closer than that. Two sentences, "Bien." at 40 to 1000 ms and "Venue." at 1150 to 2000 ms, are 150 ms apart and still come back as two segments.
TranscriptionWorker.get_transcripthands the stored timestamps to stable_whisper divided by 100, but they are milliseconds and stable_whisper works in seconds. Every gap is seen ten times larger, so the 150 ms pause is read as 1.5 s and stays above the threshold. The result is multiplied back by 100, which is why the final timestamps looked right. #1564 fixed exactly this in the transcript resizer plugin; the dialog has its own copy of the code and still divides by 100.This switches the dialog to
/ 1000and* 1000, same as the plugin.test_transcription_worker_calls_stable_whisperasserted the old scale (1.0 s back as 100 ms), so I updated it to 1000 and 2000.The new test runs the real
TranscriptionWorker.runwith stable_whisper onwhisper-french.mp3and the two segments above. Before the change it fails with two unmerged segments, after it gets one segment from 40 to 2000. Both resizer test files pass with the change.Found by a defect-hunting pipeline I build and run (Dev-next-gen), using Claude Code with Anthropic's Claude Opus 5.5.