edyfy/Depression-Detection-Voice
0
Depression Detection (Voice)
This Space uses a voice input to detect signs of depression using a trained ML model.
๐๏ธ Depression Detection from Voice
This project is uses machine learning to predict the risk of depression from short audio samples of speech. โ ๏ธ Disclaimer: This tool is for educational purposes only and not for clinical or medical use.
๐ Features
- Upload or record voice samples directly in the app.
- Extracts audio features (e.g., MFCCs) using
librosa. - Predicts probability of depression (0 = low, 1 = high) using a trained model.
- Interactive Gradio UI for testing and demonstration.
๐ ๏ธ Installation
1. Clone the repository
git clone https://github.com/your-username/dep_voice_scaffold.git
cd dep_voice_scaffold2. Set up environment
Install dependencies with pip:
pip install -r requirements.txtOr if you prefer conda:
conda create -n depvoice python=3.10
conda activate depvoice
pip install -r requirements.txtโถ๏ธ Running the App
Run the Gradio app:
python app.pyThis will launch a local web interface (usually at http://127.0.0.1:7860/).
๐ Project Structure
dep_voice_scaffold/
โโโ app.py # Main Gradio app
โโโ requirements.txt # Dependencies
โโโ configs/
โ โโโ default.yaml # Feature extraction & model config
โโโ artifacts/
โ โโโ model.pkl # Trained model
โ โโโ metrics.yaml # Evaluation metrics (with threshold)
โโโ src/
โ โโโ depvoice/ # Feature extraction code๐ Example Output
After uploading a voice file, the app will return:
- Probability scores (Depressed vs Not Depressed)
- Final prediction (based on threshold in
metrics.yaml)
โ ๏ธ Disclaimer
This project is for academic purposes only. It is not a diagnostic tool and must not be used in clinical settings.
โจ Made with Python, Gradio, and โค๏ธ for research.
