{"record":{"id":"db545d790fc9f602","repo":"remotion-dev/remotion","slug":"whisper-does-not-exist-at-whisperpath-double-c","errorCode":null,"errorMessage":"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.","messagePattern":"Whisper does not exist at (.+?)\\. 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\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/install-whisper-cpp/src/transcribe.ts","lineNumber":315,"sourceCode":"}: {\n\tinputPath: string;\n\twhisperPath: string;\n\twhisperCppVersion: string;\n\tmodel: WhisperModel;\n\ttokenLevelTimestamps: HasTokenLevelTimestamps;\n\tmodelFolder?: string;\n\ttranslateToEnglish?: boolean;\n\tprintOutput?: boolean;\n\ttokensPerItem?: true extends HasTokenLevelTimestamps ? never : number | null;\n\tlanguage?: Language | null;\n\tsplitOnWord?: boolean;\n\tsignal?: AbortSignal;\n\tonProgress?: TranscribeOnProgress;\n\tflashAttention?: boolean;\n\tadditionalArgs?: AdditionalArgs;\n}): Promise<TranscriptionJson<HasTokenLevelTimestamps>> => {\n\tif (!existsSync(whisperPath)) {\n\t\tthrow new Error(\n\t\t\t`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.`,\n\t\t);\n\t}\n\n\tif (!existsSync(inputPath)) {\n\t\tthrow new Error(`Input file does not exist at ${inputPath}`);\n\t}\n\n\tif (!isWavFile(inputPath)) {\n\t\tthrow new Error(\n\t\t\t'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\"',\n\t\t);\n\t}\n\n\tconst tmpJSONDir = path.join(process.cwd(), 'tmp');\n\n\tconst {outputPath: tmpJSONPath} = await transcribeToTemporaryFile({\n\t\tfileToTranscribe: inputPath,","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/install-whisper-cpp/src/transcribe.ts#L297-L333","documentation":"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.","triggerScenarios":"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.","commonSituations":"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').","solutions":["Call installWhisperCpp() first and pass its returned path as whisperPath, or verify the path with fs.existsSync() before calling transcribe().","Check that the whisperPath points to the compiled 'main' binary inside the whisper.cpp build directory, not the source folder or model folder.","If using a custom build, recompile whisper.cpp and confirm the binary exists at the expected location.","On a fresh machine, run the installWhisperCpp() API programmatically as documented at the URL in the error message."],"exampleFix":"// before\nconst result = await transcribe({\n  inputPath: './audio.wav',\n  whisperPath: './whisper', // wrong: folder, not binary\n  whisperCppVersion: 'v1.5.4',\n  model: 'base.en',\n  tokenLevelTimestamps: false,\n});\n\n// after\nconst {whisperPath} = await installWhisperCpp({\n  version: 'v1.5.4',\n  customBuildId: null,\n  force: false,\n});\nconst result = await transcribe({\n  inputPath: './audio.wav',\n  whisperPath,\n  whisperCppVersion: 'v1.5.4',\n  model: 'base.en',\n  tokenLevelTimestamps: false,\n});","handlingStrategy":"validation","validationCode":"import fs from 'fs';\n\nfunction assertWhisperExists(whisperPath: string): void {\n  if (!fs.existsSync(whisperPath)) {\n    throw new Error(\n      `whisperPath does not exist: ${whisperPath}. Call installWhisperCpp() first.`\n    );\n  }\n}\n\n// Before calling transcribe():\nassertWhisperExists(whisperPath);","typeGuard":"import fs from 'fs';\nimport path from 'path';\n\nfunction isExecutablePath(p: string): boolean {\n  try {\n    const stat = fs.statSync(p);\n    return stat.isFile();\n  } catch {\n    return false;\n  }\n}\n\n// Usage: if (!isExecutablePath(whisperPath)) { await installWhisperCpp(...); }","tryCatchPattern":"try {\n  const result = await transcribe({inputPath, whisperPath, ...});\n} catch (err) {\n  if (err instanceof Error && err.message.includes('Whisper does not exist')) {\n    // Install whisper and retry\n    const {whisperPath: resolved} = await installWhisperCpp({version, ...});\n    result = await transcribe({inputPath, whisperPath: resolved, ...});\n  } else {\n    throw err;\n  }\n}","preventionTips":["Always call installWhisperCpp() first and use its returned whisperPath.","Use absolute paths derived from path.resolve() rather than relative strings.","In CI, run installWhisperCpp() as a setup step before any transcription job.","Log the whisperPath before calling transcribe() so failures are easy to diagnose."],"tags":["install-whisper-cpp","filesystem","setup","validation","precondition"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}