CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

Hardware mic-switch dictation, legal vocabulary boost, and docs truth-up #4729

Draft⚡ AI-generatedXLccantynz wants to mergeclaude/lawyer-product-intelligence-u5cllqmain↑4 ↓28opened Jul 23, 2026Live: 0 editing
ccantynzcommented Jul 23, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/voxlen/pull/72


What's in this PR

Three advancements aimed at making Voxlen smarter and friction-free for legal professionals:

1. Hardware mic-switch mode (no more Win+H)

The physical mute/power switch on an external mic (Razer, Blue Yeti, Elgato Wave, …) now starts and stops dictation directly — flip on to dictate, flip off to finalize.

  • Detection: a hardware-muted mic delivers digital silence (peaks < −80 dBFS); a live analog capsule always carries a noise floor above that. A pure, unit-tested FSM (src-tauri/src/stt/switch.rs) requires 0.6 s of dead audio to declare the switch off and ~200 ms of live signal to declare it on, so driver hiccups and dither can't flap it.
  • Engine-agnostic: the switch task relays into the existing AudioProcessor, so it works with Deepgram streaming, Whisper cloud, and fully-local Whisper — privileged mode included.
  • Tail-safe: on flip-off the relay drains for 2.5 s so the last words of an utterance are still transcribed before the session closes.
  • Survives power-off switches: mics whose switch kills the USB interface are recovered by the capture watchdog (including from the muted/Paused state) and dictation resumes when the mic re-enumerates.
  • Settings toggle in Audio, live status in the dictation panel ("Mic switch on — dictating" / "Mic switched off — flip to dictate"), and the panel button + global hotkey pause/resume instead of fighting the supervisor.

2. Jurisdiction-aware legal vocabulary boost

Legal Mode now feeds ~90 legal terms of art (Latin phrases, procedure, property, probate) plus jurisdiction-specific courts and instruments (UK/US/AU/CA/NZ) into Deepgram Nova-3 keyterm prompting — "estoppel", "certiorari", "voir dire" recognized first-time with zero manual curation. User, client-matter, and flywheel-learned terms always win the 100-keyterm budget (src/lib/legalVocab.ts).

3. Documentation truth-up

Full audit of all 13 project MDs against the code; fixed every stale claim: Nova-2→Nova-3, grammar model (Sonnet 4.6, not Haiku, with corrected pricing), keychain key storage (plaintext-keys claims removed), honest auto-updater status (not wired), refreshed architecture module tree/plugins/command catalog, real test-suite docs, correct SDK example, Android keyboard + Stripe + API proxy marked shipped in the CLAUDE.md gap list, CHANGELOG brought up to 1.2.0, AUDIT.md marked historical.

Testing

  • npx tsc --noEmit clean
  • 259 TypeScript tests passing (9 new: legal vocab pack + merge/cap logic)
  • cargo check clean; 43 Rust tests (6 new: mic-switch FSM — mute confirm, dither vs room-noise discrimination, anti-flap, full toggle cycle)

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y7769AiasrRUXyHD762vRK


Generated by Claude Code

ccantynzcommented Jul 23, 2026

Originally written by @vercel[bot] on GitHub.


The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
voxlen Ready Ready Preview, Comment Jul 23, 2026 8:43am

Files changed

Side-by-side diff for claude/lawyer-product-intelligence-u5cllq → main.

View diff →

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
Risk score: LOW (2/10)735e121
Touches 1 file(s) with 2 added and 2 removed across 0 owner(s). Includes a new dependency. No tests were added for the new code.
See full signal breakdown
  • files changed: 1
  • lines added/removed: 2 / 2
  • distinct owners touched: 0
  • schema migration touched: no
  • locked / sensitive path touched: no
  • adds new dependency: yes
  • bumps major dependency: no
  • tests added for new code: no
  • diff-minus-test ratio: 1.00
How is this calculated? The score is a transparent sum of weighted signals — see src/lib/pr-risk.ts computePrRiskScore.

Gate checks

1 of 6 failing
GateTestDisabled in settingsSkipped
Secret scanNo secrets detectedPassed
Security scanStatic rules ran (8 checks, no AI required) — no static findings. AI review unavailable: The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored.Skipped
Merge checkMerge conflicts detected — AI auto-resolution will be attempted on mergeFailing
CINo CI workflows are configured for this repositorySkipped
AI ReviewAIAI review approvedPassed

Resolve conflicts manually

GlueCron AI will attempt auto-resolution when you press Merge. If it cannot, or you would rather not wait on it, the manual path below always works.
14 conflicting files between claude/lawyer-product-intelligence-u5cllq and main:
  • AUDIT.md
  • CHANGELOG.md
  • CLAUDE.md
  • README.md
  • docs/API.md
  • docs/ARCHITECTURE.md
  • docs/CONTRIBUTING.md
  • docs/PRIVACY.md
  • docs/RELEASE.md
  • docs/SECURITY.md
  • ios/README.md
  • landing/README.md
  • package-lock.json
  • src-tauri/src/commands/dictation.rs
git fetch origin
git checkout claude/lawyer-product-intelligence-u5cllq
git merge origin/main      # fix the files listed above, then:
git add -A && git commit
git push origin claude/lawyer-product-intelligence-u5cllq
After you push, the merge check re-runs automatically on the next page load and the Merge button unblocks once it passes.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts