Welcome to DispatchAI
DispatchAI is a real-time emergency call triage system that uses AI to analyze incoming calls, extract critical information, and prioritize them for dispatchers. The system ingests live phone calls via Telnyx, streams audio through parallel analysis agents, and produces a ranked priority queue to help dispatchers act on the most critical calls first.DispatchAI combines real-time speech-to-text transcription, audio distress analysis, emotion detection, and semantic classification to automatically triage emergency calls.
Key Features
Real-Time Audio Streaming
Stream live audio from Telnyx calls via WebSocket for instant analysis
Parallel Analysis Pipeline
Run audio distress detection and NLP analysis simultaneously for faster results
Intelligent Priority Ranking
Automatically score and queue calls based on risk level, category, and semantic tags
Multi-Provider Support
Integrate with Deepgram (STT), OpenAI (emotion), and Telnyx (telephony)
How It Works
DispatchAI processes emergency calls through a multi-stage pipeline:Audio Streaming
The system answers the call and starts streaming audio to the WebSocket endpoint
/wsParallel Analysis
Audio and NLP tracks run simultaneously:
- Audio Track: Analyzes voice distress using RMS-based VAD and EMA smoothing
- NLP Track: Transcribes speech with Deepgram and classifies intent
Packet Generation
The merger combines results into a CallPacket with transcript, distress score, emotion, and semantic tags
Priority Ranking
The ranking service scores the call based on:
- Risk level (CRITICAL, ELEVATED, NORMAL, LOW)
- Service category (EMS, FIRE, POLICE, OTHER)
- Semantic tags (GUNSHOT, CARDIAC_ARREST, FIRE, etc.)
CallPacket Schema
Each processed call produces aCallPacket with comprehensive analysis:
Quick Links
Quickstart
Get up and running in 5 minutes
Architecture
Understand the system design
API Reference
Explore the REST and WebSocket APIs
Use Cases
Emergency Call Centers (911/999)
Automatically prioritize incoming emergency calls to ensure life-threatening situations are handled first. The system detects keywords like “not breathing,” “unconscious,” or “gunshot” and elevates priority even if the caller sounds calm (shock/dissociation).Hospital Triage Lines
Route calls to appropriate departments (EMS, trauma, cardiology) based on semantic classification and symptom tags.Crisis Hotlines
Detect elevated distress and suicidal ideation to route high-risk callers to specialized counselors immediately.Technical Stack
- Backend: FastAPI (Python 3.10+)
- Telephony: Telnyx (WebRTC & Call Control API)
- Speech-to-Text: Deepgram (Nova-2 model)
- Emotion Detection: Deepgram Text Intelligence / OpenAI GPT-4o
- Audio Analysis: Custom RMS-based VAD with EMA distress scoring
- Queue Storage: In-memory (dev) / PostgreSQL (production)
Next Steps
Install Dependencies
Follow the Quickstart to set up your development environment