Overview
Several endpoints return Server-Sent Events (SSE) streams for real-time updates during analysis.SSE Endpoints
The following endpoints support SSE streaming:POST /analyze/stream- Stream analysis events for uploaded mediaPOST /analyze?stream=true- Alias for/analyze/streamGET /analyze/live/{session_id}/events- Subscribe to events for a live session
Event Catalogue
| Event | Schema | When it fires | Key fields |
|---|---|---|---|
status | StatusEvent | Lifecycle changes (starting, processing, waiting_media, completed). | phase, progress (0-1). |
partial_transcript | PartialTranscriptEvent | Only in live capture when interim text is available. | partial_id, text, is_final. |
final_transcript | FinalTranscriptEvent | After an utterance is finalized. | utterance_id, speaker, t_start, t_end, text. |
emotion | EmotionEvent | Immediately after each final_transcript. | emotion.emotions.*, scores (PAD), confidence. |
cognitive | CognitiveEvent | Mirrors emotion cadence. | signals, engagement, cognitive_load. |
transition | TransitionEvent | When significant state changes are detected. | from_state, to_state, drivers. |
moment | MomentEvent | Detected objections, CTAs, and topic shifts. | category, confidence, evidence. |
summary_update | ConversationSummary | Once per conversation after processing completes. | See Section 13 for schema. |
error | ErrorEvent | Fatal issues (ASR failure, invalid chunk, double SSE connection). | code, message. |
done | { conversation_id } | Terminal success marker. | conversation_id. |
Event Types
Status Event
Emitted during processing to indicate current phase and progress.Current processing phase. One of:
starting, processing, waiting_media, completedProgress indicator from 0 to 1
Partial Transcript Event
Arrives only in live capture when interim text is available.Unique identifier for this partial transcript
Partial transcript text
Whether this is a final transcript segment
Final Transcript Event
Fired per utterance once a segment is finalized.Unique identifier for the utterance
Speaker identifier from diarization
Final transcript text
Start time in seconds
End time in seconds
Emotion Event
Emitted immediately after eachfinal_transcript. Includes PAD scores (valence, arousal, dominance) and emotion classifications.
Associated utterance identifier
Speaker identifier
Emotion scores (e.g.,
{"joy": 0.64, "fear": 0.05, ...})PAD scores:
valence, arousal, dominance (each 0-1)Confidence score (0-1)
Stability indicator (e.g.,
"final")Cognitive Event
Mirrorsemotion cadence. Includes engagement and cognitive load analysis.
Associated utterance identifier
Speaker identifier
Cognitive analysis signals
Engagement score (0-1)
Cognitive load level
Transition Event
Triggers when significant state changes are detected.Unique transition identifier
Timestamp in milliseconds
Previous affective state
New affective state
Highlights which signals contributed to the transition
Array of utterance IDs that contributed to this transition
Confidence score (0-1)
Moment Event
Detected objections, CTAs, and topic shifts.Unique moment identifier
Moment category:
objection, cta_offered, cta_accepted, cta_rejected, topic_shiftSpeaker identifier
Start timestamp in milliseconds
End timestamp in milliseconds
Array of associated utterance IDs
Summary of the moment
Evidence supporting the moment detection
Confidence score (0-1)
Summary Update Event
Emitted once per conversation after processing completes. Contains structuredConversationSummary.
Full conversation summary object. See Response Schemas for complete schema.
Error Event
Fatal issues (ASR failure, invalid chunk, double SSE connection).Error code. Notable codes:
LIVE_ASR_FAILURE, NO_UTTERANCES, STREAM_FAILURE, INVALID_KEY, FILE_TOO_LARGE, ANALYSIS_FAILUREHuman-readable error message
Done Event
Terminal success marker.Final conversation identifier
SSE Format
SSE events follow the standard format:Event Order
Events are emitted in order:status(phase=start)final_transcript(per utterance once finalized)- For each utterance:
emotion,cognitive, optionaltransition/moment summary_updateafter the timeline completesstatus(phase=completed)done
Error Handling
SSE streams may emit error events at any time. Clients should handle these gracefully:LIVE_ASR_FAILURE: Live ASR connection failedNO_UTTERANCES: No speech detected in mediaSTREAM_FAILURE: General streaming failureINVALID_KEY: Missing/incorrect API keyFILE_TOO_LARGE: Exceeded file size limitANALYSIS_FAILURE: Downstream processing failure
done event indicates successful completion.