Add silent-gap removal during playback#275
Merged
Merged
Conversation
New toolbar button (fast-forward icon) opens a modal with an enable
toggle, a gap-threshold field (default 500ms), and a buffer field
(default 100ms either side). When enabled, computePlayableSections
breaks playable ranges on gaps between two unstruck words that exceed
the threshold, keeping the buffer on each side so word edges aren't
clipped. Skip ranges share the same audioDataArray as redaction so a
single listener loop handles both.
Also normalise toolbar button spacing to margin-right:4px to match the
right-side buttons, and pin the navbar min-height so it doesn't depend
on button margins (the global "button { margin-bottom: 8px }" rule was
the only thing keeping the navbar tall enough to cover the gap above
the transcript-holder).
Swap the fast-forward icon for a Lucide rabbit on the silent-gap removal button and add a primary-colored dot in the corner that appears when gap removal is enabled.
Remove the Apply/Cancel buttons from the silent-gaps modal; the toggle, threshold, and buffer inputs now apply changes on the fly.
Tuck threshold and buffer behind an "Advanced settings" disclosure so only the on/off toggle is exposed by default. When gap removal is enabled, display "Playback shortened by X.Y seconds" computed from the current transcript and settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
so word edges aren't clipped.
disclosure so the default UI stays simple.
Test plan
Addresses #272