Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
19fc580d
Unverified
Commit
19fc580d
authored
Dec 11, 2020
by
moto
Committed by
GitHub
Dec 11, 2020
Browse files
Cherry-pick 'Disallow download=True in CommonVoice (#1076)' (#1080)
parent
366cef83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
torchaudio/datasets/commonvoice.py
torchaudio/datasets/commonvoice.py
+9
-0
No files found.
torchaudio/datasets/commonvoice.py
View file @
19fc580d
...
@@ -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
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment