使用 qwen 进行语音识别,加入 tag

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-29 20:10:08 +08:00
co-authored by Copilot
parent 040273586b
commit 206a561ee7
26 changed files with 3720 additions and 443 deletions
+22
View File
@@ -0,0 +1,22 @@
export const runtime = "nodejs";
import { type NextRequest, NextResponse } from "next/server";
import { transcriptAweme } from ".";
export async function GET(req: NextRequest) {
const { searchParams } = new URL(req.url);
const awemeId = searchParams.get("awemeId");
if (!awemeId) {
return NextResponse.json(
{ error: "Missing awemeId parameter" },
{ status: 400 },
);
}
try {
const result = await transcriptAweme(awemeId, /* {log: (msg) => console.log(`[ASR] ${msg}`)} */);
return NextResponse.json(result);
} catch (error) {
console.error("ASR failed:", error);
return NextResponse.json({ error: "ASR failed" }, { status: 500 });
}
}