feat: add Windows STT support with cross-platform process management and configurable whisper path#11
Open
crixue wants to merge 4 commits into
Open
feat: add Windows STT support with cross-platform process management and configurable whisper path#11crixue wants to merge 4 commits into
crixue wants to merge 4 commits into
Conversation
…and configurable whisper path **Why** The plugin was Linux/macOS-only for STT. Windows users had no supported path to use speech-to-text despite `sox` and `whisper.cpp` both being available on the platform. The existing code also used Unix-only signals (SIGKILL/SIGINT) and utilities (`pkill`) that crash on Windows. **What Changes** - Guard Unix-specific `process.kill(pid, "SIGKILL"/"SIGINT")` and `pkill` calls behind `process.platform !== "win32"`; use `.kill()` on Windows where signal names are unsupported - Add `whisperPath` plugin option so users can point to the binary directly, bypassing `PATH` resolution — essential on Windows where OpenCode's process environment may predate `PATH` modifications - Improve `ENOENT` error message to suggest `whisperPath` as a fix - Document full Windows setup in README: winget for sox, Visual Studio Build Tools, CPU-only and CUDA whisper.cpp builds, PATH configuration, and smoke test - Generalize README CUDA docs (CUDA_ARCH env var, Blackwell min CUDA 12.8, `-real` suffix for Windows CUDA arch flags) **Capabilities** - STT recording and transcription works on Windows with the same `tiny` → `large-v3` model range as Linux/macOS - NVIDIA GPU acceleration on Windows (CUDA build) with Blackwell (RTX 50) support at CUDA 12.8+ - Users can avoid PATH issues entirely by setting `whisperPath` in plugin options **Impact** - Zero behavioral change on Linux/macOS — all conditional branches are no-ops on those platforms - Windows users get a complete, documented setup flow from `winget install` to working voice commands - `whisperPath` option is additive and optional; existing configurations continue to resolve via `PATH` as before - CUDA arch table fix (Blackwell min 12.8) corrects an error for all platforms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add Windows STT support with cross-platform process management and configurable whisper path
It Require merge feat: enhance audio backend detection for Linux/WLS2 and input devi…
first!
Why
The plugin was Linux/macOS-only for STT. Windows users had no supported path
to use speech-to-text despite
soxandwhisper.cppboth being available onthe platform. The existing code also used Unix-only signals (SIGKILL/SIGINT)
and utilities (
pkill) that crash on Windows.What Changes
process.kill(pid, "SIGKILL"/"SIGINT")andpkillcalls behindprocess.platform !== "win32"; use.kill()onWindows where signal names are unsupported
whisperPathplugin option so users can point to the binary directly,bypassing
PATHresolution — essential on Windows where OpenCode's processenvironment may predate
PATHmodificationsENOENTerror message to suggestwhisperPathas a fixTools, CPU-only and CUDA whisper.cpp builds, PATH configuration, and smoke
test
-realsuffix for Windows CUDA arch flags)Capabilities
tiny→large-v3model range as Linux/macOSwhisperPathin pluginoptions
Impact
no-ops on those platforms
winget installtoworking voice commands
whisperPathoption is additive and optional; existing configurationscontinue to resolve via
PATHas before