Skip to content

Fix merge by gap in the transcript resizer dialog - #1658

Merged
raivisdejus merged 2 commits into
chidiwilliams:mainfrom
Dev-next-gen:fix/resizer-merge-gap-seconds
Oct 16, 2026
Merged

raivisdejus merged 2 commits into
chidiwilliams:mainfrom
Dev-next-gen:fix/resizer-merge-gap-seconds

Conversation

@Dev-next-gen

Copy link
Copy Markdown
Contributor

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_transcript hands 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 / 1000 and * 1000, same as the plugin. test_transcription_worker_calls_stable_whisper asserted 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.run with stable_whisper on whisper-french.mp3 and 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.

Dev-next-gen and others added 2 commits October 14, 2026 00:50
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.
@raivisdejus
raivisdejus enabled auto-merge (squash) October 16, 2026 19:18
@Dev-next-gen

Copy link
Copy Markdown
Contributor Author

The red build (macos-latest) check is not related to this change: it fails in the Bundle step, which is the same step that fails on main in the three most recent CI runs (for example https://github.com/chidiwilliams/buzz/actions/runs/38945501682/job/117123733430, at 6fc1a85). On main the step stops right after installing create-dmg, on the certificate import, with security: SecKeychainItemImport: Unable to decode the provided data., and the log shows APPLE_ID, APPLE_APP_PASSWORD and APPLE_TEAM_ID as empty. The full log for this PR's job won't be available until the run finishes, so I can confirm the failing step but not yet the exact line. This PR only touches the resizer widget and its test, and test (ubuntu-latest) has passed.

Found by a defect-hunting pipeline I build and run (Dev-next-gen), using Claude Code with Anthropic's Claude Opus 5.5.

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.68%. Comparing base (c02e63f) to head (a31260f).

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     
Flag Coverage Δ
Linux 82.96% <ø> (+0.14%) ⬆️
macOS 83.38% <ø> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@raivisdejus
raivisdejus merged commit c6c0a69 into chidiwilliams:main Oct 16, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants