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