Repository navigation
Conversation
Owner
Author
|
Gonna drop this. Too project-specific. |
force_transcript_words now anchors transcript words that match a forward whisper token span and distributes unmatched runs evenly between anchors, instead of mapping token-by-token. This keeps word highlights in sync when whisper transcribes the same sound inconsistently or splits product names into subword tokens. _model_short_name maps the rest of the large family (large-v3, large-v2, large-v1) to their dotted whisper.cpp --dtw preset names, not just large-v3-turbo.
…-transcript # Conflicts: # README.md # caption.py
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.
This PR adds caption controls and timing fixes for word-highlighted captions.
New flags:
--font-size Nscales caption text.--timing-mode whisper|uniformpicks the word-timing source when--transcriptis used.uniformspreads transcript words evenly across theclip, which is steadier on short or noisy clips where whisper's forced
alignment jumps around.
--hold-lastkeeps the final caption visible until the end of the clip.Transcript handling:
--transcript, the exact transcript words are displayed and mapped ontowhisper's word timings, fixing proper nouns that whisper splits into subword
tokens. A small
canonical_word()alias map lets you align alternatespellings or pronunciations.
and interpolates unmatched runs evenly between anchors, instead of matching
token-by-token. Highlights stay in sync even when whisper transcribes the same
sound inconsistently.
Timing robustness:
repair_word_timings()drops zero-duration and overlapping word spans thatmade highlight transitions look stuck or skip.
Other fixes:
.wtsoutput witherrors="replace"to tolerate invalid UTF-8.large-v3-turbo,large-v3,large-v2,large-v1) to the dotted--dtwpreset names whisper-cli expects.README updated for the new flags and behavior.