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

Prepare CSJ #851

Merged
merged 9 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Parse transcript in lhotse
  • Loading branch information
teowenshen committed Oct 16, 2022
commit f8e2326865b2de67f60f91af0a13c312527374c3
32 changes: 27 additions & 5 deletions lhotse/bin/modes/recipes/csj.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,24 @@


@prepare.command(context_settings=dict(show_default=True))
@click.argument("transcript_dir", type=click.Path(exists=True, dir_okay=True))
@click.argument("output_dir", type=click.Path())
@click.argument("corpus_dir", type=click.Path(exists=True, dir_okay=True))
@click.argument("transcript_dir", type=click.Path())
@click.argument("manifest_dir", type=click.Path())
@click.option(
"-c",
"--configs",
type=click.Path(exists=True, file_okay=True),
default=None,
multiple=True,
help=(
"List of .ini config files to use when parsing transcripts. "
"Pass each with `-c`. Example: "
"`-c local/config/disfluent.ini -c local/config/fluent.ini` "
"NOTE: Only the segment specifications in the first config file are "
"used. The remaining config files that come after will inherit "
"the segment boundaries of the first config file. "
),
)
@click.option(
"-p",
"--dataset-parts",
Expand All @@ -32,14 +48,20 @@
help="How many threads to use (can give good speed-ups with slow disks).",
)
def csj(
corpus_dir: Pathlike,
transcript_dir: Pathlike,
output_dir: Pathlike,
manifest_dir: Pathlike,
configs: Union[Pathlike, Sequence[Pathlike]],
dataset_parts: Union[str, Sequence[str]],
num_jobs: int,
):
"Prepare Corpus of Spontaneous Japanese"

prepare_csj(
corpus_dir=corpus_dir,
transcript_dir=transcript_dir,
output_dir=output_dir,
num_jobs=num_jobs,
manifest_dir=manifest_dir,
dataset_parts=dataset_parts,
configs=configs,
nj=num_jobs,
)
Loading