Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing downloading Edin. ver. of VCTK #1247

Merged
merged 4 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lhotse/bin/modes/recipes/vctk.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

@download.command()
@click.argument("target_dir", type=click.Path())
def vctk(target_dir: Pathlike):
@click.option("--use-edinburgh-vctk-url", default=False)
def vctk(target_dir: Pathlike, use_edinburgh_vctk_url: bool):
"""VCTK download."""
download_vctk(target_dir)
download_vctk(target_dir, use_edinburgh_vctk_url=use_edinburgh_vctk_url)

Check warning on line 26 in lhotse/bin/modes/recipes/vctk.py

View check run for this annotation

Codecov / codecov/patch

lhotse/bin/modes/recipes/vctk.py#L26

Added line #L26 was not covered by tests
4 changes: 4 additions & 0 deletions lhotse/recipes/vctk.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
def download_vctk(
target_dir: Pathlike = ".",
force_download: Optional[bool] = False,
use_edinburgh_vctk_url: Optional[bool] = False,
url: Optional[str] = CREST_VCTK_URL,
) -> Path:
"""
Expand All @@ -117,6 +118,9 @@ def download_vctk(
target_dir = Path(target_dir)
target_dir.mkdir(parents=True, exist_ok=True)

if use_edinburgh_vctk_url:
url = EDINBURGH_VCTK_URL

archive_name = url.split("/")[-1]
archive_path = target_dir / archive_name
part_dir = target_dir / archive_name.replace(".zip", "").replace(".tar.gz", "")
Expand Down
Loading