From 1bfc9bc2b26d335348f6f3cb7cec423257b091f1 Mon Sep 17 00:00:00 2001 From: drryanhuang Date: Thu, 2 Jan 2025 04:08:26 +0000 Subject: [PATCH] =?UTF-8?q?rm=20comment=20&&=20=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...udio_signal✅.py => test_audio_signal.py} | 0 .../core/{test_bands✅.py => test_bands.py} | 0 .../{test_display✅.py => test_display.py} | 0 .../core/{test_dsp✅.py => test_dsp.py} | 0 .../{test_effects✅.py => test_effects.py} | 33 ------------------- .../{test_fftconv✅.py => test_fftconv.py} | 11 +------ .../core/{test_grad✅.py => test_grad.py} | 0 .../{test_highpass✅.py => test_highpass.py} | 0 .../{test_loudness✅.py => test_loudness.py} | 0 .../{test_lowpass✅.py => test_lowpass.py} | 0 .../core/{test_util✅.py => test_util.py} | 0 .../{test_datasets✅.py => test_datasets.py} | 0 ...st_preprocess✅.py => test_preprocess.py} | 0 ...st_transforms✅.py => test_transforms.py} | 0 ...st_decorators✅.py => test_decorators.py} | 0 .../ml/{test_model✅.py => test_model.py} | 0 .../{test_post✅.py => test_post.py} | 0 17 files changed, 1 insertion(+), 43 deletions(-) rename audio/tests/audiotools/core/{test_audio_signal✅.py => test_audio_signal.py} (100%) rename audio/tests/audiotools/core/{test_bands✅.py => test_bands.py} (100%) rename audio/tests/audiotools/core/{test_display✅.py => test_display.py} (100%) rename audio/tests/audiotools/core/{test_dsp✅.py => test_dsp.py} (100%) rename audio/tests/audiotools/core/{test_effects✅.py => test_effects.py} (90%) rename audio/tests/audiotools/core/{test_fftconv✅.py => test_fftconv.py} (86%) rename audio/tests/audiotools/core/{test_grad✅.py => test_grad.py} (100%) rename audio/tests/audiotools/core/{test_highpass✅.py => test_highpass.py} (100%) rename audio/tests/audiotools/core/{test_loudness✅.py => test_loudness.py} (100%) rename audio/tests/audiotools/core/{test_lowpass✅.py => test_lowpass.py} (100%) rename audio/tests/audiotools/core/{test_util✅.py => test_util.py} (100%) rename audio/tests/audiotools/data/{test_datasets✅.py => test_datasets.py} (100%) rename audio/tests/audiotools/data/{test_preprocess✅.py => test_preprocess.py} (100%) rename audio/tests/audiotools/data/{test_transforms✅.py => test_transforms.py} (100%) rename audio/tests/audiotools/ml/{test_decorators✅.py => test_decorators.py} (100%) rename audio/tests/audiotools/ml/{test_model✅.py => test_model.py} (100%) rename audio/tests/audiotools/{test_post✅.py => test_post.py} (100%) diff --git a/audio/tests/audiotools/core/test_audio_signal✅.py b/audio/tests/audiotools/core/test_audio_signal.py similarity index 100% rename from audio/tests/audiotools/core/test_audio_signal✅.py rename to audio/tests/audiotools/core/test_audio_signal.py diff --git a/audio/tests/audiotools/core/test_bands✅.py b/audio/tests/audiotools/core/test_bands.py similarity index 100% rename from audio/tests/audiotools/core/test_bands✅.py rename to audio/tests/audiotools/core/test_bands.py diff --git a/audio/tests/audiotools/core/test_display✅.py b/audio/tests/audiotools/core/test_display.py similarity index 100% rename from audio/tests/audiotools/core/test_display✅.py rename to audio/tests/audiotools/core/test_display.py diff --git a/audio/tests/audiotools/core/test_dsp✅.py b/audio/tests/audiotools/core/test_dsp.py similarity index 100% rename from audio/tests/audiotools/core/test_dsp✅.py rename to audio/tests/audiotools/core/test_dsp.py diff --git a/audio/tests/audiotools/core/test_effects✅.py b/audio/tests/audiotools/core/test_effects.py similarity index 90% rename from audio/tests/audiotools/core/test_effects✅.py rename to audio/tests/audiotools/core/test_effects.py index 0063d3cea..1ab6298b6 100644 --- a/audio/tests/audiotools/core/test_effects✅.py +++ b/audio/tests/audiotools/core/test_effects.py @@ -144,42 +144,9 @@ def test_pipeline(): (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]) diff --git a/audio/tests/audiotools/core/test_fftconv✅.py b/audio/tests/audiotools/core/test_fftconv.py similarity index 86% rename from audio/tests/audiotools/core/test_fftconv✅.py rename to audio/tests/audiotools/core/test_fftconv.py index 2296673ee..b344519da 100644 --- a/audio/tests/audiotools/core/test_fftconv✅.py +++ b/audio/tests/audiotools/core/test_fftconv.py @@ -63,16 +63,7 @@ class TestFFTConv1d(_BaseTest): w = paddle.randn([10, 5, 19]) 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): x = paddle.randn([16, 4, 1024]) diff --git a/audio/tests/audiotools/core/test_grad✅.py b/audio/tests/audiotools/core/test_grad.py similarity index 100% rename from audio/tests/audiotools/core/test_grad✅.py rename to audio/tests/audiotools/core/test_grad.py diff --git a/audio/tests/audiotools/core/test_highpass✅.py b/audio/tests/audiotools/core/test_highpass.py similarity index 100% rename from audio/tests/audiotools/core/test_highpass✅.py rename to audio/tests/audiotools/core/test_highpass.py diff --git a/audio/tests/audiotools/core/test_loudness✅.py b/audio/tests/audiotools/core/test_loudness.py similarity index 100% rename from audio/tests/audiotools/core/test_loudness✅.py rename to audio/tests/audiotools/core/test_loudness.py diff --git a/audio/tests/audiotools/core/test_lowpass✅.py b/audio/tests/audiotools/core/test_lowpass.py similarity index 100% rename from audio/tests/audiotools/core/test_lowpass✅.py rename to audio/tests/audiotools/core/test_lowpass.py diff --git a/audio/tests/audiotools/core/test_util✅.py b/audio/tests/audiotools/core/test_util.py similarity index 100% rename from audio/tests/audiotools/core/test_util✅.py rename to audio/tests/audiotools/core/test_util.py diff --git a/audio/tests/audiotools/data/test_datasets✅.py b/audio/tests/audiotools/data/test_datasets.py similarity index 100% rename from audio/tests/audiotools/data/test_datasets✅.py rename to audio/tests/audiotools/data/test_datasets.py diff --git a/audio/tests/audiotools/data/test_preprocess✅.py b/audio/tests/audiotools/data/test_preprocess.py similarity index 100% rename from audio/tests/audiotools/data/test_preprocess✅.py rename to audio/tests/audiotools/data/test_preprocess.py diff --git a/audio/tests/audiotools/data/test_transforms✅.py b/audio/tests/audiotools/data/test_transforms.py similarity index 100% rename from audio/tests/audiotools/data/test_transforms✅.py rename to audio/tests/audiotools/data/test_transforms.py diff --git a/audio/tests/audiotools/ml/test_decorators✅.py b/audio/tests/audiotools/ml/test_decorators.py similarity index 100% rename from audio/tests/audiotools/ml/test_decorators✅.py rename to audio/tests/audiotools/ml/test_decorators.py diff --git a/audio/tests/audiotools/ml/test_model✅.py b/audio/tests/audiotools/ml/test_model.py similarity index 100% rename from audio/tests/audiotools/ml/test_model✅.py rename to audio/tests/audiotools/ml/test_model.py diff --git a/audio/tests/audiotools/test_post✅.py b/audio/tests/audiotools/test_post.py similarity index 100% rename from audio/tests/audiotools/test_post✅.py rename to audio/tests/audiotools/test_post.py