-
Notifications
You must be signed in to change notification settings - Fork 10k
feat: add first-party voice transcription with local Whisper #11345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cmdNiels
wants to merge
21
commits into
anomalyco:dev
Choose a base branch
from
cmdNiels:dev
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,301
−43
Conversation
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
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Related PRs Found1. PR #9264 - feat: voice-typing using external Whisper / ALM API
2. PR #3827 - Add voice-to-text transcription feature
Note: PR #11345 (the current PR) explicitly references PR #9264 in its description and provides a comparison, so the relationship is acknowledged by the authors. |
- Only attempt FFI stderr redirection on Linux (process.platform check) - Move dlopen call inside redirectStderr function with try/catch - Gracefully skip stderr suppression on Windows/macOS - Allows voice feature to work cross-platform without E2E test failures
Replaces @xenova/transformers with @huggingface/transformers 3.8.1 which properly respects ONNX logging configuration. Removes 63 lines of complex FFI stderr redirection code in favor of simple env.backends.onnx.logSeverityLevel configuration.
1 task
|
Eagerly waiting for this PR to be merged! |
- Resolved conflicts in prompt/index.tsx by keeping both VoiceRecorder and DialogSkill features - Regenerated bun.lock after merge
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.
What does this PR do?
Implements first-party, local voice transcription using Whisper.cpp via
@huggingface/transformers. All processing happens locally with zero configuration required.Features
/status\for recording, configurable in~/.config/opencode/opencode.jsonThis follows the frontend-backend separation design of OpenCode:
Usage
/statusdialog\to start recording\again to stopModels are cached in
~/.cache/opencode/models/and persist across sessions.Comparison with PR #9264
PR #9264 implements voice via external APIs (Groq/OpenAI/local whisper-fastapi). This implementation prioritizes privacy and simplicity. Both approaches have merit. This implementation aligns with OpenCode's philosophy of local-first, privacy-respecting tooling.
Fixes #2425
Fixes #4695
How did you verify your code works?
\keybind, model download/caching, transcription accuracy