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
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)
Traceback (most recent call last):
File "test1.py", line 3, in <module>
result = asr(audio_file="zh.wav")
File "/home/aistudio/PaddleSpeech/paddlespeech/cli/utils.py", line 328, in _warpper
return executor_func(self, *args, **kwargs)
File "/home/aistudio/PaddleSpeech/paddlespeech/cli/asr/infer.py", line 512, in __call__
res = self.postprocess() # Retrieve result of asr.
File "/home/aistudio/PaddleSpeech/paddlespeech/cli/asr/infer.py", line 335, in postprocess
return self._outputs["result"]
KeyError: 'result'
运行在百度
AiStudio
,相关依赖包:问题描述:
使用 语音识别 和 视频字幕 生成的 Python API 时出现报错。
出现以下报错:
参考 语言识别 功能相关文档时发现其中的 Python API 运行时不报错。
参考链接:https://github.com/PaddlePaddle/PaddleSpeech/blob/develop/demos/speech_recognition/README_cn.md
经测试发现
asr_executor()
方法时还需要指定模型。例:
运行结果:
写了两篇博客记录了相关过程,希望可以帮助到各位:
The text was updated successfully, but these errors were encountered: