From 6bc0949e7eac3f7b8aca83d45dd2e9cad87cd1f6 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Tue, 7 Jul 2026 12:58:12 -0500 Subject: [PATCH] feat(transcription): add multilingual/language fields to ModelInfo+Settings (T8.7, M4.2) --- src-tauri/src/models.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src-tauri/src/models.rs b/src-tauri/src/models.rs index 23dcf2d..e0d6092 100644 --- a/src-tauri/src/models.rs +++ b/src-tauri/src/models.rs @@ -45,6 +45,19 @@ pub struct ModelInfo { pub size_mb: u32, // approximate download size pub installed: bool, pub active: bool, + /// `false` for the `.en` (English-only) ggml variants; `true` for the + /// multilingual variants (no `.en` suffix, T8.7/FR-TRX-4/M4.2) — gates + /// whether the Settings language picker is enabled for this model. + pub multilingual: bool, +} + +/// One selectable transcription language (T8.7, FR-TRX-4) — ISO-639-1 code +/// (as accepted by `whisper_rs::FullParams::set_language`) plus a display +/// label for the Settings dropdown. +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct LanguageOption { + pub code: String, + pub label: String, } #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] @@ -198,6 +211,15 @@ pub struct Settings { pub llm_advanced: serde_json::Value, pub preferred_backend: String, // auto|npu|nvidia|amd|intel|cpu pub whisper_model: String, // ModelInfo.id, e.g. "base.en-q5_1" + /// Global default transcription language (T8.7, FR-TRX-4): `None`/`"auto"` + /// lets whisper.cpp auto-detect; an ISO-639-1 code (e.g. "es") forces + /// that language. Only takes effect with a multilingual model loaded — + /// an English-only (`.en`) model always decodes English regardless of + /// this setting (see `transcription::resolve_language`). Each meeting + /// persists whatever was actually used at `Meeting.language`, so this is + /// just the default applied at the next `start_recording`. + #[serde(default)] + pub whisper_language: Option, pub low_overhead: bool, // Recording retention (ADR-0009). Default OFF. pub default_record: bool,