From f91b9eeda1ab104c8ba6888c2599d7f0fa2e3a35 Mon Sep 17 00:00:00 2001 From: Edresson Date: Wed, 29 Jul 2020 21:21:42 -0300 Subject: [PATCH] fix Lint check --- mozilla_voice_tts/tts/datasets/preprocess.py | 4 ++-- mozilla_voice_tts/tts/models/tacotron2.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mozilla_voice_tts/tts/datasets/preprocess.py b/mozilla_voice_tts/tts/datasets/preprocess.py index 0509677c..7865652a 100644 --- a/mozilla_voice_tts/tts/datasets/preprocess.py +++ b/mozilla_voice_tts/tts/datasets/preprocess.py @@ -229,14 +229,14 @@ def vctk(root_path, meta_files=None, wavs_path='wav48'): items = [] meta_files = glob(f"{os.path.join(root_path,'txt')}/**/*.txt", recursive=True) for meta_file in meta_files: - txt, speaker_id, txt_file = os.path.relpath(meta_file,root_path).split(os.sep) + _, speaker_id, txt_file = os.path.relpath(meta_file, root_path).split(os.sep) file_id = txt_file.split('.')[0] if isinstance(test_speakers, list): # if is list ignore this speakers ids if speaker_id in test_speakers: continue with open(meta_file) as file_text: text = file_text.readlines()[0] - wav_file = os.path.join(root_path, wavs_path, speaker_id,file_id+'.wav') + wav_file = os.path.join(root_path, wavs_path, speaker_id, file_id+'.wav') items.append([text, wav_file, speaker_id]) return items \ No newline at end of file diff --git a/mozilla_voice_tts/tts/models/tacotron2.py b/mozilla_voice_tts/tts/models/tacotron2.py index c2fc8a32..2839cea7 100644 --- a/mozilla_voice_tts/tts/models/tacotron2.py +++ b/mozilla_voice_tts/tts/models/tacotron2.py @@ -58,7 +58,7 @@ class Tacotron2(TacotronAbstract): else: # if speaker_embedding_dim is not None we need use speaker embedding per sample self.embeddings_per_sample = True - + # speaker and gst embeddings is concat in decoder input if num_speakers > 1: decoder_in_features = decoder_in_features + speaker_embedding_dim # add speaker embedding dim @@ -73,7 +73,7 @@ class Tacotron2(TacotronAbstract): if not self.embeddings_per_sample: self.speaker_embedding = nn.Embedding(num_speakers, speaker_embedding_dim) self.speaker_embedding.weight.data.normal_(0, 0.3) - + # base model layers self.encoder = Encoder(encoder_in_features) self.decoder = Decoder(decoder_in_features, self.decoder_output_dim, r, attn_type, attn_win,