Datasets:
fix: audio paths in script
Browse files
speech-emotion-recognition-dataset.py
CHANGED
|
@@ -72,7 +72,7 @@ class SpeechEmotionRecognitionDataset(datasets.GeneratorBasedBuilder):
|
|
| 72 |
|
| 73 |
def _generate_examples(self, audio, annotations):
|
| 74 |
annotations_df = pd.read_csv(annotations, sep=';')
|
| 75 |
-
audio =
|
| 76 |
|
| 77 |
for idx, sub_dir in enumerate(audio):
|
| 78 |
sub_dir = Path(sub_dir)
|
|
@@ -92,13 +92,13 @@ class SpeechEmotionRecognitionDataset(datasets.GeneratorBasedBuilder):
|
|
| 92 |
'set_id':
|
| 93 |
set_id,
|
| 94 |
'euphoric':
|
| 95 |
-
euphoric,
|
| 96 |
'joyfully':
|
| 97 |
-
joyfully,
|
| 98 |
'sad':
|
| 99 |
-
sad,
|
| 100 |
'surprised':
|
| 101 |
-
surprised,
|
| 102 |
'text':
|
| 103 |
annotations_df.loc[annotations_df['set_id'] == set_id]
|
| 104 |
['text'].values[0],
|
|
|
|
| 72 |
|
| 73 |
def _generate_examples(self, audio, annotations):
|
| 74 |
annotations_df = pd.read_csv(annotations, sep=';')
|
| 75 |
+
audio = Path(audio).iterdir()
|
| 76 |
|
| 77 |
for idx, sub_dir in enumerate(audio):
|
| 78 |
sub_dir = Path(sub_dir)
|
|
|
|
| 92 |
'set_id':
|
| 93 |
set_id,
|
| 94 |
'euphoric':
|
| 95 |
+
str(euphoric),
|
| 96 |
'joyfully':
|
| 97 |
+
str(joyfully),
|
| 98 |
'sad':
|
| 99 |
+
str(sad),
|
| 100 |
'surprised':
|
| 101 |
+
str(surprised),
|
| 102 |
'text':
|
| 103 |
annotations_df.loc[annotations_df['set_id'] == set_id]
|
| 104 |
['text'].values[0],
|