Skip to content

Separate the speech-recognition language from the UI language (add an auto-detect option) #14

Description

@MaxiKingXXL

Summary

A single LANGUAGE setting currently controls BOTH the interface language and the Whisper recognition language. Choosing an interface language therefore also forces Whisper to transcribe in that language. Splitting these into two independent settings, plus an "auto-detect" option for recognition, clearly improves accuracy for non-English and mixed-language dictation.

Problem

config.LANGUAGE is passed straight to WhisperModel.transcribe(language=...) and also selects the UI locale, so the two are coupled:

  • A user whose interface is English but who dictates in another language has Whisper forced to English, which mis-transcribes or over-anglicizes the speech.
  • Someone who switches between two languages (for example dictating sometimes in German, sometimes in English) cannot win: any single fixed language mis-handles the other.

Proposed change

  1. Add a separate WHISPER_LANGUAGE setting for recognition, independent of the UI LANGUAGE.
    • None = auto-detect per clip (recommended default): faster-whisper detects each utterance's language instead of forcing one, ideal for users who switch languages.
    • "de" / "en" / ... = force a specific recognition language.
  2. Pass WHISPER_LANGUAGE (not LANGUAGE) to transcribe().
  3. Optional UI: a "Recognition language" dropdown in Settings (Auto / languages), separate from the interface-language dropdown, persisted like the other settings. Since the transcriber can read it per call, it applies without a restart.
  4. Optional: log the detected language per transcription (faster-whisper returns it in the info object), so users can see what was recognized.

Backward compatibility

Default WHISPER_LANGUAGE = None (auto-detect). Existing users are unaffected, except that recognition is no longer pinned to the interface language, which is exactly the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions