@lingjingai/scriptctl 0.63.12 → 0.63.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changes/0.63.13.md +3 -0
- package/dist/bin.js +0 -0
- package/dist/review-agent.js +29 -9
- package/dist/review-agent.js.map +2 -2
- package/package.json +19 -18
- package/skills/scriptctl/SKILL.md +1 -1
package/dist/bin.js
CHANGED
|
File without changes
|
package/dist/review-agent.js
CHANGED
|
@@ -3411,7 +3411,7 @@ async function alignEpisode(doc, episode, video, scriptPath, config, onAsrComple
|
|
|
3411
3411
|
};
|
|
3412
3412
|
const reportDir2 = await fs6.mkdtemp(path4.join(root, "no-audio-"));
|
|
3413
3413
|
await fs6.writeFile(path4.join(reportDir2, "report.json"), JSON.stringify(report2, null, 2));
|
|
3414
|
-
return { report: report2, reportDir: reportDir2, usage: [] };
|
|
3414
|
+
return { status: "source_no_audio", report: report2, reportDir: reportDir2, usage: [] };
|
|
3415
3415
|
}
|
|
3416
3416
|
const utterances = await episodeAsr(video, root);
|
|
3417
3417
|
onAsrComplete?.();
|
|
@@ -3438,7 +3438,7 @@ async function alignEpisode(doc, episode, video, scriptPath, config, onAsrComple
|
|
|
3438
3438
|
});
|
|
3439
3439
|
const report = resolveComparison(doc, episode, asrCues(utterances), response.value);
|
|
3440
3440
|
await fs6.writeFile(path4.join(reportDir, "report.json"), JSON.stringify(report, null, 2));
|
|
3441
|
-
return { report, reportDir, usage: response.usage };
|
|
3441
|
+
return { status: "compared", report, reportDir, usage: response.usage };
|
|
3442
3442
|
}
|
|
3443
3443
|
|
|
3444
3444
|
// packages/review-agent/src/review.ts
|
|
@@ -3539,15 +3539,35 @@ async function reviewScript(opts) {
|
|
|
3539
3539
|
return;
|
|
3540
3540
|
}
|
|
3541
3541
|
alignments.set(episode, alignment);
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3542
|
+
if (alignment.status === "source_no_audio") {
|
|
3543
|
+
emit({ type: "asr-skipped", episode_number: episode, reason: "source_no_audio", ...alignment });
|
|
3544
|
+
} else {
|
|
3545
|
+
emit({ type: "asr-compared", episode_number: episode, ...alignment });
|
|
3546
|
+
const corrections = alignment.report.timestamp_corrections;
|
|
3547
|
+
retime(doc, corrections.map((fix) => ({ at: fix.action, ts: fix.after })));
|
|
3548
|
+
commit(doc, opts.scriptPath);
|
|
3549
|
+
timestampCorrections += corrections.length;
|
|
3550
|
+
emit({ type: "asr-applied", episode_number: episode, timestamp_corrections: corrections.length });
|
|
3551
|
+
}
|
|
3548
3552
|
}
|
|
3549
3553
|
emit({ type: "unit-started", episode_number: episode });
|
|
3550
|
-
|
|
3554
|
+
const reviewed = await reviewUnit(doc, episode, video, config, alignment?.report);
|
|
3555
|
+
if (alignment?.status === "source_no_audio") {
|
|
3556
|
+
reviewed.message = `\u539F\u7247\u65E0\u97F3\u8F68\uFF0C\u5DF2\u8DF3\u8FC7 ASR \u6821\u65F6\uFF1B${reviewed.message}`;
|
|
3557
|
+
reviewed.findings.push(toFinding(doc, {
|
|
3558
|
+
category: "timeline",
|
|
3559
|
+
at: String(episode),
|
|
3560
|
+
title: "\u539F\u7247\u65E0\u97F3\u8F68\uFF0CASR \u6821\u65F6\u672A\u6267\u884C",
|
|
3561
|
+
issue: "ffprobe \u786E\u8BA4\u6E90\u89C6\u9891\u6CA1\u6709\u97F3\u9891\u6D41\u3002",
|
|
3562
|
+
impact: "\u53F0\u8BCD\u53EA\u80FD\u6309\u753B\u9762\u5B57\u5E55\u6838\u5BF9\uFF0C\u65E0\u6CD5\u6838\u9A8C\u5B9E\u9645\u53D1\u58F0\u65F6\u95F4\u3001\u6F0F\u8BCD\u6216\u65E0\u5B57\u5E55\u753B\u5916\u97F3\u3002",
|
|
3563
|
+
resolution: "\u4FDD\u7559\u73B0\u6709\u53F0\u8BCD\u548C\u65F6\u95F4\uFF0C\u7EE7\u7EED\u753B\u9762\u5BA1\u6838\uFF1B\u672C\u96C6\u672A\u901A\u8FC7\u8BED\u97F3\u6821\u65F6\u3002",
|
|
3564
|
+
outcome: "unresolved",
|
|
3565
|
+
confidence: "high",
|
|
3566
|
+
unresolved_reason: "\u6E90\u89C6\u9891\u7F3A\u5C11\u97F3\u8F68",
|
|
3567
|
+
evidence: [`video|\u65E0\u97F3\u8F68\u63A2\u6D4B\u8BB0\u5F55|${alignment.reportDir}/report.json`]
|
|
3568
|
+
}, episode, 0));
|
|
3569
|
+
}
|
|
3570
|
+
checkpoint(reviewed, "episode");
|
|
3551
3571
|
});
|
|
3552
3572
|
if (opts.convergeOnly || opts.converge !== false) {
|
|
3553
3573
|
emit({ type: "unit-started", episode_number: 0 });
|