This commit is contained in:
949036910@qq.com
2026-05-31 02:29:18 +08:00
parent d6fefd6138
commit 620b022af0
3 changed files with 197 additions and 0 deletions

View File

@@ -422,6 +422,16 @@ globalThis.__nodejsMain = async function main(params) {
srtPath = makeOutputPath("subtitle", "srt");
fs.writeFileSync(srtPath, buildSrtContent(records, maxChars), "utf8");
if (p.recognizeOnly) {
pipelineNative.deleteFile(audioPath);
return {
success: true,
records,
srtPath,
message: `字幕识别完成,共 ${records.length}`,
};
}
const { width, height } = probeVideoSize(current);
const assPath = makeOutputPath("subtitle", "ass");
fs.writeFileSync(