From 2b364dfd5e9c7b0e1b39a5d3fd4c3a3954078654 Mon Sep 17 00:00:00 2001 From: moto <855818+mthrok@users.noreply.github.com> Date: Tue, 8 Dec 2020 18:47:14 +0000 Subject: [PATCH 1/3] Disallow download=True --- torchaudio/datasets/commonvoice.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/torchaudio/datasets/commonvoice.py b/torchaudio/datasets/commonvoice.py index 825cf3e9ab..e74d7de642 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 dataseet manually and place 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] From eb89942c20249cd5c786565ab12711e9efb25056 Mon Sep 17 00:00:00 2001 From: moto <855818+mthrok@users.noreply.github.com> Date: Tue, 8 Dec 2020 11:30:26 -0800 Subject: [PATCH 2/3] Change instrcution to 'extract' --- torchaudio/datasets/commonvoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchaudio/datasets/commonvoice.py b/torchaudio/datasets/commonvoice.py index e74d7de642..dd0f84a71d 100644 --- a/torchaudio/datasets/commonvoice.py +++ b/torchaudio/datasets/commonvoice.py @@ -183,7 +183,7 @@ def __init__(self, raise RuntimeError( "Common Voice dataset requires user agreement on the usage term, " "and torchaudio no longer provides the download feature. " - "Please download the dataseet manually and place it in the root directory, " + "Please download the dataseet 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()}") From b6eb1b48ac7f0f00093582765a21d1f05b679045 Mon Sep 17 00:00:00 2001 From: moto <855818+mthrok@users.noreply.github.com> Date: Tue, 8 Dec 2020 11:32:15 -0800 Subject: [PATCH 3/3] Fix typo --- torchaudio/datasets/commonvoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchaudio/datasets/commonvoice.py b/torchaudio/datasets/commonvoice.py index dd0f84a71d..5b92d9bf21 100644 --- a/torchaudio/datasets/commonvoice.py +++ b/torchaudio/datasets/commonvoice.py @@ -183,7 +183,7 @@ def __init__(self, raise RuntimeError( "Common Voice dataset requires user agreement on the usage term, " "and torchaudio no longer provides the download feature. " - "Please download the dataseet manually and extract it in the root directory, " + "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()}")