can1357/oh-my-pi · error · Error

Failed to download the local text-to-speech model.

Error message

Failed to download the local text-to-speech model.

What it means

The speech setup step downloads a local text-to-speech model via `downloadTtsModel`; that helper returns a boolean rather than throwing. A `false` result means the download did not complete, so `buildSpeechComponents`'s `ensure` callback converts it into this user-facing error. Setup aborts without working TTS.

Source

Thrown at packages/coding-agent/src/cli/setup-cli.ts:213

			},
			pick: async () => {
				const chosen = await selectSetupModel(
					"Text-to-Speech model",
					[...TTS_LOCAL_MODEL_OPTIONS],
					settings.get("tts.localModel"),
				);
				if (chosen === null) return false;
				if (isTtsLocalModelKey(chosen)) {
					settings.set("tts.localModel", chosen);
					await settings.flush();
				}
				return true;
			},
			ensure: async onProgress => {
				const ok = await downloadTtsModel(settings.get("tts.localModel"), progress =>
					onProgress({ stage: progress.stage, percent: progress.percent }),
				);
				if (!ok) throw new Error("Failed to download the local text-to-speech model.");
			},
		},
	];
}

/**
 * Unified `omp setup speech` flow. Drives every {@link SpeechComponent} through
 * one path: report (`--json`/`--check`) or install (interactive pick + ensure
 * with single-line progress; non-TTY skips pickers and installs configured
 * values).
 */
async function handleSpeechSetup(flags: { json?: boolean; check?: boolean }): Promise<void> {
	await Settings.init({ cwd: getProjectDir() });
	const components = buildSpeechComponents();

	if (flags.json) {
		const report: Record<string, { ready: boolean; status: string }> = {};
		let allReady = true;

View on GitHub (pinned to 9690622007)

Solutions

  1. Check network connectivity/proxy settings and retry the setup
  2. Verify the `tts.localModel` setting names a valid downloadable model
  3. Free disk space in the model cache directory and retry
  4. Fall back to a different TTS provider in settings if local download can't work in your environment

Example fix

// before
settings.set("tts.localModel", "whisper-tiny-en");   // invalid id
// after
settings.set("tts.localModel", "<valid-model-key-from-catalog>");  // then re-run setup
Defensive patterns

Strategy: retry

Validate before calling

const modelId = settings.get("tts.localModel");
if (!modelId || typeof modelId !== "string") {
  console.error("tts.localModel is not configured — set a valid local TTS model first.");
}

Try / catch

let ok = false;
for (let attempt = 0; attempt < 3 && !ok; attempt++) {
  ok = await downloadTtsModel(settings.get("tts.localModel"), onProgress);
  if (!ok) await Bun.sleep(2000 * (attempt + 1));
}
if (!ok) throw new Error("Failed to download the local text-to-speech model.");

Prevention

When it happens

Trigger: Running `omp` speech/setup flow where `downloadTtsModel(settings.get("tts.localModel"), ...)` returns false: network failure mid-download, invalid or unknown model name in the `tts.localModel` setting, disk full, or the model host unreachable.

Common situations: Corporate proxy/firewall blocking the model download URL; misspelled model id in settings; interrupted first-run download leaving an unusable cache; no disk space in the models cache directory.

Related errors


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