Skip to content

Windows support, live dictation, and redesigned model settings - #2

Open
OnlyHelion wants to merge 2 commits into
qonto:mainfrom
OnlyHelion:windows-live-dictation
Open

OnlyHelion wants to merge 2 commits into
qonto:mainfrom
OnlyHelion:windows-live-dictation

Conversation

@OnlyHelion

Copy link
Copy Markdown

What this adds

Windows support. The plugin previously assumed macOS (whisper-cli via Homebrew). On Windows it now auto-downloads a managed whisper.cpp runtime on first use - a pinned ggml-org/whisper.cpp CI release, checksum-verified, extracted into %LOCALAPPDATA%\opencode-dictation\bin - and looks for whisper-cli.exe / whisper-server.exe there first. macOS behavior is preserved: the Homebrew dirs (/opt/homebrew/bin, /usr/local/bin) are still searched, and a missing whisper-cli shows the "Install it with brew install whisper-cpp" hint instead of a download prompt.

Live dictation (optional, off by default). The transcript updates as you talk: rolling audio windows are resampled to 16 kHz and transcribed by a resident whisper-server that keeps the model warm across chunks, with a per-chunk fallback to whisper-cli when the server is unavailable or a chunk fails (a failed slot stays poisoned for the session rather than being retried on every chunk). On stop, a final cleanup pass re-transcribes the whole recording and replaces the draft, repairing chunk seams. A plain Enter during a session stops it through the same path as the shortcut, so a raw draft is never sent without the cleanup pass.

Redesigned Settings -> Dictation. The model row offers presets, or Browse picks a folder and lists its .bin models inline (the saved one gets the check), plus a Custom typed-name field. The title/description column is pinned to the row top so the folder panel is the only thing that grows, the panel stays open until the settings menu is left, and Browse/Apply are equal width. New "Live dictation" toggle.

Tests + docs. 37 unit tests covering chunking/resampling/dedupe, server response parsing and the multipart body builder, model-row helpers, settings validation, and model/binary discovery. README and AGENTS.md updated for Windows.

Testing

  • Hand-checked end to end on Windows: record -> transcribe -> insert into the composer, live dictation with the resident server, the settings flows, Enter-to-stop, and the keybind.
  • macOS: the code paths are preserved (Homebrew discovery, the whisper-server the brew formula ships, the darwin hint), but they were not re-run on a Mac during this work - flagging that for any reviewer with a Mac handy.
  • Gate: oxlint + oxfmt + tsc clean, 37/37 tests pass, and the committed dist/gui-experimental.cjs is rebuilt from source.

OnlyHelion added a commit to OnlyHelion/opencode-dictation that referenced this pull request Dec 5, 2026
@OnlyHelion
OnlyHelion force-pushed the windows-live-dictation branch from 9b69b1c to 7df0fb0 Compare December 5, 2026 23:57
OnlyHelion added a commit to OnlyHelion/opencode-dictation that referenced this pull request Dec 5, 2026
Windows: managed whisper.cpp runtime auto-downloaded on first use (pinned ggml-org release, checksum-verified, extracted to %LOCALAPPDATA%\opencode-dictation\bin); whisper-cli.exe and whisper-server.exe are looked up there first. macOS paths are unchanged (Homebrew dirs, brew install hint).

Live dictation (optional, off by default): rolling audio windows are resampled and transcribed by a resident whisper-server that keeps the model warm across chunks, with a per-chunk fallback to whisper-cli; a final full-recording pass on stop replaces the draft and repairs chunk seams; plain Enter stops the session through the same path as the shortcut.

Settings: model row with presets, folder Browse listing .bin files inline, and a Custom typed name; title column pinned to the row top; equal-width Browse/Apply; live-dictation toggle.

Tests: 37 unit tests across chunks, server parsing, model-row helpers, settings and discovery. README and AGENTS.md updated for Windows.
Signed-off-by: OnlyHelion <onlyhelion@users.noreply.github.com>
Applies the comment audit: rewrite false or stale comments, cut ones that restate the code, and drop pointers to the deleted model-row prototype. Code changes: remove the duplicate stopChunkServer() call in discard() (endLive() already makes it), share SOUND_LEVEL from chunks.ts instead of two copies, and delete the unused modelFileLabel helper and its test. dist/ rebuilt.

Signed-off-by: OnlyHelion <onlyhelion@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant