Skip to content

Language selection not respected for mic transcription (Whisper) and summary #3

@ScreepCode

Description

@ScreepCode

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions