paddlespeech 部署及安装

安装前请安装miniconda环境,不会的请参考上一篇文章

官方文档

创建环境:

1、创建paddlespeech 虚拟环境

conda create -n paddlespeech python=3.8

2、初始化

conda init

3、激活

conda activate

4、进入环境

conda activate paddlespeech

安装源码:

下载源码

git clone -b r1.2 https://gitee.com/paddlepaddle/PaddleSpeech

安装依赖:

切换到git 下来的paddlespeech源码地址:

cd PaddleSpeech
pip install pytest-runner -i https://pypi.tuna.tsinghua.edu.cn/simple 
pip install . -i https://pypi.tuna.tsinghua.edu.cn/simple 
pip install uvicorn==0.18.3

为防止后面启动报错我又安装了一个paddlepaddle

pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple

这是错误提示:
在这里插入图片描述

服务配置:

这里Server开启哪些服务,主要是由/home/aistudio/PaddleSpeech/paddlespeech/server/conf/application.yaml
文件控制,这里先带大家一起解读这个文件。

host: 0.0.0.0 port: 8090

#The task format in the engin_list is: _
#task choices = [‘asr_python’, ‘asr_inference’, ‘tts_python’, ‘tts_inference’, ‘cls_python’, ‘cls_inference’] protocol: ‘http’
engine_list: [‘asr_python’, ‘tts_python’, ‘cls_python’, ‘text_python’,
‘vector_python’]

host定义的是主机的网络服务信息 port开启8090端口 protocol定义了协议类型为http
engine_list表示开启了哪些服务类型,我们可以看到开启了asr(语音识别),tts(语音合成),cls(声音分类),text(标点恢复),vector(声纹向量提取)
如果我们只想开启其中某个服务,只需修改engine_list配置参数,只保留对应项即可

启动服务:

如果需要修改上面的配置需要修改 PaddleSpeech\paddlespeech\server\conf\application.yaml
以下文件

在PaddleSpeech\demos\speech_server下执行:

paddlespeech_server start --config_file ./conf/application.yaml

启动成功:

在这里插入图片描述

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值