Datasets:

ArXiv:
License:
Anjaly commited on
Commit
6c7ff6f
1 Parent(s): 7438d41

modified loading script

Browse files
Files changed (1) hide show
  1. snow-mountain.py +4 -2
snow-mountain.py CHANGED
@@ -17,9 +17,9 @@
17
  import os
18
  import csv
19
  import json
20
- import pandas as pd
21
-
22
  import datasets
 
 
23
 
24
 
25
  _CITATION = """\
@@ -179,8 +179,10 @@ class Test(datasets.GeneratorBasedBuilder):
179
  data_df = pd.read_csv(f,sep=',')
180
  transcripts = []
181
  for index,row in data_df.iterrows():
 
182
  yield key, {
183
  "sentence": row["sentence"],
184
  "path": row["path"],
 
185
  }
186
  key+=1
 
17
  import os
18
  import csv
19
  import json
 
 
20
  import datasets
21
+ import pandas as pd
22
+ from scipy.io import wavfile
23
 
24
 
25
  _CITATION = """\
 
179
  data_df = pd.read_csv(f,sep=',')
180
  transcripts = []
181
  for index,row in data_df.iterrows():
182
+ samplerate, audio_data = wavfile.read(row["path"])
183
  yield key, {
184
  "sentence": row["sentence"],
185
  "path": row["path"],
186
+ "audio":{"path": row["path"], "bytes": audio_data}
187
  }
188
  key+=1