remotion-dev/remotion · error
Invalid transcription decoding settings.
Error message
Invalid transcription decoding settings.
What it means
This catch-all error is thrown when any of the decoding parameters (topK, noRepeatNgramSize and related numeric decoding settings) are not non-negative integers. The tool bundles several numeric checks into one error to reject malformed decoding configuration before starting the Whisper job.
Source
Thrown at packages/studio/src/components/WebMcp.tsx:578
'strideLengthInSeconds must be non-negative and less than half of chunkLengthInSeconds.',
);
}
if (
typeof temperature !== 'number' ||
!Number.isFinite(temperature) ||
temperature <= 0 ||
typeof repetitionPenalty !== 'number' ||
!Number.isFinite(repetitionPenalty) ||
repetitionPenalty <= 0 ||
typeof topK !== 'number' ||
!Number.isInteger(topK) ||
topK < 0 ||
typeof noRepeatNgramSize !== 'number' ||
!Number.isInteger(noRepeatNgramSize) ||
noRepeatNgramSize < 0
) {
throw new Error('Invalid transcription decoding settings.');
}
const forceFullSequences = input.forceFullSequences ?? false;
const doSample = input.doSample ?? false;
if (
typeof forceFullSequences !== 'boolean' ||
typeof doSample !== 'boolean'
) {
throw new Error(
'forceFullSequences and doSample must be booleans.',
);
}
const src = staticFile(assetPath);
const displayName = assetPath.split('/').at(-1) ?? assetPath;
const outputPath =
input.outputPath ?? getDefaultCaptionOutputName(src, displayName);
if (typeof outputPath !== 'string') {View on GitHub (pinned to b2f4e34732)
Solutions
- Ensure topK and noRepeatNgramSize are integers >= 0 (defaults: topK 50, noRepeatNgramSize as documented)
- Omit the fields to accept defaults
- Parse and round values before sending
Example fix
// before
{ "topK": "50" }
// after
{ "topK": 50 } Defensive patterns
Strategy: validation
Validate before calling
const okInt = (v: unknown) => typeof v === 'number' && Number.isInteger(v) && v >= 0;
if (!okInt(topK) || !okInt(noRepeatNgramSize)) {
throw new Error('topK and noRepeatNgramSize must be integers >= 0');
} Type guard
const isNonNegativeInt = (v: unknown): v is number => typeof v === 'number' && Number.isInteger(v) && v >= 0;
Try / catch
try {
await callWhisperTool({ topK, noRepeatNgramSize });
} catch (err) {
if (err instanceof Error && err.message === 'Invalid transcription decoding settings.') {
// re-run with defaults
await callWhisperTool({});
}
} Prevention
- Send numbers, never numeric strings from JSON configs
- Omit decoding options to use defaults (topK 50)
- Check for NaN/Infinity before sending
- Round fractional values with Math.round
When it happens
Trigger: Passing topK = 2.5 (non-integer), topK = -1, noRepeatNgramSize = "0", NaN, Infinity, or a similar malformed numeric decoding option.
Common situations: Sending numbers as JSON strings; copy-pasting decoding configs from Python/transformers where types differ; using null where 0 was intended.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 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/86ea2451a84976c1.
Report an issue: GitHub.