def test_calculate_threshold_and_psd_maximum(self, art_warning, audio_sample):
        try:
            test_input = audio_sample

            masker = PsychoacousticMasker()
            threshold, psd_max = masker.calculate_threshold_and_psd_maximum(test_input)

            assert threshold.shape == (masker.window_size // 2 + 1, 28)
            assert np.floor(psd_max) == 78.0
        except ARTTestException as e:
            art_warning(e)
Пример #2
0
    def test_calculate_threshold_and_psd_maximum(self, art_warning,
                                                 audio_sample):
        try:
            test_input = audio_sample

            masker = PsychoacousticMasker()
            threshold, psd_max = masker.calculate_threshold_and_psd_maximum(
                test_input)

            assert threshold.shape[1] == psd_max.shape[0]
            assert threshold.shape[0] == masker.window_size // 2 + 1
        except ARTTestException as e:
            art_warning(e)