Repository navigation
fix(asr/nemotron-multilingual): skip unchanged partial callbacks - #1005
Merged
Alex-Wengg merged 1 commit intoOct 9, 2026
Merged
Alex-Wengg merged 1 commit into
Alex-Wengg merged 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.
Follow-up to #994.
With blank rescue enabled,
processChunkTrackedpublishes after every chunk, and since #994 it does so even when the settled text has not changed: during silence, or when the chunk's new tokens are still held behind a rescue frontier. A chunk that decoded tokens can also publish the same string twice, once from the pipeline and once at the end of the chunk. Before #994 the callback fired only when tokens were decoded. A consumer that restarts a timer on every partial never sees it expire while these repeats arrive each chunk.PunctuationCommitLayer.processPartialTextis one: it invalidates its debounce on each call, so an unpunctuated tail stays uncommitted until punctuation arrives or the stream ends.publishPartialTranscriptnow remembers the last text it delivered and skips the callback when the new text is identical. That covers the end-of-chunk publish, both pipeline publish sites and thefinish()flush. A flush that releases withheld text differs from the last delivery, so it still fires. The history is cleared inreset(),resetStates()andfinish(), so a new stream starts fresh. With rescue disabled the callback behaves as before. The callback doc comment now says text is delivered only when it changes.Tests: seven new cases in
NemotronMultilingualPublicationTestscover unchanged text delivering once, changed text delivering, the same text delivering again afterreset()and afterresetStates(), the final flush delivering changed text once and skipping text already delivered live, and unchanged rescue-disabled behavior. They failed before the change (9 assertion failures) and pass after it.swift build, the Nemotron suites (124 tests) andswift format linton the changed files pass.