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
10.86k stars 1.82k forks source link

[TTS]ImportError: cannot import name 'get_cmap' from 'matplotlib.cm' #3812

Closed ZHUHF123 closed 2 days ago

ZHUHF123 commented 2 months ago

Traceback (most recent call last): File "/home/puaiuc/.conda/envs/paddle_tts/bin/paddlespeech", line 8, in sys.exit(_execute()) File "/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/paddlespeech/cli/entry.py", line 40, in _execute exec("from {} import {}".format(module, cls)) File "", line 1, in File "/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/paddlespeech/cli/tts/init.py", line 14, in from .infer import TTSExecutor File "/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/paddlespeech/cli/tts/infer.py", line 33, in from paddlespeech.t2s.exps.syn_utils import get_am_inference File "/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/paddlespeech/t2s/init.py", line 19, in from . import models File "/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/paddlespeech/t2s/models/init.py", line 14, in from .ernie_sat import File "/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/paddlespeech/t2s/models/ernie_sat/init.py", line 15, in from .ernie_sat_updater import File "/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/paddlespeech/t2s/models/ernie_sat/ernie_sat_updater.py", line 24, in from paddlespeech.t2s.training.extensions.evaluator import StandardEvaluator File "/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/paddlespeech/t2s/training/init.py", line 15, in from .experiment import * File "/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/paddlespeech/t2s/training/experiment.py", line 23, in from paddlespeech.t2s.utils import checkpoint File "/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/paddlespeech/t2s/utils/init.py", line 15, in from . import display File "/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/paddlespeech/t2s/utils/display.py", line 14, in import librosa.display File "/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/librosa/display.py", line 48, in from matplotlib.cm import get_cmap ImportError: cannot import name 'get_cmap' from 'matplotlib.cm' (/home/puaiuc/.conda/envs/paddle_tts/lib/python3.9/site-packages/matplotlib/cm.py)

使用语音合成指令paddlespeech tts --input "你好,欢迎使用百度飞桨深度学习框架!" --output output.wav 报错如上 没发现有什么问题 按照说明装的环境 应该是哪个包的版本不匹配,有大佬解答一下吗 当前python 3.9 paddlepaddle-gpu 2.5.1 CUDA12.0 gcc7.5.0
pip list如下 absl-py 2.1.0 aiohttp 3.9.5 aiosignal 1.3.1 aistudio-sdk 0.2.4 annotated-types 0.7.0 antlr4-python3-runtime 4.9.3 anyio 4.4.0 astor 0.8.1 asttokens 2.4.1 async-timeout 4.0.3 attrs 23.2.0 audioread 3.0.1 av 12.2.0 Babel 2.15.0 bce-python-sdk 0.9.17 blinker 1.8.2 bokeh 3.4.2 boltons 24.0.0 Bottleneck 1.4.0 braceexpand 0.1.7 certifi 2024.6.2 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 colorama 0.4.6 coloredlogs 15.0.1 colorlog 6.8.2 contourpy 1.2.1 cycler 0.12.1 Cython 3.0.10 datasets 2.20.0 decorator 5.1.1 dill 0.3.4 Distance 0.1.3 dnspython 2.6.1 editdistance 0.8.1 einops 0.8.0 email_validator 2.2.0 exceptiongroup 1.2.1 executing 2.0.1 fastapi 0.111.0 fastapi-cli 0.0.4 filelock 3.15.4 Flask 3.0.3 flask-babel 4.0.0 flatbuffers 24.3.25 fonttools 4.53.0 frozenlist 1.4.1 fsspec 2024.5.0 ftfy 6.2.0 future 1.0.0 g2p-en 2.1.0 g2pM 0.1.2.5 h11 0.14.0 h5py 3.11.0 httpcore 1.0.5 httptools 0.6.1 httpx 0.27.0 huggingface-hub 0.23.4 humanfriendly 10.0 HyperPyYAML 1.2.2 idna 3.7 importlib_metadata 8.0.0 importlib_resources 6.4.0 inflect 7.0.0 intervaltree 3.1.0 ipython 8.18.1 itsdangerous 2.2.0 jedi 0.19.1 jieba 0.42.1 Jinja2 3.1.4 joblib 1.4.2 jsonlines 4.0.0 kaldiio 2.18.0 kiwisolver 1.4.5 librosa 0.8.1 ligo-segments 1.4.0 llvmlite 0.43.0 loguru 0.7.2 lxml 5.2.2 markdown-it-py 3.0.0 MarkupSafe 2.1.5 matplotlib 3.9.0 matplotlib-inline 0.1.7 mdurl 0.1.2 mido 1.3.2 mock 5.1.0 mpmath 1.3.0 multidict 6.0.5 multiprocess 0.70.12.2 nara-wpe 0.0.10 nltk 3.8.1 note-seq 0.0.5 numba 0.60.0 numpy 1.23.5 omegaconf 2.3.0 onnx 1.16.1 onnxruntime 1.18.1 OpenCC 1.1.6 opencc-python-reimplemented 0.1.7 opencv-python 4.6.0.66 opt-einsum 3.3.0 orjson 3.10.5 packaging 23.2 paddle-bfloat 0.1.7 paddle2onnx 1.2.4 paddleaudio 1.1.0 paddlefsl 1.1.0 paddlenlp 2.8.1 paddlepaddle-gpu 2.5.1 paddlesde 0.2.5 paddleslim 2.6.0 paddlespeech 0.0.0 paddlespeech-feat 0.1.0 pandas 2.2.2 parameterized 0.9.0 parso 0.8.4 pathos 0.2.8 pattern_singleton 1.2.0 pexpect 4.9.0 pillow 10.4.0 pip 24.0 platformdirs 4.2.2 pooch 1.8.2 portalocker 2.10.0 pox 0.3.4 ppdiffusers 0.24.0 ppft 1.7.6.8 praatio 5.1.1 pretty_midi 0.2.10 prettytable 3.10.0 prompt_toolkit 3.0.47 protobuf 5.27.2 psutil 6.0.0 ptyprocess 0.7.0 pure-eval 0.2.2 pyarrow 16.1.0 pyarrow-hotfix 0.6 pybind11 2.13.1 pycparser 2.22 pycryptodome 3.20.0 pydantic 2.8.0 pydantic_core 2.20.0 pydub 0.25.1 Pygments 2.18.0 pygtrie 2.5.0 pyparsing 3.1.2 pypinyin 0.44.0 pypinyin-dict 0.8.0 pytest-runner 6.0.1 python-dateutil 2.9.0.post0 python-dotenv 1.0.1 python-multipart 0.0.9 pytz 2024.1 pyworld 0.3.4 PyYAML 6.0.1 pyzmq 26.0.3 rarfile 4.2 regex 2024.5.15 requests 2.32.3 requests-mock 1.12.1 resampy 0.4.3 rich 13.7.1 ruamel.yaml 0.18.6 ruamel.yaml.clib 0.2.8 sacrebleu 2.4.2 safetensors 0.4.3 scikit-learn 1.5.0 scipy 1.13.1 sentencepiece 0.2.0 seqeval 1.2.2 setuptools 69.5.1 shellingham 1.5.4 six 1.16.0 sniffio 1.3.1 sortedcontainers 2.4.0 soundfile 0.12.1 stack-data 0.6.3 starlette 0.37.2 swig 4.2.1 sympy 1.12.1 tabulate 0.9.0 TextGrid 1.6.1 threadpoolctl 3.5.0 timer 0.3.0 ToJyutping 0.2.1 tool-helpers 0.1.1 tornado 6.4.1 tqdm 4.66.4 traitlets 5.14.3 trampoline 0.1.2 typeguard 2.13.3 typer 0.12.3 typing_extensions 4.12.2 tzdata 2024.1 ujson 5.10.0 urllib3 1.26.19 uvicorn 0.30.1 uvloop 0.19.0 visualdl 2.5.3 watchfiles 0.22.0 wcwidth 0.2.13 webrtcvad 2.0.10 websockets 12.0 Werkzeug 3.0.3 wheel 0.43.0 xxhash 3.4.1 xyzservices 2024.6.0 yacs 0.1.8 yarl 1.9.4 zhon 2.0.2 zipp 3.19.2

Ray961123 commented 2 months ago

开发者你好,感谢关注 PaddleSpeech 开源项目,抱歉给你带来了不好的开发体验,目前开源项目维护人力有限,你可以尝试通过修改 PaddleSpeech 源码的方式自己解决,或请求开源社区其他开发者的协助。飞桨开源社区交流频道:飞桨AI Studio星河社区-人工智能学习与实训社区

ReturnTR commented 2 weeks ago

降低matplot版本为3.7.3,刚踩过的坑

zxcd commented 2 days ago

感谢您的issue,该问题已被修复于https://github.com/PaddlePaddle/PaddleSpeech/pull/3841