๐ง Urban Sound Classification System An AI-based system that classifies environmental sounds using machine learning. This project processes audio files and predicts categories such as sirens, dog barking, drilling, and street noise using the UrbanSound8K dataset.
๐ Overview Urban environments contain a variety of sounds that can be analyzed for smart applications. This project builds a sound classification model that: Takes an audio file as input Extracts meaningful audio features Uses a trained model to classify the sound
Outputs the predicted category ๐ Features ๐ต Accepts .wav audio input ๐ Feature extraction using MFCC and spectral features ๐ค Machine Learning model (Random Forest / CNN) ๐ Accurate classification of 10 sound categories ๐ Easy to extend for real-time applications
๐ง Technologies Used
Python Librosa (Audio Processing) NumPy & Pandas Scikit-learn / TensorFlow / Keras Matplotlib
๐ Dataset UrbanSound8K Dataset 8732 labeled sound clips 10 Classes: Air Conditioner Car Horn Children Playing Dog Bark Drilling Engine Idling Gun Shot Jackhammer Siren Street Music
โ๏ธ Project Workflow Audio Input Load .wav audio file Preprocessing Noise reduction Normalization Feature Extraction MFCC (Mel Frequency Cepstral Coefficients) Chroma Features Spectral Contrast Model Training Train using Random Forest / CNN Prediction Output predicted sound label
๐ ๏ธ Installation
Bash
git clone https://github.com/your-username/urban-sound-classifier.git
cd urban-sound-classifier
pip install -r requirements.txt
Output:
Predicted Sound: Siren Confidence: 92%
๐ Project Structure
urban-sound-classifier/ โโโ data/ โโโ models/ โโโ src/ โ โโโ preprocess.py โ โโโ feature_extraction.py โ โโโ train_model.py โ โโโ predict.py โโโ requirements.txt โโโ README.md
๐ Model Details Algorithm: Random Forest / Convolutional Neural Network Input: Extracted MFCC features Output: Sound class label Evaluation Metrics: Accuracy Confusion Matrix
๐ Applications Smart City Monitoring Traffic Sound Detection Industrial Noise Analysis Emergency Sound Recognition
๐ฎ Future Improvements Real-time sound detection Mobile application integration Deep learning improvements (LSTM, CNN tuning) Web deployment using Flask / Streamlit
๐จโ๐ป Author Mohamed Ansari
โญ Contributing Contributions are welcome! Feel free to fork the repository and submit a pull request.
๐ License This project is licensed under the MIT License.