diff --git a/torchaudio/datasets/commonvoice.py b/torchaudio/datasets/commonvoice.py index 825cf3e9ab..5b92d9bf21 100644 --- a/torchaudio/datasets/commonvoice.py +++ b/torchaudio/datasets/commonvoice.py @@ -179,6 +179,15 @@ def __init__(self, "romansh sursilvan": "rm-sursilv" } + if download: + raise RuntimeError( + "Common Voice dataset requires user agreement on the usage term, " + "and torchaudio no longer provides the download feature. " + "Please download the dataset manually and extract it in the root directory, " + "then provide the target language to `url` argument.") + if url not in languages: + raise ValueError(f"`url` must be one of available languages: {languages.keys()}") + if url in languages: ext_archive = ".tar.gz" language = languages[url]