From 4aaa8effe8339501546661c60bfeccdfe1a2bc9d Mon Sep 17 00:00:00 2001 From: KP <109694228@qq.com> Date: Tue, 14 Jun 2022 17:32:55 +0800 Subject: [PATCH] Refactor paddleaudio to paddlespeech.audio --- paddlespeech/audio/datasets/esc50.py | 2 +- paddlespeech/audio/datasets/gtzan.py | 2 +- paddlespeech/audio/datasets/tess.py | 2 +- paddlespeech/audio/datasets/urban_sound.py | 2 +- paddlespeech/cli/cls/infer.py | 2 -- paddlespeech/cli/vector/infer.py | 2 -- paddlespeech/cls/models/panns/panns.py | 2 +- 7 files changed, 5 insertions(+), 9 deletions(-) diff --git a/paddlespeech/audio/datasets/esc50.py b/paddlespeech/audio/datasets/esc50.py index e7477d40..f5c7050f 100644 --- a/paddlespeech/audio/datasets/esc50.py +++ b/paddlespeech/audio/datasets/esc50.py @@ -16,8 +16,8 @@ import os from typing import List from typing import Tuple +from ..utils import DATA_HOME from ..utils.download import download_and_decompress -from ..utils.env import DATA_HOME from .dataset import AudioClassificationDataset __all__ = ['ESC50'] diff --git a/paddlespeech/audio/datasets/gtzan.py b/paddlespeech/audio/datasets/gtzan.py index cfea6f37..1f6835a5 100644 --- a/paddlespeech/audio/datasets/gtzan.py +++ b/paddlespeech/audio/datasets/gtzan.py @@ -17,8 +17,8 @@ import random from typing import List from typing import Tuple +from ..utils import DATA_HOME from ..utils.download import download_and_decompress -from ..utils.env import DATA_HOME from .dataset import AudioClassificationDataset __all__ = ['GTZAN'] diff --git a/paddlespeech/audio/datasets/tess.py b/paddlespeech/audio/datasets/tess.py index 8faab9c3..1469fa5e 100644 --- a/paddlespeech/audio/datasets/tess.py +++ b/paddlespeech/audio/datasets/tess.py @@ -17,8 +17,8 @@ import random from typing import List from typing import Tuple +from ..utils import DATA_HOME from ..utils.download import download_and_decompress -from ..utils.env import DATA_HOME from .dataset import AudioClassificationDataset __all__ = ['TESS'] diff --git a/paddlespeech/audio/datasets/urban_sound.py b/paddlespeech/audio/datasets/urban_sound.py index d97c4d1d..0389cd5f 100644 --- a/paddlespeech/audio/datasets/urban_sound.py +++ b/paddlespeech/audio/datasets/urban_sound.py @@ -16,8 +16,8 @@ import os from typing import List from typing import Tuple +from ..utils import DATA_HOME from ..utils.download import download_and_decompress -from ..utils.env import DATA_HOME from .dataset import AudioClassificationDataset __all__ = ['UrbanSound8K'] diff --git a/paddlespeech/cli/cls/infer.py b/paddlespeech/cli/cls/infer.py index f4e8baea..942dc3b9 100644 --- a/paddlespeech/cli/cls/infer.py +++ b/paddlespeech/cli/cls/infer.py @@ -21,8 +21,6 @@ from typing import Union import numpy as np import paddle import yaml -from paddleaudio import load -from paddleaudio.features import LogMelSpectrogram from ..executor import BaseExecutor from ..log import logger diff --git a/paddlespeech/cli/vector/infer.py b/paddlespeech/cli/vector/infer.py index c736a53e..4bc8e135 100644 --- a/paddlespeech/cli/vector/infer.py +++ b/paddlespeech/cli/vector/infer.py @@ -22,8 +22,6 @@ from typing import Union import paddle import soundfile -from paddleaudio.backends import load as load_audio -from paddleaudio.compliance.librosa import melspectrogram from yacs.config import CfgNode from ..executor import BaseExecutor diff --git a/paddlespeech/cls/models/panns/panns.py b/paddlespeech/cls/models/panns/panns.py index f2a1b9ae..4befe7aa 100644 --- a/paddlespeech/cls/models/panns/panns.py +++ b/paddlespeech/cls/models/panns/panns.py @@ -16,8 +16,8 @@ import os import paddle.nn as nn import paddle.nn.functional as F +from paddlespeech.audio.utils import MODEL_HOME from paddlespeech.audio.utils.download import load_state_dict_from_url -from paddlespeech.audio.utils.env import MODEL_HOME __all__ = ['CNN14', 'CNN10', 'CNN6', 'cnn14', 'cnn10', 'cnn6'] -- GitLab