fix(react-native): deliver Whisper transcripts after stop - #13048
fix(react-native): deliver Whisper transcripts after stop#13048StiensWout wants to merge 2 commits into
Conversation
Preserve transcripts for accepted PCM while ignoring subsequent audio. Three public API tests pass with Bun and are wired into the shared check manifest. All 13 selected local manifest checks pass. No hardware or live model was used. Failure-Class: none
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Serialize batches and the final tail through one promise chain. A delayed-first-batch test fails before serialization and passes after it. All five exported API tests pass with Bun, including continuation after a failed batch. Failure-Class: none
|
Verified this end to end in an isolated offline container using the repo's pinned Bun (1.3.14):
One non-blocking observation: a rejected runner is now swallowed silently by the pending.then(decode, decode) chain (previously it surfaced as an unhandled rejection), which keeps later accepted audio decoding - the right trade-off here since StreamingTranscriber exposes no error channel. If whisper.rn decode failures ever matter to SDK consumers, an optional error callback would be a natural follow-up. Note: no checks have reported on this head yet - workflow runs for a first-time contributor typically need a maintainer's approval before they start. Leaving the merge decision to a human maintainer; the fix itself looks correct and is nicely tested. This feedback is AI-generated on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
fix(react-native): deliver Whisper transcripts after stop. Confidence ~4/5 (title fix(), root cause stated, small scoped diff, regression tests added). Confirmed bug still present on main (stop() sets stopped=true before flush()'s onTranscript call, discarding the final transcript).
Stopping the React Native Whisper transcriber discards the final buffered transcript and any decode still running. Queue decodes in audio order and deliver results for audio accepted before stop, while continuing to ignore later audio and repeated stop calls.
Related to #13011. This fixes the React Native adapter only; the shared cross-language lifecycle discussion remains open.
Validation:
Failure-Class: none
Product invariants affected: none.