Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
d028c841
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
1 年多 前同步成功
通知
207
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看板
提交
d028c841
编写于
9月 07, 2021
作者:
H
Hui Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix recipe train and avg shell
上级
b105c63e
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
50 addition
and
164 deletion
+50
-164
examples/aishell/s0/local/client.sh
examples/aishell/s0/local/client.sh
+0
-20
examples/aishell/s0/local/server.sh
examples/aishell/s0/local/server.sh
+0
-40
examples/aishell/s0/local/train.sh
examples/aishell/s0/local/train.sh
+2
-2
examples/aishell/s0/local/tune.sh
examples/aishell/s0/local/tune.sh
+0
-28
examples/aishell/s0/run.sh
examples/aishell/s0/run.sh
+1
-1
examples/aishell/s1/local/train.sh
examples/aishell/s1/local/train.sh
+3
-3
examples/aishell/s1/run.sh
examples/aishell/s1/run.sh
+1
-1
examples/callcenter/s1/local/train.sh
examples/callcenter/s1/local/train.sh
+3
-3
examples/callcenter/s1/run.sh
examples/callcenter/s1/run.sh
+1
-1
examples/librispeech/s0/README.md
examples/librispeech/s0/README.md
+10
-3
examples/librispeech/s0/local/train.sh
examples/librispeech/s0/local/train.sh
+3
-3
examples/librispeech/s0/local/tune.sh
examples/librispeech/s0/local/tune.sh
+0
-33
examples/librispeech/s0/run.sh
examples/librispeech/s0/run.sh
+1
-1
examples/librispeech/s1/local/train.sh
examples/librispeech/s1/local/train.sh
+3
-3
examples/librispeech/s1/run.sh
examples/librispeech/s1/run.sh
+1
-1
examples/librispeech/s2/local/train.sh
examples/librispeech/s2/local/train.sh
+3
-3
examples/librispeech/s2/run.sh
examples/librispeech/s2/run.sh
+1
-1
examples/punctuation_restoration/README.md
examples/punctuation_restoration/README.md
+1
-1
examples/ted_en_zh/t0/local/train.sh
examples/ted_en_zh/t0/local/train.sh
+3
-3
examples/ted_en_zh/t0/run.sh
examples/ted_en_zh/t0/run.sh
+1
-1
examples/timit/s1/local/train.sh
examples/timit/s1/local/train.sh
+3
-3
examples/timit/s1/run.sh
examples/timit/s1/run.sh
+1
-1
examples/tiny/s0/local/train.sh
examples/tiny/s0/local/train.sh
+3
-3
examples/tiny/s0/run.sh
examples/tiny/s0/run.sh
+1
-1
examples/tiny/s1/local/train.sh
examples/tiny/s1/local/train.sh
+3
-3
examples/tiny/s1/run.sh
examples/tiny/s1/run.sh
+1
-1
未找到文件。
examples/aishell/s0/local/client.sh
已删除
100755 → 0
浏览文件 @
b105c63e
#!/bin/bash
source
path.sh
# run on MacOS
# brew install portaudio
# pip install pyaudio
# pip install keyboard
# start demo client
python3
-u
${
BIN_DIR
}
/deploy/client.py
\
--host_ip
=
"localhost"
\
--host_port
=
8086
\
if
[
$?
-ne
0
]
;
then
echo
"Failed in starting demo client!"
exit
1
fi
exit
0
examples/aishell/s0/local/server.sh
已删除
100755 → 0
浏览文件 @
b105c63e
#!/bin/bash
# TODO: replace the model with a mandarin model
if
[[
$#
!=
1
]]
;
then
echo
"usage:
$1
checkpoint_path"
exit
-1
fi
source
path.sh
# download language model
bash
local
/download_lm_ch.sh
if
[
$?
-ne
0
]
;
then
exit
1
fi
# download well-trained model
#bash local/download_model.sh
#if [ $? -ne 0 ]; then
# exit 1
#fi
# start demo server
CUDA_VISIBLE_DEVICES
=
0
\
python3
-u
${
BIN_DIR
}
/deploy/server.py
\
--device
'gpu'
\
--nproc
1
\
--config
conf/deepspeech2.yaml
\
--host_ip
=
"localhost"
\
--host_port
=
8086
\
--speech_save_dir
=
"demo_cache"
\
--checkpoint_path
${
1
}
if
[
$?
-ne
0
]
;
then
echo
"Failed in starting demo server!"
exit
1
fi
exit
0
examples/aishell/s0/local/train.sh
浏览文件 @
d028c841
...
...
@@ -20,7 +20,7 @@ fi
mkdir
-p
exp
seed
=
10086
if
[
${
seed
}
]
;
then
if
[
${
seed
}
!=
0
]
;
then
export
FLAGS_cudnn_deterministic
=
True
fi
...
...
@@ -32,7 +32,7 @@ python3 -u ${BIN_DIR}/train.py \
--model_type
${
model_type
}
\
--seed
${
seed
}
if
[
${
seed
}
]
;
then
if
[
${
seed
}
!=
0
]
;
then
unset
FLAGS_cudnn_deterministic
fi
...
...
examples/aishell/s0/local/tune.sh
已删除
100755 → 0
浏览文件 @
b105c63e
#!/bin/bash
# grid-search for hyper-parameters in language model
python3
-u
${
BIN_DIR
}
/tune.py
\
--device
'gpu'
\
--nproc
1
\
--config
conf/deepspeech2.yaml
\
--num_batches
=
10
\
--batch_size
=
128
\
--beam_size
=
300
\
--num_proc_bsearch
=
8
\
--num_alphas
=
10
\
--num_betas
=
10
\
--alpha_from
=
0.0
\
--alpha_to
=
5.0
\
--beta_from
=
-6
\
--beta_to
=
6
\
--cutoff_prob
=
1.0
\
--cutoff_top_n
=
40
\
--checkpoint_path
${
1
}
if
[
$?
-ne
0
]
;
then
echo
"Failed in tuning!"
exit
1
fi
exit
0
examples/aishell/s0/run.sh
浏览文件 @
d028c841
...
...
@@ -27,7 +27,7 @@ fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
# avg n best model
avg.sh exp/
${
ckpt
}
/checkpoints
${
avg_num
}
avg.sh
best
exp/
${
ckpt
}
/checkpoints
${
avg_num
}
fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
...
...
examples/aishell/s1/local/train.sh
浏览文件 @
d028c841
...
...
@@ -19,8 +19,8 @@ echo "using ${device}..."
mkdir
-p
exp
seed
=
10
24
if
[
${
seed
}
]
;
then
seed
=
10
086
if
[
${
seed
}
!=
0
]
;
then
export
FLAGS_cudnn_deterministic
=
True
fi
...
...
@@ -31,7 +31,7 @@ python3 -u ${BIN_DIR}/train.py \
--output
exp/
${
ckpt_name
}
\
--seed
${
seed
}
if
[
${
seed
}
]
;
then
if
[
${
seed
}
!=
0
]
;
then
unset
FLAGS_cudnn_deterministic
fi
...
...
examples/aishell/s1/run.sh
浏览文件 @
d028c841
...
...
@@ -25,7 +25,7 @@ fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
# avg n best model
avg.sh exp/
${
ckpt
}
/checkpoints
${
avg_num
}
avg.sh
best
exp/
${
ckpt
}
/checkpoints
${
avg_num
}
fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
...
...
examples/callcenter/s1/local/train.sh
浏览文件 @
d028c841
...
...
@@ -19,8 +19,8 @@ echo "using ${device}..."
mkdir
-p
exp
seed
=
10
24
if
[
${
seed
}
]
;
then
seed
=
10
086
if
[
${
seed
}
!=
0
]
;
then
export
FLAGS_cudnn_deterministic
=
True
fi
...
...
@@ -31,7 +31,7 @@ python3 -u ${BIN_DIR}/train.py \
--output
exp/
${
ckpt_name
}
\
--seed
${
seed
}
if
[
${
seed
}
]
;
then
if
[
${
seed
}
!=
0
]
;
then
unset
FLAGS_cudnn_deterministic
fi
...
...
examples/callcenter/s1/run.sh
浏览文件 @
d028c841
...
...
@@ -25,7 +25,7 @@ fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
# avg n best model
avg.sh exp/
${
ckpt
}
/checkpoints
${
avg_num
}
avg.sh
best
exp/
${
ckpt
}
/checkpoints
${
avg_num
}
fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
...
...
examples/librispeech/s0/README.md
浏览文件 @
d028c841
# LibriSpeech
## Data
| Data Subset | Duration in Seconds |
| --- | --- |
| data/manifest.train | 0.83s ~ 29.735s |
| data/manifest.dev | 1.065 ~ 35.155s |
| data/manifest.test-clean | 1.285s ~ 34.955s |
## Deepspeech2
| Model | Params | release | Config | Test set | Loss | WER |
| --- | --- | --- | --- | --- | --- | --- |
| DeepSpeech2 | 42.96M | 2.2.0 | conf/deepspeech2.yaml + spec_aug |
14.49190807 | test-clean
| 0.067283 |
| DeepSpeech2 | 42.96M | 2.1.0 | conf/deepspeech2.yaml |
15.184467315673828 | test-clean
| 0.072154 |
| DeepSpeech2 | 42.96M | 2.0.0 | conf/deepspeech2.yaml |
- | test-clean
| 0.073973 |
| DeepSpeech2 | 42.96M | 2.2.0 | conf/deepspeech2.yaml + spec_aug |
test-clean | 14.49190807
| 0.067283 |
| DeepSpeech2 | 42.96M | 2.1.0 | conf/deepspeech2.yaml |
test-clean | 15.184467315673828
| 0.072154 |
| DeepSpeech2 | 42.96M | 2.0.0 | conf/deepspeech2.yaml |
test-clean | -
| 0.073973 |
| DeepSpeech2 | 42.96M | 1.8.5 | - | test-clean | - | 0.074939 |
examples/librispeech/s0/local/train.sh
浏览文件 @
d028c841
...
...
@@ -20,8 +20,8 @@ echo "using ${device}..."
mkdir
-p
exp
seed
=
10
24
if
[
${
seed
}
]
;
then
seed
=
10
086
if
[
${
seed
}
!=
0
]
;
then
export
FLAGS_cudnn_deterministic
=
True
fi
...
...
@@ -33,7 +33,7 @@ python3 -u ${BIN_DIR}/train.py \
--model_type
${
model_type
}
\
--seed
${
seed
}
if
[
${
seed
}
]
;
then
if
[
${
seed
}
!=
0
]
;
then
unset
FLAGS_cudnn_deterministic
fi
...
...
examples/librispeech/s0/local/tune.sh
已删除
100755 → 0
浏览文件 @
b105c63e
#!/bin/bash
if
[
$#
!=
1
]
;
then
echo
"usage: tune ckpt_path"
exit
1
fi
# grid-search for hyper-parameters in language model
python3
-u
${
BIN_DIR
}
/tune.py
\
--device
'gpu'
\
--nproc
1
\
--config
conf/deepspeech2.yaml
\
--num_batches
=
-1
\
--batch_size
=
128
\
--beam_size
=
500
\
--num_proc_bsearch
=
12
\
--num_alphas
=
45
\
--num_betas
=
8
\
--alpha_from
=
1.0
\
--alpha_to
=
3.2
\
--beta_from
=
0.1
\
--beta_to
=
0.45
\
--cutoff_prob
=
1.0
\
--cutoff_top_n
=
40
\
--checkpoint_path
${
1
}
if
[
$?
-ne
0
]
;
then
echo
"Failed in tuning!"
exit
1
fi
exit
0
examples/librispeech/s0/run.sh
浏览文件 @
d028c841
...
...
@@ -25,7 +25,7 @@ fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
# avg n best model
avg.sh exp/
${
ckpt
}
/checkpoints
${
avg_num
}
avg.sh
best
exp/
${
ckpt
}
/checkpoints
${
avg_num
}
fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
...
...
examples/librispeech/s1/local/train.sh
浏览文件 @
d028c841
...
...
@@ -19,8 +19,8 @@ echo "using ${device}..."
mkdir
-p
exp
seed
=
10
24
if
[
${
seed
}
]
;
then
seed
=
10
086
if
[
${
seed
}
!=
0
]
;
then
export
FLAGS_cudnn_deterministic
=
True
fi
...
...
@@ -31,7 +31,7 @@ python3 -u ${BIN_DIR}/train.py \
--output
exp/
${
ckpt_name
}
\
--seed
${
seed
}
if
[
${
seed
}
]
;
then
if
[
${
seed
}
!=
0
]
;
then
unset
FLAGS_cudnn_deterministic
fi
...
...
examples/librispeech/s1/run.sh
浏览文件 @
d028c841
...
...
@@ -24,7 +24,7 @@ fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
# avg n best model
avg.sh exp/
${
ckpt
}
/checkpoints
${
avg_num
}
avg.sh
best
exp/
${
ckpt
}
/checkpoints
${
avg_num
}
fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
...
...
examples/librispeech/s2/local/train.sh
浏览文件 @
d028c841
...
...
@@ -19,8 +19,8 @@ echo "using ${device}..."
mkdir
-p
exp
seed
=
10
24
if
[
${
seed
}
]
;
then
seed
=
10
086
if
[
${
seed
}
!=
0
]
;
then
export
FLAGS_cudnn_deterministic
=
True
fi
...
...
@@ -32,7 +32,7 @@ python3 -u ${BIN_DIR}/train.py \
--output
exp/
${
ckpt_name
}
\
--seed
${
seed
}
if
[
${
seed
}
]
;
then
if
[
${
seed
}
!=
0
]
;
then
unset
FLAGS_cudnn_deterministic
fi
...
...
examples/librispeech/s2/run.sh
浏览文件 @
d028c841
...
...
@@ -25,7 +25,7 @@ fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
# avg n best model
avg.sh exp/
${
ckpt
}
/checkpoints
${
avg_num
}
avg.sh
best
exp/
${
ckpt
}
/checkpoints
${
avg_num
}
fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
...
...
examples/punctuation_restoration/README.md
浏览文件 @
d028c841
# Punctation Restoration
Please using
`https://github.com/745165806/PaddleSpeechTask`
to do this task.
Please using
[
PaddleSpeechTask
](
https://github.com/745165806/PaddleSpeechTask]
to do this task.
examples/ted_en_zh/t0/local/train.sh
浏览文件 @
d028c841
...
...
@@ -19,8 +19,8 @@ echo "using ${device}..."
mkdir
-p
exp
seed
=
10
24
if
[
${
seed
}
]
;
then
seed
=
10
086
if
[
${
seed
}
!=
0
]
;
then
export
FLAGS_cudnn_deterministic
=
True
fi
...
...
@@ -31,7 +31,7 @@ python3 -u ${BIN_DIR}/train.py \
--output
exp/
${
ckpt_name
}
\
--seed
${
seed
}
if
[
${
seed
}
]
;
then
if
[
${
seed
}
!=
0
]
;
then
unset
FLAGS_cudnn_deterministic
fi
...
...
examples/ted_en_zh/t0/run.sh
浏览文件 @
d028c841
...
...
@@ -26,7 +26,7 @@ fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
# avg n best model
../../utils/avg.sh
exp/
${
ckpt
}
/checkpoints
${
avg_num
}
avg.sh best
exp/
${
ckpt
}
/checkpoints
${
avg_num
}
fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
...
...
examples/timit/s1/local/train.sh
浏览文件 @
d028c841
...
...
@@ -19,8 +19,8 @@ echo "using ${device}..."
mkdir
-p
exp
seed
=
10
24
if
[
${
seed
}
]
;
then
seed
=
10
086
if
[
${
seed
}
!=
0
]
;
then
export
FLAGS_cudnn_deterministic
=
True
fi
...
...
@@ -31,7 +31,7 @@ python3 -u ${BIN_DIR}/train.py \
--output
exp/
${
ckpt_name
}
\
--seed
${
seed
}
if
[
${
seed
}
]
;
then
if
[
${
seed
}
!=
0
]
;
then
unset
FLAGS_cudnn_deterministic
fi
...
...
examples/timit/s1/run.sh
浏览文件 @
d028c841
...
...
@@ -26,7 +26,7 @@ fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
# avg n best model
avg.sh exp/
${
ckpt
}
/checkpoints
${
avg_num
}
avg.sh
best
exp/
${
ckpt
}
/checkpoints
${
avg_num
}
fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
...
...
examples/tiny/s0/local/train.sh
浏览文件 @
d028c841
...
...
@@ -19,8 +19,8 @@ fi
mkdir
-p
exp
seed
=
10
24
if
[
${
seed
}
]
;
then
seed
=
10
086
if
[
${
seed
}
!=
0
]
;
then
export
FLAGS_cudnn_deterministic
=
True
fi
...
...
@@ -32,7 +32,7 @@ python3 -u ${BIN_DIR}/train.py \
--model_type
${
model_type
}
\
--seed
${
seed
}
if
[
${
seed
}
]
;
then
if
[
${
seed
}
!=
0
]
;
then
unset
FLAGS_cudnn_deterministic
fi
...
...
examples/tiny/s0/run.sh
浏览文件 @
d028c841
...
...
@@ -27,7 +27,7 @@ fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
# avg n best model
avg.sh exp/
${
ckpt
}
/checkpoints
${
avg_num
}
avg.sh
best
exp/
${
ckpt
}
/checkpoints
${
avg_num
}
fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
...
...
examples/tiny/s1/local/train.sh
浏览文件 @
d028c841
...
...
@@ -18,8 +18,8 @@ fi
mkdir
-p
exp
seed
=
10
24
if
[
${
seed
}
]
;
then
seed
=
10
086
if
[
${
seed
}
!=
0
]
;
then
export
FLAGS_cudnn_deterministic
=
True
fi
...
...
@@ -30,7 +30,7 @@ python3 -u ${BIN_DIR}/train.py \
--output
exp/
${
ckpt_name
}
\
--seed
${
seed
}
if
[
${
seed
}
]
;
then
if
[
${
seed
}
!=
0
]
;
then
unset
FLAGS_cudnn_deterministic
fi
...
...
examples/tiny/s1/run.sh
浏览文件 @
d028c841
...
...
@@ -25,7 +25,7 @@ fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
# avg n best model
avg.sh exp/
${
ckpt
}
/checkpoints
${
avg_num
}
avg.sh
best
exp/
${
ckpt
}
/checkpoints
${
avg_num
}
fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录