diff --git a/openless-all/app/src-tauri/src/asr/local/foundry.rs b/openless-all/app/src-tauri/src/asr/local/foundry.rs index 5f7fe774..43a0bc2e 100644 --- a/openless-all/app/src-tauri/src/asr/local/foundry.rs +++ b/openless-all/app/src-tauri/src/asr/local/foundry.rs @@ -19,6 +19,16 @@ pub const MODELS: &[FoundryWhisperModel] = &[ display_name: "Whisper Small", quality_tier: "balanced", }, + FoundryWhisperModel { + alias: "whisper-medium", + display_name: "Whisper Medium", + quality_tier: "high-quality", + }, + FoundryWhisperModel { + alias: "whisper-large-v3-turbo", + display_name: "Whisper Large V3 Turbo", + quality_tier: "max-quality", + }, FoundryWhisperModel { alias: "whisper-base", display_name: "Whisper Base", @@ -244,7 +254,13 @@ mod tests { .iter() .map(|model| model.alias.as_str()) .collect::>(), - vec!["whisper-small", "whisper-base", "whisper-tiny"] + vec![ + "whisper-small", + "whisper-medium", + "whisper-large-v3-turbo", + "whisper-base", + "whisper-tiny" + ] ); assert!(catalog.iter().all(|model| !model.cached)); } diff --git a/openless-all/app/src-tauri/src/commands.rs b/openless-all/app/src-tauri/src/commands.rs index a689074d..6715f03f 100644 --- a/openless-all/app/src-tauri/src/commands.rs +++ b/openless-all/app/src-tauri/src/commands.rs @@ -3071,6 +3071,8 @@ mod tests { assert!( validate_foundry_model_alias(crate::asr::local::foundry::DEFAULT_MODEL_ALIAS).is_ok() ); + assert!(validate_foundry_model_alias("whisper-medium").is_ok()); + assert!(validate_foundry_model_alias("whisper-large-v3-turbo").is_ok()); assert!(validate_foundry_model_alias("whisper-large").is_err()); } @@ -3087,6 +3089,18 @@ mod tests { ); } + #[test] + fn foundry_active_model_pref_preserves_large_model_aliases() { + for alias in ["whisper-medium", "whisper-large-v3-turbo"] { + let prefs = UserPreferences { + foundry_local_asr_model: alias.to_string(), + ..Default::default() + }; + + assert_eq!(active_foundry_model_from_prefs(&prefs), alias); + } + } + #[test] fn credentials_status_accepts_keyless_custom_llm_only() { let keyless_ready = CredentialsSnapshot { diff --git a/openless-all/app/src/i18n/en.ts b/openless-all/app/src/i18n/en.ts index 58834374..4d3fff50 100644 --- a/openless-all/app/src/i18n/en.ts +++ b/openless-all/app/src/i18n/en.ts @@ -934,6 +934,10 @@ export const en: typeof zhCN = { foundryLanguageDesc: 'Choose Chinese for Chinese dictation, Auto for mixed use.', foundryModelSmall: 'Whisper Small (default / balanced)', foundryModelSmallDesc: 'Default balanced option for quality and resource use.', + foundryModelMedium: 'Whisper Medium (higher quality)', + foundryModelMediumDesc: 'Higher accuracy for stronger devices that can handle larger downloads and slower inference.', + foundryModelLarge: 'Whisper Large V3 Turbo (best quality)', + foundryModelLargeDesc: 'Large-model option for high-end devices and quality-first use.', foundryModelBase: 'Whisper Base (faster / lower resource)', foundryModelBaseDesc: 'Faster with lower resource use for lightweight daily dictation.', foundryModelTiny: 'Whisper Tiny (fastest / smoke test)', diff --git a/openless-all/app/src/i18n/ja.ts b/openless-all/app/src/i18n/ja.ts index f106e3c5..e52459a5 100644 --- a/openless-all/app/src/i18n/ja.ts +++ b/openless-all/app/src/i18n/ja.ts @@ -936,6 +936,10 @@ export const ja: typeof zhCN = { foundryLanguageDesc: '中国語聞き取りは「中文」を、混用は「自動」を選択。', foundryModelSmall: 'Whisper Small(既定 / バランス)', foundryModelSmallDesc: '品質とリソース使用量のバランスを取った既定オプション。', + foundryModelMedium: 'Whisper Medium(高品質)', + foundryModelMediumDesc: 'より高い精度。大きなダウンロードと遅めの推論を許容できる高性能デバイス向け。', + foundryModelLarge: 'Whisper Large V3 Turbo(最高品質)', + foundryModelLargeDesc: '高性能デバイスと品質優先の用途に向く大きなモデル。', foundryModelBase: 'Whisper Base(高速 / 低リソース)', foundryModelBaseDesc: 'より高速でリソース消費が少なく、日常の軽量ディクテーションに適しています。', foundryModelTiny: 'Whisper Tiny(最速 / スモークテスト)', diff --git a/openless-all/app/src/i18n/ko.ts b/openless-all/app/src/i18n/ko.ts index 854695fc..3994cc98 100644 --- a/openless-all/app/src/i18n/ko.ts +++ b/openless-all/app/src/i18n/ko.ts @@ -936,6 +936,10 @@ export const ko: typeof zhCN = { foundryLanguageDesc: '중국어는 "중문", 혼합 사용은 "자동" 선택.', foundryModelSmall: 'Whisper Small(기본 / 균형)', foundryModelSmallDesc: '품질과 리소스 사용량을 균형 있게 맞춘 기본 옵션.', + foundryModelMedium: 'Whisper Medium(더 높은 품질)', + foundryModelMediumDesc: '더 높은 정확도. 더 큰 다운로드와 느린 추론을 감당할 수 있는 고성능 기기에 적합합니다.', + foundryModelLarge: 'Whisper Large V3 Turbo(최고 품질)', + foundryModelLargeDesc: '고성능 기기와 품질 우선 사용에 맞는 대형 모델 옵션.', foundryModelBase: 'Whisper Base(더 빠름 / 낮은 리소스)', foundryModelBaseDesc: '더 빠르고 리소스를 적게 사용해 가벼운 일상 받아쓰기에 적합합니다.', foundryModelTiny: 'Whisper Tiny(가장 빠름 / 스모크 테스트)', diff --git a/openless-all/app/src/i18n/zh-CN.ts b/openless-all/app/src/i18n/zh-CN.ts index a46a3828..538e54cd 100644 --- a/openless-all/app/src/i18n/zh-CN.ts +++ b/openless-all/app/src/i18n/zh-CN.ts @@ -932,6 +932,10 @@ export const zhCN = { foundryLanguageDesc: '中文听写选中文,中英混用选自动。', foundryModelSmall: 'Whisper Small(默认 / 平衡)', foundryModelSmallDesc: '默认平衡选项,兼顾质量与资源占用。', + foundryModelMedium: 'Whisper Medium(更高质量)', + foundryModelMediumDesc: '更高准确率,适合性能更强、可接受更大下载和更慢推理的设备。', + foundryModelLarge: 'Whisper Large V3 Turbo(最高质量)', + foundryModelLargeDesc: '更高质量的大模型选项,适合高配设备和质量优先场景。', foundryModelBase: 'Whisper Base(更快 / 更省资源)', foundryModelBaseDesc: '更快、资源占用更低,适合日常轻量使用。', foundryModelTiny: 'Whisper Tiny(最快 / 冒烟测试)', diff --git a/openless-all/app/src/i18n/zh-TW.ts b/openless-all/app/src/i18n/zh-TW.ts index 88e4f9a1..6a8014c7 100644 --- a/openless-all/app/src/i18n/zh-TW.ts +++ b/openless-all/app/src/i18n/zh-TW.ts @@ -934,6 +934,10 @@ export const zhTW: typeof zhCN = { foundryLanguageDesc: '中文聽寫選中文,中英混用選自動。', foundryModelSmall: 'Whisper Small(默認 / 平衡)', foundryModelSmallDesc: '默認平衡選項,兼顧質量與資源佔用。', + foundryModelMedium: 'Whisper Medium(更高質量)', + foundryModelMediumDesc: '更高準確率,適合性能更強、可接受更大下載和更慢推理的設備。', + foundryModelLarge: 'Whisper Large V3 Turbo(最高質量)', + foundryModelLargeDesc: '更高質量的大模型選項,適合高配設備和質量優先場景。', foundryModelBase: 'Whisper Base(更快 / 更省資源)', foundryModelBaseDesc: '更快、資源佔用更低,適合日常輕量使用。', foundryModelTiny: 'Whisper Tiny(最快 / 冒煙測試)', diff --git a/openless-all/app/src/lib/localAsr.ts b/openless-all/app/src/lib/localAsr.ts index e7f5f650..e1aac87d 100644 --- a/openless-all/app/src/lib/localAsr.ts +++ b/openless-all/app/src/lib/localAsr.ts @@ -66,7 +66,15 @@ export interface FoundryLocalAsrStatus { error: string | null; } -export type FoundryLocalAsrModelAlias = 'whisper-small' | 'whisper-base' | 'whisper-tiny'; +export const FOUNDRY_LOCAL_ASR_MODEL_ALIASES = [ + 'whisper-small', + 'whisper-medium', + 'whisper-large-v3-turbo', + 'whisper-base', + 'whisper-tiny', +] as const; + +export type FoundryLocalAsrModelAlias = typeof FOUNDRY_LOCAL_ASR_MODEL_ALIASES[number]; export type FoundryLocalAsrLanguageHint = '' | 'zh' | 'en'; export type FoundryRuntimeSource = 'auto' | 'nuget' | 'ort-nightly'; @@ -94,8 +102,8 @@ export interface FoundryPrepareProgress { export interface FoundryLocalAsrModelOption { alias: FoundryLocalAsrModelAlias; - labelKey: string; - descKey: string; + labelKey: `localAsr.foundryModel${'Small' | 'Medium' | 'Large' | 'Base' | 'Tiny'}`; + descKey: `localAsr.foundryModel${'Small' | 'Medium' | 'Large' | 'Base' | 'Tiny'}Desc`; } export const FOUNDRY_LOCAL_ASR_MODELS: FoundryLocalAsrModelOption[] = [ @@ -104,6 +112,16 @@ export const FOUNDRY_LOCAL_ASR_MODELS: FoundryLocalAsrModelOption[] = [ labelKey: 'localAsr.foundryModelSmall', descKey: 'localAsr.foundryModelSmallDesc', }, + { + alias: 'whisper-medium', + labelKey: 'localAsr.foundryModelMedium', + descKey: 'localAsr.foundryModelMediumDesc', + }, + { + alias: 'whisper-large-v3-turbo', + labelKey: 'localAsr.foundryModelLarge', + descKey: 'localAsr.foundryModelLargeDesc', + }, { alias: 'whisper-base', labelKey: 'localAsr.foundryModelBase', @@ -123,6 +141,18 @@ const MOCK_FOUNDRY_CATALOG: FoundryLocalAsrCatalogModel[] = [ cached: false, fileSizeMb: 967, }, + { + alias: 'whisper-medium', + displayName: 'Whisper Medium', + cached: false, + fileSizeMb: 937, + }, + { + alias: 'whisper-large-v3-turbo', + displayName: 'Whisper Large V3 Turbo', + cached: false, + fileSizeMb: 1285, + }, { alias: 'whisper-base', displayName: 'Whisper Base',