For comprehensive setup details, see the published journal article.
- Python 3.8+
- 4GB RAM (8GB for training)
- Optional: NVIDIA GPU
# Clone and setup
git clone https://github.com/yourusername/7-Emotion-Bangla-Speech-Recognition-Model.git
cd 7-Emotion-Bangla-Speech-Recognition-Model
# Create environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install backend dependencies
cd emotion-detection/backend
pip install -r requirements.txt
# Install frontend dependencies
cd ../
npm installpython -c "import torch; print(torch.__version__)"
python -c "import librosa; print(librosa.__version__)"# Terminal 1: Backend
cd emotion-detection/backend
python app.py
# Terminal 2: Frontend
cd emotion-detection
npm startOpen: http://localhost:3000
ssh pi@raspberrypi.local
git clone <repo-url>
cd emotion-detection-raspi/backend
pip install -r requirements-pi.txt
python app.pyimport torch
from backend.model import load_model, extract_features, predict_emotion
# Load pre-trained model (path relative to backend/)
model = load_model('Final_MultiScale_Realtime_Model.pth')
# Extract MFCC features from a 3-second 16kHz WAV file
features = extract_features('audio.wav')
# Predict emotion label
emotion = predict_emotion(model, features)
print("Predicted emotion:", emotion)| Issue | Solution |
|---|---|
| PyTorch import error | pip install torch --index-url https://download.pytorch.org/whl/cpu |
| CUDA not found | Use CPU mode or update GPU drivers |
| Port 5000 in use | FLASK_PORT=5001 python app.py |
| ffmpeg missing | apt-get install ffmpeg (Linux) or brew install ffmpeg (macOS) |
| Raspberry Pi slow | Reduce batch size or enable quantization |
📖 Full Journal Article - Complete methodology
📚 ARCHITECTURE.md - System design
🏗️ RESEARCH.md - Research details
💻 Final Model Notebook - Full implementation
Last Updated: February 2026