Repository navigation
Conversation
The file/one-shot path fed the whole clip into one fixed encoder window and silently dropped every mel frame past capacity (~20 s), truncating long transcriptions. When the input exceeds the selected encoder window, slice the precomputed mel features into overlapping windows (8 s left context, 1 s uncommitted look-ahead) and carry decoder state across them with the streaming path's word-boundary confirm/rollback scheme. Audio that fits one window takes the unchanged code path, byte-identical output. Vocab bias stays off for the internal windows to match one-shot behavior. Backtested against real customer recordings (63 s) and test_long.wav (75.7 s): full-duration transcripts, no seam duplication, 96.7% word overlap with the streaming API, ~linear cost in window count, prompt cactus_stop cancellation. Short fixtures byte-identical pre/post.
This branch has not been deployed
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.
Problem
The one-shot
cactus_transcribepath feeds the entire clip into a single fixed encoder window and silently drops every mel frame past capacity (~20-21 s):copy_frames = std::min(source_frames, expected_frames)intranscribe_parakeet_tdt. Long recordings come back with only the first ~20 s of text. Reported downstream as Pebble MOB-11009 (+14 duplicates) and MOB-14307 (reproducible on demand).Fix
When the input exceeds the selected encoder window (and no caller stream state is present), slice the precomputed mel features into overlapping windows — 8 s left context, 1 s uncommitted look-ahead — and carry decoder state across them with a local
ParakeetTdtStreamState, reusing the streaming path's word-boundary confirm/rollback scheme. Final window runsis_final=true. Audio that fits one window takes the literally unchanged code path.internalflag on the state struct.should_stopis honored at each window boundary and per-frame inside the decode loop.Validation
Backtested via the
transcribeCLI (publiccactus_transcribeFFI) with the v2.2.0parakeet-tdt-0.6b-v3-cq4bundle, baseline captured pre-patch:cactus_stopfired 150 ms into a 75 s file returns in ~270 ms with a partial result.test_sttcasetranscription_long_formguards the regression (fails on truncated output).Follow-ups (not in this PR)
parakeet_flushin stream.cpp can build an over-capacity window on a long undecoded tail (same silent truncation).should_stopintotranscribe_parakeet_tdt.