Datasets:
DCNemesis
commited on
Commit
·
d304eff
1
Parent(s):
d39d45e
fix name of validation split
Browse files
audio-keyword-spotting.py
CHANGED
@@ -104,7 +104,7 @@ class AudioKeywordSpotting(datasets.GeneratorBasedBuilder):
|
|
104 |
gen_kwargs={
|
105 |
"audio_dir": audio_dir,
|
106 |
"data": langmeta,
|
107 |
-
"split": "
|
108 |
},
|
109 |
),
|
110 |
datasets.SplitGenerator(
|
@@ -121,7 +121,6 @@ class AudioKeywordSpotting(datasets.GeneratorBasedBuilder):
|
|
121 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
122 |
def _generate_examples(self, audio_dir, data, split):
|
123 |
for key, row in enumerate(data[split]):
|
124 |
-
print(key, row)
|
125 |
try:
|
126 |
tfile = os.path.join(audio_dir, row['file'])
|
127 |
if not tfile.endswith('.wav'):
|
@@ -138,7 +137,5 @@ class AudioKeywordSpotting(datasets.GeneratorBasedBuilder):
|
|
138 |
}
|
139 |
except Exception as e:
|
140 |
print(e)
|
141 |
-
print(audio_dir, row['file'])
|
142 |
-
print(os.path.join(audio_dir, row['file']))
|
143 |
print(f'In split {split}: {row["file"]} failed to download. Data may be missing.')
|
144 |
pass
|
|
|
104 |
gen_kwargs={
|
105 |
"audio_dir": audio_dir,
|
106 |
"data": langmeta,
|
107 |
+
"split": "validation",
|
108 |
},
|
109 |
),
|
110 |
datasets.SplitGenerator(
|
|
|
121 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
122 |
def _generate_examples(self, audio_dir, data, split):
|
123 |
for key, row in enumerate(data[split]):
|
|
|
124 |
try:
|
125 |
tfile = os.path.join(audio_dir, row['file'])
|
126 |
if not tfile.endswith('.wav'):
|
|
|
137 |
}
|
138 |
except Exception as e:
|
139 |
print(e)
|
|
|
|
|
140 |
print(f'In split {split}: {row["file"]} failed to download. Data may be missing.')
|
141 |
pass
|