{"record":{"id":"aac5e66c539ceaf4","repo":"remotion-dev/remotion","slug":"the-model-model-does-not-support-translation","errorCode":null,"errorMessage":"The model \"${model}\" does not support translation.","messagePattern":"The model \"(.+?)\" does not support translation\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/whisper-webgpu/src/transcribe.ts","lineNumber":114,"sourceCode":"\t}\n\n\tif (!Number.isFinite(repetitionPenalty) || repetitionPenalty <= 0) {\n\t\tthrow new TypeError(\n\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);","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/whisper-webgpu/src/transcribe.ts#L96-L132","documentation":"transcribe() resolves getModelInfo(model) after validating options; when task is 'translate' the selected model's supportsTranslation capability is checked, and English-only models (which cannot produce cross-language output) cause this error. Pick a multilingual model that supports translation or use task 'transcribe'.","triggerScenarios":"Calling transcribe() with task: 'translate' and an English-only model such as 'Xenova/whisper-tiny.en' or 'onnx-community/whisper-base.en'.","commonSituations":"Hardcoding 'translate' while the model id came from user config; swapping models for speed (.en variants) without revisiting the task; UI exposing translate for all models.","solutions":["Switch to a multilingual model (drop the .en suffix, e.g. whisper-tiny instead of whisper-tiny.en)","Or set task: 'transcribe' if translation is not actually needed","Derive allowed tasks from the model: only offer translate when supportsTranslation is true"],"exampleFix":"// before\nawait transcribe({model: 'onnx-community/whisper-tiny.en', task: 'translate'});\n// after\nawait transcribe({model: 'onnx-community/whisper-tiny', task: 'translate'});","handlingStrategy":"validation","validationCode":"const {supportsTranslation} = getModelInfo(model);\nif (task === 'translate' && !supportsTranslation) throw new Error(`model ${model} cannot translate`);","typeGuard":null,"tryCatchPattern":"try {\n  await transcribe({model, task: 'translate'});\n} catch (e) {\n  if (e instanceof Error && e.message.includes('does not support translation')) {\n    model = model.replace(/\\.en$/, '');\n  } else throw e;\n}","preventionTips":["Check model capabilities before exposing a translate option in UI","Avoid .en model variants when translation may be requested","Keep model id and allowed tasks paired in your config schema"],"tags":["whisper","model-capability","translation"],"backgroundTag":"unsupported-operation","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-09-09T13:27:51.281Z","contentChangedAt":"2026-09-09T13:27:51.281Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}