Skip to content

Commit 0847882

Browse files
authored
Update PitchShift() detection to 40Hz
1 parent d8ac027 commit 0847882

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_augmentations.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,10 @@ def test_pitch_shift_transform_with_pitch_detection():
196196
f0_hz = f0_hz[~np.isnan(f0_hz)]
197197

198198
detected_f0_hz = np.max(f0_hz)
199-
200-
# the detected frequency vs. expected frequency should not be smaller than 20Hz.
201-
assert abs(detected_f0_hz - expected_frequency_shift) < 20
199+
200+
detection_threshold_in_hz = 40
201+
# the detected frequency vs. expected frequency should not be smaller than 40Hz.
202+
assert abs(detected_f0_hz - expected_frequency_shift) < detection_threshold_in_hz
202203

203204

204205
@pytest.mark.parametrize("num_channels", [1, 2])

0 commit comments

Comments
 (0)