You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can pass any audio file, if it's not in the appropriate format (16000Hz and mono channel), then it'll be automatically converted, make sure you have `ffmpeg` installed in your system and added to *PATH*.
106
107
## Example 2: Using RNNs for 5 Emotions
107
108
```python
108
109
from deep_emotion_recognition import DeepEmotionRecognizer
[+] Best model determined: RandomForestClassifier with 93.454% test accuracy
166
+
167
+
predicted_angry predicted_neutral predicted_sad
168
+
true_angry 98.275864 1.149425 0.574713
169
+
true_neutral 0.917431 88.073395 11.009174
170
+
true_sad 6.250000 1.875000 91.875000
171
+
172
+
Prediction: angry
173
+
```
174
+
You can print the number of samples on each class:
175
+
```python
176
+
rec.get_samples_by_class()
177
+
```
178
+
**Output:**
179
+
```
180
+
train test total
181
+
angry 910 174 1084
182
+
neutral 650 109 759
183
+
sad 862 160 1022
184
+
total 2422 443 2865
185
+
```
186
+
In this case, the dataset is only from TESS and RAVDESS, and not balanced, you can pass `True` to `balance` on the `EmotionRecognizer` instance to balance the data.
147
187
## Algorithms Used
148
188
This repository can be used to build machine learning classifiers as well as regressors for the case of 3 emotions {'sad': 0, 'neutral': 1, 'happy': 2} and the case of 5 emotions {'angry': 1, 'sad': 2, 'neutral': 3, 'ps': 4, 'happy': 5}
0 commit comments