Skip to content

Commit cb15e38

Browse files
authored
[Hackathon 7th No.55] Add audiotools to PaddleSpeech (#3900)
* add AudioSignal && util * fix codestyle * add basemodel && decorator * add util && add quality * add acc && data && transforms * add utils * fix dir * add *.py; wo unitest * add unitest * fix codestyle * fix cuda error * add readme && __all__ * add 2 file test * change download dir * fix CI download path * add tar -zxvf * change requirements path * add audiotools path * fix place error * fix paddle2.5 verion Q * FFTConv1d -> FFTConv1D * FFTConv1d -> FFTConv1D * mv unfold * add _unfold1d 2 loudness * fix stupid device variable * bias -> bias_attr * () -> [] * fix .to() * rm ✅ * fix exp * deepcopy -> clone * fix dim error * fix slice && tensor.to * fix paddle2.5 index bug * git rm std * rm comment && ✅ * rm some useless comment * add __all__ * fix codestyle * fix soundfile.info error * fix sth * add License * fix cycle import * Adapt to paddle3.0 && update readme * fix License * fix License * rm duplicate requirements * fix trasform problems * rm disp * Update test_transforms.py * change path * rm notebook && add audio path * rm import * add comment * fix cycle import && rm TYPE_CHECKING * rm IPython * rm sth useless * rm uesless deps * Update requirements.txt
1 parent 553a9db commit cb15e38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+11176
-0
lines changed

audio/audiotools/README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
Audiotools is a comprehensive toolkit designed for audio processing and analysis, providing robust solutions for audio signal processing, data management, model training, and evaluation.
2+
3+
### Directory Structure
4+
5+
```
6+
.
7+
├── audiotools
8+
│ ├── README.md
9+
│ ├── __init__.py
10+
│ ├── core
11+
│ │ ├── __init__.py
12+
│ │ ├── _julius.py
13+
│ │ ├── audio_signal.py
14+
│ │ ├── display.py
15+
│ │ ├── dsp.py
16+
│ │ ├── effects.py
17+
│ │ ├── ffmpeg.py
18+
│ │ ├── loudness.py
19+
│ │ └── util.py
20+
│ ├── data
21+
│ │ ├── __init__.py
22+
│ │ ├── datasets.py
23+
│ │ ├── preprocess.py
24+
│ │ └── transforms.py
25+
│ ├── metrics
26+
│ │ ├── __init__.py
27+
│ │ └── quality.py
28+
│ ├── ml
29+
│ │ ├── __init__.py
30+
│ │ ├── accelerator.py
31+
│ │ ├── basemodel.py
32+
│ │ └── decorators.py
33+
│ ├── requirements.txt
34+
│ └── post.py
35+
├── tests
36+
│ └── audiotools
37+
│ ├── core
38+
│ │ ├── test_audio_signal.py
39+
│ │ ├── test_bands.py
40+
│ │ ├── test_display.py
41+
│ │ ├── test_dsp.py
42+
│ │ ├── test_effects.py
43+
│ │ ├── test_fftconv.py
44+
│ │ ├── test_grad.py
45+
│ │ ├── test_highpass.py
46+
│ │ ├── test_loudness.py
47+
│ │ ├── test_lowpass.py
48+
│ │ └── test_util.py
49+
│ ├── data
50+
│ │ ├── test_datasets.py
51+
│ │ ├── test_preprocess.py
52+
│ │ └── test_transforms.py
53+
│ ├── ml
54+
│ │ ├── test_decorators.py
55+
│ │ └── test_model.py
56+
│ └── test_post.py
57+
58+
```
59+
60+
- **core**: Contains the core class AudioSignal, which is responsible for the fundamental representation and manipulation of audio signals.
61+
62+
- **data**: Primarily dedicated to storing and processing datasets, including classes and functions for data preprocessing, ensuring efficient loading and transformation of audio data.
63+
64+
- **metrics**: Implements functions for various audio evaluation metrics, enabling precise assessment of the performance of audio models and processing algorithms.
65+
66+
- **ml**: Comprises classes and methods related to model training, supporting the construction, training, and optimization of machine learning models in the context of audio.
67+
68+
This project aims to provide developers and researchers with an efficient and flexible framework to foster innovation and exploration across various domains of audio technology.

audio/audiotools/__init__.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
from . import metrics
15+
from . import ml
16+
from . import post
17+
from .core import AudioSignal
18+
from .core import highpass_filter
19+
from .core import highpass_filters
20+
from .core import Meter
21+
from .core import STFTParams
22+
from .core import util
23+
from .data import datasets
24+
from .data import preprocess
25+
from .data import transforms

audio/audiotools/core/__init__.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
from . import util
15+
from ._julius import fft_conv1d
16+
from ._julius import FFTConv1D
17+
from ._julius import highpass_filter
18+
from ._julius import highpass_filters
19+
from ._julius import lowpass_filter
20+
from ._julius import LowPassFilter
21+
from ._julius import LowPassFilters
22+
from ._julius import pure_tone
23+
from ._julius import resample_frac
24+
from ._julius import split_bands
25+
from ._julius import SplitBands
26+
from .audio_signal import AudioSignal
27+
from .audio_signal import STFTParams
28+
from .loudness import Meter

0 commit comments

Comments
 (0)