{"record":{"id":"ded32556d9ade78f","repo":"remotion-dev/remotion","slug":"the-language-option-is-required-for-the-multilingu","errorCode":null,"errorMessage":"The language option is required for the multilingual model \"${model}\" because automatic language detection is not supported.","messagePattern":"The language option is required for the multilingual model \"(.+?)\" because automatic language detection is not supported\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/whisper-webgpu/src/transcribe.ts","lineNumber":118,"sourceCode":"\t\t\t'repetitionPenalty must be a finite number greater than 0.',\n\t\t);\n\t}\n\n\tif (!Number.isInteger(noRepeatNgramSize) || noRepeatNgramSize < 0) {\n\t\tthrow new TypeError('noRepeatNgramSize must be a non-negative integer.');\n\t}\n\n\tif (task !== 'transcribe' && task !== 'translate') {\n\t\tthrow new TypeError('task must be either \"transcribe\" or \"translate\".');\n\t}\n\n\tconst {multilingual, supportsTranslation} = getModelInfo(model);\n\tif (task === 'translate' && !supportsTranslation) {\n\t\tthrow new Error(`The model \"${model}\" does not support translation.`);\n\t}\n\n\tif (multilingual && (language === undefined || language === 'auto')) {\n\t\tthrow new Error(\n\t\t\t`The language option is required for the multilingual model \"${model}\" because automatic language detection is not supported.`,\n\t\t);\n\t}\n\n\tif (\n\t\t!multilingual &&\n\t\tlanguage !== undefined &&\n\t\tlanguage !== 'auto' &&\n\t\tlanguage !== 'en' &&\n\t\tlanguage !== 'english'\n\t) {\n\t\tthrow new Error(\n\t\t\t`The English-only model \"${model}\" does not support the language \"${language}\".`,\n\t\t);\n\t}\n\n\tconst output = await withLoadedWhisperPipeline({\n\t\tmodel,","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/whisper-webgpu/src/transcribe.ts#L100-L136","documentation":"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.","triggerScenarios":"Calling transcribe() with a multilingual model (e.g. 'onnx-community/whisper-base') and language omitted, undefined, or set to 'auto'.","commonSituations":"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'.","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"],"exampleFix":"// before\nawait transcribe({model: 'onnx-community/whisper-base', language: 'auto'});\n// after\nawait transcribe({model: 'onnx-community/whisper-base', language: 'en'});","handlingStrategy":"validation","validationCode":"const {multilingual} = getModelInfo(model);\nif (multilingual && (language === undefined || language === 'auto')) throw new Error('an explicit language is required for multilingual models');","typeGuard":null,"tryCatchPattern":"try {\n  await transcribe({model, language});\n} catch (e) {\n  if (e instanceof Error && e.message.includes('language option is required')) {\n    language = detectedLanguage ?? 'en';\n  } else throw e;\n}","preventionTips":["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"],"tags":["whisper","language","validation"],"backgroundTag":"missing-required-argument","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-09-09T13:27:51.281Z","contentChangedAt":"2026-09-09T13:27:51.281Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}