Skip to content

feat(app): add local whisper voice input#31955

Draft
alexandre-leng wants to merge 1 commit into
anomalyco:devfrom
alexandre-leng:_feat/local-whisper-voice-input
Draft

feat(app): add local whisper voice input#31955
alexandre-leng wants to merge 1 commit into
anomalyco:devfrom
alexandre-leng:_feat/local-whisper-voice-input

Conversation

@alexandre-leng

@alexandre-leng alexandre-leng commented Jun 11, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This PR adds multilingual voice input directly to the OpenCode prompt composer.

A new voice button is available next to the file attachment control. When activated, it records microphone audio, transcribes it locally using onnx-community/whisper-large-v3-turbo through Transformers/WebGPU when available, and inserts the resulting transcript at the current cursor position in the prompt.

The transcription workflow is designed to remain client-side, avoiding the need to send spoken prompts to a remote speech recognition service. The Whisper model is loaded lazily on first use to reduce startup overhead. If the local Whisper runtime is unavailable, the feature falls back to the browser's native speech recognition API.

Additional changes include:

  • Multilingual speech recognition with automatic language detection through Whisper.
  • Browser speech recognition fallback using the current OpenCode locale.
  • Localized labels, status messages, and error states for the voice input workflow.

How did you verify your code works?

Executed:

bun test --preload ./happydom.ts ./src/i18n/parity.test.ts

Notes:

  • bun typecheck from packages/app is currently blocked in this Windows worktree because src/custom-elements.d.ts is a text pointer to ../../ui/src/custom-elements.d.ts.
  • The repository-wide pre-push typecheck is also blocked by unrelated local workspace issues (packages/mission-control exists locally but is not present in the lockfile) as well as the same custom-elements.d.ts pointer issue in packages/enterprise.

Screenshots / recordings

UI change — screenshots or recordings can be added here.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jun 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential duplicate PRs found:

  1. PR feat(opencode): add voice input #29663 - feat(opencode): add voice input

  2. PR feat: add first-party voice transcription with local Whisper #11345 - feat: add first-party voice transcription with local Whisper

  3. PR feat(tui-mic): Add mic/STT plugin with provider selection, config, and multi-provider support (Whisper/OpenAI, ElevenLabs, Sarvam AI) #30059 - feat(tui-mic): Add mic/STT plugin with provider selection, config, and multi-provider support

These PRs address voice input and Whisper transcription functionality. PR #29663 and #11345 appear most closely related as they both target voice input with Whisper, though the scope and components may differ.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jun 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@alexandre-leng

Copy link
Copy Markdown
Author

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

* PR description is missing required template sections. Please use the [PR template](../blob/dev/.github/pull_request_template.md).

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

Update

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