Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion openless-all/app/src-tauri/src/asr/local/foundry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -244,7 +254,13 @@ mod tests {
.iter()
.map(|model| model.alias.as_str())
.collect::<Vec<_>>(),
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));
}
Expand Down
14 changes: 14 additions & 0 deletions openless-all/app/src-tauri/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand All @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions openless-all/app/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down
4 changes: 4 additions & 0 deletions openless-all/app/src/i18n/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(最速 / スモークテスト)',
Expand Down
4 changes: 4 additions & 0 deletions openless-all/app/src/i18n/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(가장 빠름 / 스모크 테스트)',
Expand Down
4 changes: 4 additions & 0 deletions openless-all/app/src/i18n/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(最快 / 冒烟测试)',
Expand Down
4 changes: 4 additions & 0 deletions openless-all/app/src/i18n/zh-TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(最快 / 冒煙測試)',
Expand Down
36 changes: 33 additions & 3 deletions openless-all/app/src/lib/localAsr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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[] = [
Expand All @@ -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',
Expand All @@ -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',
Expand Down
Loading