remotion-dev/remotion · error · Error
The language option is required for the multilingual model "
Error message
The language option is required for the multilingual model "${model}" because automatic language detection is not supported. What it means
Multilingual Whisper models require an explicit language because this library does not support automatic language detection. Calling transcribe() on a multilingual model with language undefined or 'auto' throws this error.
Source
Thrown at packages/whisper-webgpu/src/transcribe.ts:118
'repetitionPenalty must be a finite number greater than 0.',
);
}
if (!Number.isInteger(noRepeatNgramSize) || noRepeatNgramSize < 0) {
throw new TypeError('noRepeatNgramSize must be a non-negative integer.');
}
if (task !== 'transcribe' && task !== 'translate') {
throw new TypeError('task must be either "transcribe" or "translate".');
}
const {multilingual, supportsTranslation} = getModelInfo(model);
if (task === 'translate' && !supportsTranslation) {
throw new Error(`The model "${model}" does not support translation.`);
}
if (multilingual && (language === undefined || language === 'auto')) {
throw new Error(
`The language option is required for the multilingual model "${model}" because automatic language detection is not supported.`,
);
}
if (
!multilingual &&
language !== undefined &&
language !== 'auto' &&
language !== 'en' &&
language !== 'english'
) {
throw new Error(
`The English-only model "${model}" does not support the language "${language}".`,
);
}
const output = await withLoadedWhisperPipeline({
model,View on GitHub (pinned to b2f4e34732)
Solutions
- Pass an explicit language code (e.g. 'en', 'de') when using a multilingual model
- Default the language in your config/UI instead of 'auto'
- Or use an English-only (.en) model when only English audio is expected
Example fix
// before
await transcribe({model: 'onnx-community/whisper-base', language: 'auto'});
// after
await transcribe({model: 'onnx-community/whisper-base', language: 'en'}); Defensive patterns
Strategy: validation
Validate before calling
const {multilingual} = getModelInfo(model);
if (multilingual && (language === undefined || language === 'auto')) throw new Error('an explicit language is required for multilingual models'); Try / catch
try {
await transcribe({model, language});
} catch (e) {
if (e instanceof Error && e.message.includes('language option is required')) {
language = detectedLanguage ?? 'en';
} else throw e;
} Prevention
- Always set an explicit language code for multilingual models
- Replace 'auto' defaults in configs/UI with a concrete language
- Prefer English-only (.en) models when the audio language is known to be English
When it happens
Trigger: Calling transcribe() with a multilingual model (e.g. 'onnx-community/whisper-base') and language omitted, undefined, or set to 'auto'.
Common situations: Migrating from transformers.js or other Whisper stacks where 'auto' detection is supported; options objects with language left as an unset optional field; UI defaults of 'auto'.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Invalid whisper model ${model}. Available: ${models.join(',
- Non-semantic version provided. Only releases of Whisper.cpp
- Unknown Whisper model: ${selectedModel}
- Unknown Whisper model: ${modelName}.
- task must be transcribe or translate.
AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09).
Data as JSON: /api/errors/ded32556d9ade78f.
Report an issue: GitHub.