Skip to content

Add language selection for Whisper models#674

Open
wallneradam wants to merge 4 commits into
altic-dev:mainfrom
wallneradam:codex/whisper-language-selection
Open

Add language selection for Whisper models#674
wallneradam wants to merge 4 commits into
altic-dev:mainfrom
wallneradam:codex/whisper-language-selection

Conversation

@wallneradam

@wallneradam wallneradam commented Jul 21, 2026

Copy link
Copy Markdown

Description

Adds a searchable language selector to every Whisper model in Voice Engine settings. Users can keep automatic language detection or force one of Whisper's 99 supported languages.

The selected language is persisted, included in settings backups, and passed to RunOptions.language for transcription. Existing installations initially inherit the language selected during onboarding until the user explicitly chooses Automatic or another language.

This improves short utterances and single-word dictation, where Whisper may not have enough context to reliably detect the spoken language.

Type of Change

  • 🐞 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 🧹 Chore
  • 📝 Documentation update

Related Issue or Discussion

Revisits #100. The earlier concern about exposing a Whisper-only setting is less applicable now that Voice Engine settings already provide model-specific language selection for Cohere and Nemotron.

Testing

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS version: 26.5.2
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml Sources (0 violations)
  • Ran formatter locally: swiftformat --config .swiftformat Sources (the current base branch has pre-existing whole-file formatting failures in SettingsStore.swift and WhisperProvider.swift; unrelated lines were not reformatted)
  • Ran tests locally: 152 tests passed with 0 failures
  • Built the signed Debug application successfully
  • Manually tested selecting Hungarian, searching the language list, and Hungarian dictation in the installed application

Screenshots / Video

Whisper language picker

  • No UI/visual changes; screenshots/video are not applicable.

Notes

  • Uses the existing VoiceEngineLanguageCatalog; no duplicate language list or dependency update is introduced.
  • Automatic detection remains available and preserves the previous behavior.
  • Onboarding Whisper routes now apply their existing language binding instead of discarding it.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10744e1bd9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Sources/Fluid/Services/WhisperProvider.swift
@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a searchable language selector to Whisper model rows in Voice Engine settings, letting users force a specific language or keep automatic detection. The selected language is persisted in UserDefaults, included in backups, and forwarded to RunOptions.language at transcription time.

  • selectedWhisperLanguageCode getter falls back to the onboarding language for existing installs that have no stored value, while the backup restore correctly uses if let so pre-feature backups leave that fallback intact.
  • The Hebrew language code is corrected from "iw" to "he" throughout the catalog and the supported-code set to match the ISO 639-1 code current Whisper models accept.
  • apply() now writes selectedWhisperLanguageCode for .whisper route bindings instead of silently discarding them, so onboarding language selection is no longer lost when the user lands on a Whisper model.

Confidence Score: 5/5

Safe to merge; the change is well-scoped and all edge cases (pre-feature backups, existing onboarding installs, invalid stored codes) are handled gracefully.

The core persistence, backup-restore, and transcription paths are all correct. The only finding is that the Automatic option lives inside the scroll view and can scroll out of view — search recovers it, but pinning it would be friendlier. Nothing here would cause data loss or incorrect transcription behavior.

AISettingsView+SpeechRecognition.swift — the Automatic option placement in the scrollable language list.

Reviews (3): Last reviewed commit: "Preserve automatic language in settings ..." | Re-trigger Greptile

Comment thread Sources/Fluid/Persistence/SettingsStore.swift Outdated
Comment thread Sources/Fluid/Services/WhisperProvider.swift Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a0546b8b82

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Sources/Fluid/Persistence/SettingsStore.swift
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