inference: a reference track sets the length — Runware refuses duration alongside inputs.audio
ci / test (push) Successful in 45s
inference / deploy (push) Failing after 1m10s
sync / sync (push) Successful in 7s
time/worker-run cd .github/time; python3 - <<'E' p='test_time.py'; s=open(p).read() s=s.replace('("I cannot do that
ci / test (pull_request) Successful in 45s
heartbeat / tick (pull_request_review) Successful in 10s

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K6897PWcUEwHiqZMcVnNF6
This commit is contained in:
teahubxyzandClaude Fable 5.1 committed 2026-10-21 01:42:33 +00:00
1 parent 3ad797b37f
commit ba998b6a82
1 file changed
+1 -1
+1 -1
View File
@@ -87,7 +87,7 @@ async function renderRunware(body, env) {
duration: Math.max(30, Math.min(num(body.duration, 120), num(env.AUDIO_SECONDS, 120))), outputType: "URL", outputFormat: "MP3", deliveryMethod: "sync", includeCost: true, duration: Math.max(30, Math.min(num(body.duration, 120), num(env.AUDIO_SECONDS, 120))), outputType: "URL", outputFormat: "MP3", deliveryMethod: "sync", includeCost: true,
audioSettings: { bitrate: 192, channels: 2, sampleRate: 44100 }, settings: {} }; audioSettings: { bitrate: 192, channels: 2, sampleRate: 44100 }, settings: {} };
if (Number.isInteger(+body.seed) && +body.seed >= 0) task.seed = Math.min(2147483647, +body.seed); if (Number.isInteger(+body.seed) && +body.seed >= 0) task.seed = Math.min(2147483647, +body.seed);
if (typeof body.reference === "string" && /^data:audio\/[a-z0-9.+-]+;base64,[A-Za-z0-9+/=]+$/i.test(body.reference)) task.inputs = { audio: body.reference }; if (typeof body.reference === "string" && /^data:audio\/[a-z0-9.+-]+;base64,[A-Za-z0-9+/=]+$/i.test(body.reference)) { task.inputs = { audio: body.reference }; delete task.duration; } // the reference sets the length
const beats = String(body.timeSignature || "").match(/^(\d)\/(4|8)$/); // "3/4" → 3; Runware takes 2, 3, 4 or 6 beats to the bar const beats = String(body.timeSignature || "").match(/^(\d)\/(4|8)$/); // "3/4" → 3; Runware takes 2, 3, 4 or 6 beats to the bar
if (beats && [2, 3, 4, 6].includes(+beats[1])) task.settings.timeSignature = +beats[1]; if (beats && [2, 3, 4, 6].includes(+beats[1])) task.settings.timeSignature = +beats[1];
if (body.steps) task.steps = Math.min(20, Math.max(1, +body.steps | 0)); if (body.steps) task.steps = Math.min(20, Math.max(1, +body.steps | 0));