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
3.9 KiB
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+Spaceby 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
- Set one of:
DEEPGRAM_API_KEY,GROQ_API_KEY, orOPENAI_API_KEYin the environment. - Optional: install SoX (
winget install sox) for native capture; otherwise renderer MediaDevices is used automatically. - In Desktop Settings → Voice, choose provider/hotkey and enable commands.
- 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.mdpackages/app/src/voice/*packages/opencode/src/config/voice.tsCHANGELOGS/2026-07-26-desktop-voice-control.mdbackups/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-actionhooks for voice accept/reject)
Notes
- Existing npm plugin
opencode-voiceremains useful for CLI/TUI; this feature targets the Electron desktop app where plugins cannot access mic/DOM. - Electron
globalShortcutonly 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, andpackages/session-uiwith their package typecheck commands. - Verified the voice command parser with four passing unit tests.
- Built with
OPENCODE_CHANNEL=prodand packageddist/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.gitignoreso local timestamped safety copies stay untracked. - Re-verified package typechecks for
desktop,app,opencode,ui, andsession-ui, plus voice command parser unit tests. - Committed voice control source changes on
devasfeat(desktop): add voice control(78bf9a35eb50e183128a003ce8ef3a5c8b6bb359). - Added remote
cloudaxe→https://repo.cloudaxe.io/CloudAxe/cloudaxe-opencode.git; left GitHuboriginunchanged. - Direct full-history HTTP push hit server
413 Request Entity Too Large; seeded history via Gitea migrate fromanomalyco/opencode, then force-with-lease updatedcloudaxe/devto the local voice tip. - Verified
cloudaxe/devSHA matches localdev(78bf9a35eb50e183128a003ce8ef3a5c8b6bb359).