Datasets:

ArXiv:
License:
Anjaly commited on
Commit
19b51eb
·
1 Parent(s): 0b79e5b

supporting audio zip files

Browse files
Files changed (1) hide show
  1. snow-mountain.py +5 -5
snow-mountain.py CHANGED
@@ -140,11 +140,11 @@ class Test(datasets.GeneratorBasedBuilder):
140
  audio = row['path'].split('/')[-1]
141
  zip_url = '/'.join(row["path"].split('/')[:-1])+'.zip'
142
  archive_path = dl_manager.download(zip_url)
143
- zip_f = zipfile.ZipFile(archive_path)
144
- f = zip_f.open(audio)
145
- content = f.read()
146
- # for path, file in dl_manager.iter_archive(archive_path):
147
- # content = path.read()
148
  # # if file in str(row["path"]):
149
  # # content = file.read()
150
  # # break
 
140
  audio = row['path'].split('/')[-1]
141
  zip_url = '/'.join(row["path"].split('/')[:-1])+'.zip'
142
  archive_path = dl_manager.download(zip_url)
143
+ # zip_f = zipfile.ZipFile(archive_path)
144
+ # f = zip_f.open(audio)
145
+ # content = f.read()
146
+ for path, file in dl_manager.iter_archive(archive_path):
147
+ content = file.read()
148
  # # if file in str(row["path"]):
149
  # # content = file.read()
150
  # # break