remotion-dev/remotion · error · Error

Whisper does not exist at ${whisperPath}. Double-check the p

Error message

Whisper does not exist at ${whisperPath}. Double-check the passed whisperPath. If you havent installed whisper, check out the installWhisperCpp() API at https://www.remotion.dev/docs/install-whisper-cpp/install-whisper-cpp to see how to install whisper programatically.

What it means

The transcribe() function from @remotion/install-whisper-cpp checks that the whisper.cpp binary exists at the given whisperPath before attempting transcription. If fs.existsSync(whisperPath) returns false, the function throws immediately. This guards against passing a path where whisper was never compiled or was installed to a different location.

Source

Thrown at packages/install-whisper-cpp/src/transcribe.ts:315

}: {
	inputPath: string;
	whisperPath: string;
	whisperCppVersion: string;
	model: WhisperModel;
	tokenLevelTimestamps: HasTokenLevelTimestamps;
	modelFolder?: string;
	translateToEnglish?: boolean;
	printOutput?: boolean;
	tokensPerItem?: true extends HasTokenLevelTimestamps ? never : number | null;
	language?: Language | null;
	splitOnWord?: boolean;
	signal?: AbortSignal;
	onProgress?: TranscribeOnProgress;
	flashAttention?: boolean;
	additionalArgs?: AdditionalArgs;
}): Promise<TranscriptionJson<HasTokenLevelTimestamps>> => {
	if (!existsSync(whisperPath)) {
		throw new Error(
			`Whisper does not exist at ${whisperPath}. Double-check the passed whisperPath. If you havent installed whisper, check out the installWhisperCpp() API at https://www.remotion.dev/docs/install-whisper-cpp/install-whisper-cpp to see how to install whisper programatically.`,
		);
	}

	if (!existsSync(inputPath)) {
		throw new Error(`Input file does not exist at ${inputPath}`);
	}

	if (!isWavFile(inputPath)) {
		throw new Error(
			'Invalid inputFile type. The provided file is not a wav file! Convert the file to a 16KHz wav file first: "ffmpeg -i input.mp4 -ar 16000 output.wav -y"',
		);
	}

	const tmpJSONDir = path.join(process.cwd(), 'tmp');

	const {outputPath: tmpJSONPath} = await transcribeToTemporaryFile({
		fileToTranscribe: inputPath,

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Call installWhisperCpp() first and pass its returned path as whisperPath, or verify the path with fs.existsSync() before calling transcribe().
  2. Check that the whisperPath points to the compiled 'main' binary inside the whisper.cpp build directory, not the source folder or model folder.
  3. If using a custom build, recompile whisper.cpp and confirm the binary exists at the expected location.
  4. On a fresh machine, run the installWhisperCpp() API programmatically as documented at the URL in the error message.

Example fix

// before
const result = await transcribe({
  inputPath: './audio.wav',
  whisperPath: './whisper', // wrong: folder, not binary
  whisperCppVersion: 'v1.5.4',
  model: 'base.en',
  tokenLevelTimestamps: false,
});

// after
const {whisperPath} = await installWhisperCpp({
  version: 'v1.5.4',
  customBuildId: null,
  force: false,
});
const result = await transcribe({
  inputPath: './audio.wav',
  whisperPath,
  whisperCppVersion: 'v1.5.4',
  model: 'base.en',
  tokenLevelTimestamps: false,
});
Defensive patterns

Strategy: validation

Validate before calling

import fs from 'fs';

function assertWhisperExists(whisperPath: string): void {
  if (!fs.existsSync(whisperPath)) {
    throw new Error(
      `whisperPath does not exist: ${whisperPath}. Call installWhisperCpp() first.`
    );
  }
}

// Before calling transcribe():
assertWhisperExists(whisperPath);

Type guard

import fs from 'fs';
import path from 'path';

function isExecutablePath(p: string): boolean {
  try {
    const stat = fs.statSync(p);
    return stat.isFile();
  } catch {
    return false;
  }
}

// Usage: if (!isExecutablePath(whisperPath)) { await installWhisperCpp(...); }

Try / catch

try {
  const result = await transcribe({inputPath, whisperPath, ...});
} catch (err) {
  if (err instanceof Error && err.message.includes('Whisper does not exist')) {
    // Install whisper and retry
    const {whisperPath: resolved} = await installWhisperCpp({version, ...});
    result = await transcribe({inputPath, whisperPath: resolved, ...});
  } else {
    throw err;
  }
}

Prevention

When it happens

Trigger: Calling transcribe({whisperPath, inputPath, ...}) with a whisperPath that does not resolve to an existing whisper.cpp main executable on disk. This includes passing a relative path from the wrong working directory, passing the model folder instead of the binary path, or never calling installWhisperCpp() beforehand.

Common situations: First-time setup where whisper.cpp was never compiled locally; CI environments that skip the install step; passing a path from installWhisperCpp() output that was since deleted; working directory mismatch when using a relative whisperPath; platform differences where the binary name differs (e.g. 'main' vs 'main.exe').

Related errors


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