omi
omi copied to clipboard
React Native Whisper drops leftover and in-flight transcripts on stop
On current main, createWhisperTranscriber().stop() in sdks/react-native/src/stt/whisper.ts sets stopped = true and then flushes. The flush awaits the runner and only calls onTranscript when !stopped, so:
- The leftover (short) buffer passed to
stopis decoded and then discarded. - A full batch already in
await runner(...)is also discarded whenstopraces it.
Reproduction with Node 22 and the public constructor (no device, native Whisper binary, or user audio): append 100 bytes below a 1-second batch, call stop(), wait. onTranscript received [] instead of the leftover text. The injected runner was () => 'last words'.
This is the React Native adapter only. The TypeScript device SDK counterpart is #12964. Open competing PR #13048 is CONFLICTING because it also edits README and checks-manifest.