Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
f7b4a49d
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,发现更多精彩内容 >>
未验证
提交
f7b4a49d
编写于
11月 10, 2021
作者:
小湉湉
提交者:
GitHub
11月 10, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #984 from PaddlePaddle/egs
[examples] default script run on gpu 0
上级
3e1f4779
080b0431
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
37 addition
and
29 deletion
+37
-29
README.md
README.md
+3
-4
examples/aishell/s1/run.sh
examples/aishell/s1/run.sh
+10
-8
examples/callcenter/s1/run.sh
examples/callcenter/s1/run.sh
+3
-2
examples/librispeech/s0/run.sh
examples/librispeech/s0/run.sh
+4
-3
examples/librispeech/s1/run.sh
examples/librispeech/s1/run.sh
+3
-2
examples/librispeech/s2/run.sh
examples/librispeech/s2/run.sh
+4
-3
examples/ted_en_zh/t0/run.sh
examples/ted_en_zh/t0/run.sh
+2
-1
examples/timit/s1/run.sh
examples/timit/s1/run.sh
+3
-2
examples/tiny/s1/run.sh
examples/tiny/s1/run.sh
+4
-3
paddlespeech/s2t/exps/u2_st/model.py
paddlespeech/s2t/exps/u2_st/model.py
+1
-1
未找到文件。
README.md
浏览文件 @
f7b4a49d
...
...
@@ -187,7 +187,7 @@ The current hyperlinks redirect to [Previous Parakeet](https://github.com/Paddle
<td
rowspan=
"2"
>
Aishell
</td>
<td
>
DeepSpeech2 RNN + Conv based Models
</td>
<td>
<a
href =
"./examples/aishell/s0"
>
deepspeech2-aishell
</a>
<a
href =
"./examples/aishell/s0"
>
deepspeech2-aishell
</a>
</td>
</tr>
<tr>
...
...
@@ -200,7 +200,7 @@ The current hyperlinks redirect to [Previous Parakeet](https://github.com/Paddle
<td>
Librispeech
</td>
<td>
Transformer based Attention Models
</td>
<td>
<a
href =
"./examples/librispeech/s0"
>
deepspeech2-librispeech
</a>
/
<a
href =
"./examples/librispeech/s1"
>
transformer.conformer.u2-librispeech
</a>
/
<a
href =
"./examples/librispeech/s2"
>
transformer.conformer.u2-kaldi-librispeech
</a>
<a
href =
"./examples/librispeech/s0"
>
deepspeech2-librispeech
</a>
/
<a
href =
"./examples/librispeech/s1"
>
transformer.conformer.u2-librispeech
</a>
/
<a
href =
"./examples/librispeech/s2"
>
transformer.conformer.u2-kaldi-librispeech
</a>
</td>
</td>
</tr>
...
...
@@ -223,7 +223,7 @@ The current hyperlinks redirect to [Previous Parakeet](https://github.com/Paddle
<td>
TIMIT
</td>
<td>
Unified Streaming & Non-streaming Two-pass
</td>
<td>
<a
href =
"./examples/timit/s1"
>
u2-timit
</a>
<a
href =
"./examples/timit/s1"
>
u2-timit
</a>
</td>
</tr>
</tbody>
...
...
@@ -351,4 +351,3 @@ howpublished = {\url{https://github.com/PaddlePaddle/PaddleSpeech}},
year=
{
2021
}
}
```
examples/aishell/s1/run.sh
浏览文件 @
f7b4a49d
...
...
@@ -2,6 +2,7 @@
source
path.sh
set
-e
gpus
=
0,1,2,3
stage
=
0
stop_stage
=
100
conf_path
=
conf/conformer.yaml
...
...
@@ -22,7 +23,7 @@ fi
if
[
${
stage
}
-le
1
]
&&
[
${
stop_stage
}
-ge
1
]
;
then
# train model, all `ckpt` under `exp` dir
CUDA_VISIBLE_DEVICES
=
0,1,2,3
./local/train.sh
${
conf_path
}
${
ckpt
}
CUDA_VISIBLE_DEVICES
=
${
gpus
}
./local/train.sh
${
conf_path
}
${
ckpt
}
fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
...
...
@@ -45,13 +46,14 @@ if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then
CUDA_VISIBLE_DEVICES
=
0 ./local/export.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
.jit
fi
# Optionally, you can add LM and test it with runtime.
if
[
${
stage
}
-le
6
]
&&
[
${
stop_stage
}
-ge
6
]
;
then
# t
rain lm and build TLG
./local/tlg.sh
--corpus
aishell
--lmtype
srilm
fi
# Optionally, you can add LM and test it with runtime.
if
[
${
stage
}
-le
6
]
&&
[
${
stop_stage
}
-ge
6
]
;
then
# t
est a single .wav file
CUDA_VISIBLE_DEVICES
=
0 ./local/test_hub.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
${
audio_file
}
||
exit
-1
fi
if
[
${
stage
}
-le
7
]
&&
[
${
stop_stage
}
-ge
7
]
;
then
# test a single .wav file
CUDA_VISIBLE_DEVICES
=
3 ./local/test_hub.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
${
audio_file
}
||
exit
-1
echo
"warning: deps on kaldi and srilm, please make sure installed."
# train lm and build TLG
./local/tlg.sh
--corpus
aishell
--lmtype
srilm
fi
examples/callcenter/s1/run.sh
浏览文件 @
f7b4a49d
...
...
@@ -2,6 +2,7 @@
set
-e
source
path.sh
gpus
=
0,1,2,3
stage
=
0
stop_stage
=
100
conf_path
=
conf/conformer.yaml
...
...
@@ -20,7 +21,7 @@ fi
if
[
${
stage
}
-le
1
]
&&
[
${
stop_stage
}
-ge
1
]
;
then
# train model, all `ckpt` under `exp` dir
CUDA_VISIBLE_DEVICES
=
0,1,2,3
./local/train.sh
${
conf_path
}
${
ckpt
}
CUDA_VISIBLE_DEVICES
=
${
gpus
}
./local/train.sh
${
conf_path
}
${
ckpt
}
fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
...
...
@@ -30,7 +31,7 @@ fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
# test ckpt avg_n
CUDA_VISIBLE_DEVICES
=
4
./local/test.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
||
exit
-1
CUDA_VISIBLE_DEVICES
=
0
./local/test.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
||
exit
-1
fi
if
[
${
stage
}
-le
4
]
&&
[
${
stop_stage
}
-ge
4
]
;
then
...
...
examples/librispeech/s0/run.sh
浏览文件 @
f7b4a49d
...
...
@@ -2,6 +2,7 @@
set
-e
source
path.sh
gpus
=
0,1,2,3,4,5,6,7
stage
=
0
stop_stage
=
100
conf_path
=
conf/deepspeech2.yaml
...
...
@@ -21,7 +22,7 @@ fi
if
[
${
stage
}
-le
1
]
&&
[
${
stop_stage
}
-ge
1
]
;
then
# train model, all `ckpt` under `exp` dir
CUDA_VISIBLE_DEVICES
=
0,1,2,3,4,5,6,7
./local/train.sh
${
conf_path
}
${
ckpt
}
${
model_type
}
CUDA_VISIBLE_DEVICES
=
${
gpus
}
./local/train.sh
${
conf_path
}
${
ckpt
}
${
model_type
}
fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
...
...
@@ -31,7 +32,7 @@ fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
# test ckpt avg_n
CUDA_VISIBLE_DEVICES
=
7
./local/test.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
${
model_type
}
||
exit
-1
CUDA_VISIBLE_DEVICES
=
0
./local/test.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
${
model_type
}
||
exit
-1
fi
if
[
${
stage
}
-le
4
]
&&
[
${
stop_stage
}
-ge
4
]
;
then
...
...
@@ -41,5 +42,5 @@ fi
if
[
${
stage
}
-le
5
]
&&
[
${
stop_stage
}
-ge
5
]
;
then
# test a single .wav file
CUDA_VISIBLE_DEVICES
=
3
./local/test_hub.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
${
model_type
}
${
audio_file
}
||
exit
-1
CUDA_VISIBLE_DEVICES
=
0
./local/test_hub.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
${
model_type
}
${
audio_file
}
||
exit
-1
fi
examples/librispeech/s1/run.sh
浏览文件 @
f7b4a49d
...
...
@@ -4,6 +4,7 @@ set -e
.
./path.sh
||
exit
1
;
.
./cmd.sh
||
exit
1
;
gpus
=
0,1,2,3
stage
=
0
stop_stage
=
100
conf_path
=
conf/transformer.yaml
...
...
@@ -24,7 +25,7 @@ fi
if
[
${
stage
}
-le
1
]
&&
[
${
stop_stage
}
-ge
1
]
;
then
# train model, all `ckpt` under `exp` dir
CUDA_VISIBLE_DEVICES
=
0,1,2,3
./local/train.sh
${
conf_path
}
${
ckpt
}
CUDA_VISIBLE_DEVICES
=
${
gpus
}
./local/train.sh
${
conf_path
}
${
ckpt
}
fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
...
...
@@ -49,5 +50,5 @@ fi
if
[
${
stage
}
-le
6
]
&&
[
${
stop_stage
}
-ge
6
]
;
then
# test a single .wav file
CUDA_VISIBLE_DEVICES
=
3
./local/test_hub.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
${
audio_file
}
||
exit
-1
CUDA_VISIBLE_DEVICES
=
0
./local/test_hub.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
${
audio_file
}
||
exit
-1
fi
examples/librispeech/s2/run.sh
浏览文件 @
f7b4a49d
...
...
@@ -5,6 +5,7 @@ set -e
.
./path.sh
||
exit
1
;
.
./cmd.sh
||
exit
1
;
gpus
=
0,1,2,3,4,5,6,7
stage
=
0
stop_stage
=
100
conf_path
=
conf/transformer.yaml
...
...
@@ -24,7 +25,7 @@ fi
if
[
${
stage
}
-le
1
]
&&
[
${
stop_stage
}
-ge
1
]
;
then
# train model, all `ckpt` under `exp` dir
CUDA_VISIBLE_DEVICES
=
0,1,2,3,4,5,6,7
./local/train.sh
${
conf_path
}
${
ckpt
}
CUDA_VISIBLE_DEVICES
=
${
gpus
}
./local/train.sh
${
conf_path
}
${
ckpt
}
fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
...
...
@@ -49,9 +50,9 @@ fi
if
[
${
stage
}
-le
6
]
&&
[
${
stop_stage
}
-ge
6
]
;
then
# export ckpt avg_n
CUDA_VISIBLE_DEVICES
=
./local/export.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
.jit
./local/export.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
.jit
fi
if
[
${
stage
}
-le
7
]
&&
[
${
stop_stage
}
-ge
7
]
;
then
CUDA_VISIBLE_DEVICES
=
./local/cacu_perplexity.sh
||
exit
-1
./local/cacu_perplexity.sh
||
exit
-1
fi
examples/ted_en_zh/t0/run.sh
浏览文件 @
f7b4a49d
...
...
@@ -2,6 +2,7 @@
set
-e
source
path.sh
gpus
=
0,1,2,3
stage
=
0
stop_stage
=
100
conf_path
=
conf/transformer_joint_noam.yaml
...
...
@@ -21,7 +22,7 @@ fi
if
[
${
stage
}
-le
1
]
&&
[
${
stop_stage
}
-ge
1
]
;
then
# train model, all `ckpt` under `exp` dir
CUDA_VISIBLE_DEVICES
=
0,1,2,3,4,5,6,7
./local/train.sh
${
conf_path
}
${
ckpt
}
CUDA_VISIBLE_DEVICES
=
${
gpus
}
./local/train.sh
${
conf_path
}
${
ckpt
}
fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
...
...
examples/timit/s1/run.sh
浏览文件 @
f7b4a49d
...
...
@@ -3,6 +3,7 @@ set -e
.
path.sh
||
exit
1
;
gpus
=
0,1,2,3
stage
=
0
stop_stage
=
50
conf_path
=
conf/transformer.yaml
...
...
@@ -23,7 +24,7 @@ fi
if
[
${
stage
}
-le
1
]
&&
[
${
stop_stage
}
-ge
1
]
;
then
# train model, all `ckpt` under `exp` dir
CUDA_VISIBLE_DEVICES
=
0,1,2,3
./local/train.sh
${
conf_path
}
${
ckpt
}
CUDA_VISIBLE_DEVICES
=
${
gpus
}
./local/train.sh
${
conf_path
}
${
ckpt
}
fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
...
...
@@ -33,7 +34,7 @@ fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
# test ckpt avg_n
CUDA_VISIBLE_DEVICES
=
7
./local/test.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
||
exit
-1
CUDA_VISIBLE_DEVICES
=
0
./local/test.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
||
exit
-1
fi
if
[
${
stage
}
-le
4
]
&&
[
${
stop_stage
}
-ge
4
]
;
then
...
...
examples/tiny/s1/run.sh
浏览文件 @
f7b4a49d
...
...
@@ -2,6 +2,7 @@
set
-e
source
path.sh
gpus
=
0
stage
=
0
stop_stage
=
100
conf_path
=
conf/transformer.yaml
...
...
@@ -20,7 +21,7 @@ fi
if
[
${
stage
}
-le
1
]
&&
[
${
stop_stage
}
-ge
1
]
;
then
# train model, all `ckpt` under `exp` dir
./local/train.sh
${
conf_path
}
${
ckpt
}
CUDA_VISIBLE_DEVICES
=
${
gpus
}
./local/train.sh
${
conf_path
}
${
ckpt
}
fi
if
[
${
stage
}
-le
2
]
&&
[
${
stop_stage
}
-ge
2
]
;
then
...
...
@@ -30,12 +31,12 @@ fi
if
[
${
stage
}
-le
3
]
&&
[
${
stop_stage
}
-ge
3
]
;
then
# test ckpt avg_n
CUDA_VISIBLE_DEVICES
=
./local/test.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
||
exit
-1
CUDA_VISIBLE_DEVICES
=
${
gpus
}
./local/test.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
||
exit
-1
fi
if
[
${
stage
}
-le
4
]
&&
[
${
stop_stage
}
-ge
4
]
;
then
# ctc alignment of test data
CUDA_VISIBLE_DEVICES
=
./local/align.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
||
exit
-1
CUDA_VISIBLE_DEVICES
=
${
gpus
}
./local/align.sh
${
conf_path
}
exp/
${
ckpt
}
/checkpoints/
${
avg_ckpt
}
||
exit
-1
fi
if
[
${
stage
}
-le
5
]
&&
[
${
stop_stage
}
-ge
5
]
;
then
...
...
paddlespeech/s2t/exps/u2_st/model.py
浏览文件 @
f7b4a49d
...
...
@@ -441,7 +441,7 @@ class U2STTester(U2STTrainer):
""
.
join
(
chr
(
t
)
for
t
in
text
[:
text_len
])
for
text
,
text_len
in
zip
(
texts
,
texts_len
)
]
hyps
=
self
.
model
.
decode
(
audio
,
audio_len
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录