Skip to main content

isWhisperModelCached()v4.0.518

Checks whether all files needed for a timestamped Whisper model from remotion.media are present in the persistent Transformers.js cache. The check does not download or initialize the model.

model-cache.ts
import {isWhisperModelCached} from '@remotion/whisper-webgpu'; const downloaded = await isWhisperModelCached({ model: 'small.en', });

Options​

model​

One of the names returned by getAvailableModels().

Return value​

A Promise<boolean> resolving to true if every required model file is cached.

Models cached from Hugging Face by versions before 4.0.522 do not satisfy this check. Use downloadWhisperModel() to download and cache a copy from remotion.media.

Compatibility​

BrowsersServersEnvironments
Chrome
Firefox
Safari
Node.js
Bun
Serverless Functions

See also​