move data.py and rename some files

This commit is contained in:
lifuchen 2020-02-13 12:46:21 +00:00 committed by liuyibing01
parent c8482a0788
commit 5ad005fd9a
16 changed files with 14 additions and 20 deletions

2
.gitignore vendored
View File

@ -132,7 +132,7 @@ dmypy.json
.pyre/
# Shell, vim, and output folder
*.sh
#*.sh
*.swp
runs
syn_audios

View File

@ -13,10 +13,12 @@ from tensorboardX import SummaryWriter
import paddle.fluid.dygraph as dg
import paddle.fluid.layers as layers
import paddle.fluid as fluid
from parakeet.models.dataloader.ljspeech import LJSpeechLoader
from parakeet.models.transformer_tts.transformerTTS import TransformerTTS
from parakeet.models.transformer_tts.transformer_tts import TransformerTTS
from parakeet.models.fastspeech.fastspeech import FastSpeech
from parakeet.models.fastspeech.utils import get_alignment
import sys
sys.path.append("../transformer_tts")
from data import LJSpeechLoader
def load_checkpoint(step, model_path):
model_dict, opti_dict = fluid.dygraph.load_dygraph(os.path.join(model_path, step))

View File

@ -1,4 +1,3 @@
# train model
# if you wish to resume from an exists model, uncomment --checkpoint_path and --fastspeech_step
#CUDA_VISIBLE_DEVICES=0,1,2,3 \

View File

@ -14,7 +14,7 @@ from pprint import pprint
from collections import OrderedDict
from parakeet import audio
from parakeet.models.transformer_tts.vocoder import Vocoder
from parakeet.models.transformer_tts.transformerTTS import TransformerTTS
from parakeet.models.transformer_tts.transformer_tts import TransformerTTS
def load_checkpoint(step, model_path):
model_dict, _ = fluid.dygraph.load_dygraph(os.path.join(model_path, step))

View File

@ -13,8 +13,8 @@ import paddle.fluid as fluid
import paddle.fluid.dygraph as dg
import paddle.fluid.layers as layers
from parakeet.modules.utils import cross_entropy
from parakeet.models.dataloader.ljspeech import LJSpeechLoader
from parakeet.models.transformer_tts.transformerTTS import TransformerTTS
from data import LJSpeechLoader
from parakeet.models.transformer_tts.transformer_tts import TransformerTTS
def load_checkpoint(step, model_path):
model_dict, opti_dict = fluid.dygraph.load_dygraph(os.path.join(model_path, step))

View File

@ -10,7 +10,7 @@ from pprint import pprint
import paddle.fluid as fluid
import paddle.fluid.dygraph as dg
import paddle.fluid.layers as layers
from parakeet.models.dataloader.ljspeech import LJSpeechLoader
from data import LJSpeechLoader
from parakeet.models.transformer_tts.vocoder import Vocoder
def load_checkpoint(step, model_path):

View File

@ -1,7 +1,7 @@
import paddle.fluid.dygraph as dg
import paddle.fluid as fluid
from parakeet.modules.utils import *
from parakeet.models.fastspeech.FFTBlock import FFTBlock
from parakeet.models.fastspeech.fft_block import FFTBlock
class Decoder(dg.Layer):
def __init__(self,

View File

@ -1,7 +1,7 @@
import paddle.fluid.dygraph as dg
import paddle.fluid as fluid
from parakeet.modules.utils import *
from parakeet.models.fastspeech.FFTBlock import FFTBlock
from parakeet.models.fastspeech.fft_block import FFTBlock
class Encoder(dg.Layer):
def __init__(self,

View File

@ -3,7 +3,7 @@ import paddle.fluid.dygraph as dg
import paddle.fluid as fluid
from parakeet.g2p.text.symbols import symbols
from parakeet.models.transformer_tts.post_convnet import PostConvNet
from parakeet.models.fastspeech.LengthRegulator import LengthRegulator
from parakeet.models.fastspeech.length_regulator import LengthRegulator
from parakeet.models.fastspeech.encoder import Encoder
from parakeet.models.fastspeech.decoder import Decoder

View File

@ -11,16 +11,9 @@ class TransformerTTS(dg.Layer):
self.config = config
def forward(self, characters, mel_input, pos_text, pos_mel):
# key (batch_size, seq_len, channel)
# c_mask (batch_size, seq_len)
# attns_enc (channel / 2, seq_len, seq_len)
key, c_mask, attns_enc = self.encoder(characters, pos_text)
# mel_output/postnet_output (batch_size, mel_len, n_mel)
# attn_probs (128, mel_len, seq_len)
# stop_preds (batch_size, mel_len, 1)
# attns_dec (128, mel_len, mel_len)
mel_output, postnet_output, attn_probs, stop_preds, attns_dec = self.decoder(key, key, mel_input, c_mask, pos_mel)
return mel_output, postnet_output, attn_probs, stop_preds, attns_enc, attns_dec

View File

@ -2,7 +2,7 @@ import paddle.fluid.dygraph as dg
import paddle.fluid as fluid
from parakeet.modules.customized import Conv1D
from parakeet.modules.utils import *
from parakeet.models.transformer_tts.CBHG import CBHG
from parakeet.models.transformer_tts.cbhg import CBHG
class Vocoder(dg.Layer):
"""