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

搭建demos下speech_web,能进入页面但是功能不可用 #2181

Closed bzy456 closed 2 years ago

bzy456 commented 2 years ago

简单描述下遇到的问题,搭建成功的大佬帮忙解决下回个帖 1.搭建demos下speech_web,能进入页面但是功能不可用,启用 cd web_client yarn dev --port 8011 一点击音频文件识别,上传.wav后,一直识别,没结果,然后报错 16:40:32 [vite] http proxy error: Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20) 16:42:25 [vite] http proxy error: Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20) (x2) 16:53:35 [vite] http proxy error: Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20) (x3) 2.在后端部署时报错,但是我没管,没影响页面, cd speech_server

默认8010端口

python main.py --port 8010 报错如下: (PaddleSpeech) D:\workspace\bzy\demovoice\PaddleSpeech-develop\demos\speech_web\speech_server>python main.py --port 8010 [nltk_data] Error loading averaged_perceptron_tagger: <urlopen error [nltk_data] [Errno 11004] getaddrinfo failed> [nltk_data] Error loading cmudict: <urlopen error [Errno 11004] [nltk_data] getaddrinfo failed> D:\workspace\syt\soft\anaconda\ana\envs\PaddleSpeech\lib\site-packages_distutils_hack__init__.py:30: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. D:\workspace\syt\soft\anaconda\ana\envs\PaddleSpeech\lib\site-packages\pip_vendor\packaging\version.py:111: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release warnings.warn( D:\workspace\syt\soft\anaconda\ana\envs\PaddleSpeech\lib\site-packages\pip_vendor\packaging\version.py:111: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release warnings.warn( ERROR: Could not find a version that satisfies the requirement paddlespeech_ctcdecoders (from versions: none) ERROR: No matching distribution found for paddlespeech_ctcdecoders 2022-07-23 16:33:42.124 | INFO | paddlespeech.s2t.modules.ctc::43 - paddlespeech_ctcdecoders not installed! Traceback (most recent call last): File "main.py", line 29, in from src.robot import Robot File "D:\workspace\bzy\demovoice\PaddleSpeech-develop\demos\speech_web\speech_server\src\robot.py", line 6, in from src.SpeechBase.asr import ASR File "D:\workspace\bzy\demovoice\PaddleSpeech-develop\demos\speech_web\speech_server\src\SpeechBase\asr.py", line 7, in from paddlespeech.server.engine.asr.online.python.asr_engine import ASREngine ModuleNotFoundError: No module named 'paddlespeech.server.engine.asr.online.python'

lucky0604 commented 2 years ago

通过pip install paddlespeech貌似是无法直接引用paddlespeech.server.engine.asr.online.python这个模块的 我的解决方式是将PaddleSpeech仓库下的paddlespeech文件夹直接复制一份到demos/speech_web/speech_server/下,让文件依赖通过项目文件目录的路径而不是通过pip下载的模块

yt605155624 commented 2 years ago

可以 clone 最新的代码后 cd 到 PaddleSpeech pip install . 安装最新代码,release 版目前不包含相关模块

bbqkj commented 1 year ago

[vite] http proxy error: 前端代理报错 vite.config.js 23行 target: "http://localhost:8010",改为ip的形式