Skip to content

Commit cb6de82

Browse files
authored
[0.7.1] Disallow download=True in CommonVoice (#1076)
1 parent fa6e140 commit cb6de82

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

torchaudio/datasets/commonvoice.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,15 @@ def __init__(self,
179179
"romansh sursilvan": "rm-sursilv"
180180
}
181181

182+
if download:
183+
raise RuntimeError(
184+
"Common Voice dataset requires user agreement on the usage term, "
185+
"and torchaudio no longer provides the download feature. "
186+
"Please download the dataset manually and extract it in the root directory, "
187+
"then provide the target language to `url` argument.")
188+
if url not in languages:
189+
raise ValueError(f"`url` must be one of available languages: {languages.keys()}")
190+
182191
if url in languages:
183192
ext_archive = ".tar.gz"
184193
language = languages[url]

0 commit comments

Comments
 (0)