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.16k stars 1.85k forks source link

paddle的numpy库版本和paddlespeech冲突 #3618

Open alittlenico opened 11 months ago

alittlenico commented 11 months ago

按照文档,在conda虚拟环境先安装了paddle-gpu版本,再安装了paddlespeech。调用PaddleSpeech/examples/aishell3/vits/local/preprocess.sh预处理shell处理数据时,报错。根据报错应该是paddle的numpy和paddlespeech需要的版本不一致,我也不敢贸然修改numpy的版本,因为可能导致paddle出什么问题。有什么解决方法吗? python:3.9 numpy版本是1.26.2。 paddlepaddle版本: paddlepaddle-gpu 2.5.1.post112 paddlespeech版本:paddlespeech 1.4.1 除了numpy冲突外,还有一个[nltk_data] 错误。 报错如下: File "/home/inspur/ly416100210174/proj/PaddleSpeech/utils/gen_duration_from_textgrid.py", line 18, in import librosa File "/home/inspur/ly416100210174/miniconda3/envs/paddlepaddle/lib/python3.8/site-packages/librosa/init.py", line 211, in from . import core File "/home/inspur/ly416100210174/miniconda3/envs/paddlepaddle/lib/python3.8/site-packages/librosa/core/init.py", line 9, in from .constantq import * # pylint: disable=wildcard-import File "/home/inspur/ly416100210174/miniconda3/envs/paddlepaddle/lib/python3.8/site-packages/librosa/core/constantq.py", line 1059, in dtype=np.complex, File "/home/inspur/ly416100210174/miniconda3/envs/paddlepaddle/lib/python3.8/site-packages/numpy/init.py", line 305, in getattr raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'complex'. np.complex was a deprecated alias for the builtin complex. To avoid this error in existing code, 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. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: [nltk_data] Error loading averaged_perceptron_tagger: <urlopen error [nltk_data] [Errno -2] Name or service not known> [nltk_data] Error loading cmudict: <urlopen error [Errno -2] Name or [nltk_data] service not known>

zhaojigang commented 11 months ago

我用python3.10也遇到numpy冲突这个问题了,换成3.9好了

alittlenico commented 11 months ago

我用python3.10也遇到numpy冲突这个问题了,换成3.9好了

还是不行

alittlenico commented 11 months ago

根据报错原因:librosa/core/constantq.py", line 1059, in dtype=np.complex。 librosa的版本是:0.8.1

alittlenico commented 11 months ago

有人能给点帮助吗 卡好久了

alittlenico commented 11 months ago

解决,把某个评论区找到解决办法。librosa不变,numpy降级为1.23.5。

Douflamingo666 commented 10 months ago

解决,把某个评论区找到解决办法。librosa不变,numpy降级为1.23.5。

按照你的办法,解决。这版本问题,真烦,文档能写清楚就好了

mlick commented 10 months ago

解决,把某个评论区找到解决办法。librosa不变,numpy降级为1.23.5。

感谢大佬,解决了

zhouhao27 commented 7 months ago

解决,把某个评论区找到解决办法。librosa不变,numpy降级为1.23.5。

按照你的办法,解决。这版本问题,真烦,文档能写清楚就好了

怎么降级numpy?

chenmj201601 commented 3 days ago

解决,把某个评论区找到解决办法。librosa不变,numpy降级为1.23.5。

还是不行呀