diff --git a/scripts/demo.py b/scripts/demo.py index 6272d9d1..493657ac 100644 --- a/scripts/demo.py +++ b/scripts/demo.py @@ -24,6 +24,7 @@ BandStopFilter, TimeInversion, Padding, + VTLP, ) from torch_audiomentations.augmentations.shuffle_channels import ShuffleChannels from torch_audiomentations.core.transforms_interface import ModeNotSupportedException @@ -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}, ] diff --git a/torch_audiomentations/augmentations/vtlp.py b/torch_audiomentations/augmentations/vtlp.py index 3c83be98..7470aef7 100644 --- a/torch_audiomentations/augmentations/vtlp.py +++ b/torch_audiomentations/augmentations/vtlp.py @@ -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