can1357/oh-my-pi · error · Error

Speech model download finished without required files (${spe

Error message

Speech model download finished without required files (${spec.repo}).

What it means

After the worker reports a successful download, downloadSttModel double-checks on disk with isSttModelCached that every required file is actually present (config.json plus encoder/decoder ONNX shards for Whisper tiers; encoder/decoder/joiner/tokens for sherpa tiers; .part sidecars ignored). If verification fails, the download claimed success but left an incomplete cache, and this error is thrown.

Source

Thrown at packages/coding-agent/src/stt/downloader.ts:124

			const settled = event.status === "ready" || event.status === "done";
			const percent = total > 0 ? Math.min(100, Math.round((loaded / total) * 100)) : settled ? 100 : 0;
			onProgress?.({
				status: event.status,
				percent,
				loaded,
				total,
				file: event.file,
				repo: spec.repo,
				label: spec.label,
			});
		},
	});
	if (!result.ok) {
		const detail = result.error ? `: ${result.error}` : ". Check your network connection.";
		throw new Error(`Failed to download speech model (${spec.repo})${detail}`);
	}
	if (!(await isSttModelCached(spec.key))) {
		throw new Error(`Speech model download finished without required files (${spec.repo}).`);
	}
}

// ── Public API ─────────────────────────────────────────────────────

export async function ensureSTTDependencies(options?: EnsureOptions): Promise<void> {
	await downloadSttModel(
		resolveSttModelSpec(options?.modelName).key,
		progress => {
			const stage =
				progress.status === "ready" || progress.status === "done"
					? `Speech model ${progress.label} ready`
					: `Downloading speech model ${progress.label}`;
			options?.onProgress?.({ stage, percent: progress.percent });
		},
		{ signal: options?.signal },
	);
}

View on GitHub (pinned to 9690622007)

Solutions

  1. Delete the model's cache directory under the tiny-models cache and re-download.
  2. Confirm the cache directory (getTinyModelsCacheDir) is stable between runs — check XDG/HOME env overrides.
  3. Exclude the cache directory from antivirus/cleanup tooling.
  4. Retry the download; if reproducible, compare the on-disk file list with the spec's required files.
Defensive patterns

Strategy: validation

Validate before calling

import { isSttModelCached } from "./downloader";
if (!(await isSttModelCached(key))) await downloadSttModel(key); // verify-or-redownload

Try / catch

try { await downloadSttModel(key); } catch (err) { if (String(err).includes("without required files")) { await rm(repoDir, { recursive: true, force: true }); await downloadSttModel(key); } else throw err; }

Prevention

When it happens

Trigger: The worker reports done/ready but the cache directory lacks required files — an interrupted write that was misreported, files written to a different cache dir than getTinyModelsCacheDir() reads, or something deleted files between download and verification.

Common situations: Concurrent runs racing on the same cache directory, a redirected/moved cache dir (XDG/env change) so verification looks in the wrong place, antivirus or cleanup tools removing large ONNX files, or a buggy/short-circuited worker completion event.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/52471c164db20132. Report an issue: GitHub.