Skip to main content

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.ts
import {disposeWhisperModel} from '@remotion/whisper-webgpu'; await disposeWhisperModel({model: 'small.en'});

Options​

model?​

Only dispose this model. Default: all loaded models.

Compatibility​

BrowsersServersEnvironments
Chrome
Firefox
Safari
Node.js
Bun
Serverless Functions

See also​