Commit cedeaf34 authored by PG_LoLo's avatar PG_LoLo
Browse files

VCTK dataset download fix

parent c844ac63
...@@ -181,9 +181,7 @@ class VCTK(data.Dataset): ...@@ -181,9 +181,7 @@ class VCTK(data.Dataset):
filename = url.rpartition('/')[2] filename = url.rpartition('/')[2]
file_path = os.path.join(self.root, self.raw_folder, filename) file_path = os.path.join(self.root, self.raw_folder, filename)
if not os.path.isfile(file_path): if not os.path.isfile(file_path):
data = urllib.request.urlopen(url) urllib.request.urlretrieve(url, file_path)
with open(file_path, 'wb') as f:
f.write(data.read())
if not os.path.exists(dset_abs_path): if not os.path.exists(dset_abs_path):
with tarfile.open(file_path) as zip_f: with tarfile.open(file_path) as zip_f:
zip_f.extractall(raw_abs_dir) zip_f.extractall(raw_abs_dir)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment