Datasets:
ArXiv:
License:
error fix
Browse files- snow-mountain.py +4 -2
snow-mountain.py
CHANGED
@@ -79,7 +79,7 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
79 |
features = datasets.Features(
|
80 |
{
|
81 |
"sentence": datasets.Value("string"),
|
82 |
-
"audio": datasets.Audio(sampling_rate=16_000),
|
83 |
"path": datasets.Value("string"),
|
84 |
}
|
85 |
)
|
@@ -193,9 +193,11 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
193 |
for index,row in data_df.iterrows():
|
194 |
downloaded_audio = dl_manager.download(row["path"])
|
195 |
# samplerate, audio_data = wavfile.read(downloaded_audio)
|
|
|
|
|
196 |
yield key, {
|
197 |
"sentence": row["sentence"],
|
198 |
"path": row["path"],
|
199 |
-
"audio":{"path": row["path"], "bytes":
|
200 |
}
|
201 |
key+=1
|
|
|
79 |
features = datasets.Features(
|
80 |
{
|
81 |
"sentence": datasets.Value("string"),
|
82 |
+
"audio": datasets.features.Audio(sampling_rate=16_000),
|
83 |
"path": datasets.Value("string"),
|
84 |
}
|
85 |
)
|
|
|
193 |
for index,row in data_df.iterrows():
|
194 |
downloaded_audio = dl_manager.download(row["path"])
|
195 |
# samplerate, audio_data = wavfile.read(downloaded_audio)
|
196 |
+
with open(downloaded_audio, 'rb') as fd:
|
197 |
+
contents = fd.read()
|
198 |
yield key, {
|
199 |
"sentence": row["sentence"],
|
200 |
"path": row["path"],
|
201 |
+
"audio":{"path": row["path"], "bytes": contents}
|
202 |
}
|
203 |
key+=1
|