A machine learningβbased real-time audio classification system for detecting human screams using MFCC feature extraction, SVM and MLP classifiers, and emergency-aware alert logic with temporal smoothing and false-alarm control.
This project implements a real-time scream detection system capable of distinguishing scream vs non-scream audio events from a microphone stream or audio files. It is designed for emergency detection, safety monitoring, and public security applications, where low latency, high recall, and controlled false alarms are critical.
The system combines:
- Robust audio signal processing
- Classical machine learning classifiers
- Energy gating, confidence thresholds, and temporal smoothing
- Immediate alert logic for single-scream emergencies
- Binary Audio Classification: Scream vs Non-Scream
- MFCC-based Feature Extraction
- SVM (RBF kernel) and MLP classifiers
- Real-time microphone inference
- Energy-based silence filtering
- Temporal smoothing (sliding-window voting)
- Immediate & sustained emergency alerts
- False alarm and detection latency evaluation
- Ablation study for system validation
- Fully reproducible evaluation pipeline
- Emergency & Distress Detection
- Smart Surveillance Systems
- Women & Child Safety Solutions
- Smart Homes and IoT Safety
- Healthcare & Patient Monitoring
- Public Safety Research
- Audio Event Detection Studies
- Scream: Human screams and distress vocalizations
- Non-Scream: Speech, silence, background noise, environmental sounds
- MFCC (13 coefficients)
- Statistical aggregation: mean + standard deviation
- Fixed-length audio normalization
- Sampling rate: 22,050 Hz
Raw audio files are not included due to size and licensing constraints. Extracted features are provided for reproducibility.
-
Support Vector Machine (SVM)
- RBF kernel
- Probability estimation enabled
-
Multi-Layer Perceptron (MLP)
- Hidden layers:
(128, 64, 32) - Activation: ReLU
- Early stopping enabled
- Hidden layers:
- Faster inference
- Lower latency
- Better stability in low-data regimes
- Easier deployment on edge devices
The real-time pipeline includes:
- Microphone audio capture
- Energy-based silence filtering
- MFCC feature extraction
- SVM + MLP inference
- Confidence thresholding
- Sliding-window temporal smoothing
- Immediate alert for single high-confidence scream
- Sustained alert for repeated screams
This design balances recall, precision, and robustness.
Sound_Detection_Scream_NonScream/
β
βββ Model/ # Trained models
β βββ scream_svm.pkl
β βββ scream_mlp.pkl
β βββ scaler.pkl
β
βββ asset/ # Evaluation assets
β βββ features.csv
β βββ scream_alert_log.txt
β
βββ Sound _Detection.ipynb # Main notebook (training + evaluation)
βββ README.md
βββ .gitignore
- Python 3.8+
- pip
- Microphone (for real-time detection)
git clone https://github.com/satwik-shreshth/Sound_Detection_Scream_NonScream.git
cd Sound_Detection_Scream_NonScream
pip install -r requirements.txtRun the notebook:
jupyter notebook "Sound _Detection.ipynb"Includes:
- Feature extraction
- Model training
- Accuracy & confusion matrix
- ROC & Precision-Recall curves
- False alarm & latency computation
- Ablation experiments
The notebook contains sliding-window real-time scream detection using your trained models with alert logic.
- Accuracy
- Precision
- Recall (priority metric)
- F1-Score
- ROC-AUC
- Confusion Matrix
- False Alarm Rate
- Detection Latency (ms)
- Alert Stability
Validated the importance of:
- Energy gating
- Confidence thresholds
- Temporal smoothing
- Immediate alert logic
- High recall for scream detection
- Low detection latency (~tens of milliseconds)
- Significant reduction in false alarms with energy gating
- Stable alerts with temporal smoothing
- Suitable for real-time emergency scenarios
This system must be used responsibly:
- Respect privacy laws and consent
- Avoid unauthorized surveillance
- Deploy strictly for safety and emergency use
- Ensure transparency in public deployments
- Multi-class audio event detection
- Emotion intensity estimation
- Edge-device deployment (Raspberry Pi)
- Mobile application integration
- Adaptive thresholding
- Cloud-based alerting systems
Satwik Shreshth Research Student GitHub: https://github.com/satwik-shreshth
@software{scream_detection_2026,
author = {Satwik Shreshth},
title = {Real-Time Scream Detection using MFCC, SVM, and MLP},
year = {2026},
url = {https://github.com/satwik-shreshth/Sound_Detection_Scream_NonScream}
}β If this project helped you, consider starring the repository.