Handy/src-tauri/src/shortcut
Viren Mohindra cb32d35b9e
feat(audio): lazy stream close for bluetooth mic latency (#747)
* feat(audio): opt-in lazy stream close for bluetooth mic latency

keep the microphone stream open for 30s after recording stops to
reduce latency on back-to-back transcriptions. gated behind an
experimental setting (off by default) since it keeps the mic actively
capturing while idle — degrading bluetooth audio quality on macOS.

adds lazy_stream_close setting, tauri command, toggle in experimental
settings section, and i18n strings.

* fix: gate lazy close on setting in cancel_recording path

cancel_recording was unconditionally calling schedule_lazy_close,
keeping the mic open for 30s even when the setting was disabled.
also bump close_generation on AlwaysOn→OnDemand switch to cancel
any stale lazy close timers.

* feat(audio): opt-in lazy stream close for bluetooth mic latency

keep the microphone stream open for 30s after recording stops to
reduce latency on back-to-back transcriptions. gated behind an
experimental setting (off by default) since it keeps the mic actively
capturing while idle — degrading bluetooth audio quality on macOS.

adds lazy_stream_close setting, tauri command, toggle in experimental
settings section, and i18n strings.

* fix: gate lazy close on setting in cancel_recording path

cancel_recording was unconditionally calling schedule_lazy_close,
keeping the mic open for 30s even when the setting was disabled.
also bump close_generation on AlwaysOn→OnDemand switch to cancel
any stale lazy close timers.

* chore: fix cargo fmt on model.rs line from main merge

* fix race

---------

Co-authored-by: CJ Pais <cj@cjpais.com>
2026-03-19 14:12:43 +08:00
..
handler.rs fix: transcription lock-up race condition & add small debounce (#824) 2026-02-16 22:18:50 +08:00
handy_keys.rs use blocking for handy keys (#881) 2026-02-23 11:18:47 +08:00
mod.rs feat(audio): lazy stream close for bluetooth mic latency (#747) 2026-03-19 14:12:43 +08:00
tauri_impl.rs attempt to clean up warnings on build (#1037) 2026-03-14 11:42:42 +08:00