This project uses Convolutional Neural Networks (CNNs) to detect emotions from voice recordings. The dataset is preprocessed to extract MFCC (Mel Frequency Cepstral Coefficients) features, which are then used to train a deep learning model to classify emotions.
- Emotion Detection: Classifies emotions such as happy, sad, angry, calm, etc.
- Visualization: Displays MFCC curves and confusion matrices for better understanding.
- Preprocessing: Standardizes audio features for consistent input to the model.
- Python 3.8 or higher
- Virtual environment (recommended)
git clone https://github.com/your-username/emotion-detection-from-voice.git
cd emotion-detection-from-voice###Set Up Virtual Environment
python -m venv .venv
[activate](http://_vscodecontentref_/1) # On Windows
# source .venv/bin/activate # On Linux/MacInstall Dependencies
pip install -r requirements.txt-
Preprocess the Dataset Place your .wav files in the data/ directory. The dataset should follow the RAVDESS naming convention.
-
Train the Model Run the main.py script to preprocess the data, train the model, and save the results:
python [main.py](http://_vscodecontentref_/3)- Visualize Results Run the Visualize.py script to generate the confusion matrix and accuracy/loss graphs:
python [Visualize.py](http://_vscodecontentref_/4)- Test with New Audio Use the evaluate.py script to test the model with a new .wav file:
python [evaluate.py](http://_vscodecontentref_/5)- librosa
- numpy
- matplotlib
- keras
- scikit-learn
- tensorflow
- tqdm Install all dependencies using:
pip install -r requirements.txt- RAVDESS Dataset
- Librosa Documentation
License This project is licensed under the MIT License. See the LICENSE file for details.


