Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
7ceef6c3
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
大约 2 年 前同步成功
通知
210
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看板
提交
7ceef6c3
编写于
11月 05, 2021
作者:
H
Hui Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
format code
上级
f9221b4b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
21 addition
and
21 deletion
+21
-21
docs/source/dependencies.md
docs/source/dependencies.md
+2
-2
paddlespeech/s2t/exps/u2/model.py
paddlespeech/s2t/exps/u2/model.py
+5
-4
paddlespeech/s2t/exps/u2_kaldi/model.py
paddlespeech/s2t/exps/u2_kaldi/model.py
+5
-4
paddlespeech/s2t/exps/u2_st/model.py
paddlespeech/s2t/exps/u2_st/model.py
+4
-4
paddlespeech/s2t/utils/ctc_utils.py
paddlespeech/s2t/utils/ctc_utils.py
+2
-1
paddlespeech/t2s/exps/tacotron2/ljspeech.py
paddlespeech/t2s/exps/tacotron2/ljspeech.py
+3
-6
未找到文件。
docs/source/dependencies.md
浏览文件 @
7ceef6c3
...
@@ -13,7 +13,7 @@ bc flac jq vim tig tree pkg-config libsndfile1 libflac-dev libvorbis-dev libboos
...
@@ -13,7 +13,7 @@ bc flac jq vim tig tree pkg-config libsndfile1 libflac-dev libvorbis-dev libboos
```
```
build-essential cmake libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev libeigen3-dev zlib1g-dev libbz2-dev liblzma-dev gcc-5 g++-5
build-essential cmake libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev libeigen3-dev zlib1g-dev libbz2-dev liblzma-dev gcc-5 g++-5
```
```
### The dependencies of sox:
### The dependencies of sox:
```
```
...
@@ -25,7 +25,7 @@ libvorbis-dev libmp3lame-dev libmad-ocaml-dev
...
@@ -25,7 +25,7 @@ libvorbis-dev libmp3lame-dev libmad-ocaml-dev
```
```
kenlm
kenlm
sox
sox
mfa
mfa
openblas
openblas
kaldi
kaldi
...
...
paddlespeech/s2t/exps/u2/model.py
浏览文件 @
7ceef6c3
...
@@ -554,10 +554,11 @@ class U2Tester(U2Trainer):
...
@@ -554,10 +554,11 @@ class U2Tester(U2Trainer):
@
paddle
.
no_grad
()
@
paddle
.
no_grad
()
def
align
(
self
):
def
align
(
self
):
ctc_utils
.
ctc_align
(
self
.
config
,
ctc_utils
.
ctc_align
(
self
.
config
,
self
.
model
,
self
.
align_loader
,
self
.
model
,
self
.
align_loader
,
self
.
config
.
decoding
.
batch_size
,
self
.
config
.
decoding
.
batch_size
,
self
.
align_loader
.
collate_fn
.
stride_ms
,
self
.
align_loader
.
collate_fn
.
stride_ms
,
self
.
align_loader
.
collate_fn
.
vocab_list
,
self
.
args
.
result_file
)
self
.
align_loader
.
collate_fn
.
vocab_list
,
self
.
args
.
result_file
)
def
load_inferspec
(
self
):
def
load_inferspec
(
self
):
"""infer model and input spec.
"""infer model and input spec.
...
...
paddlespeech/s2t/exps/u2_kaldi/model.py
浏览文件 @
7ceef6c3
...
@@ -527,10 +527,11 @@ class U2Tester(U2Trainer):
...
@@ -527,10 +527,11 @@ class U2Tester(U2Trainer):
@
paddle
.
no_grad
()
@
paddle
.
no_grad
()
def
align
(
self
):
def
align
(
self
):
ctc_utils
.
ctc_align
(
self
.
config
,
ctc_utils
.
ctc_align
(
self
.
config
,
self
.
model
,
self
.
align_loader
,
self
.
model
,
self
.
align_loader
,
self
.
config
.
decoding
.
batch_size
,
self
.
config
.
decoding
.
batch_size
,
self
.
align_loader
.
collate_fn
.
stride_ms
,
self
.
align_loader
.
collate_fn
.
stride_ms
,
self
.
align_loader
.
collate_fn
.
vocab_list
,
self
.
args
.
result_file
)
self
.
align_loader
.
collate_fn
.
vocab_list
,
self
.
args
.
result_file
)
def
load_inferspec
(
self
):
def
load_inferspec
(
self
):
"""infer model and input spec.
"""infer model and input spec.
...
...
paddlespeech/s2t/exps/u2_st/model.py
浏览文件 @
7ceef6c3
...
@@ -543,10 +543,10 @@ class U2STTester(U2STTrainer):
...
@@ -543,10 +543,10 @@ class U2STTester(U2STTrainer):
@
paddle
.
no_grad
()
@
paddle
.
no_grad
()
def
align
(
self
):
def
align
(
self
):
ctc_utils
.
ctc_align
(
self
.
config
,
ctc_utils
.
ctc_align
(
self
.
config
,
self
.
model
,
self
.
align_loader
,
self
.
model
,
self
.
align_loader
,
self
.
config
.
decoding
.
batch_size
,
self
.
config
.
decoding
.
batch_size
,
self
.
config
.
collator
.
stride_ms
,
self
.
config
.
collator
.
stride_ms
,
self
.
vocab_list
,
self
.
vocab_list
,
self
.
args
.
result_file
)
self
.
args
.
result_file
)
def
load_inferspec
(
self
):
def
load_inferspec
(
self
):
"""infer model and input spec.
"""infer model and input spec.
...
...
paddlespeech/s2t/utils/ctc_utils.py
浏览文件 @
7ceef6c3
...
@@ -12,8 +12,9 @@
...
@@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
# Modified from wenet(https://github.com/wenet-e2e/wenet)
# Modified from wenet(https://github.com/wenet-e2e/wenet)
from
typing
import
List
from
pathlib
import
Path
from
pathlib
import
Path
from
typing
import
List
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
...
...
paddlespeech/t2s/exps/tacotron2/ljspeech.py
浏览文件 @
7ceef6c3
...
@@ -67,19 +67,16 @@ class LJSpeechCollector(object):
...
@@ -67,19 +67,16 @@ class LJSpeechCollector(object):
# Sort by text_len in descending order
# Sort by text_len in descending order
texts
=
[
texts
=
[
i
i
for
i
,
_
in
sorted
(
for
i
,
_
in
sorted
(
zip
(
texts
,
text_lens
),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
zip
(
texts
,
text_lens
),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
]
]
mels
=
[
mels
=
[
i
i
for
i
,
_
in
sorted
(
for
i
,
_
in
sorted
(
zip
(
mels
,
text_lens
),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
zip
(
mels
,
text_lens
),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
]
]
mel_lens
=
[
mel_lens
=
[
i
i
for
i
,
_
in
sorted
(
for
i
,
_
in
sorted
(
zip
(
mel_lens
,
text_lens
),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
zip
(
mel_lens
,
text_lens
),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
]
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录