feat: start skips the mic check by default; --check to opt in

invert the pre-listen mic check — default is no check (just start listening); pass
'claudedo start --check' to run it. replaces the old --skip-audio-check flag.

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
disqualifier 2026-06-26 02:25:20 -04:00
parent e6dadab143
commit 69b14663f4
2 changed files with 9 additions and 8 deletions

View File

@ -64,8 +64,9 @@ claudedo test-audio
## Usage ## Usage
**Run it in a terminal you watch — that's the product.** You launch `claudedo **Run it in a terminal you watch — that's the product.** You launch `claudedo
start`, it does a quick mic check, then drops into a visible listen loop. Each start` and it drops into a visible listen loop (pass `--check` to run a mic check
utterance prints a timestamped, colored line — `HH:MM:SS [claude-libs] heard "…" → first). Each utterance prints a timestamped, colored line — `HH:MM:SS [claude-libs]
heard "…" →
typed 'fix'` (green for injected, red for drops, `[SYSTEM]`/`[VOICE]` for state and typed 'fix'` (green for injected, red for drops, `[SYSTEM]`/`[VOICE]` for state and
recognition). That terminal is your recognition/action console; you attach to the recognition). That terminal is your recognition/action console; you attach to the
`claude-<name>` session in another pane to watch the keystrokes land. It runs in the `claude-<name>` session in another pane to watch the keystrokes land. It runs in the
@ -73,9 +74,9 @@ foreground by design — the console is the point — though `claudedo stop` can
stray instance. stray instance.
```bash ```bash
claudedo start # mic-check, then the visible listen loop (listen mode default) claudedo start # the visible listen loop (listen mode default; no mic check)
claudedo start --check # run a mic check before listening
claudedo start --mode ptt # push-to-talk instead (desk-only — see Modes) claudedo start --mode ptt # push-to-talk instead (desk-only — see Modes)
claudedo start --skip-audio-check # skip the pre-listen mic check
claudedo status # running? mode? target session? claudedo status # running? mode? target session?
claudedo stop # stop a running daemon claudedo stop # stop a running daemon
claudedo set <name> # set the sticky target -> claude-<name> (alias: switch) claudedo set <name> # set the sticky target -> claude-<name> (alias: switch)

View File

@ -33,12 +33,12 @@ def cmd_start(args: argparse.Namespace) -> int:
config = _load_or_die(args.config) config = _load_or_die(args.config)
if args.mode: if args.mode:
config.mode = args.mode config.mode = args.mode
if not args.skip_audio_check: if args.check:
print("checking mic before listening (speak briefly) ...") print("checking mic before listening (speak briefly) ...")
peak = _probe_mic(config, seconds=2.0, verbose=False) peak = _probe_mic(config, seconds=2.0, verbose=False)
if peak is None or peak < 0.02: if peak is None or peak < 0.02:
print("mic check failed — no usable input.", file=sys.stderr) print("mic check failed — no usable input.", file=sys.stderr)
print("run `claudedo test-audio` to debug; or `claudedo start --skip-audio-check`", print("run `claudedo test-audio` to debug, or `claudedo start` to skip the check",
file=sys.stderr) file=sys.stderr)
return 1 return 1
print(f"mic OK (peak {peak:.3f}).") print(f"mic OK (peak {peak:.3f}).")
@ -217,8 +217,8 @@ def build_parser() -> argparse.ArgumentParser:
sp = sub.add_parser("start", help="run the daemon (foreground)") sp = sub.add_parser("start", help="run the daemon (foreground)")
sp.add_argument("--mode", choices=("listen", "ptt"), help="override input mode") sp.add_argument("--mode", choices=("listen", "ptt"), help="override input mode")
sp.add_argument("--skip-audio-check", action="store_true", sp.add_argument("--check", action="store_true",
help="skip the pre-listen mic check") help="run a mic check before listening (off by default)")
sp.set_defaults(func=cmd_start) sp.set_defaults(func=cmd_start)
sub.add_parser("stop", help="stop a running daemon").set_defaults(func=cmd_stop) sub.add_parser("stop", help="stop a running daemon").set_defaults(func=cmd_stop)