ProgramComputer commited on
Commit
c47fe1f
1 Parent(s): 86c2f26

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +4 -1
test.py CHANGED
@@ -335,7 +335,10 @@ class VoxCeleb(datasets.GeneratorBasedBuilder):
335
  if conf.startswith("audio"):
336
  if dataset_format == "aac":
337
  with fs.open(info["file"], 'rb') as f:
338
- y, sr = librosa.load(f)
 
 
 
339
  info["audio"] = {'array':y,'path':info["file"],'sampling_rate':sr}
340
  else:
341
  info["audio"] = info["file"]
 
335
  if conf.startswith("audio"):
336
  if dataset_format == "aac":
337
  with fs.open(info["file"], 'rb') as f:
338
+ z = io.BytesIO(f.read())
339
+ pathlib.Path('./temp.m4a').write_bytes(z.getbuffer())
340
+ y, sr = librosa.load('./temp.m4a')
341
+ #y, sr = librosa.load(f)
342
  info["audio"] = {'array':y,'path':info["file"],'sampling_rate':sr}
343
  else:
344
  info["audio"] = info["file"]