feat: add voice studio prototype flow
This commit is contained in:
75
frontend/src/types/voiceSession.ts
Normal file
75
frontend/src/types/voiceSession.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
export interface VoiceTurnSummary {
|
||||
id: string
|
||||
session_id: string
|
||||
turn_index: number
|
||||
status: string
|
||||
user_transcript: string | null
|
||||
transcript_confidence: number | null
|
||||
transcription_provider: string | null
|
||||
detected_intent: string
|
||||
intent_confidence: number | null
|
||||
assistant_text: string | null
|
||||
assistant_audio_ready: boolean
|
||||
assistant_audio_url: string | null
|
||||
user_audio_ready: boolean
|
||||
user_audio_url: string | null
|
||||
error_message: string | null
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface VoiceSessionEvent {
|
||||
id: number
|
||||
session_id: string
|
||||
turn_id: string | null
|
||||
event_type: string
|
||||
status: string
|
||||
message: string | null
|
||||
event_metadata: Record<string, unknown>
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export interface VoiceSessionSummary {
|
||||
id: string
|
||||
child_profile_id: string | null
|
||||
universe_id: string | null
|
||||
final_story_id: number | null
|
||||
target_mode: string
|
||||
status: string
|
||||
current_turn_index: number
|
||||
total_turns: number
|
||||
working_title: string | null
|
||||
story_state: Record<string, unknown>
|
||||
latest_user_transcript: string | null
|
||||
latest_assistant_text: string | null
|
||||
latest_detected_intent: string | null
|
||||
latest_assistant_audio_ready: boolean
|
||||
last_turn_status: string | null
|
||||
can_continue: boolean
|
||||
can_finalize: boolean
|
||||
last_error: string | null
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface VoiceSessionDetail extends VoiceSessionSummary {
|
||||
recent_turns: VoiceTurnSummary[]
|
||||
events: VoiceSessionEvent[]
|
||||
}
|
||||
|
||||
export interface VoiceTurnAcceptedResponse {
|
||||
turn_id: string
|
||||
session_id: string
|
||||
status: string
|
||||
}
|
||||
|
||||
export interface VoiceTurnUploadAcceptedResponse extends VoiceTurnAcceptedResponse {
|
||||
transcription_provider: string | null
|
||||
}
|
||||
|
||||
export interface VoiceSessionFinalizeResponse {
|
||||
session_id: string
|
||||
status: string
|
||||
story_id: number | null
|
||||
generation_job_id: string | null
|
||||
}
|
||||
Reference in New Issue
Block a user