You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
测试代码如下
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'
测试环境
![Snipaste_2024-01-05_16-54-08](https://private-user-images.githubusercontent.com/118660349/294443531-42c10ffa-0d3d-473b-839e-71cc95488023.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU3MzI4MDcsIm5iZiI6MTcyNTczMjUwNywicGF0aCI6Ii8xMTg2NjAzNDkvMjk0NDQzNTMxLTQyYzEwZmZhLTBkM2QtNDczYi04MzllLTcxY2M5NTQ4ODAyMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwN1QxODA4MjdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02ZjEwNTQzNDQzOTI2ODhkNGIyNzJhYmM1YzFkYjQ3YzgyN2QxNjA0OGZiMDljNGVhZGIzYTI0ODEyMjg2YzY4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.TQ5xVfx-86v6XElctWrdtlUh5Y5W_eD7KLqOVu7qbRw)
win10
依赖版本
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 希望这两个都可以正常运行 谢谢!!!
The text was updated successfully, but these errors were encountered: