anjalyjayakrishnan commited on
Commit
7765a2e
1 Parent(s): 4c9d66c
Files changed (1) hide show
  1. test.py +0 -3
test.py CHANGED
@@ -79,7 +79,6 @@ class Test(datasets.GeneratorBasedBuilder):
79
  # "unnamed": datasets.Value("int64"),
80
  "sentence": datasets.Value("string"),
81
  "path": datasets.Value("string"),
82
- "audio": datasets.Audio(sampling_rate=16_000),
83
  }
84
  )
85
  return datasets.DatasetInfo(
@@ -149,10 +148,8 @@ class Test(datasets.GeneratorBasedBuilder):
149
  data_df = pd.read_csv(f,sep=',')
150
  transcripts = []
151
  for index,row in data_df.iterrows():
152
- samplerate, audio_data = wavfile.read('data/'+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
 
79
  # "unnamed": datasets.Value("int64"),
80
  "sentence": datasets.Value("string"),
81
  "path": datasets.Value("string"),
 
82
  }
83
  )
84
  return datasets.DatasetInfo(
 
148
  data_df = pd.read_csv(f,sep=',')
149
  transcripts = []
150
  for index,row in data_df.iterrows():
 
151
  yield key, {
152
  "sentence": row["sentence"],
153
  "path": row["path"],
 
154
  }
155
  key+=1