remotion-dev/remotion · error · Error

Invalid whisper model ${model}. Available: ${models.join(',

Error message

Invalid whisper model ${model}. Available: ${models.join(', ')}

What it means

Thrown by @remotion/install-whisper-cpp's `downloadWhisperModel` when the `model` argument is not one of the supported model identifiers. The allowed set is fixed in source: tiny, tiny.en, base, base.en, small, small.en, medium, medium.en, large-v1, large-v2, large-v3, large-v3-turbo. Any other string is rejected before any network call.

Source

Thrown at packages/install-whisper-cpp/src/download-whisper-model.ts:58

};

export const downloadWhisperModel = async ({
	model,
	folder,
	printOutput = true,
	onProgress,
	signal,
}: {
	model: WhisperModel;
	folder: string;
	signal?: AbortSignal;
	printOutput?: boolean;
	onProgress?: OnProgress;
}): Promise<{
	alreadyExisted: boolean;
}> => {
	if (!models.includes(model)) {
		throw new Error(
			`Invalid whisper model ${model}. Available: ${models.join(', ')}`,
		);
	}

	const filePath = getModelPath(folder, model);

	if (existsSync(filePath)) {
		const {size} = fs.statSync(filePath);
		if (size === modelSizes[model]) {
			if (printOutput) {
				console.log(`Model already exists at ${filePath}`);
			}

			return Promise.resolve({alreadyExisted: true});
		}

		if (printOutput) {
			throw new Error(

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Use one of the supported identifiers: tiny, tiny.en, base, base.en, small, small.en, medium, medium.en, large-v1, large-v2, large-v3, or large-v3-turbo.
  2. Read the error message itself: it lists every available model joined by commas.
  3. If you need a newer model, check whether a newer @remotion/install-whisper-cpp version added it.

Example fix

// before
downloadWhisperModel({model: 'huge', folder: 'whisper'});

// after
downloadWhisperModel({model: 'large-v3', folder: 'whisper'});
Defensive patterns

Strategy: type-guard

Validate before calling

const MODELS = ['tiny','tiny.en','base','base.en','small','small.en','medium','medium.en','large-v1','large-v2','large-v3','large-v3-turbo'] as const;
function isWhisperModel(m: string): m is typeof MODELS[number] {
  return (MODELS as readonly string[]).includes(m);
}

if (!isWhisperModel(model)) throw new Error(`Unsupported model: ${model}`);

Type guard

const MODELS = ['tiny','tiny.en','base','base.en','small','small.en','medium','medium.en','large-v1','large-v2','large-v3','large-v3-turbo'] as const;
type WhisperModel = typeof MODELS[number];
function isWhisperModel(m: string): m is WhisperModel {
  return (MODELS as readonly string[]).includes(m);
}

Prevention

When it happens

Trigger: Calling `downloadWhisperModel({model: 'huge', ...})` ('huge' is a real whisper.cpp model name but unsupported here), or `model: 'large'` (must be versioned like 'large-v3'), or a typo such as 'medium-english'.

Common situations: Copying a model name from the upstream whisper.cpp docs that is not in Remotion's allow-list; using an outdated tutorial that references 'large' instead of 'large-v3'; passing a value typed loosely as string.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/8a8b542acb9fe190. Report an issue: GitHub.