Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
06c9eee3
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
大约 1 年 前同步成功
通知
206
Star
8425
Fork
1598
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
245
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DeepSpeech
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
245
Issue
245
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
06c9eee3
编写于
6月 08, 2022
作者:
H
huangyuxin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update reademe, add conf file, updata test_cli
上级
6ebe4765
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
105 addition
and
2 deletion
+105
-2
demos/streaming_asr_server/README.md
demos/streaming_asr_server/README.md
+2
-0
demos/streaming_asr_server/README_cn.md
demos/streaming_asr_server/README_cn.md
+3
-1
demos/streaming_asr_server/conf/ws_conformer_wenetspeech_application_faster.yaml
...ver/conf/ws_conformer_wenetspeech_application_faster.yaml
+48
-0
paddlespeech/cli/asr/infer.py
paddlespeech/cli/asr/infer.py
+1
-1
paddlespeech/server/conf/ws_conformer_wenetspeech_application_faster.yaml
...ver/conf/ws_conformer_wenetspeech_application_faster.yaml
+48
-0
tests/unit/cli/test_cli.sh
tests/unit/cli/test_cli.sh
+3
-0
未找到文件。
demos/streaming_asr_server/README.md
浏览文件 @
06c9eee3
...
...
@@ -33,6 +33,8 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
```
bash
# in PaddleSpeech/demos/streaming_asr_server start the service
paddlespeech_server start
--config_file
./conf/ws_conformer_wenetspeech_application.yaml
# if you want to increase decoding speed, you can use the config file below, it will increase decoding speed and reduce accuracy
paddlespeech_server start
--config_file
./conf/ws_conformer_wenetspeech_application_faster.yaml
```
Usage:
...
...
demos/streaming_asr_server/README_cn.md
浏览文件 @
06c9eee3
...
...
@@ -21,7 +21,7 @@
下载好
`PaddleSpeech`
之后,进入到
`PaddleSpeech/demos/streaming_asr_server`
目录。
配置文件可参见该目录下
`conf/ws_application.yaml`
和
`conf/ws_conformer_wenetspeech_application.yaml`
。
目前服务集成的模型有: DeepSpeech2和 conformer模型,对应的配置文件如下:
目前服务集成的模型有: DeepSpeech2
和 conformer模型,对应的配置文件如下:
*
DeepSpeech:
`conf/ws_application.yaml`
*
conformer:
`conf/ws_conformer_wenetspeech_application.yaml`
...
...
@@ -40,6 +40,8 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
```
bash
# 在 PaddleSpeech/demos/streaming_asr_server 目录启动服务
paddlespeech_server start
--config_file
./conf/ws_conformer_wenetspeech_application.yaml
# 你如果愿意为了增加解码的速度而牺牲一定的模型精度,你可以使用如下的脚本
paddlespeech_server start
--config_file
./conf/ws_conformer_wenetspeech_application_faster.yaml
```
使用方法:
...
...
demos/streaming_asr_server/conf/ws_conformer_wenetspeech_application_faster.yaml
0 → 100644
浏览文件 @
06c9eee3
# This is the parameter configuration file for PaddleSpeech Serving.
#################################################################################
# SERVER SETTING #
#################################################################################
host
:
0.0.0.0
port
:
8090
# The task format in the engin_list is: <speech task>_<engine type>
# task choices = ['asr_online']
# protocol = ['websocket'] (only one can be selected).
# websocket only support online engine type.
protocol
:
'
websocket'
engine_list
:
[
'
asr_online'
]
#################################################################################
# ENGINE CONFIG #
#################################################################################
################################### ASR #########################################
################### speech task: asr; engine_type: online #######################
asr_online
:
model_type
:
'
conformer_online_wenetspeech'
am_model
:
# the pdmodel file of am static model [optional]
am_params
:
# the pdiparams file of am static model [optional]
lang
:
'
zh'
sample_rate
:
16000
cfg_path
:
decode_method
:
force_yes
:
True
device
:
'
cpu'
# cpu or gpu:id
decode_method
:
"
attention_rescoring"
continuous_decoding
:
True
# enable continue decoding when endpoint detected
num_decoding_left_chunks
:
16
am_predictor_conf
:
device
:
# set 'gpu:id' or 'cpu'
switch_ir_optim
:
True
glog_info
:
False
# True -> print glog
summary
:
True
# False -> do not show predictor config
chunk_buffer_conf
:
window_n
:
7
# frame
shift_n
:
4
# frame
window_ms
:
25
# ms
shift_ms
:
10
# ms
sample_rate
:
16000
sample_width
:
2
paddlespeech/cli/asr/infer.py
浏览文件 @
06c9eee3
...
...
@@ -88,7 +88,7 @@ class ASRExecutor(BaseExecutor):
'-num_left'
,
type
=
str
,
default
=-
1
,
help
=
'only support transformer and conformer model'
)
help
=
'only support transformer and conformer
online
model'
)
self
.
parser
.
add_argument
(
'--ckpt_path'
,
type
=
str
,
...
...
paddlespeech/server/conf/ws_conformer_wenetspeech_application_faster.yaml
0 → 100644
浏览文件 @
06c9eee3
# This is the parameter configuration file for PaddleSpeech Serving.
#################################################################################
# SERVER SETTING #
#################################################################################
host
:
0.0.0.0
port
:
8090
# The task format in the engin_list is: <speech task>_<engine type>
# task choices = ['asr_online']
# protocol = ['websocket'] (only one can be selected).
# websocket only support online engine type.
protocol
:
'
websocket'
engine_list
:
[
'
asr_online'
]
#################################################################################
# ENGINE CONFIG #
#################################################################################
################################### ASR #########################################
################### speech task: asr; engine_type: online #######################
asr_online
:
model_type
:
'
conformer_online_wenetspeech'
am_model
:
# the pdmodel file of am static model [optional]
am_params
:
# the pdiparams file of am static model [optional]
lang
:
'
zh'
sample_rate
:
16000
cfg_path
:
decode_method
:
force_yes
:
True
device
:
'
cpu'
# cpu or gpu:id
decode_method
:
"
attention_rescoring"
continuous_decoding
:
True
# enable continue decoding when endpoint detected
num_decoding_left_chunks
:
16
am_predictor_conf
:
device
:
# set 'gpu:id' or 'cpu'
switch_ir_optim
:
True
glog_info
:
False
# True -> print glog
summary
:
True
# False -> do not show predictor config
chunk_buffer_conf
:
window_n
:
7
# frame
shift_n
:
4
# frame
window_ms
:
25
# ms
shift_ms
:
10
# ms
sample_rate
:
16000
sample_width
:
2
tests/unit/cli/test_cli.sh
浏览文件 @
06c9eee3
...
...
@@ -22,6 +22,9 @@ paddlespeech asr --model deepspeech2online_wenetspeech --input ./zh.wav
paddlespeech asr
--model
deepspeech2online_aishell
--input
./zh.wav
paddlespeech asr
--model
deepspeech2offline_librispeech
--lang
en
--input
./en.wav
# Support editing num_decoding_left_chunks
paddlespeech asr
--model
conformer_online_wenetspeech
--num_decoding_left_chunks
3
--input
./zh.wav
# long audio restriction
{
wget
-c
https://paddlespeech.bj.bcebos.com/datasets/single_wav/zh/test_long_audio_01.wav
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录