Add alternate-language hotkey for multilingual Whisper - #3
Open
timvancann wants to merge 2 commits into
Open
Conversation
…hisper default Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
timvancann
force-pushed
the
feat/multi-language-dictation
branch
from
September 4, 2026 17:22
8cda2d9 to
fa27ba2
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The backend migration currently allows stt_language_alt="auto" (contradicting the pinned-alt-language intent/UI), and there are a couple of small but concrete UI/docs clarity issues to address.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR adds an alternate-language dictation path for the on-device Whisper STT pipeline by introducing a second dictation hotkey and explicit per-trigger language selection, while keeping refinement (LLM cleanup) English-focused.
Changes:
- Extend the STT
Transcriberinterface to accept an explicit Whisper language code, and plumb that through the dictation worker pipeline. - Add config + Settings UI support for primary/alternate Whisper languages and a dedicated alternate-language dictation hotkey (plain dictation only, no refinement).
- Switch the default Whisper model from English-only (
*.en) to a multilingual build (small), including config migration and script updates.
File summaries
| File | Description |
|---|---|
| src-tauri/src/stt.rs | Adds language-aware transcription, language enumeration/validation, and tests. |
| src-tauri/src/lib.rs | Threads the selected language through dictation handling and worker commands. |
| src-tauri/src/hotkeys.rs | Adds a new DictateAlt action and passes the correct language into on_release. |
| src-tauri/src/fn_key.rs | Ensures Fn-trigger dictation uses the primary configured language. |
| src-tauri/src/config.rs | Introduces language + alternate-hotkey config fields, defaults, and migration logic/tests. |
| src-tauri/src/commands.rs | Exposes Whisper-supported languages to the frontend and adds hotkey support for dictate_alt. |
| scripts/setup.sh | Updates default model download to the multilingual small build. |
| scripts/bench.sh | Updates the gated STT default model to small. |
| frontend/settings.js | Populates and persists primary/alternate STT languages; wires new hotkey field. |
| frontend/settings.html | Adds language dropdowns and a new recorder row for the alternate-language dictation hotkey. |
| AGENTS.md | Documents the new alternate-language chord and the multilingual default model. |
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- config: migrate() now rejects "auto" for stt_language_alt (primary-only), since the alternate chord pins a second language and the Settings alt dropdown has no auto entry; add a regression test. - settings: rename the non-Fn dictation row to "Dictate — keyboard shortcut" so it no longer collides with "Dictate — alternate language" (reference updated to match). - bench: fix the stale small.en threshold comment. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AWLP7oXQfVN5PhkoJiSphY
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.
The current whisper model and setup works VERY well, but for non-native speaker who uses English professionally but his native language for other cases Murmur could benefit from a dedicated multi-lingual setup.
The reason to have a dedicated button is to reduce false positives on language detection by whisper which increase in rate on shorter sentences. This way the detection is English by default, and the refinement with the LLM. But still has the option to run (just dictation) with a non-English language. Since small LLMs are notoriously bad an non-English prompts I've chosen to purposefully NOT refine the non-English prompt with the LLM.
I already use this locally a lot, and works really well! Hope to merge it back into the root :).
Cheers, and thanks for this amazing repo which already had me cancel my WisprFlow subscription .