diff --git a/python/paddle/audio/functional/window.py b/python/paddle/audio/functional/window.py index 315d5a50a323f..472c56b87acf9 100644 --- a/python/paddle/audio/functional/window.py +++ b/python/paddle/audio/functional/window.py @@ -231,16 +231,6 @@ def _tukey( return _truncate(w, needs_trunc) -@window_function_register.register() -def _kaiser( - M: int, beta: float, sym: bool = True, dtype: str = 'float64' -) -> Tensor: - """Compute a Kaiser window. - The Kaiser window is a taper formed by using a Bessel function. - """ - raise NotImplementedError() - - @window_function_register.register() def _gaussian( M: int, std: float, sym: bool = True, dtype: str = 'float64' @@ -346,7 +336,7 @@ def get_window( """Return a window of a given length and type. Args: - window (Union[str, Tuple[str, float]]): The window function applied to the signal before the Fourier transform. Supported window functions: 'hamming', 'hann', 'kaiser', 'gaussian', 'general_gaussian', 'exponential', 'triang', 'bohman', 'blackman', 'cosine', 'tukey', 'taylor'. + window (Union[str, Tuple[str, float]]): The window function applied to the signal before the Fourier transform. Supported window functions: 'hamming', 'hann', 'gaussian', 'general_gaussian', 'exponential', 'triang', 'bohman', 'blackman', 'cosine', 'tukey', 'taylor'. win_length (int): Number of samples. fftbins (bool, optional): If True, create a "periodic" window. Otherwise, create a "symmetric" window, for use in filter design. Defaults to True. dtype (str, optional): The data type of the return window. Defaults to 'float64'. @@ -363,7 +353,7 @@ def get_window( cosine_window = paddle.audio.functional.get_window('cosine', n_fft) std = 7 - gussian_window = paddle.audio.functional.get_window(('gaussian',std), n_fft) + gaussian_window = paddle.audio.functional.get_window(('gaussian',std), n_fft) """ sym = not fftbins diff --git a/python/paddle/audio/utils/__init__.py b/python/paddle/audio/utils/__init__.py deleted file mode 100644 index 55a55c3ed0a84..0000000000000 --- a/python/paddle/audio/utils/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License" -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/python/paddle/audio/utils/error.py b/python/paddle/audio/utils/error.py deleted file mode 100644 index 244340b99b5ec..0000000000000 --- a/python/paddle/audio/utils/error.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -__all__ = ['ParameterError'] - - -class ParameterError(Exception): - """Exception class for Parameter checking""" - - pass diff --git a/python/paddle/tests/test_audio_functions.py b/python/paddle/tests/test_audio_functions.py index 5542b4483b62c..80a99343d8020 100644 --- a/python/paddle/tests/test_audio_functions.py +++ b/python/paddle/tests/test_audio_functions.py @@ -178,13 +178,6 @@ def test_gaussian_window_and_exception(self, n_fft: int): np.testing.assert_array_almost_equal( window_scipy_exp, window_paddle_exp.numpy(), decimal=5 ) - try: - window_paddle = paddle.audio.functional.get_window( - ("kaiser", 1.0), self.n_fft - ) - except NotImplementedError: - pass - try: window_paddle = paddle.audio.functional.get_window("hann", -1) except ValueError: