windows安装paddlespeech步骤:
1. 安装vs c++编译环境
对于 Windows 系统,需要安装 Visual Studio
来完成 C++ 编译环境的安装。
Microsoft C++ Build Tools - Visual Studio
2. 安装conda
conda create -y -p paddlespeech python=3.8
conda activate paddlespeech
conda install -y -c conda-forge sox libsndfile swig bzip2
3. 下载源码
git clone https://github.com/PaddlePaddle/PaddleSpeech.git
cd PaddleSpeech
4. 安装依赖
pip install paddlepaddle==2.4.2
修改setup.py:
pip install opencc==1.1.7
pip install ppdiffusers==0.14.2
pip install paddlenlp==2.5.2
编译
absl-py==2.1.0
aiohappyeyeballs==2.4.3
aiohttp==3.10.11
aiosignal==1.3.1
antlr4-python3-runtime==4.9.3
anyio==4.5.2
astor==0.8.1
asttokens==2.4.1
async-timeout==5.0.1
attrs==24.2.0
audioread==3.0.1
babel==2.16.0
backcall==0.2.0
bce-python-sdk==0.9.23
blinker==1.8.2
bokeh==3.1.1
boltons==24.1.0
Bottleneck==1.4.0
braceexpand==0.1.7
certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.4.0
click==8.1.7
colorama==0.4.6
coloredlogs==15.0.1
colorlog==6.9.0
contourpy==1.1.1
cycler==0.12.1
Cython==3.0.11
datasets==3.1.0
decorator==5.1.1
dill==0.3.4
Distance==0.1.3
editdistance==0.8.1
einops==0.8.0
exceptiongroup==1.2.2
executing==2.1.0
fastapi==0.115.5
filelock==3.16.1
Flask==3.0.3
Flask-Babel==2.0.0
flatbuffers==24.3.25
fonttools==4.55.0
frozenlist==1.5.0
fsspec==2024.9.0
ftfy==6.2.3
future==1.0.0
g2p-en==2.1.0
g2pM==0.1.2.5
h11==0.14.0
h5py==3.11.0
huggingface-hub==0.26.2
humanfriendly==10.0
HyperPyYAML==1.2.2
idna==3.10
importlib_metadata==8.5.0
importlib_resources==6.4.5
inflect==7.0.0
intervaltree==3.1.0
ipython==8.12.3
itsdangerous==2.2.0
jedi==0.19.2
jieba==0.42.1
Jinja2==3.1.4
joblib==1.4.2
jsonlines==4.0.0
kaldiio==2.18.0
kiwisolver==1.4.7
librosa==0.8.1
llvmlite==0.41.1
loguru==0.7.2
lxml==5.3.0
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.7.5
matplotlib-inline==0.1.7
mdurl==0.1.2
mido==1.3.3
mock==5.1.0
mpmath==1.3.0
multidict==6.1.0
multiprocess==0.70.12.2
nara-wpe==0.0.11
nltk==3.9.1
note-seq==0.0.3
numba==0.58.1
numpy==1.23.5
omegaconf==2.3.0
onnx==1.12.0
onnxruntime==1.19.2
OpenCC==1.1.7
opencc-python-reimplemented==0.1.7
opencv-python==4.6.0.66
opt-einsum==3.3.0
packaging==24.2
paddle-bfloat==0.1.7
paddle2onnx==1.3.0
paddleaudio==1.1.0
paddlefsl==1.1.0
paddlenlp==2.5.2
paddlepaddle==2.4.2
paddlesde==0.2.5
paddleslim==2.6.0
paddlespeech @ file:///E:/%E5%B7%A5%E4%BD%9C/%E9%A1%B9%E7%9B%AE/%E6%99%BA%E8%83%BD%E5%8C%96%E4%BA%A7%E5%93%81/paddlespeech
paddlespeech-feat==0.1.0
pandas==2.0.3
parameterized==0.9.0
parso==0.8.4
pathos==0.2.8
pattern_singleton==1.2.0
pickleshare==0.7.5
pillow==10.4.0
platformdirs==4.3.6
pooch==1.8.2
portalocker==3.0.0
pox==0.3.5
ppdiffusers==0.14.2
ppft==1.7.6.9
praatio==5.1.1
pretty_midi==0.2.10
prettytable==3.11.0
prompt_toolkit==3.0.48
propcache==0.2.0
protobuf==3.20.0
psutil==6.1.0
pure_eval==0.2.3
pyarrow==17.0.0
pybind11==2.13.6
pycparser==2.22
pycryptodome==3.21.0
pydantic==1.10.19
pydub==0.25.1
Pygments==2.18.0
pygtrie==2.5.0
pyparsing==3.1.4
pypinyin==0.44.0
pypinyin-dict==0.8.0
pyreadline3==3.5.4
pytest-runner==6.0.1
python-dateutil==2.9.0.post0
pytz==2024.2
pywin32==308
pyworld==0.3.4
PyYAML==6.0.2
pyzmq==26.2.0
rarfile==4.2
regex==2024.11.6
requests==2.32.3
requests-mock==1.12.1
resampy==0.4.3
rich==13.9.4
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
sacrebleu==2.4.3
safetensors==0.4.5
scikit-learn==1.3.2
scipy==1.10.1
sentencepiece==0.2.0
seqeval==1.2.2
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.41.3
swig==4.3.0
sympy==1.13.3
tabulate==0.9.0
TextGrid==1.6.1
threadpoolctl==3.5.0
timer==0.3.0
ToJyutping==0.2.1
tornado==6.4.2
tqdm==4.67.1
traitlets==5.14.3
trampoline==0.1.2
typeguard==2.13.3
typer==0.13.1
typing_extensions==4.12.2
tzdata==2024.2
urllib3==1.26.20
uvicorn==0.32.1
visualdl==2.4.2
wcwidth==0.2.13
webrtcvad==2.0.10
websockets==13.1
Werkzeug==3.0.6
win32-setctime==1.1.0
xxhash==3.5.0
xyzservices==2024.9.0
yacs==0.1.8
yarl==1.15.2
zhon==2.0.2
zipp==3.20.2
pip install pytest-runner
pip install .
5. 下载nltk_data
地址:https://paddlespeech.bj.bcebos.com/Parakeet/tools/nltk_data.tar.gz
目录:C:\Users\{USER_NAME}\AppData\Roaming\nltk_data
6.启动服务
paddlespeech_server start --config .\demos\streaming_tts_server\conf\tts_online_ws_application.yaml
7.apifox测试
新建websocket接口
127.0.0.1:8192/paddlespeech/tts/streaming
分别输入:
{"task": "tts","signal": "start"
}{"text": "你好,欢迎使用百度飞桨语音合成服务。","spk_id": 0
}{"task": "tts","signal": "end"
}
Linux安装PaddleSpeech步骤
使用有 root 权限的 Ubuntu
- 使用apt安装
build-essential
sudo apt install build-essential
- 克隆
PaddleSpeech
仓库
git clone https://github.com/PaddlePaddle/PaddleSpeech.git
# 进入PaddleSpeech目录
cd PaddleSpeech
安装 Conda
# 下载 miniconda
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -P tools/
# 安装 miniconda
bash tools/Miniconda3-latest-Linux-x86_64.sh -b
# conda 初始化$HOME/miniconda3/bin/conda init
# 激活 conda
bash
# 创建 Conda 虚拟环境
conda create -y -p tools/venv python=3.8
# 激活 Conda 虚拟环境:
conda activate tools/venv
# 安装 Conda 包
conda install -y -c conda-forge sox libsndfile swig bzip2 libflac bc
如果已经下载过conda,可以直接执行
# 安装 Conda 包
conda install -y -c conda-forge sox libsndfile swig bzip2 libflac bc
安装 PaddlePaddle
前往PaddlePaddle飞桨PaddlePaddle-源于产业实践的开源深度学习平台,下载对应的paddlepaddle版本
python -m pip install paddlepaddle-gpu==2.6.2 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
如果报错,使用python3
python -m pip install paddlepaddle-gpu==2.6.2 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
用开发者模式安装 PaddleSpeech
部分用户系统由于默认源的问题,安装中会出现 kaldiio 安转出错的问题,建议首先安装 pytest-runner:
pip install pytest-runner -i https://pypi.tuna.tsinghua.edu.cn/simple
然后安装 PaddleSpeech:
pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple