added distil models

This commit is contained in:
2026-04-03 10:25:48 -06:00
parent ea3f1d2b23
commit c7445206cc
3 changed files with 126 additions and 7 deletions

View File

@ -113,7 +113,24 @@ export default function App() {
throw new Error('Transcription not available');
}
// Step 1: ensure model is downloaded (may take a while on first run)
const modelLabel = whisperModel === 'tiny' ? '~75 MB' : whisperModel === 'base' ? '~140 MB' : '~460 MB';
const MODEL_SIZES: Record<string, string> = {
'tiny': '~75 MB',
'tiny.en': '~75 MB',
'base': '~140 MB',
'base.en': '~140 MB',
'small': '~460 MB',
'small.en': '~460 MB',
'medium': '~1.5 GB',
'medium.en': '~1.5 GB',
'large': '~2.9 GB',
'large-v2': '~2.9 GB',
'large-v3': '~2.9 GB',
'large-v3-turbo': '~1.6 GB',
'distil-large-v3': '~1.5 GB',
'distil-medium.en': '~750 MB',
'distil-small.en': '~190 MB',
};
const modelLabel = MODEL_SIZES[whisperModel] ?? 'unknown size';
setTranscribing(true, 5, `Downloading ${whisperModel} model (${modelLabel})...`);
await window.electronAPI.ensureModel(whisperModel);
@ -145,19 +162,36 @@ export default function App() {
{/* Whisper model selector */}
<div className="flex items-center gap-3">
<label className="text-xs text-editor-text-muted whitespace-nowrap">Model size:</label>
<label className="text-xs text-editor-text-muted whitespace-nowrap">Model:</label>
<select
value={whisperModel}
onChange={(e) => setWhisperModel(e.target.value)}
className="px-3 py-1.5 bg-editor-surface border border-editor-border rounded-lg text-xs text-white focus:outline-none focus:border-editor-accent"
>
<option value="tiny">tiny (~75 MB, fastest)</option>
<option value="base">base (~140 MB, fast)</option>
<option value="small">small (~460 MB, good)</option>
<option value="medium">medium (~1.5 GB, better)</option>
<option value="large">large (~2.9 GB, best)</option>
<optgroup label="Multilingual (any language)">
<option value="tiny">tiny ~75 MB · fastest, low accuracy</option>
<option value="base">base ~140 MB · fast, decent accuracy</option>
<option value="small">small ~460 MB · good balance</option>
<option value="medium">medium ~1.5 GB · better accuracy</option>
<option value="large-v2">large-v2 ~2.9 GB · high accuracy</option>
<option value="large-v3">large-v3 ~2.9 GB · best overall </option>
<option value="large-v3-turbo">large-v3-turbo ~1.6 GB · fast + accurate </option>
<option value="distil-large-v3">distil-large-v3 ~1.5 GB · fast, near large-v3 quality</option>
</optgroup>
<optgroup label="English-only (faster &amp; more accurate for English)">
<option value="tiny.en">tiny.en ~75 MB · fastest English</option>
<option value="base.en">base.en ~140 MB · fast English</option>
<option value="small.en">small.en ~460 MB · good English</option>
<option value="medium.en">medium.en ~1.5 GB · great English</option>
<option value="distil-small.en">distil-small.en ~190 MB · fast English </option>
<option value="distil-medium.en">distil-medium.en ~750 MB · best fast English </option>
</optgroup>
</select>
</div>
<p className="text-[11px] text-editor-text-muted text-center max-w-sm">
For noisy/YouTube videos use <span className="text-white">large-v3</span> or <span className="text-white">large-v3-turbo</span>.
English-only models are ~10% faster and more accurate for English content.
</p>
{IS_ELECTRON ? (
<div className="flex flex-col items-center gap-3">