Unverified Commit 19fc580d authored by moto's avatar moto Committed by GitHub
Browse files

Cherry-pick 'Disallow download=True in CommonVoice (#1076)' (#1080)

parent 366cef83
...@@ -180,6 +180,15 @@ class COMMONVOICE(Dataset): ...@@ -180,6 +180,15 @@ class COMMONVOICE(Dataset):
"romansh sursilvan": "rm-sursilv" "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: if url in languages:
ext_archive = ".tar.gz" ext_archive = ".tar.gz"
language = languages[url] language = languages[url]
......
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