An AI-powered road emergency assistant designed to operate entirely offline. RoadSOS helps users identify emergencies, locate nearby services, access emergency helplines, and interact through voice commands without relying on cloud services or an active internet connection.
Demo.Video.webm
- Offline NLP-based emergency classification
- Instant identification of road accidents and critical situations
- No internet dependency
- Search nearby hospitals, police stations, towing services, and fuel stations
- Uses locally stored service database
- Supports 19 major Indian cities
- Pure SVG-based rendering
- No external map providers
- Local Mercator projection implementation
- Offline speech-to-text support
- Whisper Tiny
- Vosk
- PocketSphinx
- Automatic fallback mechanism
- National emergency contacts available at all times
- Accessible even without network connectivity
- SQLite-based chat history
- No cloud storage
- Privacy-focused architecture
| Feature | Offline Support |
|---|---|
| Emergency Detection | ✅ |
| Service Discovery | ✅ |
| Emergency Helplines | ✅ |
| SQLite Storage | ✅ |
| Interactive Map | ✅ |
| Voice Input (Whisper/Vosk) | ✅ |
| Navigation Links | ✅ |
| FastAPI Backend | ✅ |
User
│
▼
Streamlit Frontend
│
├── Voice Input
├── Offline Map
├── Chat Interface
│
▼
FastAPI Backend
│
├── Emergency Classifier
├── Service Finder
├── Offline Services Database
├── SQLite Storage
└── Voice Processing Engine
RoadSOS/
├── backend/
│ ├── chatbot.py
│ ├── database.py
│ ├── emergency_classifier.py
│ ├── main.py
│ ├── offline_services.py
│ ├── service_finder.py
│ └── voice_input.py
│
├── frontend/
│ ├── app.py
│ └── map_view.py
│
├── data/
│ ├── offline_services.json
│ └── roadsos.db
│
├── requirements.txt
├── run.sh
├── run.bat
└── README.md
git clone <repository-url>
cd RoadSOSpip install -r requirements.txtOr use helper scripts:
bash run.sh installrun.bat installDownload the Whisper Tiny model:
python -c "import whisper; whisper.load_model('tiny')"Without this setup, the application falls back to online speech recognition services.
streamlit run frontend/app.pyOpen:
http://localhost:8501
bash run.sh fullServices:
- Frontend →
http://localhost:8501 - API Docs →
http://localhost:8000/docs
RoadSOS currently provides offline service coverage for:
Delhi, Mumbai, Bangalore, Chennai, Hyderabad, Kolkata, Pune, Ahmedabad, Jaipur, Lucknow, Surat, Patna, Bhopal, Indore, Nagpur, Visakhapatnam, Kochi, Chandigarh, and Guwahati.
For unsupported locations, national emergency helplines remain available.
| Service | Number |
|---|---|
| National Emergency | 112 |
| Ambulance | 108 |
| Police | 100 |
| Fire Brigade | 101 |
| Highway Helpline | 1033 |
| Disaster Response | 1078 |
| Women Helpline | 1091 |
| Child Helpline | 1098 |
POST /chat{
"text": "My car met with an accident",
"lat": 28.6139,
"lon": 77.2090
}GET /services/allPOST /voiceGET /helplinesGET /stats- Python
- FastAPI
- Streamlit
- SQLite
- Whisper
- Vosk
- PocketSphinx
- SVG Rendering
- Multilingual emergency support
- Offline route guidance
- AI-powered incident severity prediction
- SMS-based emergency alerts
- Expanded city coverage
This project is intended for educational, research, and road-safety applications.
Important: In any real emergency, immediately contact 112 or your local emergency services.