ProgramComputer commited on
Commit
a73a1b6
1 Parent(s): c47fe1f

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +2 -2
test.py CHANGED
@@ -335,8 +335,8 @@ class VoxCeleb(datasets.GeneratorBasedBuilder):
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}
 
335
  if conf.startswith("audio"):
336
  if dataset_format == "aac":
337
  with fs.open(info["file"], 'rb') as f:
338
+ z = BytesIO(f.read())
339
+ 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}