packages/docs/docs/whisper-web/download-whisper-model.mdx
:::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.
import {downloadWhisperModel} from '@remotion/whisper-web';
const {alreadyDownloaded} = await downloadWhisperModel({
model: 'tiny.en',
onProgress: (progress) => {
console.log(progress);
},
});
modelThe model to download. Possible values: tiny, tiny.en, base, base.en, small, small.en.
onProgress?Act upon download progress. This is the function signature:
import {DownloadWhisperModelOnProgress, DownloadWhisperModelProgress} from '@remotion/whisper-web';
const onProgress: DownloadWhisperModelOnProgress = ({progress, totalBytes, downloadedBytes}: DownloadWhisperModelProgress) => {
console.log({progress, totalBytes, downloadedBytes});
};
Returns an object with the following properties:
alreadyDownloaded: Whether the model has already been downloaded.