PaddlePaddle / PaddleSpeech

Easy-to-use Speech Toolkit including Self-Supervised Learning model, SOTA/Streaming ASR with punctuation, Streaming TTS with text frontend, Speaker Verification System, End-to-End Speech Translation and Keyword Spotting. Won NAACL2022 Best Demo Award.
https://paddlespeech.readthedocs.io
Apache License 2.0
11.19k stars 1.86k forks source link

[ASR]调用ASRExecutor语音转文字时报错OSError: (External) CUFFT error(5) #3453

Open imxiongying opened 1 year ago

imxiongying commented 1 year ago

错误信息

  File "api_v2.py", line 331, in speech2textOfflineFile
    asr_res = chatbot.speech2text(out_file_path)
  File "/server/pp-tts/src/robot.py", line 48, in speech2text
    res = self.asr_model(audio_file=audio_file)
  File "/usr/local/anaconda3/envs/pp-tts-3.8.16/lib/python3.8/site-packages/paddlespeech/cli/utils.py", line 328, in _warpper
    return executor_func(self, *args, **kwargs)
  File "/usr/local/anaconda3/envs/pp-tts-3.8.16/lib/python3.8/site-packages/paddlespeech/cli/asr/infer.py", line 496, in __call__
    self.preprocess(model, audio_file)
  File "/usr/local/anaconda3/envs/pp-tts-3.8.16/lib/python3.8/site-packages/paddlespeech/cli/asr/infer.py", line 264, in preprocess
    audio = preprocessing(audio, **preprocess_args)
  File "/usr/local/anaconda3/envs/pp-tts-3.8.16/lib/python3.8/site-packages/paddlespeech/audio/transform/transformation.py", line 147, in __call__
    xs = [func(x, **_kwargs) for x in xs]
  File "/usr/local/anaconda3/envs/pp-tts-3.8.16/lib/python3.8/site-packages/paddlespeech/audio/transform/transformation.py", line 147, in <listcomp>
    xs = [func(x, **_kwargs) for x in xs]
  File "/usr/local/anaconda3/envs/pp-tts-3.8.16/lib/python3.8/site-packages/paddlespeech/audio/transform/spectrogram.py", line 373, in __call__
    mat = kaldi.fbank(
  File "/usr/local/anaconda3/envs/pp-tts-3.8.16/lib/python3.8/site-packages/paddlespeech/audio/compliance/kaldi.py", line 472, in fbank
    spectrum = paddle.fft.rfft(strided_input).abs()
  File "/usr/local/anaconda3/envs/pp-tts-3.8.16/lib/python3.8/site-packages/paddle/fft.py", line 340, in rfft
    return fft_r2c(x, n, axis, norm, forward=True, onesided=True, name=name)
  File "/usr/local/anaconda3/envs/pp-tts-3.8.16/lib/python3.8/site-packages/paddle/fft.py", line 1468, in fft_r2c
    out = _C_ops.fft_r2c(x, axes, norm, forward, onesided)
OSError: (External) CUFFT error(5).
  [Hint: Please search for the error code(5) on website (https://docs.nvidia.com/cuda/cufft/index.html#cufftresult) to get Nvidia's official solution and advice about CUFFT Error.] (at /paddle/paddle/phi/kernels/funcs/cufft_util.h:127)

相关代码

from paddlespeech.cli.asr.infer import ASRExecutor
self.asr_model = ASRExecutor()
res = self.asr_model(audio_file=audio_file)

项目环境:

zxcd commented 1 year ago

建议检查环境安装。看下paddlepaddle和paddlespeech是否正确安装。

cgychn commented 1 year ago

请问解决了么,4060报同样的错,2080上跑是正常的

cgychn commented 1 year ago

40系显卡需要将: paddlepaddle-gpu升级至2.5.0.post120版本 paddlespeech升级为dev版本 cudnn升级为8.9 cuda升级为12.0