rm comment &&

pull/3900/head
drryanhuang 9 months ago
parent 189acc6297
commit 1bfc9bc2b2

@ -144,42 +144,9 @@ def test_pipeline():
(spk @ ir).mix(nz, snr=tgt_snr) (spk @ ir).mix(nz, snr=tgt_snr)
# def test_codec():
# audio_path = "./audio/spk/f10_script4_produced.wav"
# spk = AudioSignal(audio_path, offset=10, duration=10)
# with pytest.raises(ValueError):
# spk.apply_codec("unknown preset")
# out = spk.deepcopy().apply_codec("Ogg")
# out = spk.deepcopy().apply_codec("8-bit")
# def test_pitch_shift():
# audio_path = "./audio/spk/f10_script4_produced.wav"
# spk = AudioSignal(audio_path, offset=10, duration=1)
# single = spk.deepcopy().pitch_shift(5)
# batch_size = 4
# spk_batch = AudioSignal.batch([spk.deepcopy() for _ in range(batch_size)])
# batched = spk_batch.deepcopy().pitch_shift(5)
# assert np.allclose(batched[0].audio_data, single[0].audio_data)
# def test_time_stretch():
# audio_path = "./audio/spk/f10_script4_produced.wav"
# spk = AudioSignal(audio_path, offset=10, duration=1)
# single = spk.deepcopy().time_stretch(0.8)
# batch_size = 4
# spk_batch = AudioSignal.batch([spk.deepcopy() for _ in range(batch_size)])
# batched = spk_batch.deepcopy().time_stretch(0.8)
# assert np.allclose(batched[0].audio_data, single[0].audio_data)
@pytest.mark.parametrize("n_bands", [1, 2, 4, 8, 12, 16]) @pytest.mark.parametrize("n_bands", [1, 2, 4, 8, 12, 16])

@ -63,16 +63,7 @@ class TestFFTConv1d(_BaseTest):
w = paddle.randn([10, 5, 19]) w = paddle.randn([10, 5, 19])
self.assertEqual(list(fft_conv1d(x, w).shape), [1, 10, 1]) self.assertEqual(list(fft_conv1d(x, w).shape), [1, 10, 1])
# def test_block_ratio(self):
# x = paddle.randn([1, 5, 1024])
# w = paddle.randn([10, 5, 19])
# ref = fft_conv1d(x, w)
# for block_ratio in [1, 5, 10, 20]:
# y = fft_conv1d(x, w, block_ratio=block_ratio)
# self.assertSimilar(y, ref, msg=str(block_ratio))
# with self.assertRaises(RuntimeError):
# y = fft_conv1d(x, w, block_ratio=0.9)
def test_module(self): def test_module(self):
x = paddle.randn([16, 4, 1024]) x = paddle.randn([16, 4, 1024])
Loading…
Cancel
Save