Update ravdess-script.py
Browse files- ravdess-script.py +25 -24
ravdess-script.py
CHANGED
|
@@ -26,30 +26,30 @@ RAVDESS_EMOTIONS_MAPPING = {
|
|
| 26 |
'08': 'surprised',
|
| 27 |
}
|
| 28 |
RAVDESS_ACTOR_FOLD_MAPPING = {
|
| 29 |
-
'01': '
|
| 30 |
-
'02': '
|
| 31 |
-
'03': '
|
| 32 |
-
'04': '
|
| 33 |
-
'05': '
|
| 34 |
-
'06': '
|
| 35 |
-
'07': '
|
| 36 |
-
'08': '
|
| 37 |
-
'09': '
|
| 38 |
-
'10': '
|
| 39 |
-
'11': '
|
| 40 |
-
'12': '
|
| 41 |
-
'13': '
|
| 42 |
-
'14': '
|
| 43 |
-
'15': '
|
| 44 |
-
'16': '
|
| 45 |
-
'17': '
|
| 46 |
-
'18': '
|
| 47 |
-
'19': '
|
| 48 |
-
'20': '
|
| 49 |
-
'21': '
|
| 50 |
-
'22': '
|
| 51 |
-
'23': '
|
| 52 |
-
'24': '
|
| 53 |
}
|
| 54 |
CLASSES = list(RAVDESS_EMOTIONS_MAPPING.values())
|
| 55 |
|
|
@@ -135,6 +135,7 @@ class RAVDESS(datasets.GeneratorBasedBuilder):
|
|
| 135 |
"label": default_find_classes(audio_path),
|
| 136 |
}
|
| 137 |
|
|
|
|
| 138 |
def default_find_classes(audio_path):
|
| 139 |
return RAVDESS_EMOTIONS_MAPPING.get(Path(audio_path).name.split('-')[2])
|
| 140 |
|
|
|
|
| 26 |
'08': 'surprised',
|
| 27 |
}
|
| 28 |
RAVDESS_ACTOR_FOLD_MAPPING = {
|
| 29 |
+
'01': '5',
|
| 30 |
+
'02': '1',
|
| 31 |
+
'03': '2',
|
| 32 |
+
'04': '5',
|
| 33 |
+
'05': '1',
|
| 34 |
+
'06': '2',
|
| 35 |
+
'07': '2',
|
| 36 |
+
'08': '4',
|
| 37 |
+
'09': '5',
|
| 38 |
+
'10': '3',
|
| 39 |
+
'11': '3',
|
| 40 |
+
'12': '3',
|
| 41 |
+
'13': '2',
|
| 42 |
+
'14': '1',
|
| 43 |
+
'15': '1',
|
| 44 |
+
'16': '1',
|
| 45 |
+
'17': '4',
|
| 46 |
+
'18': '2',
|
| 47 |
+
'19': '3',
|
| 48 |
+
'20': '3',
|
| 49 |
+
'21': '4',
|
| 50 |
+
'22': '5',
|
| 51 |
+
'23': '4',
|
| 52 |
+
'24': '4',
|
| 53 |
}
|
| 54 |
CLASSES = list(RAVDESS_EMOTIONS_MAPPING.values())
|
| 55 |
|
|
|
|
| 135 |
"label": default_find_classes(audio_path),
|
| 136 |
}
|
| 137 |
|
| 138 |
+
|
| 139 |
def default_find_classes(audio_path):
|
| 140 |
return RAVDESS_EMOTIONS_MAPPING.get(Path(audio_path).name.split('-')[2])
|
| 141 |
|