diff --git a/README.md b/README.md index c501e0c3..9a049df8 100644 --- a/README.md +++ b/README.md @@ -335,4 +335,4 @@ PaddleSpeech is provided under the [Apache-2.0 License](./LICENSE). ## Acknowledgement -PaddleSpeech depends on a lot of open source repos. See [references](docs/source/asr/reference.md) for more information. +PaddleSpeech depends on a lot of open source repos. See [references](docs/source/reference.md) for more information. diff --git a/audio/paddleaudio/features/core.py b/audio/paddleaudio/features/core.py index f53f60f3..dd25724f 100644 --- a/audio/paddleaudio/features/core.py +++ b/audio/paddleaudio/features/core.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from librosa(https://github.com/librosa/librosa) import warnings from typing import List from typing import Optional diff --git a/docs/source/asr/reference.md b/docs/source/asr/reference.md deleted file mode 100644 index d3676fff..00000000 --- a/docs/source/asr/reference.md +++ /dev/null @@ -1,8 +0,0 @@ -# Reference - -We refer these repos to build `model` and `engine`: - -* [delta](https://github.com/Delta-ML/delta.git) -* [espnet](https://github.com/espnet/espnet.git) -* [kaldi](https://github.com/kaldi-asr/kaldi.git) -* [wenet](https://github.com/mobvoi/wenet) diff --git a/docs/source/reference.md b/docs/source/reference.md new file mode 100644 index 00000000..39c7afe5 --- /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 ee7d53de..0b91ddd1 100644 --- a/paddlespeech/s2t/decoders/README.md +++ b/paddlespeech/s2t/decoders/README.md @@ -1,4 +1,5 @@ # Decoders +we borrow a lot of code from Espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) ## Reference ### CTC Prefix Beam Search diff --git a/paddlespeech/s2t/decoders/beam_search/batch_beam_search.py b/paddlespeech/s2t/decoders/beam_search/batch_beam_search.py index 3fc1c435..ed9790cd 100644 --- a/paddlespeech/s2t/decoders/beam_search/batch_beam_search.py +++ b/paddlespeech/s2t/decoders/beam_search/batch_beam_search.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) class BatchBeamSearch(): diff --git a/paddlespeech/s2t/decoders/beam_search/beam_search.py b/paddlespeech/s2t/decoders/beam_search/beam_search.py index 6c4f069d..f331cb1c 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 d0710f9c..d9324ca0 100644 --- a/paddlespeech/s2t/decoders/recog.py +++ b/paddlespeech/s2t/decoders/recog.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """V2 backend for `asr_recog.py` using py:class:`decoders.beam_search.BeamSearch`.""" import jsonlines import paddle diff --git a/paddlespeech/s2t/decoders/recog_bin.py b/paddlespeech/s2t/decoders/recog_bin.py index e4d81f40..cd7a360a 100644 --- a/paddlespeech/s2t/decoders/recog_bin.py +++ b/paddlespeech/s2t/decoders/recog_bin.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """End-to-end speech recognition model decoding script.""" import logging import os diff --git a/paddlespeech/s2t/decoders/scorers/ctc.py b/paddlespeech/s2t/decoders/scorers/ctc.py index 74a5f578..ace80bd3 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 864e22d1..c5a76db8 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 a34d8248..f2600828 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 366904a4..3272e6b7 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 7dff14c1..a609f1c6 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 3517f059..f59fb24c 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 94634360..b217d2b1 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 121410c8..7c96cb43 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 faf2f600..e810662d 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 ece83e51..8c2db279 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 447f1dbc..85bd7c23 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 7ae39b35..c8f3776a 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 331f1e82..4d368590 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 d5246777..80eaf975 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 9aa938af..6e97f824 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 39b1ee32..7601a5cc 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 7d545f5e..b0ab869a 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 816bc9f6..4d516068 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 938898c1..9207658f 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 246536db..0cde5b9f 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 0525a614..29d5a2d8 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 012ef242..5750f5a0 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 5c7886d4..6576cb92 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 ccea8e57..347264e9 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 6b8c28c6..759bd540 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 9da0d731..b96a4818 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 02f92495..7493213a 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 6fbb4d4d..7782b95b 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 753c7ec0..426bf72c 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 8ed30769..f7f70c57 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 7afc33f3..4d8eb2a1 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 f850f6f5..0222246e 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 efb928e2..5c2a2721 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 1e04afad..14201d29 100644 --- a/paddlespeech/s2t/training/triggers/interval_trigger.py +++ b/paddlespeech/s2t/training/triggers/interval_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class IntervalTrigger(): diff --git a/paddlespeech/s2t/training/triggers/limit_trigger.py b/paddlespeech/s2t/training/triggers/limit_trigger.py index ecd527ac..cd96040e 100644 --- a/paddlespeech/s2t/training/triggers/limit_trigger.py +++ b/paddlespeech/s2t/training/triggers/limit_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class LimitTrigger(): diff --git a/paddlespeech/s2t/training/triggers/time_trigger.py b/paddlespeech/s2t/training/triggers/time_trigger.py index e31179a9..53c398d1 100644 --- a/paddlespeech/s2t/training/triggers/time_trigger.py +++ b/paddlespeech/s2t/training/triggers/time_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class TimeTrigger(): diff --git a/paddlespeech/s2t/training/updaters/standard_updater.py b/paddlespeech/s2t/training/updaters/standard_updater.py index 83180a38..a320a80d 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 dcf844e3..a0698c60 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 ff8d925f..6875deb3 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 4cab0084..1387fe9d 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 d985b482..b078dcf8 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 5d318590..4d2d2324 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 e23d55f9..ccb50081 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 f7e8bb76..153d494b 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 01ead8ad..83e4e2e7 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 e63bd680..df3130da 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 7ab29554..8bc62420 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 d9bb7c16..1aee4b36 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 d82005f6..777379d0 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 6f86e56f..9184fd6a 100644 --- a/paddlespeech/s2t/utils/asr_utils.py +++ b/paddlespeech/s2t/utils/asr_utils.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import json import numpy as np @@ -18,7 +19,6 @@ import numpy as np __all__ = ["label_smoothing_dist"] -# TODO(takaaki-hori): add different smoothing methods def label_smoothing_dist(odim, lsm_type, transcript=None, blank=0): """Obtain label distribution for loss smoothing. diff --git a/paddlespeech/s2t/utils/check_kwargs.py b/paddlespeech/s2t/utils/check_kwargs.py index 1ee7329b..0aa839ac 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 010adb7a..735d590d 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 f8e1d60b..4aee3f43 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 5866a82e..d3a4c2b8 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 ff23350a..e005e5d2 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 ddf17afe..50bd73a6 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 5e7ac399..9d83bbe0 100644 --- a/paddlespeech/t2s/data/batch.py +++ b/paddlespeech/t2s/data/batch.py @@ -52,9 +52,8 @@ def batch_text_id(minibatch, pad_id=0, dtype=np.int64): """ peek_example = minibatch[0] assert len(peek_example.shape) == 1, "text example is an 1D tensor" - - lengths = [example.shape[0] for example in - minibatch] # assume (channel, n_samples) or (n_samples, ) + # assume (channel, n_samples) or (n_samples, ) + lengths = [example.shape[0] for example in minibatch] max_len = np.max(lengths) batch = [] diff --git a/paddlespeech/t2s/data/get_feats.py b/paddlespeech/t2s/data/get_feats.py index d7ab7640..b4bea0bd 100644 --- a/paddlespeech/t2s/data/get_feats.py +++ b/paddlespeech/t2s/data/get_feats.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) import librosa import numpy as np import pyworld diff --git a/paddlespeech/t2s/models/fastspeech2/fastspeech2.py b/paddlespeech/t2s/models/fastspeech2/fastspeech2.py index 754fef2a..5942533a 100644 --- a/paddlespeech/t2s/models/fastspeech2/fastspeech2.py +++ b/paddlespeech/t2s/models/fastspeech2/fastspeech2.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Fastspeech2 related modules for paddle""" from typing import Dict from typing import Sequence diff --git a/paddlespeech/t2s/models/melgan/melgan.py b/paddlespeech/t2s/models/melgan/melgan.py index 94d6e631..80bb1c1b 100644 --- a/paddlespeech/t2s/models/melgan/melgan.py +++ b/paddlespeech/t2s/models/melgan/melgan.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """MelGAN Modules.""" from typing import Any from typing import Dict diff --git a/paddlespeech/t2s/models/parallel_wavegan/parallel_wavegan.py b/paddlespeech/t2s/models/parallel_wavegan/parallel_wavegan.py index fe4ec355..9b0ba474 100644 --- a/paddlespeech/t2s/models/parallel_wavegan/parallel_wavegan.py +++ b/paddlespeech/t2s/models/parallel_wavegan/parallel_wavegan.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) import math from typing import Any from typing import Dict diff --git a/paddlespeech/t2s/models/transformer_tts/transformer_tts.py b/paddlespeech/t2s/models/transformer_tts/transformer_tts.py index f8feb553..97233c76 100644 --- a/paddlespeech/t2s/models/transformer_tts/transformer_tts.py +++ b/paddlespeech/t2s/models/transformer_tts/transformer_tts.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Fastspeech2 related modules for paddle""" from typing import Dict from typing import Sequence diff --git a/paddlespeech/t2s/modules/adversarial_loss.py b/paddlespeech/t2s/modules/adversarial_loss.py index 02e8c807..d2c8f7a9 100644 --- a/paddlespeech/t2s/modules/adversarial_loss.py +++ b/paddlespeech/t2s/modules/adversarial_loss.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Adversarial loss modules.""" import paddle import paddle.nn.functional as F diff --git a/paddlespeech/t2s/modules/fastspeech2_predictor/duration_predictor.py b/paddlespeech/t2s/modules/fastspeech2_predictor/duration_predictor.py index eac7cf99..b269b686 100644 --- a/paddlespeech/t2s/modules/fastspeech2_predictor/duration_predictor.py +++ b/paddlespeech/t2s/modules/fastspeech2_predictor/duration_predictor.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Duration predictor related modules.""" import paddle from paddle import nn diff --git a/paddlespeech/t2s/modules/fastspeech2_predictor/length_regulator.py b/paddlespeech/t2s/modules/fastspeech2_predictor/length_regulator.py index a4d508ad..bf595b24 100644 --- a/paddlespeech/t2s/modules/fastspeech2_predictor/length_regulator.py +++ b/paddlespeech/t2s/modules/fastspeech2_predictor/length_regulator.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Length regulator related modules.""" import paddle from paddle import nn diff --git a/paddlespeech/t2s/modules/fastspeech2_predictor/variance_predictor.py b/paddlespeech/t2s/modules/fastspeech2_predictor/variance_predictor.py index 0fd108d3..417fca82 100644 --- a/paddlespeech/t2s/modules/fastspeech2_predictor/variance_predictor.py +++ b/paddlespeech/t2s/modules/fastspeech2_predictor/variance_predictor.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Variance predictor related modules.""" import paddle from paddle import nn diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/attention.py b/paddlespeech/t2s/modules/fastspeech2_transformer/attention.py index a61f1245..b11329b0 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/attention.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/attention.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Multi-Head Attention layer definition.""" import math diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/decoder.py b/paddlespeech/t2s/modules/fastspeech2_transformer/decoder.py index c41e3995..489fda12 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/decoder.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/decoder.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) # 暂时删除了 dyminic conv """Decoder definition.""" import logging diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/decoder_layer.py b/paddlespeech/t2s/modules/fastspeech2_transformer/decoder_layer.py index 9b042483..0310d83e 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/decoder_layer.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/decoder_layer.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Decoder self-attention layer definition.""" import paddle from paddle import nn diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/embedding.py b/paddlespeech/t2s/modules/fastspeech2_transformer/embedding.py index 1dfd6dfd..f26c9dcb 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/embedding.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/embedding.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Positional Encoding Module.""" import math diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/encoder.py b/paddlespeech/t2s/modules/fastspeech2_transformer/encoder.py index 904b9d8b..62d7a96f 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/encoder.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/encoder.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) import logging from paddle import nn diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/encoder_layer.py b/paddlespeech/t2s/modules/fastspeech2_transformer/encoder_layer.py index d8f89d67..fb2c2e82 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/encoder_layer.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/encoder_layer.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Encoder self-attention layer definition.""" import paddle from paddle import nn diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/lightconv.py b/paddlespeech/t2s/modules/fastspeech2_transformer/lightconv.py index 3aceed31..1aeb6d6e 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/lightconv.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/lightconv.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Lightweight Convolution Module.""" import numpy import paddle diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/positionwise_feed_forward.py b/paddlespeech/t2s/modules/fastspeech2_transformer/positionwise_feed_forward.py index 39c06eba..297a3b4f 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/positionwise_feed_forward.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/positionwise_feed_forward.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Positionwise feed forward layer definition.""" import paddle diff --git a/paddlespeech/t2s/modules/fastspeech2_transformer/repeat.py b/paddlespeech/t2s/modules/fastspeech2_transformer/repeat.py index 3c62298e..0325a638 100644 --- a/paddlespeech/t2s/modules/fastspeech2_transformer/repeat.py +++ b/paddlespeech/t2s/modules/fastspeech2_transformer/repeat.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Repeat the same layer definition.""" import paddle diff --git a/paddlespeech/t2s/modules/nets_utils.py b/paddlespeech/t2s/modules/nets_utils.py index 0696335a..30d3db86 100644 --- a/paddlespeech/t2s/modules/nets_utils.py +++ b/paddlespeech/t2s/modules/nets_utils.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) import paddle from paddle import nn from typeguard import check_argument_types diff --git a/paddlespeech/t2s/modules/pqmf.py b/paddlespeech/t2s/modules/pqmf.py index 70210e3b..c299fb57 100644 --- a/paddlespeech/t2s/modules/pqmf.py +++ b/paddlespeech/t2s/modules/pqmf.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Pseudo QMF modules.""" import numpy as np import paddle diff --git a/paddlespeech/t2s/modules/residual_stack.py b/paddlespeech/t2s/modules/residual_stack.py index 71bd4f0c..236f41d3 100644 --- a/paddlespeech/t2s/modules/residual_stack.py +++ b/paddlespeech/t2s/modules/residual_stack.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Residual stack module in MelGAN.""" from typing import Any from typing import Dict diff --git a/paddlespeech/t2s/modules/stft_loss.py b/paddlespeech/t2s/modules/stft_loss.py index 8af55ab1..31963e71 100644 --- a/paddlespeech/t2s/modules/stft_loss.py +++ b/paddlespeech/t2s/modules/stft_loss.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) import paddle from paddle import nn from paddle.nn import functional as F diff --git a/paddlespeech/t2s/modules/style_encoder.py b/paddlespeech/t2s/modules/style_encoder.py index c6b12d44..868a73a9 100644 --- a/paddlespeech/t2s/modules/style_encoder.py +++ b/paddlespeech/t2s/modules/style_encoder.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Style encoder of GST-Tacotron.""" from typing import Sequence diff --git a/paddlespeech/t2s/modules/tacotron2/decoder.py b/paddlespeech/t2s/modules/tacotron2/decoder.py index 779fd0c6..691bb3ee 100644 --- a/paddlespeech/t2s/modules/tacotron2/decoder.py +++ b/paddlespeech/t2s/modules/tacotron2/decoder.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Tacotron2 decoder related modules.""" import paddle.nn.functional as F import six diff --git a/paddlespeech/t2s/modules/tacotron2/encoder.py b/paddlespeech/t2s/modules/tacotron2/encoder.py index 95f71d5e..b95e3529 100644 --- a/paddlespeech/t2s/modules/tacotron2/encoder.py +++ b/paddlespeech/t2s/modules/tacotron2/encoder.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Modified from espnet(https://github.com/espnet/espnet) """Tacotron2 encoder related modules.""" import paddle import six diff --git a/paddlespeech/t2s/training/extension.py b/paddlespeech/t2s/training/extension.py index 07e92696..3f755a76 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 28249d09..3940dffe 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 2e401596..3a86556b 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 013c754e..a61506da 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 98c03684..a83139ba 100644 --- a/paddlespeech/t2s/training/triggers/interval_trigger.py +++ b/paddlespeech/t2s/training/triggers/interval_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class IntervalTrigger(object): diff --git a/paddlespeech/t2s/training/triggers/limit_trigger.py b/paddlespeech/t2s/training/triggers/limit_trigger.py index dd7a135e..db1db774 100644 --- a/paddlespeech/t2s/training/triggers/limit_trigger.py +++ b/paddlespeech/t2s/training/triggers/limit_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class LimitTrigger(object): diff --git a/paddlespeech/t2s/training/triggers/time_trigger.py b/paddlespeech/t2s/training/triggers/time_trigger.py index aff93825..d7123524 100644 --- a/paddlespeech/t2s/training/triggers/time_trigger.py +++ b/paddlespeech/t2s/training/triggers/time_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class TimeTrigger(object): diff --git a/paddlespeech/t2s/training/updater.py b/paddlespeech/t2s/training/updater.py index 1db3d5f9..a7055031 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 2d00d196..b1c48620 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