Skip to content

feat: add translation toggle for Whisper translate vs transcribe - #53

Merged
jatinkrmalik merged 1 commit into
mainfrom
feat/translation-toggle
Mar 10, 2026
Merged

feat: add translation toggle for Whisper translate vs transcribe#53
jatinkrmalik merged 1 commit into
mainfrom
feat/translation-toggle

Conversation

@jatinkrmalik

Copy link
Copy Markdown
Member

Summary

Adds a Translation toggle in Settings to control whether Whisper translates speech to the selected language or transcribes it as-is.

Problem

When a specific language was selected, Whisper would sometimes translate instead of transcribe, producing unexpected English output for non-English speech.

Solution

  • Added translationEnabled toggle (off by default) to AppState
  • WhisperService.transcribe() now accepts a translate parameter that switches between .transcribe and .translate task modes
  • New Translation section in Settings → General with descriptive help text
  • When translation is off, the language picker serves only as a recognition hint

Files Changed

  • AppState.swift — translationEnabled @AppStorage property
  • WhisperService.swift — translate parameter in transcribe()
  • SettingsView.swift — Translation toggle UI
  • VocaMacTests.swift — unit tests

Testing

  • swift build ✅ Compiles cleanly
  • swift test ✅ All 39 tests pass

Closes #50

@jatinkrmalik
jatinkrmalik force-pushed the feat/translation-toggle branch from 0f1a22d to 4d6b161 Compare March 10, 2026 17:58
@jatinkrmalik
jatinkrmalik merged commit 9e12332 into main Mar 10, 2026
1 check passed
@jatinkrmalik
jatinkrmalik deleted the feat/translation-toggle branch August 22, 2026 05:32
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.

feat: Add translation toggle in settings to control Whisper translate vs. transcribe behavior

1 participant