def test_power_spectral_density(self, art_warning, audio_sample): try: test_input = audio_sample masker = PsychoacousticMasker() psd_matrix, psd_max = masker.power_spectral_density(test_input) assert psd_matrix.shape[0] == masker.window_size // 2 + 1 assert psd_matrix.shape[1] == psd_max.shape[0] except ARTTestException as e: art_warning(e)
def test_power_spectral_density(self, art_warning, audio_sample): try: test_input = audio_sample masker = PsychoacousticMasker() psd_matrix, psd_max = masker.power_spectral_density(test_input) assert psd_matrix.shape == (masker.window_size // 2 + 1, 28) assert np.floor(psd_max) == 78.0 except ARTTestException as e: art_warning(e)