Problem
The selected recognition language is ignored in two places:
1. Microphone transcription (Whisper)
WhisperEngine.transcribeChunk has the language hardcoded:
// WhisperEngine.swift
let langStr = strdup("en")
params.language = UnsafePointer(langStr)
No matter what language is selected in the UI (e.g. de-DE, fr-FR, ja-JP), Whisper always transcribes in the hardcoded language. Remote audio via SFSpeech works correctly because SFSpeechRecognizer is initialized with the correct locale — but the mic channel via Whisper does not.
2. Summary and Chat
SummaryService.buildPrompt and askQuestion have English-only prompts with no language instruction. The LLM always responds in English regardless of the meeting language.
Proposed Fix
Whisper:
- Add
var language: String = "en" to WhisperEngine
- Use
self.language in transcribeChunk instead of the hardcoded string
- Set
whisperEngine.language in MeetingRecorder.startRecording() by extracting the 2-letter ISO code from recognitionLanguage (e.g. "de-DE" → "de")
Summary / Chat:
- Pass
language: String to generateSummary and askQuestion
- Inject
"Respond in German." (or the appropriate language) into the prompt
- Thread the language from
recorder.recognitionLanguage (live view) and session.language (history view) through to SummaryService and ChatPanel
Problem
The selected recognition language is ignored in two places:
1. Microphone transcription (Whisper)
WhisperEngine.transcribeChunkhas the language hardcoded:No matter what language is selected in the UI (e.g.
de-DE,fr-FR,ja-JP), Whisper always transcribes in the hardcoded language. Remote audio via SFSpeech works correctly becauseSFSpeechRecognizeris initialized with the correct locale — but the mic channel via Whisper does not.2. Summary and Chat
SummaryService.buildPromptandaskQuestionhave English-only prompts with no language instruction. The LLM always responds in English regardless of the meeting language.Proposed Fix
Whisper:
var language: String = "en"toWhisperEngineself.languageintranscribeChunkinstead of the hardcoded stringwhisperEngine.languageinMeetingRecorder.startRecording()by extracting the 2-letter ISO code fromrecognitionLanguage(e.g."de-DE"→"de")Summary / Chat:
language: StringtogenerateSummaryandaskQuestion"Respond in German."(or the appropriate language) into the promptrecorder.recognitionLanguage(live view) andsession.language(history view) through toSummaryServiceandChatPanel