Voice-to-text tool that captures speech, transcribes it via Whisper, and formats the output with an LLM. Press a hotkey, speak, release β formatted text lands in your clipboard and is auto-pasted into whatever you were typing in.
ββββββββββββββββββββββββ PCM chunks ββββββββββββββββββββββββββββββββββββ formatted
β Wails Desktop App β ββWebSocketβββΆ β Cloudflare Worker (Durable Obj) β ββtextβββββΆ Clipboard β Auto-paste
β (Go + React WebView)β βββββββββββββββ Whisper STT β LLM Formatter β
ββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββ
- Hold Ctrl+Cmdβ focus context is captured, recording starts, overlay appears at top-center - Speak into your microphone (voice level meter shows input)
- Release Ctrl+Cmdβ audio streams to the cloud - Whisper transcribes, LLM formats, result is copied to clipboard and auto-pasted into the originating app
voicebox/
βββ main.go # Wails entrypoint, app menu
βββ app.go # App lifecycle, hotkey handlers, pipeline orchestration
βββ window_darwin.go # macOS window management (overlay, settings, dock click)
βββ window_other.go # Stub for non-macOS builds
βββ internal/
β βββ audio/ # PCM audio capture (malgo/miniaudio), RMS level
β βββ pipeline/ # WebSocket client, streams audio + focus context to worker
β βββ accessibility/ # macOS AX API: focused element context + auto-paste (Cmd+V)
β βββ config/ # TOML config and saving
β βββ hotkey/ # Global hotkey registration
β βββ stt/ # STT provider interface (stubs)
β βββ formatter/ # LLM formatting provider interface (stubs)
βββ frontend/ # React + Tailwind overlay UI (Vite)
β βββ src/
β βββ App.tsx # Routes between settings mode and overlay mode
β βββ components/
β β βββ settings-form.tsx # Config editor (react-hook-form + zod)
β β βββ title-bar.tsx # Frameless title bar with drag region
β βββ hooks/
β βββ use-voicebox.ts # voicebox:state / voicebox:mode / voicebox:level events
β βββ use-config.ts # GetConfig / SaveConfig / GetConfigPath bindings
βββ worker/ # Cloudflare Worker (TypeScript)
β βββ src/
β β βββ index.ts # Router: /ws (WebSocket), /health
β β βββ session.ts # Durable Object: audio accumulation + AI pipeline
β β βββ prompt.ts # System prompt + user message builder
β β βββ wav.ts # PCM-to-WAV wrapper
β β βββ types.ts # Shared types
β βββ test/ # Vitest tests
β βββ wrangler.jsonc # Worker configuration
βββ go.mod
βββ voicebox.toml # User config (gitignored)
- Go 1.24+
- Node.js + pnpm Wails v2CLI- A Cloudflare account with Workers AI access
- macOS (accessibility permission required for auto-paste)
cd worker
pnpm install
wrangler secret put VOICEBOX_TOKEN # set a shared secret
pnpm deploy
On first launch, VoiceBox opens a settings window. You can also create the config manually at ~/.config/voicebox/voicebox.toml
:
[provider]
mode = "cloud"
[cloud]
worker_url = "https://voicebox.<your-subdomain>.workers.dev"
token = "your-shared-secret"
[audio]
sample_rate = 16000
channels = 1
chunk_size = 4096
[hotkey]
record = "ctrl+cmd"
Config is loaded from (in order): ~/.config/voicebox/voicebox.toml
, next to the binary, then ./voicebox.toml
.
Auto-paste requires macOS Accessibility access. On first use, macOS will prompt for permission, or you can grant it manually in System Settings β Privacy & Security β Accessibility.
wails dev # dev mode with hot reload
wails build # production binary
Settings (700Γ450, centered): Opens on launch, dock click, or via the Recording menu. Edit config here.
Overlay (160Γ48, top-center, floating): Appears during recording. Shows recording indicator with voice level meter, spinner while processing, checkmark on success.
Client connects to GET /ws?token=<auth-token>
.
After receiving {"type":"ready"}
, the client sends a configure
message with audio and focus context, then streams binary PCM chunks:
Client Server
βββ connect /ws?token=... βββββββΆβ
ββββ {"type":"ready"} βββββββββββ
βββ {"type":"configure", ...} βββΆβ
βββ [binary PCM chunk] ββββββββββΆβ
βββ [binary PCM chunk] ββββββββββΆβ
βββ {"type":"audio_end"} ββββββββΆβ
ββββ {"type":"processing",...} βββ
ββββ {"type":"result",...} βββββββ
The configure
message carries audio params and focused element context (app name, bundle ID, element role, title, placeholder, current value) used by the LLM formatter to tailor output.
STT:@cf/openai/whisper-large-v3-turbo
Formatter:@cf/qwen/qwen3-30b-a3b-fp8
STT: faster-whisper** Formatter**: Ollama- Provider interfaces exist at
internal/stt/
andinternal/formatter/
- 16kHz sample rate, mono, PCM signed 16-bit LE
- ~4096 byte chunks (~128ms each)
- Max recording: ~25 MiB (~13 minutes)
wails dev # dev server (Go + Vite hot reload)
wails build # production build
go vet ./... # lint Go
go test ./internal/... # test Go
cd frontend && pnpm install && pnpm build
cd worker
pnpm dev # local dev server
pnpm lint # type-check
pnpm format # prettier
pnpm test # vitest
pnpm deploy # deploy to Cloudflare