paddlespeech使用,docker 安装版

paddlespeech使用,docker 安装版

默认已经安装docker

# 拉取paddlespeech镜像
docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2

# 使用镜像在当前目录构建并进入容器
docker run --name paddlespeech_docker -it -v ${PWD}/paddle registry.baidubce.com/paddlepaddle/paddle:2.3.2 /bin/bash

# 此时进入容器,在容器中执行命令
# 安装pytest-runner
pip install pytest-runner

# 安装paddlespeech
pip install paddlespeech -i https://pypi.tuna.tsinghua.edu.cn/simple

# 安装sndfile library
apt-get update
apt-get install libsndfile1

# 如果报错cannot import name 'deprecated' from 'typing_extensions',需要安装该版本,安装typing_extensions
pip install typing_extensions==4.7.1

# 运行官方示例
paddlespeech tts --input "你好,欢迎使用百度飞桨深度学习框架!" --output output.wav

# 查看生成的文件
ls
cmake-3.16.0-Linux-x86_64/  output.wav

# 在外部shell中执行命令,复制文件到本地
docker cp paddlespeech_docker:/home/output.wav ./output.wav
posted @ 2023-08-01 14:46  NewChan  阅读(1594)  评论(0)    收藏  举报