mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-04 06:54:28 +00:00
feat(video): show saved transcripts in the player
This commit is contained in:
@@ -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(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user