Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using pretrained model with mel-sepcs from "deepvoice3-pytorch" #204

Open
ymzlygw opened this issue Aug 18, 2020 · 1 comment

Comments

@ymzlygw
Copy link

ymzlygw commented Aug 18, 2020

Hey, when i try to synthesis wav from mel files , this error occurs:

python synthesis.py --conditional=./output_mel/0_mel.npy ./wavenet_premodel/20180510_mixture_lj_checkpoint_step000320000_ema.pth generated
/root/anaconda3/envs/keras/lib/python3.6/site-packages/sklearn/utils/deprecation.py:143: FutureWarning: The sklearn.preprocessing.data module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.preprocessing. Anything that cannot be imported from sklearn.preprocessing is now part of the private API.
warnings.warn(message, FutureWarning)
Using TensorFlow backend.
Command line args:
{'--conditional': './output_mel/0_mel.npy',
'--file-name-suffix': '',
'--help': False,
'--hparams': '',
'--initial-value': None,
'--length': '32000',
'--max-abs-value': '-1',
'--output-html': False,
'--preset': None,
'--speaker-id': None,
'--symmetric-mels': False,
'': './wavenet_premodel/20180510_mixture_lj_checkpoint_step000320000_ema.pth',
'<dst_dir>': 'generated'}
Load checkpoint from ./wavenet_premodel/20180510_mixture_lj_checkpoint_step000320000_ema.pth
0%| | 0/20480 [00:00<?, ?it/s]
Traceback (most recent call last):
File "synthesis.py", line 200, in
waveform = wavegen(model, length, c=c, g=speaker_id, initial_value=initial_value, fast=True)
File "synthesis.py", line 127, in wavegen
log_scale_min=hparams.log_scale_min)
File "/root/AI_/wavenet_vocoder/wavenet_vocoder/wavenet.py", line 335, in incremental_forward
x, h = f.incremental_forward(x, ct, gt)
File "/root/AI_/wavenet_vocoder/wavenet_vocoder/modules.py", line 135, in incremental_forward
return self.forward(x, c, g, True)
File "/root/AI
/wavenet_vocoder/wavenet_vocoder/modules.py", line 165, in _forward
c = conv1x1_forward(self.conv1x1c, c, is_incremental)
File "/root/AI
/wavenet_vocoder/wavenet_vocoder/modules.py", line 55, in conv1x1_forward
x = conv.incremental_forward(x)
File "/root/AI
/wavenet_vocoder/wavenet_vocoder/conv.py", line 45, in incremental_forward
output = F.linear(input.view(bsz, -1), weight, self.bias)
File "/root/anaconda3/envs/keras/lib/python3.6/site-packages/torch/nn/functional.py", line 1370, in linear
ret = torch.addmm(bias, input, weight.t())
RuntimeError: size mismatch, m1: [1 x 48], m2: [80 x 512] at /tmp/pip-req-build-808afw3c/aten/src/THC/generic/THCTensorMathBlas.cu:290

The mel(.npy) files is the file generated from "deepvpice3-pytorch" project. I extract the mel-spec (don't use lws to synthesis wav in deepvoice3-pytorch) and want to synthesis with wavenet-vovoder. But this error occurs, can you help me this?

@ymzlygw
Copy link
Author

ymzlygw commented Aug 18, 2020

The follow info may be helpful .

ar = np.load(0_mel.npy)
ar.shape ==> (80,48)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant