fix: enable multilingual transcription (Russian, auto-detect)#1
Open
fix: enable multilingual transcription (Russian, auto-detect)#1
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:"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"en"on every app restart sincetranscriptionLanguagehad nodidSetpersistence (unliketranscriptionVocabularywhich already persists)transcriptionAutoDetect— the property existed but was completely inert; noweffectiveTranscriptionLanguagereturns"multi"when auto-detect is enabledsupportedLanguages— added "Auto-detect (Multilingual)", Russian, Ukrainian, Dutch, Polish, and Turkish to the language list"dot com" → ".com"are now only sent to DeepGram when language is"en", preventing potential interference with non-English transcriptionContext
The entire transcription pipeline (
AssistantSettings→PushToTalkManager→TranscriptionService→ DeepGram WebSocket) is fully functional — it just always received"en". Russian ("ru") was even listed insupportedLanguagesbut 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
Files changed
Desktop/Sources/DeletedTypeStubs.swift—AssistantSettings: default language, persistence, auto-detect logic, expanded language listDesktop/Sources/TranscriptionService.swift— conditional English-only replacements in both streaming and batch modes🤖 Generated with Claude Code