Skip to content

Commit

Permalink
Add VLTP to the demo script
Browse files Browse the repository at this point in the history
  • Loading branch information
iver56 committed May 6, 2022
1 parent bb5a083 commit 7153c1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions scripts/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
BandStopFilter,
TimeInversion,
Padding,
VTLP,
)
from torch_audiomentations.augmentations.shuffle_channels import ShuffleChannels
from torch_audiomentations.core.transforms_interface import ModeNotSupportedException
Expand Down Expand Up @@ -163,6 +164,7 @@ def __exit__(self, type, value, traceback):
{"get_instance": lambda: PolarityInversion(mode=mode, p=1.0), "num_runs": 1},
{"get_instance": lambda: Shift(mode=mode, p=1.0), "num_runs": 5},
{"get_instance": lambda: ShuffleChannels(mode=mode, p=1.0), "num_runs": 5},
{"get_instance": lambda: VTLP(mode=mode, p=1.0), "num_runs": 5},
{"get_instance": lambda: TimeInversion(mode=mode, p=1.0), "num_runs": 1},
]

Expand Down
2 changes: 0 additions & 2 deletions torch_audiomentations/augmentations/vtlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ def __init__(
)
if min_warp_factor >= max_warp_factor:
raise ValueError("max_warp_factor must be > min_warp_factor")
if not sample_rate:
raise ValueError("sample_rate is invalid.")

self.min_warp_factor = min_warp_factor
self.max_warp_factor = max_warp_factor
Expand Down

0 comments on commit 7153c1a

Please sign in to comment.