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 500 when text is less than 10 letters #10

Open
aseques opened this issue Aug 10, 2022 · 1 comment
Open

Error 500 when text is less than 10 letters #10

aseques opened this issue Aug 10, 2022 · 1 comment

Comments

@aseques
Copy link

aseques commented Aug 10, 2022

I was trying the pronunciation of some words that didn't sound very well when in a sentence and I just discovered that anything under 10 characters throws an error 500

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/wsgiref/handlers.py", line 137, in run
    self.result = application(self.environ, self.start_response)
  File "falcon/api.py", line 274, in falcon.api.API.__call__
  File "falcon/api.py", line 269, in falcon.api.API.__call__
  File "demo_server.py", line 28, in on_get
    res.data = synthesizer.synthesize(req.params.get('text'))
  File "/srv/synthesizer.py", line 97, in synthesize
    d_vector=None)
  File "/usr/local/lib/python3.7/site-packages/TTS/tts/utils/synthesis.py", line 281, in synthesis
    outputs = run_model_torch(model, text_inputs, speaker_id, style_mel, d_vector=d_vector)
  File "/usr/local/lib/python3.7/site-packages/TTS/tts/utils/synthesis.py", line 98, in run_model_torch
    "style_mel": style_mel,
  File "/usr/local/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/TTS/tts/models/forward_tts.py", line 590, in inference
    o_en, x_mask, g, _ = self._forward_encoder(x, x_mask, g)
  File "/usr/local/lib/python3.7/site-packages/TTS/tts/models/forward_tts.py", line 357, in _forward_encoder
    o_en = self.encoder(torch.transpose(x_emb, 1, -1), x_mask)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/TTS/tts/layers/feed_forward/encoder.py", line 161, in forward
    o = self.encoder(x, x_mask)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/TTS/tts/layers/feed_forward/encoder.py", line 71, in forward
    o = self.res_conv_block(o, x_mask)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/TTS/tts/layers/generic/res_conv_bn.py", line 124, in forward
    o = block(o)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/TTS/tts/layers/generic/res_conv_bn.py", line 79, in forward
    return self.conv_bn_blocks(x)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/container.py", line 139, in forward
    input = module(input)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/TTS/tts/layers/generic/res_conv_bn.py", line 42, in forward
    o = self.conv1d(x)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 307, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 304, in _conv_forward
    self.padding, self.dilation, self.groups)
RuntimeError: Calculated padded input size per channel: (7). Kernel size: (13). Kernel size can't be greater than actual input size
172.17.0.1 - - [10/Aug/2022 12:52:58] "GET /synthesize?text=text HTTP/1.1" 500 59

@alpoktem
Copy link

This is an error with the version of the model and not the codebase. We're working on recreating models using the latest version of Coqui.

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

2 participants