BilalHasan commited on
Commit
1fb0cc2
1 Parent(s): 1f354a5

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -0
README.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ ---
6
+ # Emotion Detection From Speech
7
+
8
+ This model is the fine-tuned version of **DistilHuBERT** which classifies emotions from audio inputs.
9
+
10
+ ## Approach
11
+ 1. **Dataset:** The **Ravdess** dataset, comprising 1,440 audio files with 8 emotion labels: calm, happy, sad, angry, fearful, surprise, neutral, and disgust.
12
+ 2. **Model Fine-Tuning:** The DistilHuBERT model was fine-tuned for 7 epochs with a learning rate of 5e-5, achieving an accuracy of 98% on the test dataset.
13
+
14
+ ## Data Preprocessing
15
+ - **Sampling Rate**: Audio files were resampled to 16kHz to match the model's requirements.
16
+ - **Padding:** Audio clips shorter than 30 seconds were zero-padded.
17
+ - **Train-Test Split:** 80% of the samples were used for training, and 20% for testing.
18
+
19
+ ## Model Architecture
20
+ - **DistilHuBERT:** A lightweight variant of HuBERT, fine-tuned for emotion classification.
21
+ - **Fine-Tuning Setup:**
22
+ - Optimizer: AdamW
23
+ - Loss Function: Cross-Entropy
24
+ - Learning Rate: 5e-5
25
+ - Warm-up Ratio: 0.1
26
+ - Epochs: 7
27
+
28
+ ## Results
29
+ - **Accuracy:** 0.98 on the test dataset
30
+ - **Loss:** 0.10 on the test dataset
31
+
32
+ ## Usage
33
+ from transformers import pipeline
34
+
35
+ pipe = pipeline(
36
+ "audio-classification",
37
+ model="BilalHasan/distilhubert-finetuned-ravdess",
38
+ )
39
+
40
+ emotion = pipe(path_to_your_audio)
41
+
42
+ ## Demo
43
+ You can access the live demo of the app on [Hugging Face Spaces](https://huggingface.co/spaces/BilalHasan/Mood-Based-Yoga-Session-Recommendation).