mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Address two P2 review comments: - stt_engine: the worker broke out of its loop as soon as the shutdown flag was set, skipping any audio already enqueued by the caller's final push_dictation_audio flush. The shutdown flush then only transcribed older speech and dropped the last words. Now drain and process everything still in the audio channel before the final flush. - dictation/useLocalDictation: stop_dictation now takes an optional session id and only tears down the engine when it matches the currently-stored session_id. stopRecording captures its session and passes it to the deferred (post-flush) stop, so restarting during the Transcribing grace window no longer lets the stale stop kill the newly-started session. Unconditional callers (cancel, unmount, abort-bail, start) pass None.