omi icon indicating copy to clipboard operation
omi copied to clipboard

React Native Whisper drops leftover and in-flight transcripts on stop

Open Da7em-T opened this issue 2 months ago • 0 comments

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:

  1. The leftover (short) buffer passed to stop is decoded and then discarded.
  2. A full batch already in await runner(...) is also discarded when stop races 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.

Da7em-T avatar Sep 12 '26 13:09 Da7em-T