VoiceFlow v0.3.2: isolate runtime and stabilize settings - #20
Conversation
Preserve the current audio teardown, settings responsiveness, history, icon, and installer work before the v0.3.2 architecture convergence. creative/ and output/ remain untouched.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 940df3ebaf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| except Exception: | ||
| logger.exception("runtime worker restart failed") | ||
| self.controller.mark_degraded( | ||
| error_code="worker_restart_failed", | ||
| ) |
There was a problem hiding this comment.
Keep preview failures from disabling final dictation
When only the optional preview worker fails to restart—for example, after its process crashes or its preview assets become unavailable—this shared exception path marks the entire controller degraded, after which AppController.toggle_recording() rejects every recording even though the audio and authoritative final-ASR workers remain usable. Startup already tolerates the same preview initialization failure by setting preview_transcriber to None, so the supervisor should likewise disable preview rather than gate core dictation.
AGENTS.md reference: AGENTS.md:L74-L75
Useful? React with 👍 / 👎.
| try: | ||
| import sounddevice as sd | ||
|
|
||
| for index, device in enumerate(sd.query_devices()): | ||
| if int(device.get("max_input_channels", 0)) > 0: | ||
| devices.append((str(device.get("name", index)), index)) |
There was a problem hiding this comment.
Enumerate microphones outside the Qt process
Whenever the settings window refreshes, this imports sounddevice and calls native PortAudio device enumeration inside the Qt process; moving it to a Python thread does not provide process isolation, so a wedged enumeration leaves settings permanently refreshing and a native driver crash still terminates VoiceFlow. Route device discovery through the supervised audio worker instead of loading or calling the native audio stack here.
AGENTS.md reference: AGENTS.md:L56-L59
Useful? React with 👍 / 👎.
结果
验证