Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[audio] Audio refactoring #2032

Merged
merged 3 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pull_request_rules:
add: ["T2S"]
- name: "auto add label=Audio"
conditions:
- files~=^paddleaudio/
- files~=^paddlespeech/audio/
actions:
label:
add: ["Audio"]
Expand Down Expand Up @@ -100,7 +100,7 @@ pull_request_rules:
add: ["README"]
- name: "auto add label=Documentation"
conditions:
- files~=^(docs/|CHANGELOG.md|paddleaudio/CHANGELOG.md)
- files~=^(docs/|CHANGELOG.md)
actions:
label:
add: ["Documentation"]
Expand Down
2 changes: 0 additions & 2 deletions audio/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions audio/CHANGELOG.md

This file was deleted.

7 changes: 0 additions & 7 deletions audio/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions audio/docs/Makefile

This file was deleted.

24 changes: 0 additions & 24 deletions audio/docs/README.md

This file was deleted.

Binary file removed audio/docs/images/paddle.png
Binary file not shown.
35 changes: 0 additions & 35 deletions audio/docs/make.bat

This file was deleted.

60 changes: 0 additions & 60 deletions audio/paddleaudio/utils/env.py

This file was deleted.

99 changes: 0 additions & 99 deletions audio/setup.py

This file was deleted.

Empty file removed audio/tests/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion demos/audio_searching/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Then to start the system server, and it provides HTTP backend services.
Then start the server with Fastapi.

```bash
export PYTHONPATH=$PYTHONPATH:./src:../../paddleaudio
export PYTHONPATH=$PYTHONPATH:./src
python src/audio_search.py
```

Expand Down
2 changes: 1 addition & 1 deletion demos/audio_searching/README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ ffce340b3790 minio/minio:RELEASE.2020-12-03T00-03-10Z "/usr/bin/docker-ent…"
启动用 Fastapi 构建的服务

```bash
export PYTHONPATH=$PYTHONPATH:./src:../../paddleaudio
export PYTHONPATH=$PYTHONPATH:./src
python src/audio_search.py
```

Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions docs/source/cls/custom_dataset.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Customize Dataset for Audio Classification

Following this tutorial you can customize your dataset for audio classification task by using `paddlespeech` and `paddleaudio`.
Following this tutorial you can customize your dataset for audio classification task by using `paddlespeech`.

A base class of classification dataset is `paddleaudio.dataset.AudioClassificationDataset`. To customize your dataset you should write a dataset class derived from `AudioClassificationDataset`.
A base class of classification dataset is `paddlespeech.audio.dataset.AudioClassificationDataset`. To customize your dataset you should write a dataset class derived from `AudioClassificationDataset`.

Assuming you have some wave files that stored in your own directory. You should prepare a meta file with the information of filepaths and labels. For example the absolute path of it is `/PATH/TO/META_FILE.txt`:
```
Expand All @@ -14,7 +14,7 @@ Assuming you have some wave files that stored in your own directory. You should
Here is an example to build your custom dataset in `custom_dataset.py`:

```python
from paddleaudio.datasets.dataset import AudioClassificationDataset
from paddlespeech.audio.datasets.dataset import AudioClassificationDataset

class CustomDataset(AudioClassificationDataset):
meta_file = '/PATH/TO/META_FILE.txt'
Expand Down Expand Up @@ -48,7 +48,7 @@ class CustomDataset(AudioClassificationDataset):
Then you can build dataset and data loader from `CustomDataset`:
```python
import paddle
from paddleaudio.features import LogMelSpectrogram
from paddlespeech.audio.features import LogMelSpectrogram

from custom_dataset import CustomDataset

Expand Down
2 changes: 1 addition & 1 deletion examples/esc50/cls0/conf/panns.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data:
dataset: 'paddleaudio.datasets:ESC50'
dataset: 'paddlespeech.audio.datasets:ESC50'
num_classes: 50
train:
mode: 'train'
Expand Down
2 changes: 1 addition & 1 deletion examples/hey_snips/kws0/conf/mdtc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
###########################################
# Data #
###########################################
dataset: 'paddleaudio.datasets:HeySnips'
dataset: 'paddlespeech.audio.datasets:HeySnips'
data_dir: '/PATH/TO/DATA/hey_snips_research_6k_en_train_eval_clean_ter'

############################################
Expand Down
2 changes: 1 addition & 1 deletion examples/voxceleb/sv0/local/data_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
import argparse

import paddle
from paddleaudio.datasets.voxceleb import VoxCeleb
from yacs.config import CfgNode

from paddlespeech.audio.datasets.voxceleb import VoxCeleb
from paddlespeech.s2t.utils.log import Log
from paddlespeech.vector.io.augment import build_augment_pipeline
from paddlespeech.vector.training.seeding import seed_everything
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
from typing import List

import tqdm
from paddleaudio import load as load_audio
from yacs.config import CfgNode

from paddlespeech.audio import load as load_audio
from paddlespeech.s2t.utils.log import Log
from paddlespeech.vector.utils.vector_utils import get_chunks

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import random

import tqdm
from paddleaudio import load as load_audio
from yacs.config import CfgNode

from paddlespeech.audio import load as load_audio
from paddlespeech.s2t.utils.log import Log
from paddlespeech.vector.utils.vector_utils import get_chunks

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
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']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
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']
Expand Down
Loading