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

[S2T]Absurd basic bug #3722

Open
Imbernoulli opened this issue Mar 21, 2024 · 1 comment
Open

[S2T]Absurd basic bug #3722

Imbernoulli opened this issue Mar 21, 2024 · 1 comment
Assignees
Labels

Comments

@Imbernoulli
Copy link

(cad) (deepspeech-venv) root@8ikb0p7c24u18-0:/bjzhyai03/bohan/PaddleSpeech# paddlespeech asr --lang zh --input zh.wav
/root/miniconda3/envs/cad/lib/python3.8/site-packages/setuptools/sandbox.py:14: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
/root/miniconda3/envs/cad/lib/python3.8/site-packages/pkg_resources/__init__.py:2832: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/root/miniconda3/envs/cad/lib/python3.8/site-packages/pkg_resources/__init__.py:2832: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/root/miniconda3/envs/cad/lib/python3.8/site-packages/librosa/core/constantq.py:1059: DeprecationWarning: `np.complex` is a deprecated alias for the builtin `complex`. To silence this warning, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  dtype=np.complex,
/root/miniconda3/envs/cad/lib/python3.8/site-packages/paddle/fluid/dygraph/math_op_patch.py:275: UserWarning: The dtype of left and right variables are not the same, left dtype is paddle.float32, but right dtype is paddle.int64, the right dtype will convert to paddle.float32
  warnings.warn(
[2024-03-21 14:01:24,841] [   ERROR] - (InvalidArgument) Broadcast dimension mismatch. Operands could not be broadcast together with the shape of X = [1, 1, 0, 498] and the shape of Y = [1, 123, 123]. Received [498] in X is not equal to [123] in Y at i:3.
  [Hint: Expected x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1 == true, but received x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1:0 != true:1.] (at /paddle/paddle/phi/kernels/funcs/common_shape.h:84)
Traceback (most recent call last):
  File "/root/miniconda3/envs/cad/lib/python3.8/site-packages/paddlespeech/cli/asr/infer.py", line 314, in infer
    result_transcripts = self.model.decode(
  File "/root/miniconda3/envs/cad/lib/python3.8/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/root/miniconda3/envs/cad/lib/python3.8/site-packages/paddle/fluid/dygraph/base.py", line 375, in _decorate_function
    return func(*args, **kwargs)
  File "/root/miniconda3/envs/cad/lib/python3.8/site-packages/paddlespeech/s2t/models/u2/u2.py", line 818, in decode
    hyp = self.attention_rescoring(
  File "/root/miniconda3/envs/cad/lib/python3.8/site-packages/paddlespeech/s2t/models/u2/u2.py", line 543, in attention_rescoring
    hyps, encoder_out = self._ctc_prefix_beam_search(
  File "/root/miniconda3/envs/cad/lib/python3.8/site-packages/paddlespeech/s2t/models/u2/u2.py", line 424, in _ctc_prefix_beam_search
    encoder_out, encoder_mask = self._forward_encoder(
  File "/root/miniconda3/envs/cad/lib/python3.8/site-packages/paddlespeech/s2t/models/u2/u2.py", line 229, in _forward_encoder
    encoder_out, encoder_mask = self.encoder(
  File "/root/miniconda3/envs/cad/lib/python3.8/site-packages/paddle/fluid/dygraph/layers.py", line 948, in __call__
    return self.forward(*inputs, **kwargs)
  File "/root/miniconda3/envs/cad/lib/python3.8/site-packages/paddlespeech/s2t/modules/encoder.py", line 184, in forward
    chunk_masks = add_optional_chunk_mask(
  File "/root/miniconda3/envs/cad/lib/python3.8/site-packages/paddlespeech/s2t/modules/mask.py", line 202, in add_optional_chunk_mask
    chunk_masks = masks.logical_and(chunk_masks)  # (B, L, L)
  File "/root/miniconda3/envs/cad/lib/python3.8/site-packages/paddle/tensor/logic.py", line 122, in logical_and
    return _C_ops.logical_and(x, y)
ValueError: (InvalidArgument) Broadcast dimension mismatch. Operands could not be broadcast together with the shape of X = [1, 1, 0, 498] and the shape of Y = [1, 123, 123]. Received [498] in X is not equal to [123] in Y at i:3.
  [Hint: Expected x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1 == true, but received x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1:0 != true:1.] (at /paddle/paddle/phi/kernels/funcs/common_shape.h:84)
@Ray961123
Copy link

开发者你好,感谢关注 PaddleSpeech 开源项目,抱歉给你带来了不好的开发体验,目前开源项目维护人力有限,建议参考:#3692

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

No branches or pull requests

3 participants