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

New noise_norm perturbation based on Riva work #6445

Merged
merged 19 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d34eea2
Initial commit for new noise_norm perturbation
trias702 Apr 18, 2023
68dccf0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 18, 2023
158dc5a
Minor fix to random seed in perturb
trias702 Apr 19, 2023
ff7e79f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 19, 2023
1179c38
Merge branch 'main' into noise_norm_perturbation
trias702 Apr 19, 2023
36457a0
Merge branch 'main' of https://github.com/NVIDIA/NeMo into noise_norm…
trias702 Apr 21, 2023
2cbe186
Merge branch 'noise_norm_perturbation' of https://github.com/trias702…
trias702 Apr 21, 2023
4da47ea
Updated code to reflect feedback
trias702 Apr 21, 2023
1629be1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 21, 2023
5f1fde6
Merge branch 'main' into noise_norm_perturbation
trias702 Apr 22, 2023
39eee08
Updates for feedback given by code reviewers
trias702 Apr 25, 2023
8350383
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 25, 2023
e25b7cc
Merge branch 'main' into noise_norm_perturbation
trias702 Apr 25, 2023
4c543b0
Updates in response to PR feedback
trias702 Apr 29, 2023
35a31fe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 29, 2023
cde97b7
Merge branch 'main' into noise_norm_perturbation
trias702 Apr 29, 2023
da083e6
Added comment about ref_mic being None
trias702 Apr 29, 2023
c716d32
Merge branch 'main' into noise_norm_perturbation
trias702 May 2, 2023
899573f
Updated perturb to use inspect module
trias702 May 2, 2023
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
10 changes: 7 additions & 3 deletions nemo/collections/asr/data/audio_to_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ def expand_sharded_filepaths(sharded_filepaths, shard_strategy: str, world_size:
sharded_filepaths = sharded_filepaths.replace(bkey, "}")

if isinstance(sharded_filepaths, str):
# Brace expand
sharded_filepaths = list(braceexpand.braceexpand(sharded_filepaths))
# Brace expand, set escape=False for Windows compatibility
sharded_filepaths = list(braceexpand.braceexpand(sharded_filepaths, escape=False))

# Expand store paths into WebDataset URLs
sharded_filepaths = [
Expand Down Expand Up @@ -1359,5 +1359,9 @@ def __iter__(self):
for dataset_idx in shuffled_order:
d = self.datasets[dataset_idx]
assert isinstance(d, IterableDataset), "ChainDataset only supports IterableDataset"
for x in d:
for idx, x in enumerate(d):
yield x
# in case d is an infinite dataset, we want to break the loop
# so that the other datasets get a chance to yield too
if idx >= len(d) - 1:
break
4 changes: 2 additions & 2 deletions nemo/collections/asr/data/audio_to_text_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def get_audio_to_text_char_dataset_from_config(
constructed dataset or None if dataset config is invalid or nothing to load
"""
if 'augmentor' in config:
augmentor = process_augmentations(config['augmentor'])
augmentor = process_augmentations(config['augmentor'], global_rank=global_rank, world_size=world_size)
else:
augmentor = None

Expand Down Expand Up @@ -609,7 +609,7 @@ def get_audio_to_text_bpe_dataset_from_config(
constructed dataset or None if dataset config is invalid or nothing to load
"""
if 'augmentor' in config:
augmentor = process_augmentations(config['augmentor'])
augmentor = process_augmentations(config['augmentor'], global_rank=global_rank, world_size=world_size)
else:
augmentor = None

Expand Down
1 change: 1 addition & 0 deletions nemo/collections/asr/parts/preprocessing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
GainPerturbation,
ImpulsePerturbation,
NoisePerturbation,
NoisePerturbationWithNormalization,
Perturbation,
RirAndNoisePerturbation,
ShiftPerturbation,
Expand Down
Loading
Loading