From b49fbe65d7525aa6edce37a6e230099af8c9d007 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Thu, 4 Nov 2021 03:10:13 +0000 Subject: [PATCH 1/5] more detals of reference --- README.md | 2 +- docs/source/asr/reference.md | 8 -------- docs/source/reference.md | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 9 deletions(-) delete mode 100644 docs/source/asr/reference.md create mode 100644 docs/source/reference.md diff --git a/README.md b/README.md index c501e0c3..9a049df8 100644 --- a/README.md +++ b/README.md @@ -335,4 +335,4 @@ PaddleSpeech is provided under the [Apache-2.0 License](./LICENSE). ## Acknowledgement -PaddleSpeech depends on a lot of open source repos. See [references](docs/source/asr/reference.md) for more information. +PaddleSpeech depends on a lot of open source repos. See [references](docs/source/reference.md) for more information. diff --git a/docs/source/asr/reference.md b/docs/source/asr/reference.md deleted file mode 100644 index d3676fff..00000000 --- a/docs/source/asr/reference.md +++ /dev/null @@ -1,8 +0,0 @@ -# Reference - -We refer these repos to build `model` and `engine`: - -* [delta](https://github.com/Delta-ML/delta.git) -* [espnet](https://github.com/espnet/espnet.git) -* [kaldi](https://github.com/kaldi-asr/kaldi.git) -* [wenet](https://github.com/mobvoi/wenet) diff --git a/docs/source/reference.md b/docs/source/reference.md new file mode 100644 index 00000000..ac704cb0 --- /dev/null +++ b/docs/source/reference.md @@ -0,0 +1,33 @@ +# Reference + +We borrowed a lot of code from these repos to build `model` and `engine`, thank for these great work: + +* [espnet](https://github.com/espnet/espnet/blob/master/LICENSE) +- Apache-2.0 License +- python/shell `utils` +- kaldi feat preprocessing +- datapipeline and `transform` +- a lot of tts model, like `fastspeech2` and GAN-based `vocoder` + +* [wenet](https://github.com/wenet-e2e/wenet/blob/main/LICENSE) +- Apache-2.0 License +- U2 model +- Building TLG based Graph + +* [kaldi](https://github.com/kaldi-asr/kaldi/blob/master/COPYING) +- Apache-2.0 License +- shell/perl/python utils. +- feature bins. +- WFST based decoding for LM integration. + +* [delta](https://github.com/Delta-ML/delta/blob/master/LICENSE) +- Apache-2.0 License +- `engine` arch + +* [speechbrain](https://github.com/speechbrain/speechbrain/blob/develop/LICENSE) +- Apache-2.0 License +- ECAPA-TDNN SV model + +* [chainer](https://github.com/chainer/chainer/blob/master/LICENSE) +- MIT License +- Updater, Trainer and more utils. From c463a00f8105b2790bf3af5e2394bc7ee04e7e3a Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Thu, 4 Nov 2021 03:28:28 +0000 Subject: [PATCH 2/5] add reference code license --- paddlespeech/s2t/decoders/README.md | 1 + .../s2t/decoders/beam_search/batch_beam_search.py | 1 + paddlespeech/s2t/decoders/beam_search/beam_search.py | 1 + paddlespeech/s2t/decoders/recog.py | 1 + paddlespeech/s2t/decoders/recog_bin.py | 1 + paddlespeech/s2t/decoders/scorers/ctc.py | 1 + paddlespeech/s2t/decoders/scorers/length_bonus.py | 1 + paddlespeech/s2t/decoders/scorers/ngram.py | 1 + paddlespeech/s2t/decoders/scorers/scorer_interface.py | 1 + paddlespeech/s2t/decoders/utils.py | 1 + paddlespeech/s2t/io/batchfy.py | 1 + paddlespeech/s2t/io/converter.py | 1 + paddlespeech/s2t/io/dataset.py | 2 ++ paddlespeech/s2t/io/reader.py | 1 + paddlespeech/s2t/models/asr_interface.py | 1 + paddlespeech/s2t/models/lm/transformer.py | 1 + paddlespeech/s2t/models/lm_interface.py | 1 + paddlespeech/s2t/models/st_interface.py | 1 + paddlespeech/s2t/modules/attention.py | 1 + paddlespeech/s2t/modules/cmvn.py | 1 + paddlespeech/s2t/modules/conformer_convolution.py | 1 + paddlespeech/s2t/modules/decoder.py | 1 + paddlespeech/s2t/modules/decoder_layer.py | 1 + paddlespeech/s2t/modules/embedding.py | 1 + paddlespeech/s2t/modules/encoder.py | 1 + paddlespeech/s2t/modules/encoder_layer.py | 1 + paddlespeech/s2t/modules/loss.py | 1 + paddlespeech/s2t/modules/mask.py | 1 + paddlespeech/s2t/modules/positionwise_feed_forward.py | 1 + paddlespeech/s2t/modules/subsampling.py | 1 + paddlespeech/s2t/training/extensions/evaluator.py | 1 + paddlespeech/s2t/training/extensions/extension.py | 1 + paddlespeech/s2t/training/extensions/plot.py | 1 + paddlespeech/s2t/training/extensions/snapshot.py | 1 + paddlespeech/s2t/training/optimizer.py | 1 + paddlespeech/s2t/training/reporter.py | 1 + paddlespeech/s2t/training/scheduler.py | 1 + .../s2t/training/triggers/compare_value_trigger.py | 1 + .../s2t/training/triggers/interval_trigger.py | 1 + paddlespeech/s2t/training/triggers/limit_trigger.py | 1 + paddlespeech/s2t/training/triggers/time_trigger.py | 1 + .../s2t/training/updaters/standard_updater.py | 1 + paddlespeech/s2t/training/updaters/trainer.py | 1 + paddlespeech/s2t/training/updaters/updater.py | 1 + paddlespeech/s2t/transform/add_deltas.py | 1 + paddlespeech/s2t/transform/channel_selector.py | 1 + paddlespeech/s2t/transform/cmvn.py | 1 + paddlespeech/s2t/transform/functional.py | 1 + paddlespeech/s2t/transform/perturb.py | 1 + paddlespeech/s2t/transform/spec_augment.py | 1 + paddlespeech/s2t/transform/spectrogram.py | 1 + paddlespeech/s2t/transform/transform_interface.py | 4 +++- paddlespeech/s2t/transform/transformation.py | 3 +-- paddlespeech/s2t/transform/wpe.py | 1 + paddlespeech/s2t/utils/asr_utils.py | 2 +- paddlespeech/s2t/utils/check_kwargs.py | 1 + paddlespeech/s2t/utils/cli_readers.py | 1 + paddlespeech/s2t/utils/cli_utils.py | 1 + paddlespeech/s2t/utils/cli_writers.py | 1 + paddlespeech/s2t/utils/ctc_utils.py | 11 +---------- paddlespeech/s2t/utils/dynamic_import.py | 1 + paddlespeech/t2s/training/extension.py | 1 + paddlespeech/t2s/training/extensions/evaluator.py | 1 + paddlespeech/t2s/training/extensions/snapshot.py | 1 + paddlespeech/t2s/training/reporter.py | 1 + .../t2s/training/triggers/interval_trigger.py | 1 + paddlespeech/t2s/training/triggers/limit_trigger.py | 1 + paddlespeech/t2s/training/triggers/time_trigger.py | 1 + paddlespeech/t2s/training/updater.py | 1 + .../t2s/training/updaters/standard_updater.py | 1 + 70 files changed, 73 insertions(+), 14 deletions(-) diff --git a/paddlespeech/s2t/decoders/README.md b/paddlespeech/s2t/decoders/README.md index ee7d53de..0b91ddd1 100644 --- a/paddlespeech/s2t/decoders/README.md +++ b/paddlespeech/s2t/decoders/README.md @@ -1,4 +1,5 @@ # Decoders +we borrow a lot of code from Espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) ## Reference ### CTC Prefix Beam Search diff --git a/paddlespeech/s2t/decoders/beam_search/batch_beam_search.py b/paddlespeech/s2t/decoders/beam_search/batch_beam_search.py index 3fc1c435..ed9790cd 100644 --- a/paddlespeech/s2t/decoders/beam_search/batch_beam_search.py +++ b/paddlespeech/s2t/decoders/beam_search/batch_beam_search.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) class BatchBeamSearch(): diff --git a/paddlespeech/s2t/decoders/beam_search/beam_search.py b/paddlespeech/s2t/decoders/beam_search/beam_search.py index 6c4f069d..7d79246d 100644 --- a/paddlespeech/s2t/decoders/beam_search/beam_search.py +++ b/paddlespeech/s2t/decoders/beam_search/beam_search.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Beam search module.""" from itertools import chain from typing import Any diff --git a/paddlespeech/s2t/decoders/recog.py b/paddlespeech/s2t/decoders/recog.py index d0710f9c..d9324ca0 100644 --- a/paddlespeech/s2t/decoders/recog.py +++ b/paddlespeech/s2t/decoders/recog.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """V2 backend for `asr_recog.py` using py:class:`decoders.beam_search.BeamSearch`.""" import jsonlines import paddle diff --git a/paddlespeech/s2t/decoders/recog_bin.py b/paddlespeech/s2t/decoders/recog_bin.py index e4d81f40..cd7a360a 100644 --- a/paddlespeech/s2t/decoders/recog_bin.py +++ b/paddlespeech/s2t/decoders/recog_bin.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """End-to-end speech recognition model decoding script.""" import logging import os diff --git a/paddlespeech/s2t/decoders/scorers/ctc.py b/paddlespeech/s2t/decoders/scorers/ctc.py index 74a5f578..e0ff3d5f 100644 --- a/paddlespeech/s2t/decoders/scorers/ctc.py +++ b/paddlespeech/s2t/decoders/scorers/ctc.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """ScorerInterface implementation for CTC.""" import numpy as np import paddle diff --git a/paddlespeech/s2t/decoders/scorers/length_bonus.py b/paddlespeech/s2t/decoders/scorers/length_bonus.py index 864e22d1..2e4c8465 100644 --- a/paddlespeech/s2t/decoders/scorers/length_bonus.py +++ b/paddlespeech/s2t/decoders/scorers/length_bonus.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Length bonus module.""" from typing import Any from typing import List diff --git a/paddlespeech/s2t/decoders/scorers/ngram.py b/paddlespeech/s2t/decoders/scorers/ngram.py index a34d8248..fa8f776a 100644 --- a/paddlespeech/s2t/decoders/scorers/ngram.py +++ b/paddlespeech/s2t/decoders/scorers/ngram.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Ngram lm implement.""" from abc import ABC diff --git a/paddlespeech/s2t/decoders/scorers/scorer_interface.py b/paddlespeech/s2t/decoders/scorers/scorer_interface.py index 366904a4..ddc780da 100644 --- a/paddlespeech/s2t/decoders/scorers/scorer_interface.py +++ b/paddlespeech/s2t/decoders/scorers/scorer_interface.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Scorer interface module.""" import warnings from typing import Any diff --git a/paddlespeech/s2t/decoders/utils.py b/paddlespeech/s2t/decoders/utils.py index 7dff14c1..63709d1a 100644 --- a/paddlespeech/s2t/decoders/utils.py +++ b/paddlespeech/s2t/decoders/utils.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import numpy as np from paddlespeech.s2t.utils.log import Log diff --git a/paddlespeech/s2t/io/batchfy.py b/paddlespeech/s2t/io/batchfy.py index 3517f059..9be37c27 100644 --- a/paddlespeech/s2t/io/batchfy.py +++ b/paddlespeech/s2t/io/batchfy.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import itertools import numpy as np diff --git a/paddlespeech/s2t/io/converter.py b/paddlespeech/s2t/io/converter.py index 94634360..aacbad98 100644 --- a/paddlespeech/s2t/io/converter.py +++ b/paddlespeech/s2t/io/converter.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import numpy as np from paddlespeech.s2t.io.utility import pad_list diff --git a/paddlespeech/s2t/io/dataset.py b/paddlespeech/s2t/io/dataset.py index 121410c8..4aff9fb2 100644 --- a/paddlespeech/s2t/io/dataset.py +++ b/paddlespeech/s2t/io/dataset.py @@ -11,6 +11,8 @@ # 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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from typing import Optional from paddle.io import Dataset diff --git a/paddlespeech/s2t/io/reader.py b/paddlespeech/s2t/io/reader.py index faf2f600..1e32e620 100644 --- a/paddlespeech/s2t/io/reader.py +++ b/paddlespeech/s2t/io/reader.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from collections import OrderedDict import kaldiio diff --git a/paddlespeech/s2t/models/asr_interface.py b/paddlespeech/s2t/models/asr_interface.py index ece83e51..76ba3e2c 100644 --- a/paddlespeech/s2t/models/asr_interface.py +++ b/paddlespeech/s2t/models/asr_interface.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """ASR Interface module.""" import argparse diff --git a/paddlespeech/s2t/models/lm/transformer.py b/paddlespeech/s2t/models/lm/transformer.py index 447f1dbc..3fadba1a 100644 --- a/paddlespeech/s2t/models/lm/transformer.py +++ b/paddlespeech/s2t/models/lm/transformer.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from typing import Any from typing import List from typing import Tuple diff --git a/paddlespeech/s2t/models/lm_interface.py b/paddlespeech/s2t/models/lm_interface.py index 7ae39b35..02df874f 100644 --- a/paddlespeech/s2t/models/lm_interface.py +++ b/paddlespeech/s2t/models/lm_interface.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Language model interface.""" import argparse diff --git a/paddlespeech/s2t/models/st_interface.py b/paddlespeech/s2t/models/st_interface.py index 331f1e82..66ba49da 100644 --- a/paddlespeech/s2t/models/st_interface.py +++ b/paddlespeech/s2t/models/st_interface.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """ST Interface module.""" from .asr_interface import ASRInterface from paddlespeech.s2t.utils.dynamic_import import dynamic_import diff --git a/paddlespeech/s2t/modules/attention.py b/paddlespeech/s2t/modules/attention.py index d5246777..5cb37ee7 100644 --- a/paddlespeech/s2t/modules/attention.py +++ b/paddlespeech/s2t/modules/attention.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Multi-Head Attention layer definition.""" import math from typing import Optional diff --git a/paddlespeech/s2t/modules/cmvn.py b/paddlespeech/s2t/modules/cmvn.py index 9aa938af..df529c1c 100644 --- a/paddlespeech/s2t/modules/cmvn.py +++ b/paddlespeech/s2t/modules/cmvn.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import paddle from paddle import nn diff --git a/paddlespeech/s2t/modules/conformer_convolution.py b/paddlespeech/s2t/modules/conformer_convolution.py index 39b1ee32..b4632d42 100644 --- a/paddlespeech/s2t/modules/conformer_convolution.py +++ b/paddlespeech/s2t/modules/conformer_convolution.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """ConvolutionModule definition.""" from typing import Optional from typing import Tuple diff --git a/paddlespeech/s2t/modules/decoder.py b/paddlespeech/s2t/modules/decoder.py index 7d545f5e..bd3760c4 100644 --- a/paddlespeech/s2t/modules/decoder.py +++ b/paddlespeech/s2t/modules/decoder.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Decoder definition.""" from typing import Any from typing import List diff --git a/paddlespeech/s2t/modules/decoder_layer.py b/paddlespeech/s2t/modules/decoder_layer.py index 816bc9f6..62682bfb 100644 --- a/paddlespeech/s2t/modules/decoder_layer.py +++ b/paddlespeech/s2t/modules/decoder_layer.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Decoder self-attention layer definition.""" from typing import Optional from typing import Tuple diff --git a/paddlespeech/s2t/modules/embedding.py b/paddlespeech/s2t/modules/embedding.py index 938898c1..2b92aafe 100644 --- a/paddlespeech/s2t/modules/embedding.py +++ b/paddlespeech/s2t/modules/embedding.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Positonal Encoding Module.""" import math from typing import Tuple diff --git a/paddlespeech/s2t/modules/encoder.py b/paddlespeech/s2t/modules/encoder.py index 246536db..bf9cfeaa 100644 --- a/paddlespeech/s2t/modules/encoder.py +++ b/paddlespeech/s2t/modules/encoder.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Encoder definition.""" from typing import List from typing import Optional diff --git a/paddlespeech/s2t/modules/encoder_layer.py b/paddlespeech/s2t/modules/encoder_layer.py index 0525a614..7cff5442 100644 --- a/paddlespeech/s2t/modules/encoder_layer.py +++ b/paddlespeech/s2t/modules/encoder_layer.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Encoder self-attention layer definition.""" from typing import Optional from typing import Tuple diff --git a/paddlespeech/s2t/modules/loss.py b/paddlespeech/s2t/modules/loss.py index 012ef242..90f941f7 100644 --- a/paddlespeech/s2t/modules/loss.py +++ b/paddlespeech/s2t/modules/loss.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import inspect import paddle diff --git a/paddlespeech/s2t/modules/mask.py b/paddlespeech/s2t/modules/mask.py index 5c7886d4..964d5086 100644 --- a/paddlespeech/s2t/modules/mask.py +++ b/paddlespeech/s2t/modules/mask.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import paddle from paddlespeech.s2t.utils.log import Log diff --git a/paddlespeech/s2t/modules/positionwise_feed_forward.py b/paddlespeech/s2t/modules/positionwise_feed_forward.py index ccea8e57..0d9c2e29 100644 --- a/paddlespeech/s2t/modules/positionwise_feed_forward.py +++ b/paddlespeech/s2t/modules/positionwise_feed_forward.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Positionwise feed forward layer definition.""" import paddle from paddle import nn diff --git a/paddlespeech/s2t/modules/subsampling.py b/paddlespeech/s2t/modules/subsampling.py index 6b8c28c6..b60a6b1c 100644 --- a/paddlespeech/s2t/modules/subsampling.py +++ b/paddlespeech/s2t/modules/subsampling.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Subsampling layer definition.""" from typing import Tuple diff --git a/paddlespeech/s2t/training/extensions/evaluator.py b/paddlespeech/s2t/training/extensions/evaluator.py index 9da0d731..5989e313 100644 --- a/paddlespeech/s2t/training/extensions/evaluator.py +++ b/paddlespeech/s2t/training/extensions/evaluator.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) from typing import Dict import paddle diff --git a/paddlespeech/s2t/training/extensions/extension.py b/paddlespeech/s2t/training/extensions/extension.py index 02f92495..1eb03427 100644 --- a/paddlespeech/s2t/training/extensions/extension.py +++ b/paddlespeech/s2t/training/extensions/extension.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) PRIORITY_WRITER = 300 PRIORITY_EDITOR = 200 PRIORITY_READER = 100 diff --git a/paddlespeech/s2t/training/extensions/plot.py b/paddlespeech/s2t/training/extensions/plot.py index 6fbb4d4d..d2e5e321 100644 --- a/paddlespeech/s2t/training/extensions/plot.py +++ b/paddlespeech/s2t/training/extensions/plot.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import copy import os diff --git a/paddlespeech/s2t/training/extensions/snapshot.py b/paddlespeech/s2t/training/extensions/snapshot.py index 753c7ec0..fb4e80fe 100644 --- a/paddlespeech/s2t/training/extensions/snapshot.py +++ b/paddlespeech/s2t/training/extensions/snapshot.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import os from datetime import datetime from pathlib import Path diff --git a/paddlespeech/s2t/training/optimizer.py b/paddlespeech/s2t/training/optimizer.py index 8ed30769..f0bcb313 100644 --- a/paddlespeech/s2t/training/optimizer.py +++ b/paddlespeech/s2t/training/optimizer.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from typing import Any from typing import Dict from typing import Text diff --git a/paddlespeech/s2t/training/reporter.py b/paddlespeech/s2t/training/reporter.py index 7afc33f3..22b26752 100644 --- a/paddlespeech/s2t/training/reporter.py +++ b/paddlespeech/s2t/training/reporter.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import contextlib import math from collections import defaultdict diff --git a/paddlespeech/s2t/training/scheduler.py b/paddlespeech/s2t/training/scheduler.py index f850f6f5..732cbf0b 100644 --- a/paddlespeech/s2t/training/scheduler.py +++ b/paddlespeech/s2t/training/scheduler.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from typing import Any from typing import Dict from typing import Text diff --git a/paddlespeech/s2t/training/triggers/compare_value_trigger.py b/paddlespeech/s2t/training/triggers/compare_value_trigger.py index efb928e2..7c550268 100644 --- a/paddlespeech/s2t/training/triggers/compare_value_trigger.py +++ b/paddlespeech/s2t/training/triggers/compare_value_trigger.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) from ..reporter import DictSummary from .utils import get_trigger diff --git a/paddlespeech/s2t/training/triggers/interval_trigger.py b/paddlespeech/s2t/training/triggers/interval_trigger.py index 1e04afad..14201d29 100644 --- a/paddlespeech/s2t/training/triggers/interval_trigger.py +++ b/paddlespeech/s2t/training/triggers/interval_trigger.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class IntervalTrigger(): diff --git a/paddlespeech/s2t/training/triggers/limit_trigger.py b/paddlespeech/s2t/training/triggers/limit_trigger.py index ecd527ac..cd96040e 100644 --- a/paddlespeech/s2t/training/triggers/limit_trigger.py +++ b/paddlespeech/s2t/training/triggers/limit_trigger.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class LimitTrigger(): diff --git a/paddlespeech/s2t/training/triggers/time_trigger.py b/paddlespeech/s2t/training/triggers/time_trigger.py index e31179a9..53c398d1 100644 --- a/paddlespeech/s2t/training/triggers/time_trigger.py +++ b/paddlespeech/s2t/training/triggers/time_trigger.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class TimeTrigger(): diff --git a/paddlespeech/s2t/training/updaters/standard_updater.py b/paddlespeech/s2t/training/updaters/standard_updater.py index 83180a38..a686af74 100644 --- a/paddlespeech/s2t/training/updaters/standard_updater.py +++ b/paddlespeech/s2t/training/updaters/standard_updater.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) from typing import Dict from typing import Optional diff --git a/paddlespeech/s2t/training/updaters/trainer.py b/paddlespeech/s2t/training/updaters/trainer.py index dcf844e3..5a1295eb 100644 --- a/paddlespeech/s2t/training/updaters/trainer.py +++ b/paddlespeech/s2t/training/updaters/trainer.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import sys import traceback from collections import OrderedDict diff --git a/paddlespeech/s2t/training/updaters/updater.py b/paddlespeech/s2t/training/updaters/updater.py index ff8d925f..427722d2 100644 --- a/paddlespeech/s2t/training/updaters/updater.py +++ b/paddlespeech/s2t/training/updaters/updater.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) from dataclasses import dataclass import paddle diff --git a/paddlespeech/s2t/transform/add_deltas.py b/paddlespeech/s2t/transform/add_deltas.py index 4cab0084..0a2f3419 100644 --- a/paddlespeech/s2t/transform/add_deltas.py +++ b/paddlespeech/s2t/transform/add_deltas.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import numpy as np diff --git a/paddlespeech/s2t/transform/channel_selector.py b/paddlespeech/s2t/transform/channel_selector.py index d985b482..bc8a14bf 100644 --- a/paddlespeech/s2t/transform/channel_selector.py +++ b/paddlespeech/s2t/transform/channel_selector.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import numpy diff --git a/paddlespeech/s2t/transform/cmvn.py b/paddlespeech/s2t/transform/cmvn.py index 5d318590..749d5e18 100644 --- a/paddlespeech/s2t/transform/cmvn.py +++ b/paddlespeech/s2t/transform/cmvn.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import io import h5py diff --git a/paddlespeech/s2t/transform/functional.py b/paddlespeech/s2t/transform/functional.py index e23d55f9..afbf4a59 100644 --- a/paddlespeech/s2t/transform/functional.py +++ b/paddlespeech/s2t/transform/functional.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import inspect from paddlespeech.s2t.transform.transform_interface import TransformInterface diff --git a/paddlespeech/s2t/transform/perturb.py b/paddlespeech/s2t/transform/perturb.py index f7e8bb76..8671420c 100644 --- a/paddlespeech/s2t/transform/perturb.py +++ b/paddlespeech/s2t/transform/perturb.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import librosa import numpy import scipy diff --git a/paddlespeech/s2t/transform/spec_augment.py b/paddlespeech/s2t/transform/spec_augment.py index 01ead8ad..76e10184 100644 --- a/paddlespeech/s2t/transform/spec_augment.py +++ b/paddlespeech/s2t/transform/spec_augment.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Spec Augment module for preprocessing i.e., data augmentation""" import random diff --git a/paddlespeech/s2t/transform/spectrogram.py b/paddlespeech/s2t/transform/spectrogram.py index e63bd680..aeedf545 100644 --- a/paddlespeech/s2t/transform/spectrogram.py +++ b/paddlespeech/s2t/transform/spectrogram.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import librosa import numpy as np diff --git a/paddlespeech/s2t/transform/transform_interface.py b/paddlespeech/s2t/transform/transform_interface.py index 7ab29554..a7e04ffc 100644 --- a/paddlespeech/s2t/transform/transform_interface.py +++ b/paddlespeech/s2t/transform/transform_interface.py @@ -11,7 +11,9 @@ # 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. -# TODO(karita): add this to all the transform impl. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + + class TransformInterface: """Transform Interface""" diff --git a/paddlespeech/s2t/transform/transformation.py b/paddlespeech/s2t/transform/transformation.py index d9bb7c16..f0d1cd17 100644 --- a/paddlespeech/s2t/transform/transformation.py +++ b/paddlespeech/s2t/transform/transformation.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Transformation module.""" import copy import io @@ -23,8 +24,6 @@ import yaml from paddlespeech.s2t.utils.dynamic_import import dynamic_import -# TODO(karita): inherit TransformInterface -# TODO(karita): register cmd arguments in asr_train.py import_alias = dict( identity="paddlespeech.s2t.transform.transform_interface:Identity", time_warp="paddlespeech.s2t.transform.spec_augment:TimeWarp", diff --git a/paddlespeech/s2t/transform/wpe.py b/paddlespeech/s2t/transform/wpe.py index d82005f6..463810dd 100644 --- a/paddlespeech/s2t/transform/wpe.py +++ b/paddlespeech/s2t/transform/wpe.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from nara_wpe.wpe import wpe diff --git a/paddlespeech/s2t/utils/asr_utils.py b/paddlespeech/s2t/utils/asr_utils.py index 6f86e56f..9184fd6a 100644 --- a/paddlespeech/s2t/utils/asr_utils.py +++ b/paddlespeech/s2t/utils/asr_utils.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import json import numpy as np @@ -18,7 +19,6 @@ import numpy as np __all__ = ["label_smoothing_dist"] -# TODO(takaaki-hori): add different smoothing methods def label_smoothing_dist(odim, lsm_type, transcript=None, blank=0): """Obtain label distribution for loss smoothing. diff --git a/paddlespeech/s2t/utils/check_kwargs.py b/paddlespeech/s2t/utils/check_kwargs.py index 1ee7329b..11214aac 100644 --- a/paddlespeech/s2t/utils/check_kwargs.py +++ b/paddlespeech/s2t/utils/check_kwargs.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import inspect diff --git a/paddlespeech/s2t/utils/cli_readers.py b/paddlespeech/s2t/utils/cli_readers.py index 010adb7a..a1742d4f 100644 --- a/paddlespeech/s2t/utils/cli_readers.py +++ b/paddlespeech/s2t/utils/cli_readers.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import io import logging import sys diff --git a/paddlespeech/s2t/utils/cli_utils.py b/paddlespeech/s2t/utils/cli_utils.py index f8e1d60b..8c3953d6 100644 --- a/paddlespeech/s2t/utils/cli_utils.py +++ b/paddlespeech/s2t/utils/cli_utils.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import sys from collections.abc import Sequence from distutils.util import strtobool as dist_strtobool diff --git a/paddlespeech/s2t/utils/cli_writers.py b/paddlespeech/s2t/utils/cli_writers.py index 5866a82e..4fa7824e 100644 --- a/paddlespeech/s2t/utils/cli_writers.py +++ b/paddlespeech/s2t/utils/cli_writers.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from pathlib import Path from typing import Dict diff --git a/paddlespeech/s2t/utils/ctc_utils.py b/paddlespeech/s2t/utils/ctc_utils.py index ff23350a..5e571446 100644 --- a/paddlespeech/s2t/utils/ctc_utils.py +++ b/paddlespeech/s2t/utils/ctc_utils.py @@ -11,6 +11,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. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from typing import List import numpy as np @@ -138,16 +139,6 @@ def forced_align(ctc_probs: paddle.Tensor, y: paddle.Tensor, return output_alignment -# ctc_align( -# self.model, -# self.align_loader, -# self.config.decoding.batch_size, -# self.align_loader.collate_fn.stride_ms, -# self.align_loader.collate_fn.vocab_list, -# self.args.result_file, -# ) - - def ctc_align(model, dataloader, batch_size, stride_ms, token_dict, result_file): """ctc alignment. diff --git a/paddlespeech/s2t/utils/dynamic_import.py b/paddlespeech/s2t/utils/dynamic_import.py index ddf17afe..9b415bb7 100644 --- a/paddlespeech/s2t/utils/dynamic_import.py +++ b/paddlespeech/s2t/utils/dynamic_import.py @@ -11,6 +11,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. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import importlib import inspect from typing import Any diff --git a/paddlespeech/t2s/training/extension.py b/paddlespeech/t2s/training/extension.py index 07e92696..cc59e922 100644 --- a/paddlespeech/t2s/training/extension.py +++ b/paddlespeech/t2s/training/extension.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) from typing import Callable PRIORITY_WRITER = 300 diff --git a/paddlespeech/t2s/training/extensions/evaluator.py b/paddlespeech/t2s/training/extensions/evaluator.py index 28249d09..3d17f70c 100644 --- a/paddlespeech/t2s/training/extensions/evaluator.py +++ b/paddlespeech/t2s/training/extensions/evaluator.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) from typing import Dict import paddle diff --git a/paddlespeech/t2s/training/extensions/snapshot.py b/paddlespeech/t2s/training/extensions/snapshot.py index 2e401596..f9b67268 100644 --- a/paddlespeech/t2s/training/extensions/snapshot.py +++ b/paddlespeech/t2s/training/extensions/snapshot.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import logging import os from datetime import datetime diff --git a/paddlespeech/t2s/training/reporter.py b/paddlespeech/t2s/training/reporter.py index 013c754e..93c1e177 100644 --- a/paddlespeech/t2s/training/reporter.py +++ b/paddlespeech/t2s/training/reporter.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import contextlib import math from collections import defaultdict diff --git a/paddlespeech/t2s/training/triggers/interval_trigger.py b/paddlespeech/t2s/training/triggers/interval_trigger.py index 98c03684..a83139ba 100644 --- a/paddlespeech/t2s/training/triggers/interval_trigger.py +++ b/paddlespeech/t2s/training/triggers/interval_trigger.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class IntervalTrigger(object): diff --git a/paddlespeech/t2s/training/triggers/limit_trigger.py b/paddlespeech/t2s/training/triggers/limit_trigger.py index dd7a135e..db1db774 100644 --- a/paddlespeech/t2s/training/triggers/limit_trigger.py +++ b/paddlespeech/t2s/training/triggers/limit_trigger.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class LimitTrigger(object): diff --git a/paddlespeech/t2s/training/triggers/time_trigger.py b/paddlespeech/t2s/training/triggers/time_trigger.py index aff93825..d7123524 100644 --- a/paddlespeech/t2s/training/triggers/time_trigger.py +++ b/paddlespeech/t2s/training/triggers/time_trigger.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class TimeTrigger(object): diff --git a/paddlespeech/t2s/training/updater.py b/paddlespeech/t2s/training/updater.py index 1db3d5f9..a7ea9c2d 100644 --- a/paddlespeech/t2s/training/updater.py +++ b/paddlespeech/t2s/training/updater.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import logging from dataclasses import dataclass diff --git a/paddlespeech/t2s/training/updaters/standard_updater.py b/paddlespeech/t2s/training/updaters/standard_updater.py index 2d00d196..ecbe0e6a 100644 --- a/paddlespeech/t2s/training/updaters/standard_updater.py +++ b/paddlespeech/t2s/training/updaters/standard_updater.py @@ -11,6 +11,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. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import logging import time from typing import Dict From 38cf56295a8f6cc826beecd12bbc9a0f2309a30c Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Thu, 4 Nov 2021 03:42:44 +0000 Subject: [PATCH 3/5] fix reference format --- paddlespeech/s2t/decoders/beam_search/beam_search.py | 2 +- paddlespeech/s2t/decoders/scorers/ctc.py | 2 +- paddlespeech/s2t/decoders/scorers/length_bonus.py | 2 +- paddlespeech/s2t/decoders/scorers/ngram.py | 2 +- paddlespeech/s2t/decoders/scorers/scorer_interface.py | 2 +- paddlespeech/s2t/decoders/utils.py | 2 +- paddlespeech/s2t/io/batchfy.py | 2 +- paddlespeech/s2t/io/converter.py | 2 +- paddlespeech/s2t/io/dataset.py | 4 ++-- paddlespeech/s2t/io/reader.py | 2 +- paddlespeech/s2t/models/asr_interface.py | 2 +- paddlespeech/s2t/models/lm/transformer.py | 2 +- paddlespeech/s2t/models/lm_interface.py | 2 +- paddlespeech/s2t/models/st_interface.py | 2 +- paddlespeech/s2t/modules/attention.py | 2 +- paddlespeech/s2t/modules/cmvn.py | 2 +- paddlespeech/s2t/modules/conformer_convolution.py | 2 +- paddlespeech/s2t/modules/decoder.py | 2 +- paddlespeech/s2t/modules/decoder_layer.py | 2 +- paddlespeech/s2t/modules/embedding.py | 2 +- paddlespeech/s2t/modules/encoder.py | 2 +- paddlespeech/s2t/modules/encoder_layer.py | 2 +- paddlespeech/s2t/modules/loss.py | 2 +- paddlespeech/s2t/modules/mask.py | 2 +- paddlespeech/s2t/modules/positionwise_feed_forward.py | 2 +- paddlespeech/s2t/modules/subsampling.py | 2 +- paddlespeech/s2t/training/extensions/evaluator.py | 2 +- paddlespeech/s2t/training/extensions/extension.py | 2 +- paddlespeech/s2t/training/extensions/plot.py | 2 +- paddlespeech/s2t/training/extensions/snapshot.py | 2 +- paddlespeech/s2t/training/optimizer.py | 2 +- paddlespeech/s2t/training/reporter.py | 2 +- paddlespeech/s2t/training/scheduler.py | 2 +- paddlespeech/s2t/training/triggers/compare_value_trigger.py | 2 +- paddlespeech/s2t/training/updaters/standard_updater.py | 2 +- paddlespeech/s2t/training/updaters/trainer.py | 2 +- paddlespeech/s2t/training/updaters/updater.py | 2 +- paddlespeech/s2t/transform/add_deltas.py | 2 +- paddlespeech/s2t/transform/channel_selector.py | 2 +- paddlespeech/s2t/transform/cmvn.py | 2 +- paddlespeech/s2t/transform/functional.py | 2 +- paddlespeech/s2t/transform/perturb.py | 2 +- paddlespeech/s2t/transform/spec_augment.py | 2 +- paddlespeech/s2t/transform/spectrogram.py | 2 +- paddlespeech/s2t/transform/transform_interface.py | 2 +- paddlespeech/s2t/transform/transformation.py | 2 +- paddlespeech/s2t/transform/wpe.py | 2 +- paddlespeech/s2t/utils/check_kwargs.py | 2 +- paddlespeech/s2t/utils/cli_readers.py | 2 +- paddlespeech/s2t/utils/cli_utils.py | 2 +- paddlespeech/s2t/utils/cli_writers.py | 2 +- paddlespeech/s2t/utils/ctc_utils.py | 2 +- paddlespeech/s2t/utils/dynamic_import.py | 2 +- paddlespeech/t2s/training/extension.py | 2 +- paddlespeech/t2s/training/extensions/evaluator.py | 2 +- paddlespeech/t2s/training/extensions/snapshot.py | 2 +- paddlespeech/t2s/training/reporter.py | 2 +- paddlespeech/t2s/training/updater.py | 2 +- paddlespeech/t2s/training/updaters/standard_updater.py | 2 +- 59 files changed, 60 insertions(+), 60 deletions(-) diff --git a/paddlespeech/s2t/decoders/beam_search/beam_search.py b/paddlespeech/s2t/decoders/beam_search/beam_search.py index 7d79246d..f331cb1c 100644 --- a/paddlespeech/s2t/decoders/beam_search/beam_search.py +++ b/paddlespeech/s2t/decoders/beam_search/beam_search.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) """Beam search module.""" from itertools import chain from typing import Any diff --git a/paddlespeech/s2t/decoders/scorers/ctc.py b/paddlespeech/s2t/decoders/scorers/ctc.py index e0ff3d5f..ace80bd3 100644 --- a/paddlespeech/s2t/decoders/scorers/ctc.py +++ b/paddlespeech/s2t/decoders/scorers/ctc.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) """ScorerInterface implementation for CTC.""" import numpy as np import paddle diff --git a/paddlespeech/s2t/decoders/scorers/length_bonus.py b/paddlespeech/s2t/decoders/scorers/length_bonus.py index 2e4c8465..c5a76db8 100644 --- a/paddlespeech/s2t/decoders/scorers/length_bonus.py +++ b/paddlespeech/s2t/decoders/scorers/length_bonus.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) """Length bonus module.""" from typing import Any from typing import List diff --git a/paddlespeech/s2t/decoders/scorers/ngram.py b/paddlespeech/s2t/decoders/scorers/ngram.py index fa8f776a..f2600828 100644 --- a/paddlespeech/s2t/decoders/scorers/ngram.py +++ b/paddlespeech/s2t/decoders/scorers/ngram.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) """Ngram lm implement.""" from abc import ABC diff --git a/paddlespeech/s2t/decoders/scorers/scorer_interface.py b/paddlespeech/s2t/decoders/scorers/scorer_interface.py index ddc780da..3272e6b7 100644 --- a/paddlespeech/s2t/decoders/scorers/scorer_interface.py +++ b/paddlespeech/s2t/decoders/scorers/scorer_interface.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) """Scorer interface module.""" import warnings from typing import Any diff --git a/paddlespeech/s2t/decoders/utils.py b/paddlespeech/s2t/decoders/utils.py index 63709d1a..a609f1c6 100644 --- a/paddlespeech/s2t/decoders/utils.py +++ b/paddlespeech/s2t/decoders/utils.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import numpy as np from paddlespeech.s2t.utils.log import Log diff --git a/paddlespeech/s2t/io/batchfy.py b/paddlespeech/s2t/io/batchfy.py index 9be37c27..f59fb24c 100644 --- a/paddlespeech/s2t/io/batchfy.py +++ b/paddlespeech/s2t/io/batchfy.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import itertools import numpy as np diff --git a/paddlespeech/s2t/io/converter.py b/paddlespeech/s2t/io/converter.py index aacbad98..b217d2b1 100644 --- a/paddlespeech/s2t/io/converter.py +++ b/paddlespeech/s2t/io/converter.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import numpy as np from paddlespeech.s2t.io.utility import pad_list diff --git a/paddlespeech/s2t/io/dataset.py b/paddlespeech/s2t/io/dataset.py index 4aff9fb2..7c96cb43 100644 --- a/paddlespeech/s2t/io/dataset.py +++ b/paddlespeech/s2t/io/dataset.py @@ -11,8 +11,8 @@ # 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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) +# Modified from wenet(https://github.com/wenet-e2e/wenet) from typing import Optional from paddle.io import Dataset diff --git a/paddlespeech/s2t/io/reader.py b/paddlespeech/s2t/io/reader.py index 1e32e620..e810662d 100644 --- a/paddlespeech/s2t/io/reader.py +++ b/paddlespeech/s2t/io/reader.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) from collections import OrderedDict import kaldiio diff --git a/paddlespeech/s2t/models/asr_interface.py b/paddlespeech/s2t/models/asr_interface.py index 76ba3e2c..8c2db279 100644 --- a/paddlespeech/s2t/models/asr_interface.py +++ b/paddlespeech/s2t/models/asr_interface.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) """ASR Interface module.""" import argparse diff --git a/paddlespeech/s2t/models/lm/transformer.py b/paddlespeech/s2t/models/lm/transformer.py index 3fadba1a..85bd7c23 100644 --- a/paddlespeech/s2t/models/lm/transformer.py +++ b/paddlespeech/s2t/models/lm/transformer.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) from typing import Any from typing import List from typing import Tuple diff --git a/paddlespeech/s2t/models/lm_interface.py b/paddlespeech/s2t/models/lm_interface.py index 02df874f..c8f3776a 100644 --- a/paddlespeech/s2t/models/lm_interface.py +++ b/paddlespeech/s2t/models/lm_interface.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) """Language model interface.""" import argparse diff --git a/paddlespeech/s2t/models/st_interface.py b/paddlespeech/s2t/models/st_interface.py index 66ba49da..4d368590 100644 --- a/paddlespeech/s2t/models/st_interface.py +++ b/paddlespeech/s2t/models/st_interface.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) """ST Interface module.""" from .asr_interface import ASRInterface from paddlespeech.s2t.utils.dynamic_import import dynamic_import diff --git a/paddlespeech/s2t/modules/attention.py b/paddlespeech/s2t/modules/attention.py index 5cb37ee7..80eaf975 100644 --- a/paddlespeech/s2t/modules/attention.py +++ b/paddlespeech/s2t/modules/attention.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) """Multi-Head Attention layer definition.""" import math from typing import Optional diff --git a/paddlespeech/s2t/modules/cmvn.py b/paddlespeech/s2t/modules/cmvn.py index df529c1c..6e97f824 100644 --- a/paddlespeech/s2t/modules/cmvn.py +++ b/paddlespeech/s2t/modules/cmvn.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) import paddle from paddle import nn diff --git a/paddlespeech/s2t/modules/conformer_convolution.py b/paddlespeech/s2t/modules/conformer_convolution.py index b4632d42..7601a5cc 100644 --- a/paddlespeech/s2t/modules/conformer_convolution.py +++ b/paddlespeech/s2t/modules/conformer_convolution.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) """ConvolutionModule definition.""" from typing import Optional from typing import Tuple diff --git a/paddlespeech/s2t/modules/decoder.py b/paddlespeech/s2t/modules/decoder.py index bd3760c4..b0ab869a 100644 --- a/paddlespeech/s2t/modules/decoder.py +++ b/paddlespeech/s2t/modules/decoder.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) """Decoder definition.""" from typing import Any from typing import List diff --git a/paddlespeech/s2t/modules/decoder_layer.py b/paddlespeech/s2t/modules/decoder_layer.py index 62682bfb..4d516068 100644 --- a/paddlespeech/s2t/modules/decoder_layer.py +++ b/paddlespeech/s2t/modules/decoder_layer.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) """Decoder self-attention layer definition.""" from typing import Optional from typing import Tuple diff --git a/paddlespeech/s2t/modules/embedding.py b/paddlespeech/s2t/modules/embedding.py index 2b92aafe..9207658f 100644 --- a/paddlespeech/s2t/modules/embedding.py +++ b/paddlespeech/s2t/modules/embedding.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) """Positonal Encoding Module.""" import math from typing import Tuple diff --git a/paddlespeech/s2t/modules/encoder.py b/paddlespeech/s2t/modules/encoder.py index bf9cfeaa..0cde5b9f 100644 --- a/paddlespeech/s2t/modules/encoder.py +++ b/paddlespeech/s2t/modules/encoder.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) """Encoder definition.""" from typing import List from typing import Optional diff --git a/paddlespeech/s2t/modules/encoder_layer.py b/paddlespeech/s2t/modules/encoder_layer.py index 7cff5442..29d5a2d8 100644 --- a/paddlespeech/s2t/modules/encoder_layer.py +++ b/paddlespeech/s2t/modules/encoder_layer.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) """Encoder self-attention layer definition.""" from typing import Optional from typing import Tuple diff --git a/paddlespeech/s2t/modules/loss.py b/paddlespeech/s2t/modules/loss.py index 90f941f7..5750f5a0 100644 --- a/paddlespeech/s2t/modules/loss.py +++ b/paddlespeech/s2t/modules/loss.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) import inspect import paddle diff --git a/paddlespeech/s2t/modules/mask.py b/paddlespeech/s2t/modules/mask.py index 964d5086..6576cb92 100644 --- a/paddlespeech/s2t/modules/mask.py +++ b/paddlespeech/s2t/modules/mask.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) import paddle from paddlespeech.s2t.utils.log import Log diff --git a/paddlespeech/s2t/modules/positionwise_feed_forward.py b/paddlespeech/s2t/modules/positionwise_feed_forward.py index 0d9c2e29..347264e9 100644 --- a/paddlespeech/s2t/modules/positionwise_feed_forward.py +++ b/paddlespeech/s2t/modules/positionwise_feed_forward.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) """Positionwise feed forward layer definition.""" import paddle from paddle import nn diff --git a/paddlespeech/s2t/modules/subsampling.py b/paddlespeech/s2t/modules/subsampling.py index b60a6b1c..759bd540 100644 --- a/paddlespeech/s2t/modules/subsampling.py +++ b/paddlespeech/s2t/modules/subsampling.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) """Subsampling layer definition.""" from typing import Tuple diff --git a/paddlespeech/s2t/training/extensions/evaluator.py b/paddlespeech/s2t/training/extensions/evaluator.py index 5989e313..b96a4818 100644 --- a/paddlespeech/s2t/training/extensions/evaluator.py +++ b/paddlespeech/s2t/training/extensions/evaluator.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) from typing import Dict import paddle diff --git a/paddlespeech/s2t/training/extensions/extension.py b/paddlespeech/s2t/training/extensions/extension.py index 1eb03427..7493213a 100644 --- a/paddlespeech/s2t/training/extensions/extension.py +++ b/paddlespeech/s2t/training/extensions/extension.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) PRIORITY_WRITER = 300 PRIORITY_EDITOR = 200 PRIORITY_READER = 100 diff --git a/paddlespeech/s2t/training/extensions/plot.py b/paddlespeech/s2t/training/extensions/plot.py index d2e5e321..7782b95b 100644 --- a/paddlespeech/s2t/training/extensions/plot.py +++ b/paddlespeech/s2t/training/extensions/plot.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) import copy import os diff --git a/paddlespeech/s2t/training/extensions/snapshot.py b/paddlespeech/s2t/training/extensions/snapshot.py index fb4e80fe..426bf72c 100644 --- a/paddlespeech/s2t/training/extensions/snapshot.py +++ b/paddlespeech/s2t/training/extensions/snapshot.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) import os from datetime import datetime from pathlib import Path diff --git a/paddlespeech/s2t/training/optimizer.py b/paddlespeech/s2t/training/optimizer.py index f0bcb313..f7f70c57 100644 --- a/paddlespeech/s2t/training/optimizer.py +++ b/paddlespeech/s2t/training/optimizer.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) from typing import Any from typing import Dict from typing import Text diff --git a/paddlespeech/s2t/training/reporter.py b/paddlespeech/s2t/training/reporter.py index 22b26752..4d8eb2a1 100644 --- a/paddlespeech/s2t/training/reporter.py +++ b/paddlespeech/s2t/training/reporter.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) import contextlib import math from collections import defaultdict diff --git a/paddlespeech/s2t/training/scheduler.py b/paddlespeech/s2t/training/scheduler.py index 732cbf0b..0222246e 100644 --- a/paddlespeech/s2t/training/scheduler.py +++ b/paddlespeech/s2t/training/scheduler.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) from typing import Any from typing import Dict from typing import Text diff --git a/paddlespeech/s2t/training/triggers/compare_value_trigger.py b/paddlespeech/s2t/training/triggers/compare_value_trigger.py index 7c550268..5c2a2721 100644 --- a/paddlespeech/s2t/training/triggers/compare_value_trigger.py +++ b/paddlespeech/s2t/training/triggers/compare_value_trigger.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) from ..reporter import DictSummary from .utils import get_trigger diff --git a/paddlespeech/s2t/training/updaters/standard_updater.py b/paddlespeech/s2t/training/updaters/standard_updater.py index a686af74..a320a80d 100644 --- a/paddlespeech/s2t/training/updaters/standard_updater.py +++ b/paddlespeech/s2t/training/updaters/standard_updater.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) from typing import Dict from typing import Optional diff --git a/paddlespeech/s2t/training/updaters/trainer.py b/paddlespeech/s2t/training/updaters/trainer.py index 5a1295eb..a0698c60 100644 --- a/paddlespeech/s2t/training/updaters/trainer.py +++ b/paddlespeech/s2t/training/updaters/trainer.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) import sys import traceback from collections import OrderedDict diff --git a/paddlespeech/s2t/training/updaters/updater.py b/paddlespeech/s2t/training/updaters/updater.py index 427722d2..6875deb3 100644 --- a/paddlespeech/s2t/training/updaters/updater.py +++ b/paddlespeech/s2t/training/updaters/updater.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) from dataclasses import dataclass import paddle diff --git a/paddlespeech/s2t/transform/add_deltas.py b/paddlespeech/s2t/transform/add_deltas.py index 0a2f3419..1387fe9d 100644 --- a/paddlespeech/s2t/transform/add_deltas.py +++ b/paddlespeech/s2t/transform/add_deltas.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import numpy as np diff --git a/paddlespeech/s2t/transform/channel_selector.py b/paddlespeech/s2t/transform/channel_selector.py index bc8a14bf..b078dcf8 100644 --- a/paddlespeech/s2t/transform/channel_selector.py +++ b/paddlespeech/s2t/transform/channel_selector.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import numpy diff --git a/paddlespeech/s2t/transform/cmvn.py b/paddlespeech/s2t/transform/cmvn.py index 749d5e18..4d2d2324 100644 --- a/paddlespeech/s2t/transform/cmvn.py +++ b/paddlespeech/s2t/transform/cmvn.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import io import h5py diff --git a/paddlespeech/s2t/transform/functional.py b/paddlespeech/s2t/transform/functional.py index afbf4a59..ccb50081 100644 --- a/paddlespeech/s2t/transform/functional.py +++ b/paddlespeech/s2t/transform/functional.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import inspect from paddlespeech.s2t.transform.transform_interface import TransformInterface diff --git a/paddlespeech/s2t/transform/perturb.py b/paddlespeech/s2t/transform/perturb.py index 8671420c..153d494b 100644 --- a/paddlespeech/s2t/transform/perturb.py +++ b/paddlespeech/s2t/transform/perturb.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import librosa import numpy import scipy diff --git a/paddlespeech/s2t/transform/spec_augment.py b/paddlespeech/s2t/transform/spec_augment.py index 76e10184..83e4e2e7 100644 --- a/paddlespeech/s2t/transform/spec_augment.py +++ b/paddlespeech/s2t/transform/spec_augment.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) """Spec Augment module for preprocessing i.e., data augmentation""" import random diff --git a/paddlespeech/s2t/transform/spectrogram.py b/paddlespeech/s2t/transform/spectrogram.py index aeedf545..df3130da 100644 --- a/paddlespeech/s2t/transform/spectrogram.py +++ b/paddlespeech/s2t/transform/spectrogram.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import librosa import numpy as np diff --git a/paddlespeech/s2t/transform/transform_interface.py b/paddlespeech/s2t/transform/transform_interface.py index a7e04ffc..8bc62420 100644 --- a/paddlespeech/s2t/transform/transform_interface.py +++ b/paddlespeech/s2t/transform/transform_interface.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) class TransformInterface: diff --git a/paddlespeech/s2t/transform/transformation.py b/paddlespeech/s2t/transform/transformation.py index f0d1cd17..1aee4b36 100644 --- a/paddlespeech/s2t/transform/transformation.py +++ b/paddlespeech/s2t/transform/transformation.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) """Transformation module.""" import copy import io diff --git a/paddlespeech/s2t/transform/wpe.py b/paddlespeech/s2t/transform/wpe.py index 463810dd..777379d0 100644 --- a/paddlespeech/s2t/transform/wpe.py +++ b/paddlespeech/s2t/transform/wpe.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) from nara_wpe.wpe import wpe diff --git a/paddlespeech/s2t/utils/check_kwargs.py b/paddlespeech/s2t/utils/check_kwargs.py index 11214aac..0aa839ac 100644 --- a/paddlespeech/s2t/utils/check_kwargs.py +++ b/paddlespeech/s2t/utils/check_kwargs.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import inspect diff --git a/paddlespeech/s2t/utils/cli_readers.py b/paddlespeech/s2t/utils/cli_readers.py index a1742d4f..735d590d 100644 --- a/paddlespeech/s2t/utils/cli_readers.py +++ b/paddlespeech/s2t/utils/cli_readers.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import io import logging import sys diff --git a/paddlespeech/s2t/utils/cli_utils.py b/paddlespeech/s2t/utils/cli_utils.py index 8c3953d6..4aee3f43 100644 --- a/paddlespeech/s2t/utils/cli_utils.py +++ b/paddlespeech/s2t/utils/cli_utils.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import sys from collections.abc import Sequence from distutils.util import strtobool as dist_strtobool diff --git a/paddlespeech/s2t/utils/cli_writers.py b/paddlespeech/s2t/utils/cli_writers.py index 4fa7824e..d3a4c2b8 100644 --- a/paddlespeech/s2t/utils/cli_writers.py +++ b/paddlespeech/s2t/utils/cli_writers.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) from pathlib import Path from typing import Dict diff --git a/paddlespeech/s2t/utils/ctc_utils.py b/paddlespeech/s2t/utils/ctc_utils.py index 5e571446..e005e5d2 100644 --- a/paddlespeech/s2t/utils/ctc_utils.py +++ b/paddlespeech/s2t/utils/ctc_utils.py @@ -11,7 +11,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. -# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from wenet(https://github.com/wenet-e2e/wenet) from typing import List import numpy as np diff --git a/paddlespeech/s2t/utils/dynamic_import.py b/paddlespeech/s2t/utils/dynamic_import.py index 9b415bb7..50bd73a6 100644 --- a/paddlespeech/s2t/utils/dynamic_import.py +++ b/paddlespeech/s2t/utils/dynamic_import.py @@ -11,7 +11,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. -# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Modified from espnet(https://github.com/espnet/espnet) import importlib import inspect from typing import Any diff --git a/paddlespeech/t2s/training/extension.py b/paddlespeech/t2s/training/extension.py index cc59e922..3f755a76 100644 --- a/paddlespeech/t2s/training/extension.py +++ b/paddlespeech/t2s/training/extension.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) from typing import Callable PRIORITY_WRITER = 300 diff --git a/paddlespeech/t2s/training/extensions/evaluator.py b/paddlespeech/t2s/training/extensions/evaluator.py index 3d17f70c..3940dffe 100644 --- a/paddlespeech/t2s/training/extensions/evaluator.py +++ b/paddlespeech/t2s/training/extensions/evaluator.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) from typing import Dict import paddle diff --git a/paddlespeech/t2s/training/extensions/snapshot.py b/paddlespeech/t2s/training/extensions/snapshot.py index f9b67268..3a86556b 100644 --- a/paddlespeech/t2s/training/extensions/snapshot.py +++ b/paddlespeech/t2s/training/extensions/snapshot.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) import logging import os from datetime import datetime diff --git a/paddlespeech/t2s/training/reporter.py b/paddlespeech/t2s/training/reporter.py index 93c1e177..a61506da 100644 --- a/paddlespeech/t2s/training/reporter.py +++ b/paddlespeech/t2s/training/reporter.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) import contextlib import math from collections import defaultdict diff --git a/paddlespeech/t2s/training/updater.py b/paddlespeech/t2s/training/updater.py index a7ea9c2d..a7055031 100644 --- a/paddlespeech/t2s/training/updater.py +++ b/paddlespeech/t2s/training/updater.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) import logging from dataclasses import dataclass diff --git a/paddlespeech/t2s/training/updaters/standard_updater.py b/paddlespeech/t2s/training/updaters/standard_updater.py index ecbe0e6a..b1c48620 100644 --- a/paddlespeech/t2s/training/updaters/standard_updater.py +++ b/paddlespeech/t2s/training/updaters/standard_updater.py @@ -11,7 +11,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. -# Reference chainer MIT (https://opensource.org/licenses/MIT) +# Modified from chainer(https://github.com/chainer/chainer) import logging import time from typing import Dict From 6655728b08cf9e8d94c4b2e8e36fb0e7ae02f47b Mon Sep 17 00:00:00 2001 From: TianYuan Date: Thu, 4 Nov 2021 04:59:39 +0000 Subject: [PATCH 4/5] add reference --- paddlespeech/t2s/data/batch.py | 5 ++--- paddlespeech/t2s/data/get_feats.py | 1 + paddlespeech/t2s/models/fastspeech2/fastspeech2.py | 1 + paddlespeech/t2s/models/melgan/melgan.py | 1 + paddlespeech/t2s/models/parallel_wavegan/parallel_wavegan.py | 1 + paddlespeech/t2s/models/transformer_tts/transformer_tts.py | 1 + paddlespeech/t2s/modules/adversarial_loss.py | 1 + .../t2s/modules/fastspeech2_predictor/duration_predictor.py | 1 + .../t2s/modules/fastspeech2_predictor/length_regulator.py | 1 + .../t2s/modules/fastspeech2_predictor/variance_predictor.py | 1 + .../t2s/modules/fastspeech2_transformer/attention.py | 1 + paddlespeech/t2s/modules/fastspeech2_transformer/decoder.py | 1 + .../t2s/modules/fastspeech2_transformer/decoder_layer.py | 1 + .../t2s/modules/fastspeech2_transformer/embedding.py | 1 + paddlespeech/t2s/modules/fastspeech2_transformer/encoder.py | 1 + .../t2s/modules/fastspeech2_transformer/encoder_layer.py | 1 + .../t2s/modules/fastspeech2_transformer/lightconv.py | 1 + .../fastspeech2_transformer/positionwise_feed_forward.py | 1 + paddlespeech/t2s/modules/fastspeech2_transformer/repeat.py | 1 + paddlespeech/t2s/modules/nets_utils.py | 1 + paddlespeech/t2s/modules/pqmf.py | 1 + paddlespeech/t2s/modules/residual_stack.py | 1 + paddlespeech/t2s/modules/stft_loss.py | 1 + paddlespeech/t2s/modules/style_encoder.py | 1 + paddlespeech/t2s/modules/tacotron2/decoder.py | 1 + paddlespeech/t2s/modules/tacotron2/encoder.py | 1 + 26 files changed, 27 insertions(+), 3 deletions(-) diff --git a/paddlespeech/t2s/data/batch.py b/paddlespeech/t2s/data/batch.py index 5e7ac399..9d83bbe0 100644 --- a/paddlespeech/t2s/data/batch.py +++ b/paddlespeech/t2s/data/batch.py @@ -52,9 +52,8 @@ def batch_text_id(minibatch, pad_id=0, dtype=np.int64): """ peek_example = minibatch[0] assert len(peek_example.shape) == 1, "text example is an 1D tensor" - - lengths = [example.shape[0] for example in - minibatch] # assume (channel, n_samples) or (n_samples, ) + # assume (channel, n_samples) or (n_samples, ) + lengths = [example.shape[0] for example in minibatch] max_len = np.max(lengths) batch = [] diff --git a/paddlespeech/t2s/data/get_feats.py b/paddlespeech/t2s/data/get_feats.py index d7ab7640..b4bea0bd 100644 --- a/paddlespeech/t2s/data/get_feats.py +++ b/paddlespeech/t2s/data/get_feats.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) import librosa import numpy as np import pyworld diff --git a/paddlespeech/t2s/models/fastspeech2/fastspeech2.py b/paddlespeech/t2s/models/fastspeech2/fastspeech2.py index 754fef2a..5942533a 100644 --- a/paddlespeech/t2s/models/fastspeech2/fastspeech2.py +++ b/paddlespeech/t2s/models/fastspeech2/fastspeech2.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Fastspeech2 related modules for paddle""" from typing import Dict from typing import Sequence diff --git a/paddlespeech/t2s/models/melgan/melgan.py b/paddlespeech/t2s/models/melgan/melgan.py index 94d6e631..80bb1c1b 100644 --- a/paddlespeech/t2s/models/melgan/melgan.py +++ b/paddlespeech/t2s/models/melgan/melgan.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """MelGAN Modules.""" from typing import Any from typing import Dict diff --git a/paddlespeech/t2s/models/parallel_wavegan/parallel_wavegan.py b/paddlespeech/t2s/models/parallel_wavegan/parallel_wavegan.py index fe4ec355..9b0ba474 100644 --- a/paddlespeech/t2s/models/parallel_wavegan/parallel_wavegan.py +++ b/paddlespeech/t2s/models/parallel_wavegan/parallel_wavegan.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) import math from typing import Any from typing import Dict diff --git a/paddlespeech/t2s/models/transformer_tts/transformer_tts.py b/paddlespeech/t2s/models/transformer_tts/transformer_tts.py index f8feb553..97233c76 100644 --- a/paddlespeech/t2s/models/transformer_tts/transformer_tts.py +++ b/paddlespeech/t2s/models/transformer_tts/transformer_tts.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Fastspeech2 related modules for paddle""" from typing import Dict from typing import Sequence diff --git a/paddlespeech/t2s/modules/adversarial_loss.py b/paddlespeech/t2s/modules/adversarial_loss.py index 02e8c807..d2c8f7a9 100644 --- a/paddlespeech/t2s/modules/adversarial_loss.py +++ b/paddlespeech/t2s/modules/adversarial_loss.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Adversarial loss modules.""" import paddle import paddle.nn.functional as F diff --git a/paddlespeech/t2s/modules/fastspeech2_predictor/duration_predictor.py b/paddlespeech/t2s/modules/fastspeech2_predictor/duration_predictor.py index eac7cf99..b269b686 100644 --- a/paddlespeech/t2s/modules/fastspeech2_predictor/duration_predictor.py +++ b/paddlespeech/t2s/modules/fastspeech2_predictor/duration_predictor.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Duration predictor related modules.""" import paddle from paddle import nn diff --git a/paddlespeech/t2s/modules/fastspeech2_predictor/length_regulator.py b/paddlespeech/t2s/modules/fastspeech2_predictor/length_regulator.py index a4d508ad..bf595b24 100644 --- a/paddlespeech/t2s/modules/fastspeech2_predictor/length_regulator.py +++ b/paddlespeech/t2s/modules/fastspeech2_predictor/length_regulator.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Length regulator related modules.""" import paddle from paddle import nn diff --git a/paddlespeech/t2s/modules/fastspeech2_predictor/variance_predictor.py b/paddlespeech/t2s/modules/fastspeech2_predictor/variance_predictor.py index 0fd108d3..417fca82 100644 --- a/paddlespeech/t2s/modules/fastspeech2_predictor/variance_predictor.py +++ b/paddlespeech/t2s/modules/fastspeech2_predictor/variance_predictor.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Variance predictor related modules.""" import paddle from paddle import nn diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/attention.py b/paddlespeech/t2s/modules/fastspeech2_transformer/attention.py index a61f1245..b11329b0 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/attention.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/attention.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Multi-Head Attention layer definition.""" import math diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/decoder.py b/paddlespeech/t2s/modules/fastspeech2_transformer/decoder.py index c41e3995..489fda12 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/decoder.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/decoder.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) # 暂时删除了 dyminic conv """Decoder definition.""" import logging diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/decoder_layer.py b/paddlespeech/t2s/modules/fastspeech2_transformer/decoder_layer.py index 9b042483..0310d83e 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/decoder_layer.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/decoder_layer.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Decoder self-attention layer definition.""" import paddle from paddle import nn diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/embedding.py b/paddlespeech/t2s/modules/fastspeech2_transformer/embedding.py index 1dfd6dfd..f26c9dcb 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/embedding.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/embedding.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Positional Encoding Module.""" import math diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/encoder.py b/paddlespeech/t2s/modules/fastspeech2_transformer/encoder.py index 904b9d8b..62d7a96f 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/encoder.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/encoder.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) import logging from paddle import nn diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/encoder_layer.py b/paddlespeech/t2s/modules/fastspeech2_transformer/encoder_layer.py index d8f89d67..fb2c2e82 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/encoder_layer.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/encoder_layer.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Encoder self-attention layer definition.""" import paddle from paddle import nn diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/lightconv.py b/paddlespeech/t2s/modules/fastspeech2_transformer/lightconv.py index 3aceed31..1aeb6d6e 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/lightconv.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/lightconv.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Lightweight Convolution Module.""" import numpy import paddle diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/positionwise_feed_forward.py b/paddlespeech/t2s/modules/fastspeech2_transformer/positionwise_feed_forward.py index 39c06eba..297a3b4f 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/positionwise_feed_forward.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/positionwise_feed_forward.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Positionwise feed forward layer definition.""" import paddle diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/repeat.py b/paddlespeech/t2s/modules/fastspeech2_transformer/repeat.py index 3c62298e..0325a638 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/repeat.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/repeat.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Repeat the same layer definition.""" import paddle diff --git a/paddlespeech/t2s/modules/nets_utils.py b/paddlespeech/t2s/modules/nets_utils.py index 0696335a..30d3db86 100644 --- a/paddlespeech/t2s/modules/nets_utils.py +++ b/paddlespeech/t2s/modules/nets_utils.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) import paddle from paddle import nn from typeguard import check_argument_types diff --git a/paddlespeech/t2s/modules/pqmf.py b/paddlespeech/t2s/modules/pqmf.py index 70210e3b..c299fb57 100644 --- a/paddlespeech/t2s/modules/pqmf.py +++ b/paddlespeech/t2s/modules/pqmf.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Pseudo QMF modules.""" import numpy as np import paddle diff --git a/paddlespeech/t2s/modules/residual_stack.py b/paddlespeech/t2s/modules/residual_stack.py index 71bd4f0c..236f41d3 100644 --- a/paddlespeech/t2s/modules/residual_stack.py +++ b/paddlespeech/t2s/modules/residual_stack.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Residual stack module in MelGAN.""" from typing import Any from typing import Dict diff --git a/paddlespeech/t2s/modules/stft_loss.py b/paddlespeech/t2s/modules/stft_loss.py index 8af55ab1..31963e71 100644 --- a/paddlespeech/t2s/modules/stft_loss.py +++ b/paddlespeech/t2s/modules/stft_loss.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) import paddle from paddle import nn from paddle.nn import functional as F diff --git a/paddlespeech/t2s/modules/style_encoder.py b/paddlespeech/t2s/modules/style_encoder.py index c6b12d44..868a73a9 100644 --- a/paddlespeech/t2s/modules/style_encoder.py +++ b/paddlespeech/t2s/modules/style_encoder.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Style encoder of GST-Tacotron.""" from typing import Sequence diff --git a/paddlespeech/t2s/modules/tacotron2/decoder.py b/paddlespeech/t2s/modules/tacotron2/decoder.py index 779fd0c6..691bb3ee 100644 --- a/paddlespeech/t2s/modules/tacotron2/decoder.py +++ b/paddlespeech/t2s/modules/tacotron2/decoder.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Tacotron2 decoder related modules.""" import paddle.nn.functional as F import six diff --git a/paddlespeech/t2s/modules/tacotron2/encoder.py b/paddlespeech/t2s/modules/tacotron2/encoder.py index 95f71d5e..b95e3529 100644 --- a/paddlespeech/t2s/modules/tacotron2/encoder.py +++ b/paddlespeech/t2s/modules/tacotron2/encoder.py @@ -11,6 +11,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. +# Modified from espnet(https://github.com/espnet/espnet) """Tacotron2 encoder related modules.""" import paddle import six From 98c1131058d2bc7fb8bda23c2325ea626135fc80 Mon Sep 17 00:00:00 2001 From: KP <109694228@qq.com> Date: Thu, 4 Nov 2021 17:11:22 +0800 Subject: [PATCH 5/5] Add librosa reference. --- audio/paddleaudio/features/core.py | 1 + docs/source/reference.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/audio/paddleaudio/features/core.py b/audio/paddleaudio/features/core.py index f53f60f3..dd25724f 100644 --- a/audio/paddleaudio/features/core.py +++ b/audio/paddleaudio/features/core.py @@ -11,6 +11,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. +# Modified from librosa(https://github.com/librosa/librosa) import warnings from typing import List from typing import Optional diff --git a/docs/source/reference.md b/docs/source/reference.md index ac704cb0..39c7afe5 100644 --- a/docs/source/reference.md +++ b/docs/source/reference.md @@ -31,3 +31,7 @@ We borrowed a lot of code from these repos to build `model` and `engine`, thank * [chainer](https://github.com/chainer/chainer/blob/master/LICENSE) - MIT License - Updater, Trainer and more utils. + +* [librosa](https://github.com/librosa/librosa/blob/main/LICENSE.md) +- ISC License +- Audio feature