From bd45b0ba33270efbb65909b0a70f301fe6896ffa Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Thu, 4 Nov 2021 03:10:13 +0000 Subject: [PATCH 1/7] 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 c501e0c37..9a049df8d 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 d3676fff2..000000000 --- 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 000000000..ac704cb08 --- /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 999489620615cad5da22495f965d212b00036506 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Thu, 4 Nov 2021 03:28:28 +0000 Subject: [PATCH 2/7] 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 ee7d53dea..0b91ddd1b 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 3fc1c435f..ed9790cdf 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 6c4f069d8..7d79246df 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 d0710f9c4..d9324ca02 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 e4d81f409..cd7a360ae 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 74a5f578d..e0ff3d5f9 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 864e22d17..2e4c84651 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 a34d82483..fa8f776af 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 366904a47..ddc780da2 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 7dff14c11..63709d1a9 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 3517f059a..9be37c277 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 94634360c..aacbad980 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 121410c8b..4aff9fb2e 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 faf2f600b..1e32e620c 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 ece83e516..76ba3e2cf 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 447f1dbc3..3fadba1a3 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 7ae39b351..02df874f1 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 331f1e824..66ba49da5 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 d5246777c..5cb37ee7f 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 9aa938af7..df529c1c4 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 39b1ee327..b4632d429 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 7d545f5e8..bd3760c48 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 816bc9f61..62682bfbe 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 938898c13..2b92aafe6 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 246536dbe..bf9cfeaa6 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 0525a6147..7cff5442f 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 012ef2426..90f941f7a 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 5c7886d45..964d5086f 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 ccea8e57d..0d9c2e296 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 6b8c28c6a..b60a6b1cd 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 9da0d7316..5989e3135 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 02f924951..1eb034273 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 6fbb4d4dc..d2e5e321f 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 753c7ec0e..fb4e80fee 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 8ed30769f..f0bcb313e 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 7afc33f38..22b267521 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 f850f6f50..732cbf0b5 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 efb928e2c..7c5502681 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 1e04afad8..14201d29c 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 ecd527ac5..cd96040ef 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 e31179a9f..53c398d11 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 83180a38d..a686af743 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 dcf844e36..5a1295eb3 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 ff8d925ff..427722d2f 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 4cab0084e..0a2f34198 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 d985b482d..bc8a14bf0 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 5d3185906..749d5e187 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 e23d55f9d..afbf4a59f 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 f7e8bb764..8671420c1 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 01ead8add..76e101848 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 e63bd6803..aeedf545b 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 7ab29554e..a7e04ffcf 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 d9bb7c168..f0d1cd175 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 d82005f64..463810dda 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 6f86e56f7..9184fd6af 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 1ee7329ba..11214aac7 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 010adb7a9..a1742d4f0 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 f8e1d60bf..8c3953d69 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 5866a82ee..4fa7824e7 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 ff23350a3..5e5714469 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 ddf17afe9..9b415bb7f 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 07e92696e..cc59e9222 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 28249d096..3d17f70cd 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 2e4015969..f9b672687 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 013c754e3..93c1e1776 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 98c036846..a83139ba9 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 dd7a135e0..db1db774e 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 aff938255..d7123524b 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 1db3d5f9e..a7ea9c2d3 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 2d00d196f..ecbe0e6a8 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 d9cc902b48db79c6de430d1f2fa9c5c50b7c15f3 Mon Sep 17 00:00:00 2001 From: TianYuan Date: Thu, 4 Nov 2021 03:35:58 +0000 Subject: [PATCH 3/7] fix pwgan benchmark --- tests/benchmark/pwgan/run_all.sh | 12 ++++++------ tests/benchmark/pwgan/run_benchmark.sh | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/benchmark/pwgan/run_all.sh b/tests/benchmark/pwgan/run_all.sh index 9d722aaf1..5b66d5f58 100755 --- a/tests/benchmark/pwgan/run_all.sh +++ b/tests/benchmark/pwgan/run_all.sh @@ -25,11 +25,11 @@ fi # 数据预处理 if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then - python3 paddlespeech/t2s/exps/gan_vocoder/preprocess.py --rootdir=BZNSYP/ --dumpdir=dump --num-cpu=20 --cut-sil=True --dur-file=durations.txt --config=examples/csmsc/voc1/conf/default.yaml - python3 utils/compute_statistics.py --metadata=dump/train/raw/metadata.jsonl --field-name="feats" - python3 paddlespeech/t2s/exps/gan_vocoder/normalize.py --metadata=dump/train/raw/metadata.jsonl --dumpdir=dump/train/norm --stats=dump/train/feats_stats.npy - python3 paddlespeech/t2s/exps/gan_vocoder/normalize.py --metadata=dump/dev/raw/metadata.jsonl --dumpdir=dump/dev/norm --stats=dump/train/feats_stats.npy - python3 paddlespeech/t2s/exps/gan_vocoder/normalize.py --metadata=dump/test/raw/metadata.jsonl --dumpdir=dump/test/norm --stats=dump/train/feats_stats.npy + python paddlespeech/t2s/exps/gan_vocoder/preprocess.py --rootdir=BZNSYP/ --dumpdir=dump --num-cpu=20 --cut-sil=True --dur-file=durations.txt --config=examples/csmsc/voc1/conf/default.yaml + python utils/compute_statistics.py --metadata=dump/train/raw/metadata.jsonl --field-name="feats" + python paddlespeech/t2s/exps/gan_vocoder/normalize.py --metadata=dump/train/raw/metadata.jsonl --dumpdir=dump/train/norm --stats=dump/train/feats_stats.npy + python paddlespeech/t2s/exps/gan_vocoder/normalize.py --metadata=dump/dev/raw/metadata.jsonl --dumpdir=dump/dev/norm --stats=dump/train/feats_stats.npy + python paddlespeech/t2s/exps/gan_vocoder/normalize.py --metadata=dump/test/raw/metadata.jsonl --dumpdir=dump/test/norm --stats=dump/train/feats_stats.npy fi # 3 批量运行(如不方便批量,1,2需放到单个模型中) if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then @@ -46,7 +46,7 @@ if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then sleep 60 echo "index is speed, 8gpus, run_mode is multi_process, begin, ${model_name}" run_mode=mp - CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 bash benchmark/run_benchmark.sh ${run_mode} ${bs_item} ${fp_item} 100 ${model_mode} + CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 bash tests/benchmark/pwgan/run_benchmark.sh ${run_mode} ${bs_item} ${fp_item} 100 ${model_mode} sleep 60 done done diff --git a/tests/benchmark/pwgan/run_benchmark.sh b/tests/benchmark/pwgan/run_benchmark.sh index be5733da1..f0fcaf447 100755 --- a/tests/benchmark/pwgan/run_benchmark.sh +++ b/tests/benchmark/pwgan/run_benchmark.sh @@ -29,8 +29,8 @@ function _train(){ --run-benchmark=true" case ${run_mode} in - sp) train_cmd="python3 paddlespeech/t2s/exps/gan_vocoder/parallelwave_gan/train.py --nprocs=1 ${train_cmd}" ;; - mp) train_cmd="python3 paddlespeech/t2s/exps/gan_vocoder/parallelwave_gan/train.py --nprocs=8 ${train_cmd}" + sp) train_cmd="python paddlespeech/t2s/exps/gan_vocoder/parallelwave_gan/train.py --nprocs=1 ${train_cmd}" ;; + mp) train_cmd="python paddlespeech/t2s/exps/gan_vocoder/parallelwave_gan/train.py --nprocs=8 ${train_cmd}" log_parse_file="mylog/workerlog.0" ;; *) echo "choose run_mode(sp or mp)"; exit 1; esac From 5559660530711ea728311b070c38670e10190867 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Thu, 4 Nov 2021 03:42:44 +0000 Subject: [PATCH 4/7] 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 7d79246df..f331cb1c9 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 e0ff3d5f9..ace80bd3e 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 2e4c84651..c5a76db88 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 fa8f776af..f2600828d 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 ddc780da2..3272e6b7a 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 63709d1a9..a609f1c63 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 9be37c277..f59fb24c9 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 aacbad980..b217d2b1b 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 4aff9fb2e..7c96cb432 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 1e32e620c..e810662df 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 76ba3e2cf..8c2db2797 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 3fadba1a3..85bd7c232 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 02df874f1..c8f3776a9 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 66ba49da5..4d3685903 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 5cb37ee7f..80eaf9754 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 df529c1c4..6e97f8245 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 b4632d429..7601a5cca 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 bd3760c48..b0ab869a2 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 62682bfbe..4d5160682 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 2b92aafe6..9207658f9 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 bf9cfeaa6..0cde5b9f2 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 7cff5442f..29d5a2d87 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 90f941f7a..5750f5a0f 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 964d5086f..6576cb922 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 0d9c2e296..347264e9d 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 b60a6b1cd..759bd540f 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 5989e3135..b96a4818d 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 1eb034273..7493213a0 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 d2e5e321f..7782b95b9 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 fb4e80fee..426bf72cd 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 f0bcb313e..f7f70c570 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 22b267521..4d8eb2a1d 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 732cbf0b5..0222246e8 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 7c5502681..5c2a27217 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 a686af743..a320a80d2 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 5a1295eb3..a0698c60a 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 427722d2f..6875deb3d 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 0a2f34198..1387fe9da 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 bc8a14bf0..b078dcf81 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 749d5e187..4d2d2324f 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 afbf4a59f..ccb500819 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 8671420c1..153d494bf 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 76e101848..83e4e2e75 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 aeedf545b..df3130dad 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 a7e04ffcf..8bc624209 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 f0d1cd175..1aee4b36f 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 463810dda..777379d01 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 11214aac7..0aa839aca 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 a1742d4f0..735d590dd 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 8c3953d69..4aee3f439 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 4fa7824e7..d3a4c2b85 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 5e5714469..e005e5d28 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 9b415bb7f..50bd73a6d 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 cc59e9222..3f755a76a 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 3d17f70cd..3940dffe1 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 f9b672687..3a86556b6 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 93c1e1776..a61506daf 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 a7ea9c2d3..a70550317 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 ecbe0e6a8..b1c48620e 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 a32306fcc20064247366618486e8d3c08e81b6bc Mon Sep 17 00:00:00 2001 From: TianYuan Date: Thu, 4 Nov 2021 04:59:39 +0000 Subject: [PATCH 5/7] 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 5e7ac3996..9d83bbe09 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 d7ab76402..b4bea0bd0 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 754fef2a3..5942533a9 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 94d6e631b..80bb1c1b2 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 fe4ec3551..9b0ba4749 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 f8feb553a..97233c766 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 02e8c807d..d2c8f7a94 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 eac7cf99e..b269b6866 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 a4d508add..bf595b24e 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 0fd108d32..417fca825 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 a61f1245d..b11329b03 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 c41e39955..489fda12b 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 9b042483b..0310d83ea 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 1dfd6dfdc..f26c9dcba 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 904b9d8b1..62d7a96f9 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 d8f89d677..fb2c2e823 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 3aceed318..1aeb6d6e1 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 39c06ebaa..297a3b4fb 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 3c62298e3..0325a6382 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 0696335a5..30d3db86c 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 70210e3ba..c299fb577 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 71bd4f0c5..236f41d3e 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 8af55ab14..31963e718 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 c6b12d445..868a73a96 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 779fd0c62..691bb3ee2 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 95f71d5e3..b95e3529f 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 34c9247ad7829fd2ff8c5e62083860e3522db182 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Thu, 4 Nov 2021 08:47:41 +0000 Subject: [PATCH 6/7] add tutorial dir --- docs/tutorial/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/tutorial/.gitkeep diff --git a/docs/tutorial/.gitkeep b/docs/tutorial/.gitkeep new file mode 100644 index 000000000..e69de29bb From e00a9838cdde459f5aeff3ff916ed2dd9aa5d030 Mon Sep 17 00:00:00 2001 From: KP <109694228@qq.com> Date: Thu, 4 Nov 2021 17:11:22 +0800 Subject: [PATCH 7/7] 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 f53f60f31..dd25724ff 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 ac704cb08..39c7afe5a 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