diff --git a/README.md b/README.md index c501e0c3723ea9420dbeabb246720017c7806cf9..9a049df8d47de543b9dcb78f04ff7983ceb5388a 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/audio/paddleaudio/features/core.py b/audio/paddleaudio/features/core.py index f53f60f31f59849a253c27a1bc7141e7f5ae05a0..dd25724ff22254ced39e4387e24ccdc411148b12 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/asr/reference.md b/docs/source/asr/reference.md deleted file mode 100644 index d3676fff2371ba82386d8e0f8da5c4ef5be5f780..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..39c7afe5a2029f060d98c867ca40ded436bc83d9 --- /dev/null +++ b/docs/source/reference.md @@ -0,0 +1,37 @@ +# 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. + +* [librosa](https://github.com/librosa/librosa/blob/main/LICENSE.md) +- ISC License +- Audio feature diff --git a/paddlespeech/s2t/decoders/README.md b/paddlespeech/s2t/decoders/README.md index ee7d53deaec42e48ad62fe7e594e01df9586f184..0b91ddd1b1b9a61dbb7421c89ca853cb62a1444f 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 3fc1c435f28ba81bfe25e9311f3706caa8c9bcae..ed9790cdff7ba8f4566d90995ea0e8992fccb11e 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 6c4f069d855dfb8ad4bbc7025867be278d3ff4fb..f331cb1c93e1331aa25600e6b5b819212ed6f096 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. +# 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/recog.py b/paddlespeech/s2t/decoders/recog.py index d0710f9c40d1ad547484a86c9b0ba54ee38abbb0..d9324ca02ad5fff81f8c386282dfbce9683b0d5c 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 e4d81f40916306933ee5ae7e060cc7bfa61f72d9..cd7a360ae253cdcdf59e641f9adefc4ca87dc299 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 74a5f578dd8d7feb8229a850b458c6b13e12f263..ace80bd3eb8d3cf1639be03c244b43aacbba2ec4 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. +# 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 864e22d1794ee4e1a9bffe68107acbe8c0378f7d..c5a76db886788cccde19b6d02e8c9611be78ebde 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. +# 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 a34d82483f95051305a2e692dfd48afe7373dafb..f2600828dd2d0a89679c0b44421ea5fbc04e289e 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. +# 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 366904a4703ab5323416b8ff8150a181a5809db6..3272e6b7aa0422a3ebbf45e3b6d2931a70fab784 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. +# 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 7dff14c11199d7de05f5c246d9d845aafaf13c68..a609f1c6330dda817cd287fdaf6f6da7d94e26f6 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. +# 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 3517f059af3d52b6bb3fc285864be9f15fc0a194..f59fb24c9af48d02a523e159f5d7e199ca721cca 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. +# 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 94634360c41100f9f518c065570b4a93d4e3f9ce..b217d2b1b4028bd0218561127bc4fa7409de6f45 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. +# 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 121410c8b383f381e255fa9f718204fb68059d5f..7c96cb432890ad483adf0911409e7cb6b00d881d 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. +# 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 faf2f600bcb3e8d7ae3ccc12b8f7c2146654b9b4..e810662df377af2db05e128c1cbda9d2042afa89 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. +# 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 ece83e516b15470d31122cfc3eadf8d9346c5f66..8c2db279763dec086358fc544864b4895cf94f29 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. +# 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 447f1dbc3bb5a4b86731ec6be52bac5b3af4ab26..85bd7c2329fbf416d254bd9eabcaaf181fe7db01 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. +# 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 7ae39b351465c06cd4bfafea4f72ab6106b919b9..c8f3776a9e68afeca01ea27bafa2ae4becdbd44e 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. +# 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 331f1e824d44c65fbff8b5a1c54a34c5f7111a80..4d368590325b8f39baa804574b07dc7f4747eb54 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. +# 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 d5246777c57386b280e7e613baf853d9e7a9ba50..80eaf97542b090adec271570ce991e693b61e124 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. +# 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 9aa938af7d0e20f05f7afc3eda748e7853dd36b7..6e97f82458921bf287778b0e95a869ca54950138 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. +# 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 39b1ee3275bd2c7aa85012976cd9e4d9d75a09da..7601a5cca607df2820ba45583190516b2c80a48c 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. +# 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 7d545f5e87718550b3a29884f284f21896feca11..b0ab869a212b2fb3f9b9216e9f41f4b8b07b0fe0 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. +# 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 816bc9f619d1e6c3fe3d8f680c5be75bb778cdfe..4d516068239beac686c116846d75a3dbebcd8194 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. +# 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 938898c13ac236e5334ac36f2e46cf9c930756cc..9207658f99bec9d9bcec8425d7f8a74f2bc146f5 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. +# 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 246536dbe70045ec4c2552c09a0636aae58e04af..0cde5b9f2360f005565d17c68cd7384b74039a2c 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. +# 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 0525a6147a436770cccaf34fe187abf4dc110dce..29d5a2d872e61a7f8aec7ace9bde05829043b08c 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. +# 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 012ef242608093f6a6a8b62bb55613c62f30f0b2..5750f5a0f79e8b2bce0f89b7f68c4c696d9e85f8 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. +# 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 5c7886d459d23ad434a560478e9c6a2ae831e31b..6576cb9221e027feeaee4651b2f73795fa174225 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. +# 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 ccea8e57d8d4880996f5ad1d1fd70fe14660435f..347264e9d6cd9211f2c54ca556e99ba36cd1ae71 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. +# 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 6b8c28c6a0f7d3927f75ea9088eea7d03451e99b..759bd540f5b0149a03ef70ab6353bdcd6817d16d 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. +# 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 9da0d731645ca6005fa917d433bca338685613c6..b96a4818d18769452ecf92a7f7a640fddfdd8fe1 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. +# 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 02f924951304a5c83e4354297f12919033dc265b..7493213a05c62e06005ea5aefa6894dcde008a8e 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. +# 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 6fbb4d4dc7e40f61315173c4c04fb1d673f825c8..7782b95b9d17b1530d7682e69b82f5882bb4d5d1 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. +# 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 753c7ec0ec93d76bc0435d1500a0eaf7a44f0826..426bf72cdab9a81e5320a563fba6c6ce228435cd 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. +# 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 8ed30769f727c3345e5d5b304bd39923de4d3608..f7f70c5704b0f62eb733995a6c895799f78fe3b1 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. +# 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 7afc33f38966529c75831d45443c848ea0c12839..4d8eb2a1dd0a2dc865a9b3b48909e9c914673310 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. +# 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 f850f6f5026c64babb62fa8b666db484033e0064..0222246e8649bd2b934cc60483e35c9c49224fef 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. +# 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 efb928e2c81b5100f2c42cdb41bbf32864da96a7..5c2a2721709e0a9b5376e5d5747f17b691c2c5ac 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. +# Modified from chainer(https://github.com/chainer/chainer) 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 1e04afad8d52ba6a8a272edebfba7f09f9784723..14201d29cfc101263db51febb039a01e36bfbf1b 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 ecd527ac5349486fa398c00e1171d8d1b51b293b..cd96040ef0bbc54c878ed9b194e10936eab4974f 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 e31179a9fd90c9fd337f656ca414f8b2dbf2940c..53c398d11ca7547f86f2445c2f6d0228a0ca2ecc 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 83180a38d6e30500c23dc3b900655ce205baafd5..a320a80d2c724da20bc287f215b71d94fb9c78cc 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. +# 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 dcf844e360a11963ed0d4d875877df128011e60e..a0698c60a9c1318a417d3b71ee8906fb4f288bde 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. +# 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 ff8d925ffcf1525e75816f73355c8a92cf0cd4df..6875deb3d2bcf50bd962d66d3b7ee442ae1e4b39 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. +# 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 4cab0084eac0019335783ef3cfa093e5220b2fed..1387fe9da643b4dce7ea7887d50d3f1119722661 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. +# 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 d985b482defd7a5792dff1a4a3fca21132756a78..b078dcf81b9edab3531160b097afbcebd1f807e4 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. +# 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 5d3185906f65b507ec6afcbec2ca4b2767b83164..4d2d2324f660dd676d6774e8aedc37f0e7cb6585 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. +# 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 e23d55f9d382c79e4cf05e5c95b07d4dff220c51..ccb500819e171bada581811905737fbfd7af015d 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. +# 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 f7e8bb764c1f972fb3ec8243185542a24de2434e..153d494bf76b7d1ea99c79caf16af88ddc70638c 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. +# 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 01ead8addb9f8a3c720b51848f9b1e6e95d26e2c..83e4e2e7502390dd2610c15923eabe0be694b802 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. +# 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 e63bd68030085cca745f7981eea30d4cd3bf6d9b..df3130dadcd68e2416cc860cd41bb0e6c3d2c651 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. +# 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 7ab29554e8f1d6bd158fc1f4126b74e55e1efc06..8bc6242090b0f07c08d283401587762dbce08eee 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. +# Modified from espnet(https://github.com/espnet/espnet) + + class TransformInterface: """Transform Interface""" diff --git a/paddlespeech/s2t/transform/transformation.py b/paddlespeech/s2t/transform/transformation.py index d9bb7c1684ff0ac5c1ddfb10127b5bde332faac0..1aee4b36f79479d5aa60d4d2148bb3431697bcde 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. +# Modified from espnet(https://github.com/espnet/espnet) """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 d82005f6473dba0f0a6cc4f3edd25992ecf4a751..777379d018b651d9edf7b9179833ab2968b4599d 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. +# Modified from espnet(https://github.com/espnet/espnet) from nara_wpe.wpe import wpe diff --git a/paddlespeech/s2t/utils/asr_utils.py b/paddlespeech/s2t/utils/asr_utils.py index 6f86e56f75bb2b979c48f0fdddf8ca86e5130d0e..9184fd6af6c4046acbbe2e78346621f6eb25ae8b 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 1ee7329bacd5fd0c7333cf28ce96eb1a74ad64c3..0aa839aca8bf177d39bd174db730413bfc8a3b90 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. +# 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 010adb7a92f4277e9e5c39b0c64636063b7eefff..735d590dd97c44aa14de8113d9b0e204ac887010 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. +# 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 f8e1d60bfe605001410869124b307f3d149fda68..4aee3f4398095cd4aafa33447093db5362b36cf5 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. +# 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 5866a82eeb90503dca0c90d6d02262aeee6dd571..d3a4c2b85ccf7583c1e9cfd62d841c7f660c6a09 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. +# 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 ff23350a3e38c95c92f470a169a39f74406df9db..e005e5d2854c3698f9f6fdc10f986fdc389464a3 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. +# Modified from wenet(https://github.com/wenet-e2e/wenet) 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 ddf17afe9f10939acdcbff9c198cb6ae494764ee..50bd73a6de4219fd10c1679856eda918ac012eac 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. +# Modified from espnet(https://github.com/espnet/espnet) import importlib import inspect from typing import Any diff --git a/paddlespeech/t2s/data/batch.py b/paddlespeech/t2s/data/batch.py index 5e7ac3996ccf94d6ba6f57b0b8cd91f8025ec883..9d83bbe09c60d25d15ba0fcfd7197d257d4993cf 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 d7ab764020933f352c2d4bbf54395387c272a856..b4bea0bd090e947661ee3e6be766839f164ec6a1 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 754fef2a3ce49165ceba876dcd94353a4f0d0626..5942533a93a3875bbe4db612d938e25157037562 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 94d6e631b9283b075167e216469b259b490b8acd..80bb1c1b2c4e17fbcf0ff531e9504ff6ccad2332 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 fe4ec355139d7048e6336f8678e751d489269b67..9b0ba47498f996ce04c4d8e20838b5f39a2563cc 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 f8feb553a1137092edab285f3b1bf2a2f8cd7db4..97233c766eb0d71ad51a17d7d33c87a8bc2f4da3 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 02e8c807dcecf13a417bb4a7a33d5ec3037c52fe..d2c8f7a94ea89d5fe5975799e3cacad4f94b4cd0 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 eac7cf99e5fc1c152563032016edc504c2bc99e8..b269b6866452f57296656f30e0b74f472737891c 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 a4d508add1aa1661fb127ee16806e3ca108e2736..bf595b24e89b713b19cc52e300c22ccd4363e469 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 0fd108d323b75e21d3132d6164b709a8514156aa..417fca82594afaa7a6c2d6400c3894c409511681 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 a61f1245d34c75d7fd66bc7a6a111d9d8ef858a3..b11329b03144f3997f36ab1914cbec1612faf41b 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 c41e39955700d2ff63431b3104699167857bc8f6..489fda12bc9d5708418ef2b8e3b96ea264f7101e 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 9b042483b058f495f1cc1117bfbb53205e7171e2..0310d83ea3933c185612d53db316457f24fb8020 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 1dfd6dfdc000ed899d448a4fb17a6fd3686e013d..f26c9dcbab659f3e3b73c61308d3f513c4f26739 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 904b9d8b1f3a3770035cc6df76dca73ab56063e8..62d7a96f98738266b84aaebeb5fd0306c5a07add 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 d8f89d677adeec69c58c24b324619335f07997fc..fb2c2e823a327ab0a531076df00d19f4ae9faa7b 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 3aceed318c52a9488b3d3eabc2063f0162287879..1aeb6d6e19a8f7b0e0820829a3ed7f496693fd28 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 39c06ebaa1268e6c1c85008287fafdd31034a347..297a3b4fbb78bc121e7102f85a95272d4f91c8ef 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 3c62298e39010585624c1f4605a9376d5c9258fb..0325a638235a8fb736da886e24225ed2f66e876a 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 0696335a5c5a4a9ae424a2c6e8f72ef480b5eaa5..30d3db86c885a56204562b82f7e0d709a96717e2 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 70210e3ba843ebd9ed2a35ea94e18629c7061ace..c299fb5772070fa2e5a4fdc5201541b787b7d449 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 71bd4f0c557313b81bdec069b7fc4be3fe5ad113..236f41d3ed541ef28a6c0838b0e9aecebf98f0a2 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 8af55ab1439a61b4ef60b5ede567ef6bc1304c23..31963e718de6b617d1067458ee00987ebbe5a1ad 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 c6b12d445af96436dbb404ef279a0751bc0dfe84..868a73a969edb6d3dc1affe6b0e401a88fb7d11b 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 779fd0c62f87eb68c032abd5e19b88691f21054a..691bb3ee29c31397400e9ea6b77d982a1b2f0f64 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 95f71d5e3f4a13da6ff4babd1962ddda6fea643d..b95e3529ff7eda456863b519e8982580c066cc01 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 diff --git a/paddlespeech/t2s/training/extension.py b/paddlespeech/t2s/training/extension.py index 07e92696e18ffcbdc74eee3b44434a30617e2e23..3f755a76a5e3ef89a41f14b6631eb5f1d345ad4c 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. +# 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 28249d096655f84d3a60becea38273b184d30140..3940dffe17c6312ff9fee0552a6df4e9903ee7fa 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. +# 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 2e4015969ed88d7a77f1df33b4362a291c4db963..3a86556b6dce41a91398d90902ce49c29e78c010 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. +# 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 013c754e3e494cd913fcd65b74c18a8b9643be2f..a61506daf04c3b74b02cf4805b6720fdfbd41dc3 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. +# Modified from chainer(https://github.com/chainer/chainer) 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 98c0368469898f4e46809cc2ae2b25b5c5271c47..a83139ba9e1e6560ac2841aecafae8713cfff370 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 dd7a135e069c3323a07d042db12a5273dc185ce4..db1db774e9cadf15aa0a5625bbce5e3966c1f7b3 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 aff9382559048ae3e7d71f64bf0e7cc4304ed5ae..d7123524b30645935571739c8cac3d78f7d22079 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 1db3d5f9ea6b93a49fb45cf68bd5183fdc95e156..a70550317e1ae6e0014db1a849ce3139eb19c542 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. +# 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 2d00d196f8dc9a09b3507e93fa86bef4dd6e7a8e..b1c48620ee64b3879e8d3175ca3507b656b79a5f 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. +# Modified from chainer(https://github.com/chainer/chainer) import logging import time from typing import Dict