From 7a54a47561702c31b5f2d0b041d02babb9a19732 Mon Sep 17 00:00:00 2001 From: drryanhuang Date: Thu, 9 Jan 2025 09:22:17 +0000 Subject: [PATCH] fix License --- audio/audiotools/core/_julius.py | 28 ++------------- audio/audiotools/core/audio_signal.py | 30 ++-------------- audio/audiotools/core/display.py | 28 ++------------- audio/audiotools/core/dsp.py | 28 ++------------- audio/audiotools/core/effects.py | 28 ++------------- audio/audiotools/core/ffmpeg.py | 28 ++------------- audio/audiotools/core/loudness.py | 28 ++------------- audio/audiotools/core/util.py | 30 ++-------------- audio/audiotools/data/datasets.py | 32 +++-------------- audio/audiotools/data/preprocess.py | 28 ++------------- audio/audiotools/data/transforms.py | 28 ++------------- audio/audiotools/metrics/quality.py | 30 ++-------------- audio/audiotools/ml/accelerator.py | 34 +++--------------- audio/audiotools/ml/basemodel.py | 30 ++-------------- audio/audiotools/ml/decorators.py | 30 ++-------------- audio/audiotools/post.py | 36 ++++--------------- .../audiotools/core/test_audio_signal.py | 28 ++------------- audio/tests/audiotools/core/test_bands.py | 28 ++------------- audio/tests/audiotools/core/test_display.py | 28 ++------------- audio/tests/audiotools/core/test_dsp.py | 28 ++------------- audio/tests/audiotools/core/test_effects.py | 28 ++------------- audio/tests/audiotools/core/test_fftconv.py | 28 ++------------- audio/tests/audiotools/core/test_grad.py | 28 ++------------- audio/tests/audiotools/core/test_highpass.py | 28 ++------------- audio/tests/audiotools/core/test_loudness.py | 28 ++------------- audio/tests/audiotools/core/test_lowpass.py | 28 ++------------- audio/tests/audiotools/core/test_util.py | 28 ++------------- audio/tests/audiotools/data/test_datasets.py | 28 ++------------- .../tests/audiotools/data/test_preprocess.py | 28 ++------------- .../tests/audiotools/data/test_transforms.py | 28 ++------------- audio/tests/audiotools/ml/test_decorators.py | 28 ++------------- audio/tests/audiotools/ml/test_model.py | 28 ++------------- audio/tests/audiotools/test_post.py | 28 ++------------- 33 files changed, 79 insertions(+), 873 deletions(-) diff --git a/audio/audiotools/core/_julius.py b/audio/audiotools/core/_julius.py index eaaf5d856..c6822b602 100644 --- a/audio/audiotools/core/_julius.py +++ b/audio/audiotools/core/_julius.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2020 Alexandre Défossez. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [julius] -# (https://github.com/adefossez/julius), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright 2020 Alexandre Défossez -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from julius(https://github.com/adefossez/julius/tree/main/julius) """ Implementation of a FFT based 1D convolution in PaddlePaddle. While FFT is used in some cases for small kernel sizes, it is not the default for long ones, e.g. 512. diff --git a/audio/audiotools/core/audio_signal.py b/audio/audiotools/core/audio_signal.py index 10b6c4324..fe15f3d75 100644 --- a/audio/audiotools/core/audio_signal.py +++ b/audio/audiotools/core/audio_signal.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/core/audio_signal.py) import copy import functools import hashlib @@ -839,7 +815,7 @@ class AudioSignal( """ return self.to("cpu") - def cuda(self): # pragma: no cover + def cuda(self): """Moves AudioSignal to cuda. Returns diff --git a/audio/audiotools/core/display.py b/audio/audiotools/core/display.py index 8ca7fb276..1e7c22e39 100644 --- a/audio/audiotools/core/display.py +++ b/audio/audiotools/core/display.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/core/display.py) import inspect import typing from functools import wraps diff --git a/audio/audiotools/core/dsp.py b/audio/audiotools/core/dsp.py index c434e30da..dc2387b7a 100644 --- a/audio/audiotools/core/dsp.py +++ b/audio/audiotools/core/dsp.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/core/dsp.py) import typing import numpy as np diff --git a/audio/audiotools/core/effects.py b/audio/audiotools/core/effects.py index ed26df6c9..69b7ce30c 100644 --- a/audio/audiotools/core/effects.py +++ b/audio/audiotools/core/effects.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/core/effects.py) import typing import numpy as np diff --git a/audio/audiotools/core/ffmpeg.py b/audio/audiotools/core/ffmpeg.py index 591f5a520..2d8b218b0 100644 --- a/audio/audiotools/core/ffmpeg.py +++ b/audio/audiotools/core/ffmpeg.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/core/ffmpeg.py) import json import shlex import subprocess diff --git a/audio/audiotools/core/loudness.py b/audio/audiotools/core/loudness.py index ea24b09d8..3a86791b1 100644 --- a/audio/audiotools/core/loudness.py +++ b/audio/audiotools/core/loudness.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/core/loudness.py) import copy import math import typing diff --git a/audio/audiotools/core/util.py b/audio/audiotools/core/util.py index 3e723d879..8715ea0b4 100644 --- a/audio/audiotools/core/util.py +++ b/audio/audiotools/core/util.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/core/util.py) import collections import csv import glob @@ -332,7 +308,7 @@ def _close_temp_files(tmpfiles: list): try: yield - except: # pragma: no cover + except: _close() raise _close() diff --git a/audio/audiotools/data/datasets.py b/audio/audiotools/data/datasets.py index 08d0e93af..ac0dbb16a 100644 --- a/audio/audiotools/data/datasets.py +++ b/audio/audiotools/data/datasets.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/data/datasets.py) from pathlib import Path from typing import Callable from typing import Dict @@ -522,7 +498,7 @@ class ConcatDataset(AudioDataset): return dataset[idx // len(self.datasets)] -class ResumableDistributedSampler(DistributedBatchSampler): # pragma: no cover +class ResumableDistributedSampler(DistributedBatchSampler): """Distributed sampler that can be resumed from a given start index.""" def __init__(self, @@ -568,7 +544,7 @@ class ResumableDistributedSampler(DistributedBatchSampler): # pragma: no cover self.start_idx = 0 # set the index back to 0 so for the next epoch -class ResumableSequentialSampler(SequenceSampler): # pragma: no cover +class ResumableSequentialSampler(SequenceSampler): """Sequential sampler that can be resumed from a given start index.""" def __init__(self, dataset, start_idx: int=None, **kwargs): diff --git a/audio/audiotools/data/preprocess.py b/audio/audiotools/data/preprocess.py index a941ce0ac..f214903cf 100644 --- a/audio/audiotools/data/preprocess.py +++ b/audio/audiotools/data/preprocess.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/data/preprocess.py) import csv import os from pathlib import Path diff --git a/audio/audiotools/data/transforms.py b/audio/audiotools/data/transforms.py index 21562293b..dd75d794c 100644 --- a/audio/audiotools/data/transforms.py +++ b/audio/audiotools/data/transforms.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/data/transforms.py) import copy from contextlib import contextmanager from inspect import signature diff --git a/audio/audiotools/metrics/quality.py b/audio/audiotools/metrics/quality.py index 1c59b8605..9583a6dae 100644 --- a/audio/audiotools/metrics/quality.py +++ b/audio/audiotools/metrics/quality.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/metrics/quality.py) import os import numpy as np @@ -48,7 +24,7 @@ from ..core import AudioSignal def visqol( estimates: AudioSignal, references: AudioSignal, - mode: str="audio", ): # pragma: no cover + mode: str="audio", ): """ViSQOL score. Parameters diff --git a/audio/audiotools/ml/accelerator.py b/audio/audiotools/ml/accelerator.py index 2e8731f26..ecb45901d 100644 --- a/audio/audiotools/ml/accelerator.py +++ b/audio/audiotools/ml/accelerator.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/ml/accelerator.py) import os import typing @@ -47,7 +23,7 @@ from paddle.io import DistributedBatchSampler from paddle.io import SequenceSampler -class ResumableDistributedSampler(DistributedBatchSampler): # pragma: no cover +class ResumableDistributedSampler(DistributedBatchSampler): """Distributed sampler that can be resumed from a given start index.""" def __init__(self, dataset, start_idx: int=None, **kwargs): @@ -62,7 +38,7 @@ class ResumableDistributedSampler(DistributedBatchSampler): # pragma: no cover self.start_idx = 0 # set the index back to 0 so for the next epoch -class ResumableSequentialSampler(SequenceSampler): # pragma: no cover +class ResumableSequentialSampler(SequenceSampler): """Sequential sampler that can be resumed from a given start index.""" def __init__(self, dataset, start_idx: int=None, **kwargs): @@ -77,7 +53,7 @@ class ResumableSequentialSampler(SequenceSampler): # pragma: no cover self.start_idx = 0 # set the index back to 0 so for the next epoch -class Accelerator: # pragma: no cover +class Accelerator: """This class is used to prepare models and dataloaders for usage with DDP or DP. Use the functions prepare_model, prepare_dataloader to prepare the respective objects. In the case of models, they are moved to diff --git a/audio/audiotools/ml/basemodel.py b/audio/audiotools/ml/basemodel.py index 0f06c451d..945396d4d 100644 --- a/audio/audiotools/ml/basemodel.py +++ b/audio/audiotools/ml/basemodel.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/ml/layers/base.py) import inspect import shutil import tempfile @@ -85,8 +61,6 @@ class BaseModel(nn.Layer): """ - INTERN = [] - def save( self, path: str, diff --git a/audio/audiotools/ml/decorators.py b/audio/audiotools/ml/decorators.py index 96e256888..6a5fafad4 100644 --- a/audio/audiotools/ml/decorators.py +++ b/audio/audiotools/ml/decorators.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/ml/decorators.py) import math import os import time @@ -369,7 +345,7 @@ class Tracker: v = paddle.to_tensor([v]) if not paddle.is_tensor(v): continue - if ddp_active and v.is_cuda: # pragma: no cover + if ddp_active and v.is_cuda: dist.all_reduce(v, op=op) output[k] = v.detach() if paddle.numel(v) == 1: diff --git a/audio/audiotools/post.py b/audio/audiotools/post.py index f913d1000..599e6e1da 100644 --- a/audio/audiotools/post.py +++ b/audio/audiotools/post.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/audiotools/post.py) import tempfile import typing import zipfile @@ -55,7 +31,7 @@ def audio_table( audio_dict: dict, first_column: str=None, format_fn: typing.Callable=None, - **kwargs, ): # pragma: no cover + **kwargs, ): """Embeds an audio table into HTML, or as the output cell in a notebook. @@ -131,7 +107,7 @@ def audio_table( return output -def in_notebook(): # pragma: no cover +def in_notebook(): """Determines if code is running in a notebook. Returns @@ -142,7 +118,7 @@ def in_notebook(): # pragma: no cover try: from IPython import get_ipython - if "IPKernelApp" not in get_ipython().config: # pragma: no cover + if "IPKernelApp" not in get_ipython().config: return False except ImportError: return False @@ -151,7 +127,7 @@ def in_notebook(): # pragma: no cover return True -def disp(obj, **kwargs): # pragma: no cover +def disp(obj, **kwargs): """Displays an object, depending on if its in a notebook or not. diff --git a/audio/tests/audiotools/core/test_audio_signal.py b/audio/tests/audiotools/core/test_audio_signal.py index 8322531a1..b36a35d57 100644 --- a/audio/tests/audiotools/core/test_audio_signal.py +++ b/audio/tests/audiotools/core/test_audio_signal.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/core/test_audio_signal.py) import pathlib import sys import tempfile diff --git a/audio/tests/audiotools/core/test_bands.py b/audio/tests/audiotools/core/test_bands.py index 55d2ce4ac..45f6548be 100644 --- a/audio/tests/audiotools/core/test_bands.py +++ b/audio/tests/audiotools/core/test_bands.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2020 Alexandre Défossez. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [julius] -# (https://github.com/adefossez/julius), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright 2020 Alexandre Défossez -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from julius(https://github.com/adefossez/julius/blob/main/tests/test_bands.py) import random import sys import unittest diff --git a/audio/tests/audiotools/core/test_display.py b/audio/tests/audiotools/core/test_display.py index 5ca661bdd..f05b9f7ff 100644 --- a/audio/tests/audiotools/core/test_display.py +++ b/audio/tests/audiotools/core/test_display.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/core/test_display.py) import sys from pathlib import Path diff --git a/audio/tests/audiotools/core/test_dsp.py b/audio/tests/audiotools/core/test_dsp.py index c5e59bd5c..9bbb08743 100644 --- a/audio/tests/audiotools/core/test_dsp.py +++ b/audio/tests/audiotools/core/test_dsp.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/core/test_dsp.py) import sys import numpy as np diff --git a/audio/tests/audiotools/core/test_effects.py b/audio/tests/audiotools/core/test_effects.py index d79906e1d..8f7f3ea5d 100644 --- a/audio/tests/audiotools/core/test_effects.py +++ b/audio/tests/audiotools/core/test_effects.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/core/test_effects.py) import sys import numpy as np diff --git a/audio/tests/audiotools/core/test_fftconv.py b/audio/tests/audiotools/core/test_fftconv.py index 848cdb246..c9d39d074 100644 --- a/audio/tests/audiotools/core/test_fftconv.py +++ b/audio/tests/audiotools/core/test_fftconv.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2020 Alexandre Défossez. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [julius] -# (https://github.com/adefossez/julius), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright 2020 Alexandre Défossez -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from julius(https://github.com/adefossez/julius/blob/main/tests/test_fftconv.py) import random import sys import unittest diff --git a/audio/tests/audiotools/core/test_grad.py b/audio/tests/audiotools/core/test_grad.py index 93f6d3626..643390944 100644 --- a/audio/tests/audiotools/core/test_grad.py +++ b/audio/tests/audiotools/core/test_grad.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/core/test_grad.py) import sys from typing import Callable diff --git a/audio/tests/audiotools/core/test_highpass.py b/audio/tests/audiotools/core/test_highpass.py index 1bcafd789..8c495d4bb 100644 --- a/audio/tests/audiotools/core/test_highpass.py +++ b/audio/tests/audiotools/core/test_highpass.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2020 Alexandre Défossez. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [julius] -# (https://github.com/adefossez/julius), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright 2020 Alexandre Défossez -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from julius(https://github.com/adefossez/julius/blob/main/tests/test_filters.py) import math import random import sys diff --git a/audio/tests/audiotools/core/test_loudness.py b/audio/tests/audiotools/core/test_loudness.py index 1ff3d61e4..757c09c9a 100644 --- a/audio/tests/audiotools/core/test_loudness.py +++ b/audio/tests/audiotools/core/test_loudness.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/core/test_loudness.py) import sys import numpy as np diff --git a/audio/tests/audiotools/core/test_lowpass.py b/audio/tests/audiotools/core/test_lowpass.py index afbd4bdf8..e9fba9990 100644 --- a/audio/tests/audiotools/core/test_lowpass.py +++ b/audio/tests/audiotools/core/test_lowpass.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2020 Alexandre Défossez. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [julius] -# (https://github.com/adefossez/julius), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright 2020 Alexandre Défossez -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from julius(https://github.com/adefossez/julius/blob/main/tests/test_lowpass.py) import math import random import sys diff --git a/audio/tests/audiotools/core/test_util.py b/audio/tests/audiotools/core/test_util.py index b350732d6..ecd0d8100 100644 --- a/audio/tests/audiotools/core/test_util.py +++ b/audio/tests/audiotools/core/test_util.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/core/test_util.py) import os import random import sys diff --git a/audio/tests/audiotools/data/test_datasets.py b/audio/tests/audiotools/data/test_datasets.py index 2a4378349..d18e73a21 100644 --- a/audio/tests/audiotools/data/test_datasets.py +++ b/audio/tests/audiotools/data/test_datasets.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/data/test_datasets.py) import sys import tempfile from pathlib import Path diff --git a/audio/tests/audiotools/data/test_preprocess.py b/audio/tests/audiotools/data/test_preprocess.py index fab326cff..72b2c2832 100644 --- a/audio/tests/audiotools/data/test_preprocess.py +++ b/audio/tests/audiotools/data/test_preprocess.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/data/test_preprocess.py) import sys import tempfile from pathlib import Path diff --git a/audio/tests/audiotools/data/test_transforms.py b/audio/tests/audiotools/data/test_transforms.py index 139f27fbc..586d64d1e 100644 --- a/audio/tests/audiotools/data/test_transforms.py +++ b/audio/tests/audiotools/data/test_transforms.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/data/test_transforms.py) import inspect import sys import warnings diff --git a/audio/tests/audiotools/ml/test_decorators.py b/audio/tests/audiotools/ml/test_decorators.py index b1869ad38..ad5df200b 100644 --- a/audio/tests/audiotools/ml/test_decorators.py +++ b/audio/tests/audiotools/ml/test_decorators.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/ml/test_decorators.py) import sys import time sys.path.append("../..") diff --git a/audio/tests/audiotools/ml/test_model.py b/audio/tests/audiotools/ml/test_model.py index b4e053adc..17ff9183e 100644 --- a/audio/tests/audiotools/ml/test_model.py +++ b/audio/tests/audiotools/ml/test_model.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/ml/test_model.py) import sys import tempfile diff --git a/audio/tests/audiotools/test_post.py b/audio/tests/audiotools/test_post.py index 287b9c829..1df29dcc1 100644 --- a/audio/tests/audiotools/test_post.py +++ b/audio/tests/audiotools/test_post.py @@ -1,3 +1,4 @@ +# MIT License, Copyright (c) 2023-Present, Descript. # Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,32 +12,7 @@ # 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. -# -# This file contains code derived from [Descript] -# (https://github.com/descriptinc/audiotools), -# which is licensed under the MIT License: -# -# MIT License -# -# Copyright (c) 2023-Present, Descript -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# Modified from audiotools(https://github.com/descriptinc/audiotools/blob/master/tests/test_post.py) import sys from pathlib import Path