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
+49 -34
View File
@@ -24,29 +24,30 @@ model Author {
}
model Video {
aweme_id String @id
desc String
preview_title String?
duration_ms Int
created_at DateTime
share_url String
digg_count BigInt @default(0)
comment_count BigInt @default(0)
share_count BigInt @default(0)
collect_count BigInt @default(0)
authorId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
tags String[]
video_url String
height Int?
width Int?
cover_url String?
fps Int?
raw_json Json?
comments Comment[]
author Author @relation(fields: [authorId], references: [sec_uid], onDelete: Cascade)
transcript VideoTranscript?
aweme_id String @id
desc String
preview_title String?
duration_ms Int
created_at DateTime
share_url String
digg_count BigInt @default(0)
comment_count BigInt @default(0)
share_count BigInt @default(0)
collect_count BigInt @default(0)
authorId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
tags String[]
video_url String
height Int?
width Int?
cover_url String?
fps Int?
raw_json Json?
comments Comment[]
author Author @relation(fields: [authorId], references: [sec_uid], onDelete: Cascade)
transcript VideoTranscript?
transcriptionTask TranscriptionTask?
@@index([authorId])
@@index([created_at])
@@ -138,18 +139,32 @@ model ImageFile {
}
model VideoTranscript {
id String @id @default(cuid())
videoId String @unique
speech_detected Boolean
language String?
audio_type String?
transcript String[]
non_speech_summary String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
transcript_zh_tsv Unsupported("tsvector")?
video Video @relation(fields: [videoId], references: [aweme_id], onDelete: Cascade)
id String @id @default(cuid())
videoId String @unique
transcript String[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
transcript_zh_tsv Unsupported("tsvector")?
video Video @relation(fields: [videoId], references: [aweme_id], onDelete: Cascade)
@@index([videoId])
@@index([transcript_zh_tsv], map: "video_transcript_zh_idx", type: Gin)
}
model TranscriptionTask {
videoId String @id
status String @default("QUEUED")
providerTaskId String?
submittingAt DateTime?
submittedAt DateTime?
nextPollAt DateTime @default(now())
leaseUntil DateTime?
leaseToken String?
attempts Int @default(0)
lastError String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
video Video @relation(fields: [videoId], references: [aweme_id], onDelete: Cascade)
@@index([status, nextPollAt])
}