Conversation
|
this prevents the crash from #475, which is good. however it introduces silent failures -- if there's no mic, the app won't crash but also won't tell the user anything. they'll press push-to-talk and nothing happens additionally, if the worker exits early during init, calling i think we should validate the audio config in |
| Ok(c) => c, | ||
| Err(e) => { | ||
| log::error!("Failed to get audio config: {}", e); | ||
| return; |
There was a problem hiding this comment.
this prevents the crash but now open() returns Ok(()) even when the worker immediately exits. the caller (audio manager) sets is_open = true and thinks everything is fine
maybe we do config validation in open() before spawning the worker, or use a oneshot channel to communicate init success / failure back
| } | ||
| }; | ||
|
|
||
| if let Err(e) = stream.play() { |
There was a problem hiding this comment.
if the worker exits here ^, stop() will deadlock, and it sends Cmd::Stop(resp_tx) to a dead worker and resp_rx.recv() blocks forever waiting for a response that never comes
There was a problem hiding this comment.
think we should not let open() succeed if init fails
|
Thanks for the review @VirenMohindra, I definitely want to consider a toasting ui of some kind for error handling generally. I think probably having some unified way to throw up to the UI would be helpful for big errors Tbh I just let Claude write whatever and hadn't even reviewed this, if you would like to submit changes and improvements I would be overjoyed!! I already have a huge backlog and would love to focus on keyboard input stuff instead |
happy to! def want to clear out my in flight PRs before i jump on this one though, before they get too stale 😅 |
|
@VirenMohindra i will try and get them in soon! I'm not planning to pull much else in for a week or two. I'm trying to wrap up a rewrite of the keyboard input library generally |
- PR cjpais#477: Graceful handling when no microphone is connected - Validate device config before spawning worker thread - Use HandyError with user-friendly messages and recovery suggestions - PR cjpais#930: Transcription hook for external script processing - Add transcription_hook_enabled and transcription_hook_path settings - Pipe transcription through external scripts for custom processing - PR cjpais#814: Secure API key storage in OS keychain - Add keyring module for macOS Keychain, Windows Credential Manager, Linux Secret Service - Commands: set_api_key, get_api_key, delete_api_key, get_masked_api_key - PR cjpais#455: Text replacements with regex and magic commands - Support literal and regex pattern matching - Magic commands: [date], [time], [datetime] - Import/export functionality for replacement rules - PR cjpais#851: Per-entry post-process button for history - Retroactively post-process transcription history entries - Store post-processed text and prompt used - PR cjpais#618: Wake-word detection for Active Listening trigger - Transcript-based wake phrase detection - Configurable trigger actions, cooldown, and threshold
- PR cjpais#944: Volume slider now uses 1% step instead of 10% - PR cjpais#369: Double-click tray icon opens main window - PR cjpais#477: App no longer crashes when no microphone is connected (graceful fallback to on-demand mode) - Issue cjpais#858: Corrupt/empty model downloads are detected and re-downloaded automatically instead of blocking future download attempts - Issue cjpais#315: Overlay no longer steals focus on Windows (WS_EX_NOACTIVATE + WS_EX_TOOLWINDOW + WS_EX_TRANSPARENT) - Issue cjpais#263: Overlay size now uses logical coordinates for correct DPI scaling on high-DPI displays (150%+) - Fix log filename from 'parler' to 'phonara' Co-Authored-By: Claude Opus 4.6 <[email protected]>
…LLM env URL - PR cjpais#477: Graceful error handling in audio recorder worker thread instead of panicking when no microphone config is available or stream fails to build - PR cjpais#747: Lazy stream close for bluetooth mic latency - keeps mic stream open for 30s after recording stops in OnDemand mode, eliminating BT activation delay - PR cjpais#633: Support PHONARA_CUSTOM_LLM_BASE_URL env var to override LLM base URL at runtime (useful for local LLM services on dynamic ports) - PR cjpais#872: Bump macOS minimum system version from 10.13 to 10.15 - PR cjpais#976: Add tests confirming long repeating word stutter collapse works Co-Authored-By: Claude Opus 4.6 <[email protected]>
title