cloudaxe-opencode/CHANGELOGS/2026-07-26-desktop-voice-control.md
axcho 9f5a50a369
Some checks failed
deploy / deploy (push) Has been cancelled
generate / generate (push) Has been cancelled
nix-eval / nix-eval (push) Has been cancelled
publish / version (push) Has been cancelled
test / unit (linux) (push) Has been cancelled
test / unit (windows) (push) Has been cancelled
test / e2e (linux) (push) Has been cancelled
test / e2e (windows) (push) Has been cancelled
typecheck / typecheck (push) Has been cancelled
publish / build-cli (push) Has been cancelled
publish / sign-cli-windows (push) Has been cancelled
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=arm64 host:macos-26 platform_flag:--mac --arm64 target:aarch64-apple-darwin]) (push) Has been cancelled
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=x64 host:macos-26-intel platform_flag:--mac --x64 target:x86_64-apple-darwin]) (push) Has been cancelled
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:x86_64-unknown-linux-gnu]) (push) Has been cancelled
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404-arm platform_flag:--linux --arm64 target:aarch64-unknown-linux-gnu]) (push) Has been cancelled
publish / build-electron (map[host:blacksmith-4vcpu-windows-2025 platform_flag:--win target:x86_64-pc-windows-msvc]) (push) Has been cancelled
publish / build-electron (map[host:windows-2025 platform_flag:--win --arm64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
publish / publish (push) Has been cancelled
docs(desktop): note CloudAxe voice fork publication
2026-07-30 16:47:11 -04:00

3.9 KiB

Change Log — 2026-07-26

Desktop microphone voice control

Summary

Added built-in push-to-talk / toggle microphone voice control to the OpenCode Electron desktop app for Windows (and other desktop platforms). Speech is transcribed with cloud STT providers (Deepgram streaming, Groq Whisper, OpenAI Whisper). Short spoken phrases can be interpreted as voice commands.

Architecture

  • Main process (packages/desktop/src/main/voice/): recording orchestration, SoX/FFmpeg capture when available, cloud STT providers, global hotkey (Alt+Space by default), IPC + electron-store config.
  • Renderer fallback capture: when SoX/FFmpeg is not installed, the renderer uses getUserMedia, downsamples to 16 kHz mono PCM, and streams chunks to the main process.
  • App UI (packages/app/src/voice/): SolidJS voice context, mic button beside prompt submit, recording overlay, settings tab, command parser.
  • Config schema (packages/opencode/src/config/voice.ts): Effect Schema for voice settings.

User setup

  1. Set one of: DEEPGRAM_API_KEY, GROQ_API_KEY, or OPENAI_API_KEY in the environment.
  2. Optional: install SoX (winget install sox) for native capture; otherwise renderer MediaDevices is used automatically.
  3. In Desktop Settings → Voice, choose provider/hotkey and enable commands.
  4. Press the mic button or the global hotkey to dictate. Say send, clear, stop, etc. for commands.

Files added

  • packages/desktop/src/main/voice/*
  • packages/desktop/docs/voice-control.md
  • packages/app/src/voice/*
  • packages/opencode/src/config/voice.ts
  • CHANGELOGS/2026-07-26-desktop-voice-control.md
  • backups/20260726-121936/* (pre-change backups)

Files modified

  • Desktop main/preload/renderer IPC surface
  • Prompt input V2 (mic button + voice action wiring)
  • Settings dialog (Voice tab)
  • UI icon sets (microphone)
  • App i18n dictionaries
  • Permission dock (data-action hooks for voice accept/reject)

Notes

  • Existing npm plugin opencode-voice remains useful for CLI/TUI; this feature targets the Electron desktop app where plugins cannot access mic/DOM.
  • Electron globalShortcut only fires on keydown, so the hotkey toggles recording (press to start, press again to stop).

Production installation — 2026-07-30

  • Repaired the Windows checkout declaration shim used by app typechecking.
  • Corrected voice recorder child-process typing, settings component contracts, public voice type naming, and resolved config typing.
  • Verified packages/desktop, packages/app, packages/opencode, packages/ui, and packages/session-ui with their package typecheck commands.
  • Verified the voice command parser with four passing unit tests.
  • Built with OPENCODE_CHANNEL=prod and packaged dist/opencode-desktop-win-x64.exe.
  • Installer SHA-256: E4E4C855FB17A9027B993EFB1C59DB8DBC589A23EA9FB171F7401D359913D4EC.
  • Installed silently for the current user over OpenCode Desktop 1.18.4; the installer returned exit code 0.
  • Confirmed the existing user-data backup at C:\Users\axcho\OneDrive\Documents\Business\CloudAxc.io\Code\OpenCode\opencode-userdata-backup-20260727.

CloudAxe repository publication — 2026-07-30

  • Added backups/ to root .gitignore so local timestamped safety copies stay untracked.
  • Re-verified package typechecks for desktop, app, opencode, ui, and session-ui, plus voice command parser unit tests.
  • Committed voice control source changes on dev as feat(desktop): add voice control (78bf9a35eb50e183128a003ce8ef3a5c8b6bb359).
  • Added remote cloudaxehttps://repo.cloudaxe.io/CloudAxe/cloudaxe-opencode.git; left GitHub origin unchanged.
  • Direct full-history HTTP push hit server 413 Request Entity Too Large; seeded history via Gitea migrate from anomalyco/opencode, then force-with-lease updated cloudaxe/dev to the local voice tip.
  • Verified cloudaxe/dev SHA matches local dev (78bf9a35eb50e183128a003ce8ef3a5c8b6bb359).