fix(dictation): make microphone lifecycle race-safe

Coalesce and invalidate microphone acquisition, preserve immediate stop/cancel events, block overlapping/finalising takes, and add the opt-in keep_mic_warm setting with privacy-preserving default off.\n\nVerified: frontend CI; keep_mic_warm migration default and idempotency; diff checks.
This commit is contained in:
Jamie Pine
2026-07-19 17:45:52 -07:00
parent 0070c04bcf
commit 9b1beba3e1
10 changed files with 469 additions and 144 deletions
+2
View File
@@ -258,6 +258,7 @@ class CaptureSettingsResponse(BaseModel):
allow_auto_paste: bool = True
default_playback_voice_id: Optional[str] = None
hotkey_enabled: bool = False
keep_mic_warm: bool = False
chord_push_to_talk_keys: List[str] = Field(
default_factory=default_push_to_talk_chord
)
@@ -282,6 +283,7 @@ class CaptureSettingsUpdate(BaseModel):
allow_auto_paste: Optional[bool] = None
default_playback_voice_id: Optional[str] = None
hotkey_enabled: Optional[bool] = None
keep_mic_warm: Optional[bool] = None
chord_push_to_talk_keys: Optional[List[str]] = Field(default=None, min_length=1, max_length=6)
chord_toggle_to_talk_keys: Optional[List[str]] = Field(default=None, min_length=1, max_length=6)