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.tsimport {isWhisperModelCached } from '@remotion/whisper-webgpu'; constdownloaded = awaitisWhisperModelCached ({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
| Browsers | Servers | Environments | |||||||
|---|---|---|---|---|---|---|---|---|---|
Chrome | Firefox | Safari | Node.js | Bun | Serverless Functions | ||||