linter fixes and version updates for deps

This commit is contained in:
Eren Gölge 2021-02-01 13:18:56 +00:00 committed by Eren Gölge
parent a30a231566
commit 93a6bdfd6c
4 changed files with 10 additions and 12 deletions

View File

@ -1,9 +1,6 @@
dependencies = ['torch', 'gdown']
import torch
import os
import zipfile
from TTS.utils.generic_utils import get_user_data_dir
from TTS.utils.synthesizer import Synthesizer
from TTS.utils.manage import ModelManager
@ -30,8 +27,8 @@ def tts(model_name='tts_models/en/ljspeech/tacotron2-DCA', vocoder_name='vocoder
vocoder_path, vocoder_config_path = manager.download_model(vocoder_name)
# create synthesizer
synthesizer = Synthesizer(model_path, config_path, vocoder_path, vocoder_config_path)
return synthesizer
synt = Synthesizer(model_path, config_path, vocoder_path, vocoder_config_path)
return synt
if __name__ == '__main__':

View File

@ -61,7 +61,8 @@ def gan_dataset_case(batch_size, seq_len, hop_len, conv_pad, return_segments, us
mel = ap.melspectrogram(audio)
# the first 2 and the last 2 frames are skipped due to the padding
# differences in stft
assert (feat - mel[:, :feat1.shape[-1]])[:, 2:-2].sum() <= 0, f' [!] {(feat - mel[:, :feat1.shape[-1]])[:, 2:-2].sum()}'
max_diff = abs((feat - mel[:, :feat1.shape[-1]])[:, 2:-2]).max()
assert max_diff <= 0, f' [!] {max_diff}'
count_iter += 1
# if count_iter == max_iter: