Predictify is a full-stack AI-powered web application that identifies types of urban sounds (like sirens, dog barks, or drilling) from audio files using a trained machine learning model. Users can upload an audio clip through a modern UI, and the app will analyze and predict the sound type using Python and a Random Forest model.
- 🎙 Upload and analyze audio files (MP3, WAV, etc.)
- 🤖 Real-time machine learning prediction using Python
- 🧠 Trained with UrbanSound8K dataset
- 💡 Dual feature extraction: MFCC + Mel Spectrogram
- 🕹 Interactive and animated frontend with React + Lottie
- 🌙 Light/Dark mode toggle
- 📁 Audio upload history and playback
| Layer | Technology |
|---|---|
| Frontend | React, Framer Motion, Lottie |
| Backend | Node.js, Express, Multer |
| ML Model | Python, Librosa, Scikit-learn |
| Dataset | UrbanSound8K |
git clone https://github.com/mezone1994/predictify.git
cd predictifycd Backend
npm install
node server.jscd ../client
npm install
npm startcd ../
python preprocessing/preprocessing.pypredictify/
│
├── Backend/ # Node.js server files
│ ├── controllers/ # Controller logic
│ ├── models/ # Python execution logic
│ ├── routes/ # Express routes
│ └── server.js # Main server file
│
├── client/ # React frontend
│ ├── App.js # Main React app
│ └── TeamModal.js # Team member info modal
│
├── preprocessing/ # Feature extraction and model training
│ └── preprocessing.py # Full training script
│
├── uploads/ # Uploaded audio files
├── deploy.py # Predicts class of uploaded file
├── voice_processing_model.pkl # Saved ML model
├── *.csv # Processed training/validation/test data
├── UrbanSound8K/ # Dataset and metadata
└── README.md- Audio file is uploaded via React and sent to Express.
- File is saved in
/uploadsusing Multer. deploy.pyis executed from Node.js usingchild_process.spawn().- Python:
- Loads the
.pklmodel - Extracts MFCC features
- Predicts class using Random Forest
- Returns class ID, label, and description
- Loads the
- Node parses result and sends it to the React frontend.
Step-by-step (in preprocessing.py):
- Extract MFCC or Mel Spectrogram from
UrbanSound8K. - Save datasets as:
training_file_method1.csvvalidation_file_method1.csvtesting_file_method1.csv
- Train two Random Forest models (one for each method).
- Evaluate and compare them.
- Save the best performing model as
voice_processing_model.pkl.
| ID | Label | Description |
|---|---|---|
| 0 | air_conditioner | Humming of an AC unit |
| 1 | car_horn | Beep sound of a car horn |
| 2 | children_playing | Laughter and playful noises from kids |
| 3 | dog_bark | Woof or yap from a dog |
| 4 | drilling | Mechanical sound of a drill |
| 5 | engine_idling | Car engine running while parked |
| 6 | gun_shot | Loud sharp sound of a firearm |
| 7 | jackhammer | Percussive drilling noise |
| 8 | siren | Emergency siren wail |
| 9 | street_music | Outdoor music performance |
*Group 13 - Mcmaster Students
MIT License © 2025 Moayed Mahmoud
Free to use and modify with credit.
