feat: 将视频转写重构为纯文字异步语音识别

This commit is contained in:
2026-10-03 21:58:06 +08:00
parent 040273586b
commit 6f0e38054b
34 changed files with 2283 additions and 1771 deletions
+22
View File
@@ -0,0 +1,22 @@
import { NextResponse } from "next/server";
import { getAsrConfig } from "@/lib/stt/dashscope";
import { enqueueMissingTranscriptions } from "@/lib/stt/tasks";
export const runtime = "nodejs";
export async function POST() {
try {
getAsrConfig();
} catch (error) {
return NextResponse.json(
{ error: (error as Error).message },
{ status: 503 },
);
}
try {
return NextResponse.json(
{ queued: await enqueueMissingTranscriptions() },
{ status: 202 },
);
} catch {
return NextResponse.json({ error: "批量任务入队失败" }, { status: 500 });
}
}