feat(whisper): add Distil-Whisper Small and Large v3 as first-class models

Two new registry entries (crates/core/src/model_registry.rs):
- whisper-distil-small-en — 336 MB, ~6× faster than whisper-small-en
- whisper-distil-large-v3 — 1.55 GB, near large-v3 accuracy at medium size

Both are whisper.cpp-compatible GGML binaries hosted on HF by the
distil-whisper org; no runtime change, just wider model choice. English-only
by design (matches upstream Distil-Whisper).

The Settings model picker widens to six options — Tiny, Base, Small,
Distil-S, Medium, Distil-L — ordered roughly by accuracy. Download/load
commands now take the resolved model id (whisper-distil-*) instead of the
lowercased label, so the frontend owns the label↔id mapping.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-21 07:39:03 +01:00
parent 92d96a0841
commit 4561810751
4 changed files with 56 additions and 6 deletions

View File

@@ -337,7 +337,9 @@
Tiny: "whisper-tiny-en",
Base: "whisper-base-en",
Small: "whisper-small-en",
"Distil-S": "whisper-distil-small-en",
Medium: "whisper-medium-en",
"Distil-L": "whisper-distil-large-v3",
};
return map[size] || "whisper-base-en";
}
@@ -614,7 +616,7 @@
}
async function loadSelectedModel() {
const size = settings.modelSize.toLowerCase();
const size = whisperModelId(settings.modelSize);
engineStatus = "Loading...";
engineOk = false;
try {
@@ -650,7 +652,9 @@
Tiny: "~75MB · fastest, lower accuracy",
Base: "~150MB · balanced for most use",
Small: "~500MB · noticeably more accurate",
Medium: "~1.5GB · best quality, slower",
"Distil-S": "~336MB · small-level accuracy at ~6× the speed",
Medium: "~1.5GB · best Whisper accuracy, slower",
"Distil-L": "~1.55GB · near-large accuracy at ~6× the speed",
};
async function downloadParakeet() {
@@ -1004,7 +1008,7 @@
{#if settings.engine === "whisper"}
<div class="mb-6">
<p class="text-[10px] font-medium text-text-tertiary uppercase tracking-wider mb-2">Whisper Model</p>
<SegmentedButton options={["Tiny", "Base", "Small", "Medium"]} bind:value={settings.modelSize} />
<SegmentedButton options={["Tiny", "Base", "Small", "Distil-S", "Medium", "Distil-L"]} bind:value={settings.modelSize} />
<p class="text-[11px] text-text-tertiary mt-2">{modelDescriptions[settings.modelSize]}</p>
<div class="flex items-center gap-2 mt-3">
@@ -1022,12 +1026,12 @@
class="text-[11px] text-text-tertiary hover:text-accent"
onclick={loadSelectedModel}
>Load model</button>
{:else if downloadingModel === settings.modelSize.toLowerCase()}
{:else if downloadingModel === whisperModelId(settings.modelSize)}
<span class="text-[11px] text-warning">{downloadProgress}% downloading...</span>
{:else}
<button
class="text-[11px] text-accent hover:text-accent-hover"
onclick={() => downloadModel(settings.modelSize.toLowerCase())}
onclick={() => downloadModel(whisperModelId(settings.modelSize))}
>Download {settings.modelSize}</button>
{/if}
</div>

View File

@@ -3,7 +3,13 @@ export type FontFamily = "lexend" | "atkinson" | "opendyslexic";
export type ReduceMotion = "system" | "on" | "off";
export type RecordingEngine = "whisper" | "parakeet";
export type FormatMode = "Raw" | "Clean" | "Smart";
export type WhisperModelSize = "Tiny" | "Base" | "Small" | "Medium";
export type WhisperModelSize =
| "Tiny"
| "Base"
| "Small"
| "Distil-S"
| "Medium"
| "Distil-L";
export type AiTier = "off" | "cleanup" | "tasks";
export type LlmModelIdStr = "qwen3_1_7b" | "qwen3_4b_instruct_2507" | "qwen3_14b";
export type TaskBucket = "inbox" | "today" | "soon" | "later";