feat: add voice transcription feedback workflow

This commit is contained in:
2026-07-20 10:49:49 +08:00
parent 0a07538dce
commit bed80aa807
17 changed files with 1691 additions and 19 deletions

View File

@@ -44,9 +44,72 @@ export interface FeedbackDraft {
profileId: string | null
feedbackDate: string
content: string
feedbackSessionId?: string | null
}
export interface HealthStatus {
status: string
databaseConfigured: boolean
speechConfigured: boolean
speechAvailable: boolean
speechProvider: string | null
summaryConfigured: boolean
}
export type VoiceProcessingStatus = 'recording' | 'processing' | 'ready' | 'failed'
export interface VoiceAudioSegment {
id: string
sequence: number
durationMs: number
status: 'processing' | 'ready' | 'failed'
errorMessage: string | null
}
export interface VoiceLesson {
id: string
sequence: number
status: VoiceProcessingStatus
durationMs: number
appliedDirectly: boolean
includedInGeneration: boolean
segments: VoiceAudioSegment[]
startedAt: number
endedAt: number | null
}
export interface FeedbackSession {
id: string
profileId: string | null
feedbackDate: string
content: string
status: 'active' | 'finalized'
lessonCount: number
totalDurationMs: number
processingSegmentCount: number
failedSegmentCount: number
needsGeneration: boolean
lessons: VoiceLesson[]
createdAt: number
updatedAt: number
}
export interface VoiceLessonCreated {
id: string
sequence: number
status: VoiceProcessingStatus
startedAt: number
}
export interface VoiceLessonFinished {
id: string
status: VoiceProcessingStatus
durationMs: number
transcript: string
canApplyDirectly: boolean
}
export interface GeneratedFeedback {
content: string
method: 'llm' | 'extractive'
}