diff --git a/paddlespeech/s2t/decoders/README.md b/paddlespeech/s2t/decoders/README.md index ee7d53dea..0b91ddd1b 100644 --- a/paddlespeech/s2t/decoders/README.md +++ b/paddlespeech/s2t/decoders/README.md @@ -1,4 +1,5 @@ # Decoders +we borrow a lot of code from Espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) ## Reference ### CTC Prefix Beam Search diff --git a/paddlespeech/s2t/decoders/beam_search/batch_beam_search.py b/paddlespeech/s2t/decoders/beam_search/batch_beam_search.py index 3fc1c435f..ed9790cdf 100644 --- a/paddlespeech/s2t/decoders/beam_search/batch_beam_search.py +++ b/paddlespeech/s2t/decoders/beam_search/batch_beam_search.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) class BatchBeamSearch(): diff --git a/paddlespeech/s2t/decoders/beam_search/beam_search.py b/paddlespeech/s2t/decoders/beam_search/beam_search.py index 6c4f069d8..7d79246df 100644 --- a/paddlespeech/s2t/decoders/beam_search/beam_search.py +++ b/paddlespeech/s2t/decoders/beam_search/beam_search.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Beam search module.""" from itertools import chain from typing import Any diff --git a/paddlespeech/s2t/decoders/recog.py b/paddlespeech/s2t/decoders/recog.py index d0710f9c4..d9324ca02 100644 --- a/paddlespeech/s2t/decoders/recog.py +++ b/paddlespeech/s2t/decoders/recog.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """V2 backend for `asr_recog.py` using py:class:`decoders.beam_search.BeamSearch`.""" import jsonlines import paddle diff --git a/paddlespeech/s2t/decoders/recog_bin.py b/paddlespeech/s2t/decoders/recog_bin.py index e4d81f409..cd7a360ae 100644 --- a/paddlespeech/s2t/decoders/recog_bin.py +++ b/paddlespeech/s2t/decoders/recog_bin.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """End-to-end speech recognition model decoding script.""" import logging import os diff --git a/paddlespeech/s2t/decoders/scorers/ctc.py b/paddlespeech/s2t/decoders/scorers/ctc.py index 74a5f578d..e0ff3d5f9 100644 --- a/paddlespeech/s2t/decoders/scorers/ctc.py +++ b/paddlespeech/s2t/decoders/scorers/ctc.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """ScorerInterface implementation for CTC.""" import numpy as np import paddle diff --git a/paddlespeech/s2t/decoders/scorers/length_bonus.py b/paddlespeech/s2t/decoders/scorers/length_bonus.py index 864e22d17..2e4c84651 100644 --- a/paddlespeech/s2t/decoders/scorers/length_bonus.py +++ b/paddlespeech/s2t/decoders/scorers/length_bonus.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Length bonus module.""" from typing import Any from typing import List diff --git a/paddlespeech/s2t/decoders/scorers/ngram.py b/paddlespeech/s2t/decoders/scorers/ngram.py index a34d82483..fa8f776af 100644 --- a/paddlespeech/s2t/decoders/scorers/ngram.py +++ b/paddlespeech/s2t/decoders/scorers/ngram.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Ngram lm implement.""" from abc import ABC diff --git a/paddlespeech/s2t/decoders/scorers/scorer_interface.py b/paddlespeech/s2t/decoders/scorers/scorer_interface.py index 366904a47..ddc780da2 100644 --- a/paddlespeech/s2t/decoders/scorers/scorer_interface.py +++ b/paddlespeech/s2t/decoders/scorers/scorer_interface.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Scorer interface module.""" import warnings from typing import Any diff --git a/paddlespeech/s2t/decoders/utils.py b/paddlespeech/s2t/decoders/utils.py index 7dff14c11..63709d1a9 100644 --- a/paddlespeech/s2t/decoders/utils.py +++ b/paddlespeech/s2t/decoders/utils.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import numpy as np from paddlespeech.s2t.utils.log import Log diff --git a/paddlespeech/s2t/io/batchfy.py b/paddlespeech/s2t/io/batchfy.py index 3517f059a..9be37c277 100644 --- a/paddlespeech/s2t/io/batchfy.py +++ b/paddlespeech/s2t/io/batchfy.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import itertools import numpy as np diff --git a/paddlespeech/s2t/io/converter.py b/paddlespeech/s2t/io/converter.py index 94634360c..aacbad980 100644 --- a/paddlespeech/s2t/io/converter.py +++ b/paddlespeech/s2t/io/converter.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import numpy as np from paddlespeech.s2t.io.utility import pad_list diff --git a/paddlespeech/s2t/io/dataset.py b/paddlespeech/s2t/io/dataset.py index 121410c8b..4aff9fb2e 100644 --- a/paddlespeech/s2t/io/dataset.py +++ b/paddlespeech/s2t/io/dataset.py @@ -11,6 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from typing import Optional from paddle.io import Dataset diff --git a/paddlespeech/s2t/io/reader.py b/paddlespeech/s2t/io/reader.py index faf2f600b..1e32e620c 100644 --- a/paddlespeech/s2t/io/reader.py +++ b/paddlespeech/s2t/io/reader.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from collections import OrderedDict import kaldiio diff --git a/paddlespeech/s2t/models/asr_interface.py b/paddlespeech/s2t/models/asr_interface.py index ece83e516..76ba3e2cf 100644 --- a/paddlespeech/s2t/models/asr_interface.py +++ b/paddlespeech/s2t/models/asr_interface.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """ASR Interface module.""" import argparse diff --git a/paddlespeech/s2t/models/lm/transformer.py b/paddlespeech/s2t/models/lm/transformer.py index 447f1dbc3..3fadba1a3 100644 --- a/paddlespeech/s2t/models/lm/transformer.py +++ b/paddlespeech/s2t/models/lm/transformer.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from typing import Any from typing import List from typing import Tuple diff --git a/paddlespeech/s2t/models/lm_interface.py b/paddlespeech/s2t/models/lm_interface.py index 7ae39b351..02df874f1 100644 --- a/paddlespeech/s2t/models/lm_interface.py +++ b/paddlespeech/s2t/models/lm_interface.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Language model interface.""" import argparse diff --git a/paddlespeech/s2t/models/st_interface.py b/paddlespeech/s2t/models/st_interface.py index 331f1e824..66ba49da5 100644 --- a/paddlespeech/s2t/models/st_interface.py +++ b/paddlespeech/s2t/models/st_interface.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """ST Interface module.""" from .asr_interface import ASRInterface from paddlespeech.s2t.utils.dynamic_import import dynamic_import diff --git a/paddlespeech/s2t/modules/attention.py b/paddlespeech/s2t/modules/attention.py index d5246777c..5cb37ee7f 100644 --- a/paddlespeech/s2t/modules/attention.py +++ b/paddlespeech/s2t/modules/attention.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Multi-Head Attention layer definition.""" import math from typing import Optional diff --git a/paddlespeech/s2t/modules/cmvn.py b/paddlespeech/s2t/modules/cmvn.py index 9aa938af7..df529c1c4 100644 --- a/paddlespeech/s2t/modules/cmvn.py +++ b/paddlespeech/s2t/modules/cmvn.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import paddle from paddle import nn diff --git a/paddlespeech/s2t/modules/conformer_convolution.py b/paddlespeech/s2t/modules/conformer_convolution.py index 39b1ee327..b4632d429 100644 --- a/paddlespeech/s2t/modules/conformer_convolution.py +++ b/paddlespeech/s2t/modules/conformer_convolution.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """ConvolutionModule definition.""" from typing import Optional from typing import Tuple diff --git a/paddlespeech/s2t/modules/decoder.py b/paddlespeech/s2t/modules/decoder.py index 7d545f5e8..bd3760c48 100644 --- a/paddlespeech/s2t/modules/decoder.py +++ b/paddlespeech/s2t/modules/decoder.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Decoder definition.""" from typing import Any from typing import List diff --git a/paddlespeech/s2t/modules/decoder_layer.py b/paddlespeech/s2t/modules/decoder_layer.py index 816bc9f61..62682bfbe 100644 --- a/paddlespeech/s2t/modules/decoder_layer.py +++ b/paddlespeech/s2t/modules/decoder_layer.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Decoder self-attention layer definition.""" from typing import Optional from typing import Tuple diff --git a/paddlespeech/s2t/modules/embedding.py b/paddlespeech/s2t/modules/embedding.py index 938898c13..2b92aafe6 100644 --- a/paddlespeech/s2t/modules/embedding.py +++ b/paddlespeech/s2t/modules/embedding.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Positonal Encoding Module.""" import math from typing import Tuple diff --git a/paddlespeech/s2t/modules/encoder.py b/paddlespeech/s2t/modules/encoder.py index 246536dbe..bf9cfeaa6 100644 --- a/paddlespeech/s2t/modules/encoder.py +++ b/paddlespeech/s2t/modules/encoder.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Encoder definition.""" from typing import List from typing import Optional diff --git a/paddlespeech/s2t/modules/encoder_layer.py b/paddlespeech/s2t/modules/encoder_layer.py index 0525a6147..7cff5442f 100644 --- a/paddlespeech/s2t/modules/encoder_layer.py +++ b/paddlespeech/s2t/modules/encoder_layer.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Encoder self-attention layer definition.""" from typing import Optional from typing import Tuple diff --git a/paddlespeech/s2t/modules/loss.py b/paddlespeech/s2t/modules/loss.py index 012ef2426..90f941f7a 100644 --- a/paddlespeech/s2t/modules/loss.py +++ b/paddlespeech/s2t/modules/loss.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import inspect import paddle diff --git a/paddlespeech/s2t/modules/mask.py b/paddlespeech/s2t/modules/mask.py index 5c7886d45..964d5086f 100644 --- a/paddlespeech/s2t/modules/mask.py +++ b/paddlespeech/s2t/modules/mask.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import paddle from paddlespeech.s2t.utils.log import Log diff --git a/paddlespeech/s2t/modules/positionwise_feed_forward.py b/paddlespeech/s2t/modules/positionwise_feed_forward.py index ccea8e57d..0d9c2e296 100644 --- a/paddlespeech/s2t/modules/positionwise_feed_forward.py +++ b/paddlespeech/s2t/modules/positionwise_feed_forward.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Positionwise feed forward layer definition.""" import paddle from paddle import nn diff --git a/paddlespeech/s2t/modules/subsampling.py b/paddlespeech/s2t/modules/subsampling.py index 6b8c28c6a..b60a6b1cd 100644 --- a/paddlespeech/s2t/modules/subsampling.py +++ b/paddlespeech/s2t/modules/subsampling.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Subsampling layer definition.""" from typing import Tuple diff --git a/paddlespeech/s2t/training/extensions/evaluator.py b/paddlespeech/s2t/training/extensions/evaluator.py index 9da0d7316..5989e3135 100644 --- a/paddlespeech/s2t/training/extensions/evaluator.py +++ b/paddlespeech/s2t/training/extensions/evaluator.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) from typing import Dict import paddle diff --git a/paddlespeech/s2t/training/extensions/extension.py b/paddlespeech/s2t/training/extensions/extension.py index 02f924951..1eb034273 100644 --- a/paddlespeech/s2t/training/extensions/extension.py +++ b/paddlespeech/s2t/training/extensions/extension.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) PRIORITY_WRITER = 300 PRIORITY_EDITOR = 200 PRIORITY_READER = 100 diff --git a/paddlespeech/s2t/training/extensions/plot.py b/paddlespeech/s2t/training/extensions/plot.py index 6fbb4d4dc..d2e5e321f 100644 --- a/paddlespeech/s2t/training/extensions/plot.py +++ b/paddlespeech/s2t/training/extensions/plot.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import copy import os diff --git a/paddlespeech/s2t/training/extensions/snapshot.py b/paddlespeech/s2t/training/extensions/snapshot.py index 753c7ec0e..fb4e80fee 100644 --- a/paddlespeech/s2t/training/extensions/snapshot.py +++ b/paddlespeech/s2t/training/extensions/snapshot.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import os from datetime import datetime from pathlib import Path diff --git a/paddlespeech/s2t/training/optimizer.py b/paddlespeech/s2t/training/optimizer.py index 8ed30769f..f0bcb313e 100644 --- a/paddlespeech/s2t/training/optimizer.py +++ b/paddlespeech/s2t/training/optimizer.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from typing import Any from typing import Dict from typing import Text diff --git a/paddlespeech/s2t/training/reporter.py b/paddlespeech/s2t/training/reporter.py index 7afc33f38..22b267521 100644 --- a/paddlespeech/s2t/training/reporter.py +++ b/paddlespeech/s2t/training/reporter.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import contextlib import math from collections import defaultdict diff --git a/paddlespeech/s2t/training/scheduler.py b/paddlespeech/s2t/training/scheduler.py index f850f6f50..732cbf0b5 100644 --- a/paddlespeech/s2t/training/scheduler.py +++ b/paddlespeech/s2t/training/scheduler.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from typing import Any from typing import Dict from typing import Text diff --git a/paddlespeech/s2t/training/triggers/compare_value_trigger.py b/paddlespeech/s2t/training/triggers/compare_value_trigger.py index efb928e2c..7c5502681 100644 --- a/paddlespeech/s2t/training/triggers/compare_value_trigger.py +++ b/paddlespeech/s2t/training/triggers/compare_value_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) from ..reporter import DictSummary from .utils import get_trigger diff --git a/paddlespeech/s2t/training/triggers/interval_trigger.py b/paddlespeech/s2t/training/triggers/interval_trigger.py index 1e04afad8..14201d29c 100644 --- a/paddlespeech/s2t/training/triggers/interval_trigger.py +++ b/paddlespeech/s2t/training/triggers/interval_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class IntervalTrigger(): diff --git a/paddlespeech/s2t/training/triggers/limit_trigger.py b/paddlespeech/s2t/training/triggers/limit_trigger.py index ecd527ac5..cd96040ef 100644 --- a/paddlespeech/s2t/training/triggers/limit_trigger.py +++ b/paddlespeech/s2t/training/triggers/limit_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class LimitTrigger(): diff --git a/paddlespeech/s2t/training/triggers/time_trigger.py b/paddlespeech/s2t/training/triggers/time_trigger.py index e31179a9f..53c398d11 100644 --- a/paddlespeech/s2t/training/triggers/time_trigger.py +++ b/paddlespeech/s2t/training/triggers/time_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class TimeTrigger(): diff --git a/paddlespeech/s2t/training/updaters/standard_updater.py b/paddlespeech/s2t/training/updaters/standard_updater.py index 83180a38d..a686af743 100644 --- a/paddlespeech/s2t/training/updaters/standard_updater.py +++ b/paddlespeech/s2t/training/updaters/standard_updater.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) from typing import Dict from typing import Optional diff --git a/paddlespeech/s2t/training/updaters/trainer.py b/paddlespeech/s2t/training/updaters/trainer.py index dcf844e36..5a1295eb3 100644 --- a/paddlespeech/s2t/training/updaters/trainer.py +++ b/paddlespeech/s2t/training/updaters/trainer.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import sys import traceback from collections import OrderedDict diff --git a/paddlespeech/s2t/training/updaters/updater.py b/paddlespeech/s2t/training/updaters/updater.py index ff8d925ff..427722d2f 100644 --- a/paddlespeech/s2t/training/updaters/updater.py +++ b/paddlespeech/s2t/training/updaters/updater.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) from dataclasses import dataclass import paddle diff --git a/paddlespeech/s2t/transform/add_deltas.py b/paddlespeech/s2t/transform/add_deltas.py index 4cab0084e..0a2f34198 100644 --- a/paddlespeech/s2t/transform/add_deltas.py +++ b/paddlespeech/s2t/transform/add_deltas.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import numpy as np diff --git a/paddlespeech/s2t/transform/channel_selector.py b/paddlespeech/s2t/transform/channel_selector.py index d985b482d..bc8a14bf0 100644 --- a/paddlespeech/s2t/transform/channel_selector.py +++ b/paddlespeech/s2t/transform/channel_selector.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import numpy diff --git a/paddlespeech/s2t/transform/cmvn.py b/paddlespeech/s2t/transform/cmvn.py index 5d3185906..749d5e187 100644 --- a/paddlespeech/s2t/transform/cmvn.py +++ b/paddlespeech/s2t/transform/cmvn.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import io import h5py diff --git a/paddlespeech/s2t/transform/functional.py b/paddlespeech/s2t/transform/functional.py index e23d55f9d..afbf4a59f 100644 --- a/paddlespeech/s2t/transform/functional.py +++ b/paddlespeech/s2t/transform/functional.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import inspect from paddlespeech.s2t.transform.transform_interface import TransformInterface diff --git a/paddlespeech/s2t/transform/perturb.py b/paddlespeech/s2t/transform/perturb.py index f7e8bb764..8671420c1 100644 --- a/paddlespeech/s2t/transform/perturb.py +++ b/paddlespeech/s2t/transform/perturb.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import librosa import numpy import scipy diff --git a/paddlespeech/s2t/transform/spec_augment.py b/paddlespeech/s2t/transform/spec_augment.py index 01ead8add..76e101848 100644 --- a/paddlespeech/s2t/transform/spec_augment.py +++ b/paddlespeech/s2t/transform/spec_augment.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Spec Augment module for preprocessing i.e., data augmentation""" import random diff --git a/paddlespeech/s2t/transform/spectrogram.py b/paddlespeech/s2t/transform/spectrogram.py index e63bd6803..aeedf545b 100644 --- a/paddlespeech/s2t/transform/spectrogram.py +++ b/paddlespeech/s2t/transform/spectrogram.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import librosa import numpy as np diff --git a/paddlespeech/s2t/transform/transform_interface.py b/paddlespeech/s2t/transform/transform_interface.py index 7ab29554e..a7e04ffcf 100644 --- a/paddlespeech/s2t/transform/transform_interface.py +++ b/paddlespeech/s2t/transform/transform_interface.py @@ -11,7 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# TODO(karita): add this to all the transform impl. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + + class TransformInterface: """Transform Interface""" diff --git a/paddlespeech/s2t/transform/transformation.py b/paddlespeech/s2t/transform/transformation.py index d9bb7c168..f0d1cd175 100644 --- a/paddlespeech/s2t/transform/transformation.py +++ b/paddlespeech/s2t/transform/transformation.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Transformation module.""" import copy import io @@ -23,8 +24,6 @@ import yaml from paddlespeech.s2t.utils.dynamic_import import dynamic_import -# TODO(karita): inherit TransformInterface -# TODO(karita): register cmd arguments in asr_train.py import_alias = dict( identity="paddlespeech.s2t.transform.transform_interface:Identity", time_warp="paddlespeech.s2t.transform.spec_augment:TimeWarp", diff --git a/paddlespeech/s2t/transform/wpe.py b/paddlespeech/s2t/transform/wpe.py index d82005f64..463810dda 100644 --- a/paddlespeech/s2t/transform/wpe.py +++ b/paddlespeech/s2t/transform/wpe.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from nara_wpe.wpe import wpe diff --git a/paddlespeech/s2t/utils/asr_utils.py b/paddlespeech/s2t/utils/asr_utils.py index 6f86e56f7..9184fd6af 100644 --- a/paddlespeech/s2t/utils/asr_utils.py +++ b/paddlespeech/s2t/utils/asr_utils.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import json import numpy as np @@ -18,7 +19,6 @@ import numpy as np __all__ = ["label_smoothing_dist"] -# TODO(takaaki-hori): add different smoothing methods def label_smoothing_dist(odim, lsm_type, transcript=None, blank=0): """Obtain label distribution for loss smoothing. diff --git a/paddlespeech/s2t/utils/check_kwargs.py b/paddlespeech/s2t/utils/check_kwargs.py index 1ee7329ba..11214aac7 100644 --- a/paddlespeech/s2t/utils/check_kwargs.py +++ b/paddlespeech/s2t/utils/check_kwargs.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import inspect diff --git a/paddlespeech/s2t/utils/cli_readers.py b/paddlespeech/s2t/utils/cli_readers.py index 010adb7a9..a1742d4f0 100644 --- a/paddlespeech/s2t/utils/cli_readers.py +++ b/paddlespeech/s2t/utils/cli_readers.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import io import logging import sys diff --git a/paddlespeech/s2t/utils/cli_utils.py b/paddlespeech/s2t/utils/cli_utils.py index f8e1d60bf..8c3953d69 100644 --- a/paddlespeech/s2t/utils/cli_utils.py +++ b/paddlespeech/s2t/utils/cli_utils.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import sys from collections.abc import Sequence from distutils.util import strtobool as dist_strtobool diff --git a/paddlespeech/s2t/utils/cli_writers.py b/paddlespeech/s2t/utils/cli_writers.py index 5866a82ee..4fa7824e7 100644 --- a/paddlespeech/s2t/utils/cli_writers.py +++ b/paddlespeech/s2t/utils/cli_writers.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from pathlib import Path from typing import Dict diff --git a/paddlespeech/s2t/utils/ctc_utils.py b/paddlespeech/s2t/utils/ctc_utils.py index ff23350a3..5e5714469 100644 --- a/paddlespeech/s2t/utils/ctc_utils.py +++ b/paddlespeech/s2t/utils/ctc_utils.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference wenet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from typing import List import numpy as np @@ -138,16 +139,6 @@ def forced_align(ctc_probs: paddle.Tensor, y: paddle.Tensor, return output_alignment -# ctc_align( -# self.model, -# self.align_loader, -# self.config.decoding.batch_size, -# self.align_loader.collate_fn.stride_ms, -# self.align_loader.collate_fn.vocab_list, -# self.args.result_file, -# ) - - def ctc_align(model, dataloader, batch_size, stride_ms, token_dict, result_file): """ctc alignment. diff --git a/paddlespeech/s2t/utils/dynamic_import.py b/paddlespeech/s2t/utils/dynamic_import.py index ddf17afe9..9b415bb7f 100644 --- a/paddlespeech/s2t/utils/dynamic_import.py +++ b/paddlespeech/s2t/utils/dynamic_import.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference espnet Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import importlib import inspect from typing import Any diff --git a/paddlespeech/t2s/training/extension.py b/paddlespeech/t2s/training/extension.py index 07e92696e..cc59e9222 100644 --- a/paddlespeech/t2s/training/extension.py +++ b/paddlespeech/t2s/training/extension.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) from typing import Callable PRIORITY_WRITER = 300 diff --git a/paddlespeech/t2s/training/extensions/evaluator.py b/paddlespeech/t2s/training/extensions/evaluator.py index 28249d096..3d17f70cd 100644 --- a/paddlespeech/t2s/training/extensions/evaluator.py +++ b/paddlespeech/t2s/training/extensions/evaluator.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) from typing import Dict import paddle diff --git a/paddlespeech/t2s/training/extensions/snapshot.py b/paddlespeech/t2s/training/extensions/snapshot.py index 2e4015969..f9b672687 100644 --- a/paddlespeech/t2s/training/extensions/snapshot.py +++ b/paddlespeech/t2s/training/extensions/snapshot.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import logging import os from datetime import datetime diff --git a/paddlespeech/t2s/training/reporter.py b/paddlespeech/t2s/training/reporter.py index 013c754e3..93c1e1776 100644 --- a/paddlespeech/t2s/training/reporter.py +++ b/paddlespeech/t2s/training/reporter.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import contextlib import math from collections import defaultdict diff --git a/paddlespeech/t2s/training/triggers/interval_trigger.py b/paddlespeech/t2s/training/triggers/interval_trigger.py index 98c036846..a83139ba9 100644 --- a/paddlespeech/t2s/training/triggers/interval_trigger.py +++ b/paddlespeech/t2s/training/triggers/interval_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class IntervalTrigger(object): diff --git a/paddlespeech/t2s/training/triggers/limit_trigger.py b/paddlespeech/t2s/training/triggers/limit_trigger.py index dd7a135e0..db1db774e 100644 --- a/paddlespeech/t2s/training/triggers/limit_trigger.py +++ b/paddlespeech/t2s/training/triggers/limit_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class LimitTrigger(object): diff --git a/paddlespeech/t2s/training/triggers/time_trigger.py b/paddlespeech/t2s/training/triggers/time_trigger.py index aff938255..d7123524b 100644 --- a/paddlespeech/t2s/training/triggers/time_trigger.py +++ b/paddlespeech/t2s/training/triggers/time_trigger.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) class TimeTrigger(object): diff --git a/paddlespeech/t2s/training/updater.py b/paddlespeech/t2s/training/updater.py index 1db3d5f9e..a7ea9c2d3 100644 --- a/paddlespeech/t2s/training/updater.py +++ b/paddlespeech/t2s/training/updater.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import logging from dataclasses import dataclass diff --git a/paddlespeech/t2s/training/updaters/standard_updater.py b/paddlespeech/t2s/training/updaters/standard_updater.py index 2d00d196f..ecbe0e6a8 100644 --- a/paddlespeech/t2s/training/updaters/standard_updater.py +++ b/paddlespeech/t2s/training/updaters/standard_updater.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Reference chainer MIT (https://opensource.org/licenses/MIT) import logging import time from typing import Dict