Skip to content

Commit

Permalink
Adds preliminary sbcsae.py recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
m-wiesner committed Jan 26, 2024
1 parent 9f4bfa1 commit bd6bc0a
Show file tree
Hide file tree
Showing 4 changed files with 943 additions and 0 deletions.
1 change: 1 addition & 0 deletions lhotse/bin/modes/recipes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
from .peoples_speech import *
from .primewords import *
from .rir_noise import *
from .sbcsae import *
from .speechcommands import *
from .spgispeech import *
from .stcmds import *
Expand Down
37 changes: 37 additions & 0 deletions lhotse/bin/modes/recipes/sbcsae.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
from typing import Optional, Sequence

import click

from lhotse.bin.modes import download, prepare
from lhotse.recipes.sbcsae import download_sbcsae, prepare_sbcsae
from lhotse.utils import Pathlike

__all__ = ["sbcsae"]


@prepare.command(context_settings=dict(show_default=True))
@click.argument("corpus_dir", type=click.Path(exists=True, dir_okay=True))
@click.argument("output_dir", type=click.Path())
def sbcsae(
corpus_dir: Pathlike,
output_dir: Pathlike,
):
"""SBCSAE data preparation."""
prepare_sbcsae(corpus_dir, output_dir=output_dir)

Check warning on line 20 in lhotse/bin/modes/recipes/sbcsae.py

View check run for this annotation

Codecov / codecov/patch

lhotse/bin/modes/recipes/sbcsae.py#L20

Added line #L20 was not covered by tests


@download.command(context_settings=dict(show_default=True))
@click.argument("target_dir", type=click.Path())
@click.option(
"--download-mp3",
type=bool,
is_flag=True,
default=False,
help="Download the mp3 copy of the audio as well as wav.",
)
def sbcsae(
target_dir: Pathlike,
download_mp3: Optional[bool] = False,
):
"""SBCSAE download."""
download_sbcsae(target_dir, download_mp3=download_mp3)

Check warning on line 37 in lhotse/bin/modes/recipes/sbcsae.py

View check run for this annotation

Codecov / codecov/patch

lhotse/bin/modes/recipes/sbcsae.py#L37

Added line #L37 was not covered by tests
1 change: 1 addition & 0 deletions lhotse/recipes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
from .nsc import prepare_nsc
from .peoples_speech import prepare_peoples_speech
from .rir_noise import download_rir_noise, prepare_rir_noise
from .sbcsae import prepare_sbcsae
from .speechcommands import download_speechcommands, prepare_speechcommands
from .spgispeech import download_spgispeech, prepare_spgispeech
from .stcmds import download_stcmds, prepare_stcmds
Expand Down
Loading

0 comments on commit bd6bc0a

Please sign in to comment.