Skip to content

Add alternate-language hotkey for multilingual Whisper - #3

Open
timvancann wants to merge 2 commits into
letsgetrusty:mainfrom
timvancann:feat/multi-language-dictation
Open

Add alternate-language hotkey for multilingual Whisper#3
timvancann wants to merge 2 commits into
letsgetrusty:mainfrom
timvancann:feat/multi-language-dictation

Conversation

@timvancann

@timvancann timvancann commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

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 .

…hisper default

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 4, 2026 17:22
@timvancann
timvancann force-pushed the feat/multi-language-dictation branch from 8cda2d9 to fa27ba2 Compare September 4, 2026 17:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 Transcriber interface 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.

Comment thread src-tauri/src/config.rs
Comment thread frontend/settings.html Outdated
Comment thread scripts/bench.sh Outdated
Comment thread src-tauri/src/config.rs
- 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
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.

2 participants