语音转文本接口,bgm路径修复

This commit is contained in:
2025-10-25 13:06:17 +08:00
parent e4339a5b91
commit d1b4fb6be0
12 changed files with 423 additions and 172 deletions
+19
View File
@@ -0,0 +1,19 @@
import { NextRequest, NextResponse } from 'next/server';
import { prisma } from '@/lib/prisma';
import type { FeedItem, FeedResponse } from '@/app/types/feed';
import { getFileUrl } from '@/lib/minio';
import { transcriptAweme } from '.';
// Contract
// Inputs: search params { before?: ISOString, limit?: number }
// Output: { items: FeedItem[], nextCursor: ISOString | null }
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 });
}
const script = await transcriptAweme(awemeId);
return NextResponse.json(script);
}