Loading... ``` D:\anaconda3\envs\paddle\python.exe H:\code\pyProject\paddle\paddle_asr.py D:\anaconda3\envs\paddle\lib\site-packages\setuptools\sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources D:\anaconda3\envs\paddle\lib\site-packages\pkg_resources\__init__.py:2871: 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) D:\anaconda3\envs\paddle\lib\site-packages\pkg_resources\__init__.py:2871: 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) D:\anaconda3\envs\paddle\lib\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, D:\anaconda3\envs\paddle\lib\site-packages\paddleaudio\_extension.py:141: UserWarning: paddleaudio C++ extension is not available. sox_io, sox_effect, kaldi raw feature is not supported!!! warnings.warn( D:\anaconda3\envs\paddle\lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") W0919 18:38:00.193614 25392 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 12.2, Runtime API Version: 10.2 W0919 18:38:00.195637 25392 dynamic_loader.cc:278] Note: [Recommend] copy cudnn into CUDA installation directory. For instance, download cudnn-10.0-windows10-x64-v7.6.5.32.zip from NVIDIA's official website, then, unzip it and copy it into C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0 You should do this according to your CUDA installation directory and CUDNN version. 2023-09-19 18:38:00.188 | INFO | paddlespeech.s2t.modules.ctc:<module>:45 - paddlespeech_ctcdecoders not installed! Traceback (most recent call last): File "H:\code\pyProject\paddle\paddle_asr.py", line 17, in <module> result = asr(audio_file=audio_file, force_yes=True) File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\cli\utils.py", line 328, in _warpper return executor_func(self, *args, **kwargs) File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\cli\asr\infer.py", line 502, in __call__ self._init_from_path(model, lang, codeswitch, sample_rate, config, File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\cli\asr\infer.py", line 210, in _init_from_path model_class = self.task_resource.get_model_class(model_name) File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\resource\resource.py", line 115, in get_model_class ret.append(dynamic_import(import_path)) File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\utils\dynamic_import.py", line 37, in dynamic_import m = importlib.import_module(module_name) File "D:\anaconda3\envs\paddle\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\models\u2\__init__.py", line 14, in <module> from .u2 import U2InferModel File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\models\u2\u2.py", line 43, in <module> from paddlespeech.s2t.modules.decoder import BiTransformerDecoder File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\modules\decoder.py", line 30, in <module> from paddlespeech.s2t.modules.attention import MultiHeadedAttention File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\modules\attention.py", line 36, in <module> class MultiHeadedAttention(nn.Layer): File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\modules\attention.py", line 92, in MultiHeadedAttention mask: paddle.Tensor=paddle.ones([0, 0, 0], dtype=paddle.bool) File "D:\anaconda3\envs\paddle\lib\site-packages\paddle\tensor\creation.py", line 660, in ones return fill_constant(value=1.0, shape=shape, dtype=dtype, name=name) File "D:\anaconda3\envs\paddle\lib\site-packages\paddle\fluid\layers\tensor.py", line 795, in fill_constant out = _C_ops.full(shape, float(value), dtype, place) RuntimeError: (PreconditionNotMet) The third-party dynamic library (cudnn64_7.dll) that Paddle depends on is not configured correctly. (error code is 126) Suggestions: 1. Check if the third-party dynamic library (e.g. CUDA, CUDNN) is installed correctly and its version is matched with paddlepaddle you installed. 2. Configure third-party dynamic library environment variables as follows: - Linux: set LD_LIBRARY_PATH by `export LD_LIBRARY_PATH=...` - Windows: set PATH by `set PATH=XXX; (at ..\paddle\phi\backends\dynload\dynamic_loader.cc:305) Process finished with exit code 1 ``` **提示缺少cudnn64_7.dll** **发现这句话** ``` Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 12.2, Runtime API Version: 10.2 ``` **然后要我下载** ``` [Recommend] copy cudnn into CUDA installation directory. For instance, download cudnn-10.0-windows10-x64-v7.6.5.32.zip from NVIDIA's official website, then, unzip it and copy it into C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0 ``` **但是** ``` (paddle) C:\Users\Administrator>nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:41:10_Pacific_Daylight_Time_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0 ``` **cuda版本明明是11.8** **此时我安装的版本是paddlepaddle-gpu==2.4.2,搜了一下发现是2.5以后的版本才支持cuda11.8** [https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/windows-pip.html](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/windows-pip.html)  **但是2.5的版本又会有错误** ``` D:\anaconda3\envs\paddle\python.exe H:\code\pyProject\paddle\paddle_asr.py D:\anaconda3\envs\paddle\lib\site-packages\paddleaudio\_extension.py:141: UserWarning: paddleaudio C++ extension is not available. sox_io, sox_effect, kaldi raw feature is not supported!!! warnings.warn( D:\anaconda3\envs\paddle\lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") W0919 19:06:04.794121 24916 gpu_resources.cc:96] The GPU architecture in your current machine is Pascal, which is not compatible with Paddle installation with arch: 70 75 80 86 , it is recommended to install the corresponding wheel package according to the installation information on the official Paddle website. W0919 19:06:04.794121 24916 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 12.2, Runtime API Version: 11.8 2023-09-19 19:06:04.790 | INFO | paddlespeech.s2t.modules.ctc:<module>:45 - paddlespeech_ctcdecoders not installed! W0919 19:06:04.823117 24916 gpu_resources.cc:149] device: 0, cuDNN Version: 8.9. 2023-09-19 19:06:05.096 | INFO | paddlespeech.s2t.modules.embedding:__init__:150 - max len: 5000 [2023-09-19 19:06:07,605] [ WARNING] - The sample rate of the input file is not 16000. The program will resample the wav file to 16000. If the result does not meet your expectations, Please input the 16k 16 bit 1 channel wav file. [2023-09-19 19:06:10,879] [ ERROR] - list index out of range Traceback (most recent call last): File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\cli\asr\infer.py", line 314, in infer result_transcripts = self.model.decode( File "D:\anaconda3\envs\paddle\lib\site-packages\decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) File "D:\anaconda3\envs\paddle\lib\site-packages\paddle\fluid\dygraph\base.py", line 347, in _decorate_function return func(*args, **kwargs) File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\models\u2\u2.py", line 818, in decode hyp = self.attention_rescoring( File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\models\u2\u2.py", line 532, in attention_rescoring assert speech.shape[0] == speech_lengths.shape[0] IndexError: list index out of range Traceback (most recent call last): File "H:\code\pyProject\paddle\paddle_asr.py", line 17, in <module> result = asr(audio_file=audio_file, force_yes=True) File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\cli\utils.py", line 328, in _warpper return executor_func(self, *args, **kwargs) File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\cli\asr\infer.py", line 512, in __call__ res = self.postprocess() # Retrieve result of asr. File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\cli\asr\infer.py", line 335, in postprocess return self._outputs["result"] KeyError: 'result' Process finished with exit code 1 ``` **我就是先遇到这个错误,然后去官方issue里查找,被建议安装2.4.2的版本。。** **然后转了几圈,发现其实是paddlespeech的版本太旧了,pypi上的最新版本是是2023.3.16发布的,从最新的源码编译安装就可以解决上面的问题。** [https://github.com/PaddlePaddle/PaddleSpeech/issues/3442#issuecomment-1663320587](https://github.com/PaddlePaddle/PaddleSpeech/issues/3442#issuecomment-1663320587) **接着出现了新问题** ``` D:\anaconda3\envs\paddle\python.exe H:\code\pyProject\paddle\paddle_asr.py D:\anaconda3\envs\paddle\lib\site-packages\paddleaudio\_extension.py:141: UserWarning: paddleaudio C++ extension is not available. sox_io, sox_effect, kaldi raw feature is not supported!!! warnings.warn( D:\anaconda3\envs\paddle\lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") W0919 19:24:11.959440 15400 gpu_resources.cc:96] The GPU architecture in your current machine is Pascal, which is not compatible with Paddle installation with arch: 70 75 80 86 , it is recommended to install the corresponding wheel package according to the installation information on the official Paddle website. W0919 19:24:11.959440 15400 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 12.2, Runtime API Version: 11.8 2023-09-19 19:24:11.956 | INFO | paddlespeech.s2t.modules.ctc:<module>:45 - paddlespeech_ctcdecoders not installed! W0919 19:24:11.975440 15400 gpu_resources.cc:149] device: 0, cuDNN Version: 8.9. Traceback (most recent call last): File "H:\code\pyProject\paddle\paddle_asr.py", line 17, in <module> result = asr(audio_file=audio_file, force_yes=True) File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\cli\utils.py", line 328, in _warpper return executor_func(self, *args, **kwargs) File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\cli\asr\infer.py", line 502, in __call__ self._init_from_path(model, lang, codeswitch, sample_rate, config, File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\cli\asr\infer.py", line 212, in _init_from_path model = model_class.from_config(model_conf) File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\models\u2\u2.py", line 959, in from_config model = cls(configs) File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\models\u2\u2.py", line 861, in __init__ vocab_size, encoder, decoder, ctc = U2Model._init_from_config( File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\models\u2\u2.py", line 906, in _init_from_config encoder = ConformerEncoder( File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\modules\encoder.py", line 471, in __init__ super().__init__(input_size, output_size, attention_heads, linear_units, File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\modules\encoder.py", line 142, in __init__ pos_enc_class=pos_enc_class( File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\modules\embedding.py", line 152, in __init__ super().__init__(d_model, dropout_rate, max_len, reverse=True) File "D:\anaconda3\envs\paddle\lib\site-packages\paddlespeech\s2t\modules\embedding.py", line 99, in __init__ -paddle.arange(0, self.d_model, 2, dtype=paddle.float32) * RuntimeError: (PreconditionNotMet) The meta data must be valid when call the mutable data function. [Hint: Expected valid() == true, but received valid():0 != true:1.] (at ..\paddle\phi\core\dense_tensor.cc:122) Process finished with exit code 1 ``` 在issues中找到相关报错https://github.com/PaddlePaddle/PaddleSpeech/issues/3473,**这个还没解决** Last modification:September 19, 2023 © Allow specification reprint Support Appreciate the author WeChat Like 0 如果觉得我的文章对你有用,请随意赞赏