Repository navigation
Generate readable subtitles from word-level timings - #42
Open
davidvanleeuwen wants to merge 1 commit into
Open
davidvanleeuwen wants to merge 1 commit into
davidvanleeuwen wants to merge 1 commit into
Conversation
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.
✨ What changes
Generated subtitles currently reuse whole transcription segments, producing long blocks and estimated word highlighting. This change builds shorter cues from actual word timings, while preserving every word in both VTT and transcript JSON.
segmentsresponse. Other model overrides retain segment requests.👀 Example
A single long paragraph becomes several shorter cues. A word spoken from
1.00–1.10can remain displayed until1.83when there is silence, while its JSON word timing stays1.00–1.10.🔎 Additional checks
A 6.6-second synthetic speech recording was sent to the real Mistral API: word mode returned 16 word entries, which are retained exactly in the JSON and grouped into two display cues. The recorded, public-safe response is included as a regression fixture, including a zero-duration word from provider rounding.
The subtitle changes were tested independently of running development databases. Dense speech can still exceed the target reading speed; the builder preserves text rather than dropping words or delaying later speech. Browser fitting is handled separately in Components.