disposeWhisperModel()v4.0.518
Releases the memory used by initialized Whisper pipelines. Persistently cached model files are not deleted.
Use await using with loadWhisperModel() for cleanup at the end of a scope; call disposeWhisperModel() when you want to release a model loaded automatically.
dispose.tsimport {disposeWhisperModel } from '@remotion/whisper-webgpu'; awaitdisposeWhisperModel ({model : 'small.en'});
Options
model?
Only dispose this model. Default: all loaded models.
Compatibility
| Browsers | Servers | Environments | |||||||
|---|---|---|---|---|---|---|---|---|---|
Chrome | Firefox | Safari | Node.js | Bun | Serverless Functions | ||||