@ -245,6 +245,8 @@ class SpecAugmentor(AugmentorBase):
Returns:
x (np.ndarray): `[T, F]`
"""
assert isinstance(x, np.ndarray)
assert x.ndim == 2
x = self.time_warp(x, self.mode)
x = self.mask_freq(x, self.replace_with_zero)
x = self.mask_time(x, self.replace_with_zero)
@ -19,16 +19,17 @@
{
"type": "specaug",
"params": {
"F": 10,
"T": 50,
"W": 5,
"warp_mode": "PIL",
"F": 30,
"n_freq_masks": 2,
"T": 40,
"n_time_masks": 2,
"p": 1.0,
"W": 80,
"adaptive_number_ratio": 0,
"adaptive_size_ratio": 0,
"max_n_time_masks": 20,
"replace_with_zero": true
"replace_with_zero": false
},
"prob": 1.0
}
@ -28,7 +28,8 @@
"replace_with_zero": true,
"warp_mode": "PIL"
@ -52,17 +52,18 @@
"prob": 0.0
]
@ -11,7 +11,8 @@
@ -6,7 +6,7 @@
"max_speed_rate": 1.1,
"num_rates": 3
"type": "shift",
@ -19,16 +19,18 @@