Repository navigation
fix(transcription): repair pause-chunk seams that split one sentence - #3187
Merged
Merged
Conversation
Each sealed pause chunk is decoded as its own clip, so the offline decoder
capitalizes its first word and can end it with a period the speaker never
said. Joined back together, one sentence reads with a bogus mid-sentence
capital ("that they No longer") or a period through its middle ("probably
do. Onboarding audits").
Repair the seam only, between chunks and before the tail, never inside a
chunk: drop a trailing period after a word that dangles mid-clause (unless
the next chunk plainly opens a new sentence), then lowercase an ordinary
capitalized start. Acronyms, camelCase, "I", active vocabulary and screen
terms, and days, months, and languages keep their capital.
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.
Before
Long dictations split into pause-separated chunks, and every chunk is decoded as its own clip. Parakeet then capitalizes the chunk's first word and sometimes puts a period after its last one, so the joined sentence reads:
along the lines that they No longer allow it.let someone know In the right place.we should probably do. Onboarding audits every so often.so it can easily. Audit that once in a while.that I think the old library got. named like this.After
The join between two chunks (and before the tail) repairs the seam, never the inside of a chunk:
along the lines that they no longer allow it.let someone know in the right place.we should probably do onboarding audits every so often.so it can easily audit that once in a while.that I think the old library got named like this.A trailing
.after a word that dangles mid-clause (to,do,got,easily, ...) is dropped, unless the next chunk plainly opens a new sentence (So let's,I think,Wait), in which caseI think we should. So let's start tomorrow.keeps its period. A capitalized start is lowercased unless it isI/I'm, an acronym, camelCase, a saved or on-screen vocabulary term, or a day, month, or language.?,!,..., abbreviations (etc.,Mr.), CJK joins, and quotes are untouched.Verification
scripts/check transcription dictation continuationpasses 1081 tests, including new synthetic seam cases;cargo clippy --locked --bin hex -- -D warningsandscripts/code-shape.pyare clean.