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

Check that read_manifests_if_cached returns a non-empty dict. #555

Merged
merged 1 commit into from
Aug 28, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ def compute_fbank_aidatatang_200zh(num_mel_bins: int = 80):
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

extractor = Fbank(FbankConfig(num_mel_bins=num_mel_bins))

with get_executor() as ex: # Initialize the executor only once.
Expand Down
7 changes: 7 additions & 0 deletions egs/aishell/ASR/local/compute_fbank_aidatatang_200zh.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ def compute_fbank_aidatatang_200zh(num_mel_bins: int = 80):
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

extractor = Fbank(FbankConfig(num_mel_bins=num_mel_bins))

with get_executor() as ex: # Initialize the executor only once.
Expand Down
7 changes: 7 additions & 0 deletions egs/aishell/ASR/local/compute_fbank_aishell.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ def compute_fbank_aishell(num_mel_bins: int = 80):
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

extractor = Fbank(FbankConfig(num_mel_bins=num_mel_bins))

with get_executor() as ex: # Initialize the executor only once.
Expand Down
7 changes: 7 additions & 0 deletions egs/aishell2/ASR/local/compute_fbank_aishell2.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ def compute_fbank_aishell2(num_mel_bins: int = 80):
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

extractor = Fbank(FbankConfig(num_mel_bins=num_mel_bins))

with get_executor() as ex: # Initialize the executor only once.
Expand Down
7 changes: 7 additions & 0 deletions egs/aishell4/ASR/local/compute_fbank_aishell4.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ def compute_fbank_aishell4(num_mel_bins: int = 80):
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

extractor = Fbank(FbankConfig(num_mel_bins=num_mel_bins))

with get_executor() as ex: # Initialize the executor only once.
Expand Down
7 changes: 7 additions & 0 deletions egs/alimeeting/ASR/local/compute_fbank_alimeeting.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ def compute_fbank_alimeeting(num_mel_bins: int = 80):
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

extractor = Fbank(FbankConfig(num_mel_bins=num_mel_bins))

with get_executor() as ex: # Initialize the executor only once.
Expand Down
7 changes: 7 additions & 0 deletions egs/gigaspeech/ASR/local/preprocess_gigaspeech.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ def preprocess_giga_speech():
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

for partition, m in manifests.items():
logging.info(f"Processing {partition}")
raw_cuts_path = output_dir / f"cuts_{partition}_raw.jsonl.gz"
Expand Down
7 changes: 7 additions & 0 deletions egs/librispeech/ASR/local/compute_fbank_librispeech.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ def compute_fbank_librispeech():
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

extractor = Fbank(FbankConfig(num_mel_bins=num_mel_bins))

with get_executor() as ex: # Initialize the executor only once.
Expand Down
2 changes: 2 additions & 0 deletions egs/librispeech/ASR/local/compute_fbank_musan.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def compute_fbank_musan():
assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

musan_cuts_path = output_dir / "musan_cuts.jsonl.gz"
Expand Down
7 changes: 7 additions & 0 deletions egs/librispeech/ASR/local/preprocess_gigaspeech.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ def preprocess_giga_speech():
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

for partition, m in manifests.items():
logging.info(f"Processing {partition}")
raw_cuts_path = output_dir / f"{prefix}_cuts_{partition}_raw.{suffix}"
Expand Down
7 changes: 7 additions & 0 deletions egs/spgispeech/ASR/local/compute_fbank_musan.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ def compute_fbank_musan():
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

musan_cuts_path = src_dir / "cuts_musan.jsonl.gz"

if musan_cuts_path.is_file():
Expand Down
7 changes: 7 additions & 0 deletions egs/tal_csasr/ASR/local/compute_fbank_tal_csasr.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ def compute_fbank_tal_csasr(num_mel_bins: int = 80):
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

extractor = Fbank(FbankConfig(num_mel_bins=num_mel_bins))

with get_executor() as ex: # Initialize the executor only once.
Expand Down
7 changes: 7 additions & 0 deletions egs/tedlium3/ASR/local/compute_fbank_tedlium.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ def compute_fbank_tedlium():
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

extractor = Fbank(FbankConfig(num_mel_bins=num_mel_bins))

with get_executor() as ex: # Initialize the executor only once.
Expand Down
7 changes: 7 additions & 0 deletions egs/timit/ASR/local/compute_fbank_timit.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ def compute_fbank_timit():
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

extractor = Fbank(FbankConfig(num_mel_bins=num_mel_bins))

with get_executor() as ex: # Initialize the executor only once.
Expand Down
7 changes: 7 additions & 0 deletions egs/wenetspeech/ASR/local/preprocess_wenetspeech.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ def preprocess_wenet_speech():
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

for partition, m in manifests.items():
logging.info(f"Processing {partition}")
raw_cuts_path = output_dir / f"cuts_{partition}_raw.jsonl.gz"
Expand Down
7 changes: 7 additions & 0 deletions egs/yesno/ASR/local/compute_fbank_yesno.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ def compute_fbank_yesno():
)
assert manifests is not None

assert len(manifests) == len(dataset_parts), (
len(manifests),
len(dataset_parts),
list(manifests.keys()),
dataset_parts,
)

extractor = Fbank(
FbankConfig(sampling_rate=8000, num_mel_bins=num_mel_bins)
)
Expand Down