fix(react-native): deliver Whisper transcripts accepted before stop
Merged
DA
3mo ago+82+82+01234567890123456789-5-5-0123456789
Fixes #13618.
createWhisperTranscriber().stop() set stopped before flush, then dropped leftover and in-flight batches after await runner because delivery required !stopped. Audio accepted before stop now stays queued in order. Audio after stop is ignored. Repeated stop is a no-op.
Competing #13048 is CONFLICTING (README / checks-manifest). This PR is the adapter plus jest coverage only.
Validation
- Reproduced on
origin/maind5cbd548f6: leftover 100-byte buffer →onTranscriptreceived[]. - After the fix, leftover, in-flight full batch, and post-stop ignore contracts passed with Node 22 (
--experimental-strip-types). No device or native Whisper binary.
AI-assisted contribution. Bounty eligibility remains a maintainer decision.
Made with Cursor