downloadWhisperModel()
warning
Unstable API: This package is experimental for the moment. As we test it, we might make a few changes to the API and switch to a WebGPU-based backend in the future.
Downloads a Whisper model into IndexedDB.
app.tstsximport {downloadWhisperModel } from '@remotion/whisper-web';const {alreadyDownloaded } = awaitdownloadWhisperModel ({model : 'tiny.en',onProgress : (progress ) => {console .log (progress );},});
Options
model
The model to download. Possible values: tiny, tiny.en, base, base.en, small, small.en.
onProgress?
Act upon download progress. This is the function signature:
tsximport {DownloadWhisperModelOnProgress ,DownloadWhisperModelProgress } from '@remotion/whisper-web';constonProgress :DownloadWhisperModelOnProgress = ({progress ,totalBytes ,downloadedBytes }:DownloadWhisperModelProgress ) => {console .log ({progress ,totalBytes ,downloadedBytes });};
Return Value
Returns an object with the following properties:
alreadyDownloaded: Whether the model has already been downloaded.