Datasets:
Commit
·
f2ce8ae
1
Parent(s):
89c3270
modified loading script
Browse files
test.py
CHANGED
|
@@ -149,10 +149,10 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
| 149 |
data_df = pd.read_csv(f,sep=',')
|
| 150 |
transcripts = []
|
| 151 |
for index,row in data_df.iterrows():
|
| 152 |
-
samplerate,
|
| 153 |
yield key, {
|
| 154 |
"sentence": row["sentence"],
|
| 155 |
"path": row["path"],
|
| 156 |
-
"audio":{"path": row["path"], "bytes":
|
| 157 |
}
|
| 158 |
key+=1
|
|
|
|
| 149 |
data_df = pd.read_csv(f,sep=',')
|
| 150 |
transcripts = []
|
| 151 |
for index,row in data_df.iterrows():
|
| 152 |
+
samplerate, audio_data = wavfile.read(row["path"])
|
| 153 |
yield key, {
|
| 154 |
"sentence": row["sentence"],
|
| 155 |
"path": row["path"],
|
| 156 |
+
"audio":{"path": 'data/'+row["path"], "bytes": audio_data}
|
| 157 |
}
|
| 158 |
key+=1
|