feat(voice): add reusable transcript records

This commit is contained in:
zhangheng
2026-07-22 17:26:55 +08:00
parent f755ed2b08
commit 108e280b3f
12 changed files with 353 additions and 57 deletions

View File

@@ -86,6 +86,7 @@ interface RawVoiceLesson {
duration_ms: number
applied_directly: boolean
included_in_generation: boolean
transcript?: string
segments: RawVoiceAudioSegment[]
started_at: string
ended_at: string | null
@@ -324,6 +325,7 @@ function mapVoiceLesson(lesson: RawVoiceLesson): VoiceLesson {
durationMs: lesson.duration_ms,
appliedDirectly: lesson.applied_directly,
includedInGeneration: lesson.included_in_generation,
transcript: lesson.transcript || '',
segments: lesson.segments.map(mapVoiceSegment),
startedAt: parseTimestamp(lesson.started_at),
endedAt: lesson.ended_at ? parseTimestamp(lesson.ended_at) : null