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

windows10 Broadcast dimension mismatch. #3660

Closed
777sfdf opened this issue Jan 5, 2024 · 2 comments
Closed

windows10 Broadcast dimension mismatch. #3660

777sfdf opened this issue Jan 5, 2024 · 2 comments
Assignees
Labels

Comments

@777sfdf
Copy link

777sfdf commented Jan 5, 2024

测试环境
win10
依赖版本
Snipaste_2024-01-05_16-54-08

python版本
3.9.18

测试代码如下
from paddlespeech.cli.asr.infer import ASRExecutor

asr = ASRExecutor()
result = asr(audio_file="zh.wav")
print(result)

报错信息如下:
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/phi/kernels/funcs/common_shape.h:84)

Traceback (most recent call last):
File "G:\ASRFromPaddle\PaddleSpeech-develop\004.py", line 4, in
result = asr(audio_file="zh.wav")
File "G:\ASRFromPaddle\PaddleSpeech-develop\paddlespeech\cli\utils.py", line 328, in _warpper
return executor_func(self, *args, **kwargs)
File "G:\ASRFromPaddle\PaddleSpeech-develop\paddlespeech\cli\asr\infer.py", line 512, in call
res = self.postprocess() # Retrieve result of asr.
File "G:\ASRFromPaddle\PaddleSpeech-develop\paddlespeech\cli\asr\infer.py", line 335, in postprocess
return self._outputs["result"]
KeyError: 'result'

期望结果:
我看其他issue有提到这个问题 说的是paddlespeech版本问题 但是我看他们的是在Linux上 而且我这个paddle speech的版本是1.4.1
应该怎么修改才能可以正常运行 因为还用到流式语音服务器 streaming _asr_server 希望这两个都可以正常运行 谢谢!!!

@zxcd
Copy link
Collaborator

zxcd commented Jan 16, 2024

这应该还是版本问题,但我不确定window的支持情况如何。你可以试试 PaddleSpeech == develop, PaddlePaddle == 2.5.1 这种版本是否可以。

@zxcd zxcd assigned zxcd and unassigned zh794390558 Jan 16, 2024
@777sfdf
Copy link
Author

777sfdf commented Jan 17, 2024

已解决 重新安装了一遍测试环境 从最终的测试结果来看 是跟环境没有问题的 属于代码问题 感谢解答!!!

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