feat(video): show saved transcripts in the player

This commit is contained in:
yiling
2026-12-03 11:19:22 +08:00
parent e806435e49
commit 3952928b88
26 changed files with 1103 additions and 33 deletions
+15
View File
@@ -2,6 +2,21 @@ import { z } from 'zod'
export const transcriptLanguageCodeSchema = z.string().regex(/^[a-z]{2,3}$/)
export type SavedTranscriptLanguages = { languages: string[] }
export type TranscriptSegment = {
id: string
startMs: number
endMs: number
text: string
}
export type SavedTranscript = {
id: string
language: string
segments: TranscriptSegment[]
}
export const generateTranscriptRequestSchema = z.object({
language: transcriptLanguageCodeSchema.optional(),
})