GitHunt
VE

VEDICWARRIOR/AudioStressAnalyzer

A machine learning pipeline for stress detection from speech using acoustic feature extraction and classical classification models.

Voice-Based Stress Detection

Overview

This project detects stress in speech audio using MFCC and time-series acoustic features.

Dataset used:
RAVDESS (Ryerson Audio-Visual Database of Emotional Speech and Song)

We convert emotion labels into:

  • Normal → neutral (01), calm (02)
  • Stressed → angry (05), fearful (06)

Project Structure

VoiceStressProject/

├── dataset/
│ ├── normal/
│ ├── stressed/

├── stress_pipeline.py
├── requirements.txt
└── README.md

Features Extracted

  • 13 MFCC coefficients (mean + variance)
  • Zero Crossing Rate
  • Spectral Centroid
  • Energy
  • Pitch (mean + variance)

Total features per sample: 31

Model

RandomForest Classifier

Evaluation Metrics:

  • Accuracy
  • Precision
  • Recall
  • Confusion Matrix

How to Run

  1. Install dependencies:

    pip install -r requirements.txt

  2. Run the pipeline:

    python stress_pipeline.py

Output

  • Feature matrix shape
  • Accuracy score
  • Classification report
  • Confusion matrix

Languages

Python100.0%

Contributors

MIT License
Created February 22, 2026
Updated February 24, 2026