Skip to content

fix: enable multilingual transcription (Russian, auto-detect)#1

Open
Nibomb wants to merge 1 commit intom13v:mainfrom
Nibomb:fix/multilingual-transcription
Open

fix: enable multilingual transcription (Russian, auto-detect)#1
Nibomb wants to merge 1 commit intom13v:mainfrom
Nibomb:fix/multilingual-transcription

Conversation

@Nibomb
Copy link
Copy Markdown

@Nibomb Nibomb commented Mar 21, 2026

Summary

Push-to-talk transcription is currently hardcoded to English ("en"), making it completely unusable for non-English speakers. This PR fixes the issue by:

  • Defaulting to "multi" (multilingual auto-detect) instead of "en" — DeepGram Nova-3 supports automatic language detection for 10 languages including Russian, English, Spanish, French, German, Hindi, Portuguese, Japanese, Italian, and Dutch
  • Persisting language settings to UserDefaults — previously the language reset to "en" on every app restart since transcriptionLanguage had no didSet persistence (unlike transcriptionVocabulary which already persists)
  • Wiring up transcriptionAutoDetect — the property existed but was completely inert; now effectiveTranscriptionLanguage returns "multi" when auto-detect is enabled
  • Expanding supportedLanguages — added "Auto-detect (Multilingual)", Russian, Ukrainian, Dutch, Polish, and Turkish to the language list
  • Conditionally applying English-only replacements — find-and-replace rules like "dot com" → ".com" are now only sent to DeepGram when language is "en", preventing potential interference with non-English transcription

Context

The entire transcription pipeline (AssistantSettingsPushToTalkManagerTranscriptionService → DeepGram WebSocket) is fully functional — it just always received "en". Russian ("ru") was even listed in supportedLanguages but never surfaced to users via a language picker UI.

DeepGram Nova-3 fully supports Russian both as monolingual (language=ru) and via multilingual code-switching (language=multi), confirmed in their Nov 2025 announcement.

Test plan

  • Start Fazm, open Push-to-talk settings
  • Verify language defaults to "Auto-detect (Multilingual)" for new installs
  • Test PTT with Russian speech — should transcribe correctly
  • Test PTT with English speech — should still work
  • Test switching between specific languages (e.g., Russian, English)
  • Restart app — verify language setting persists
  • Test batch transcription mode with non-English speech

Files changed

  • Desktop/Sources/DeletedTypeStubs.swiftAssistantSettings: default language, persistence, auto-detect logic, expanded language list
  • Desktop/Sources/TranscriptionService.swift — conditional English-only replacements in both streaming and batch modes

🤖 Generated with Claude Code

The transcription language was hardcoded to "en" with no persistence
and no UI to change it, making push-to-talk unusable for non-English
speakers.

Changes:
- Default transcriptionLanguage to "multi" (DeepGram Nova-3 multilingual
  code-switching) instead of "en", enabling automatic language detection
  for Russian, English, and 8 other languages out of the box
- Persist transcriptionLanguage and transcriptionAutoDetect to
  UserDefaults so settings survive app restarts
- Wire up effectiveTranscriptionLanguage to return "multi" when
  transcriptionAutoDetect is true
- Expand supportedLanguages list with "Auto-detect (Multilingual)",
  Russian, Ukrainian, Dutch, Polish, and Turkish
- Only apply English-specific find-and-replace rules (e.g. "dot com" →
  ".com") when language is "en", preventing interference with non-English
  transcription in both streaming and batch modes

Fixes push-to-talk for Russian and other non-English languages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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