From fef33fb42a44aec4d765082994e4291914d2fdce Mon Sep 17 00:00:00 2001 From: cchenhaifeng <1090056852@qq.com> Date: Tue, 25 Feb 2025 13:39:23 +0800 Subject: [PATCH] fix codestyle --- paddlespeech/__init__.py | 1 - paddlespeech/audiotools/core/util.py | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/paddlespeech/__init__.py b/paddlespeech/__init__.py index 8fdc835b8..6c7e75c1f 100644 --- a/paddlespeech/__init__.py +++ b/paddlespeech/__init__.py @@ -13,4 +13,3 @@ # limitations under the License. import _locale _locale._getdefaultlocale = (lambda *args: ['en_US', 'utf8']) - diff --git a/paddlespeech/audiotools/core/util.py b/paddlespeech/audiotools/core/util.py index 71cd07e2c..676d57704 100644 --- a/paddlespeech/audiotools/core/util.py +++ b/paddlespeech/audiotools/core/util.py @@ -231,6 +231,7 @@ def ensure_tensor( def _get_value(other): # + from .audio_signal import AudioSignal if isinstance(other, AudioSignal): return other.audio_data return other @@ -781,6 +782,8 @@ def collate(list_of_dicts: list, n_splits: int=None): Dictionary containing batched data. """ + from .audio_signal import AudioSignal + batches = [] list_len = len(list_of_dicts) @@ -870,6 +873,7 @@ def generate_chord_dataset( """ import librosa + from .audio_signal import AudioSignal from ..data.preprocess import create_csv min_midi = librosa.note_to_midi(min_note)