Unverified Commit 7a3e15bc authored by Krishna Kalyan's avatar Krishna Kalyan Committed by GitHub
Browse files

Replace wakl_files with glob in VCTK (#1101)


Co-authored-by: default avatarkrishnakalyan3 <skalyan@cloudera.com>
parent 6b810240
...@@ -9,7 +9,6 @@ from torch.utils.data import Dataset ...@@ -9,7 +9,6 @@ from torch.utils.data import Dataset
from torchaudio.datasets.utils import ( from torchaudio.datasets.utils import (
download_url, download_url,
extract_archive, extract_archive,
walk_files
) )
URL = "https://datashare.is.ed.ac.uk/bitstream/handle/10283/3443/VCTK-Corpus-0.92.zip" URL = "https://datashare.is.ed.ac.uk/bitstream/handle/10283/3443/VCTK-Corpus-0.92.zip"
...@@ -123,9 +122,7 @@ class VCTK(Dataset): ...@@ -123,9 +122,7 @@ class VCTK(Dataset):
"with `download=True` to donwload the latest version." "with `download=True` to donwload the latest version."
) )
walker = walk_files( walker = sorted(str(p.stem) for p in Path(self._path).glob('**/*' + self._ext_audio))
self._path, suffix=self._ext_audio, prefix=False, remove_suffix=True
)
walker = filter(lambda w: self._except_folder not in w, walker) walker = filter(lambda w: self._except_folder not in w, walker)
self._walker = list(walker) self._walker = list(walker)
......
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