fix(device-ts): keep in-flight Whisper batches after stop

Closed
DA
3mo ago
+103-4

Summary

  • Whisper now keeps results for audio already accepted by the runner, including a full batch that is still in flight when stop() runs.
  • Batches are delivered in input order, so a later tail cannot hide an earlier transcript.
  • Audio appended after stop is ignored. Repeated stop() does not duplicate a batch.

Fixes #12964

Why this PR

#12971 is APPROVED but CONFLICTING against current main (README plus checks-manifest). This replacement is createWhisperTranscriber plus a Node *.test.ts regression. No bun, no manifest, no docs. Does not mix the sample-rate work in #13581.

Test plan

  • node --experimental-strip-types --test sdks/device/typescript/src/stt/whisper-inflight-stop.test.ts — 4 passed
  • CI on this PR
  • Maintainer review

Made with Cursor