KELONMYOSA
commited on
Commit
•
73121e5
1
Parent(s):
43700e8
loading script
Browse files- dusha_emotion_audio.py +3 -1
dusha_emotion_audio.py
CHANGED
@@ -52,9 +52,11 @@ class Dusha(datasets.GeneratorBasedBuilder):
|
|
52 |
for row in csv_reader:
|
53 |
audio_path, label = row
|
54 |
full_audio_path = os.path.join(audio_files, audio_path)
|
|
|
|
|
55 |
res = dict()
|
56 |
res["file"] = full_audio_path
|
57 |
-
res["audio"] =
|
58 |
res["label"] = label
|
59 |
examples.append(res)
|
60 |
|
|
|
52 |
for row in csv_reader:
|
53 |
audio_path, label = row
|
54 |
full_audio_path = os.path.join(audio_files, audio_path)
|
55 |
+
with open(full_audio_path) as audio_file:
|
56 |
+
audio = {"path": full_audio_path, "bytes": audio_file.read()}
|
57 |
res = dict()
|
58 |
res["file"] = full_audio_path
|
59 |
+
res["audio"] = audio
|
60 |
res["label"] = label
|
61 |
examples.append(res)
|
62 |
|