Overview
The CallPacket is the core data structure that represents a fully analyzed emergency call. It merges outputs from both the audio track and NLP track into a single, structured object.Schema Definition
All CallPacket fields are validated using Pydantic models, ensuring type safety throughout the system.
NLPResult
Contains all natural language understanding outputs from the transcript.Fields
The full, finalized speech-to-text transcript of the emergency call.Generated by Deepgram’s streaming STT API. Includes punctuation, smart formatting, and numeral recognition.
The caller’s primary intent or need.Examples:
"request_ambulance""report_fire""report_violence""request_police"
A 1-2 sentence dispatcher-friendly summary of the emergency situation.Generated using GPT-4o-mini with context from the category and tags:
Example
AudioResult
Contains acoustic and emotional analysis from the raw audio stream.Fields
Final distress level computed from the audio track (0.0 - 1.0).Calculated using an Exponential Moving Average (EMA) of audio loudness with detection of sudden intensity spikes:Interpretation:
0.0 - 0.15: Calm0.15 - 0.3: Tense0.3 - 0.7: Distressed0.7 - 1.0: Highly distressed
List of detected acoustic hazards or environmental sounds.Examples:
"sirens""gunshots""screaming_background""traffic_noise""breaking_glass"
Example
Complete CallPacket Example
Extended Analysis Fields
While not in the baseCallPacket schema, the system tracks additional analysis in the live signals:
Emotion Classification
Categorical emotion classification
Emotional intensity score (0.0 - 1.0)
Overall sentiment:
"positive", "neutral", or "negative"Analysis method:
"heuristic", "deepgram", or "openai"Service Classification
Primary emergency service needed:
"EMS", "FIRE", "POLICE", or "OTHER"Classification confidence (0.0 - 1.0). Higher when:
- Clear separation between categories
- Multiple supporting semantic tags
- Distress level aligns with detected emergency
Semantic tags describing the emergency. Over 50 tags are detected, including:Medical/EMS:
NOT_BREATHING,CARDIAC_ARREST,OVERDOSE,UNCONSCIOUS,SEIZUREMAJOR_BLEEDING,STROKE,ALLERGIC_REACTION,SUICIDAL
ACTIVE_SHOOTER,STABBING,ASSAULT,DOMESTIC_VIOLENCE,WEAPON_INVOLVED
FIRE,SMOKE,EXPLOSION,GAS_LEAK,HAZMAT
TRAPPED,COLLAPSE,FLOOD,VEHICLE_ACCIDENT
Semantic Tag Examples
The service classifier detects life-threatening keywords with negation awareness:Live Signals During Call
While the call is in progress, the system tracks real-time signals:Data Flow
Validation
All CallPacket instances are validated using Pydantic:Usage in Ranking
The CallPacket feeds directly into the priority ranking system:Related Concepts
Streaming Pipeline
See how CallPackets are built from dual-track analysis
Priority Ranking
Learn how CallPackets are prioritized in the dispatch queue