Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
a0843941
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看板
提交
a0843941
编写于
11月 03, 2017
作者:
Y
yangyaming
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add doc and adjust some codes.
上级
39dbcb4d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
11 deletion
+5
-11
data_utils/data.py
data_utils/data.py
+2
-2
infer.py
infer.py
+1
-3
test.py
test.py
+1
-3
tools/tune.py
tools/tune.py
+1
-3
未找到文件。
data_utils/data.py
浏览文件 @
a0843941
...
@@ -103,8 +103,8 @@ class DataGenerator(object):
...
@@ -103,8 +103,8 @@ class DataGenerator(object):
:type filename: basestring | file
:type filename: basestring | file
:param transcript: Transcription text.
:param transcript: Transcription text.
:type transcript: basestring
:type transcript: basestring
:return: Tuple of audio feature tensor and
list of token ids for
:return: Tuple of audio feature tensor and
data of transcription part,
transcription
.
where transcription part could be token ids or text
.
:rtype: tuple of (2darray, list)
:rtype: tuple of (2darray, list)
"""
"""
if
filename
.
startswith
(
'tar:'
):
if
filename
.
startswith
(
'tar:'
):
...
...
infer.py
浏览文件 @
a0843941
...
@@ -103,9 +103,7 @@ def infer():
...
@@ -103,9 +103,7 @@ def infer():
num_processes
=
args
.
num_proc_bsearch
)
num_processes
=
args
.
num_proc_bsearch
)
error_rate_func
=
cer
if
args
.
error_rate_type
==
'cer'
else
wer
error_rate_func
=
cer
if
args
.
error_rate_type
==
'cer'
else
wer
target_transcripts
=
[
target_transcripts
=
[
transcript
for
_
,
transcript
in
infer_data
]
transcript
for
_
,
transcript
in
infer_data
]
for
target
,
result
in
zip
(
target_transcripts
,
result_transcripts
):
for
target
,
result
in
zip
(
target_transcripts
,
result_transcripts
):
print
(
"
\n
Target Transcription: %s
\n
Output Transcription: %s"
%
print
(
"
\n
Target Transcription: %s
\n
Output Transcription: %s"
%
(
target
,
result
))
(
target
,
result
))
...
...
test.py
浏览文件 @
a0843941
...
@@ -104,9 +104,7 @@ def evaluate():
...
@@ -104,9 +104,7 @@ def evaluate():
vocab_list
=
vocab_list
,
vocab_list
=
vocab_list
,
language_model_path
=
args
.
lang_model_path
,
language_model_path
=
args
.
lang_model_path
,
num_processes
=
args
.
num_proc_bsearch
)
num_processes
=
args
.
num_proc_bsearch
)
target_transcripts
=
[
target_transcripts
=
[
transcript
for
_
,
transcript
in
infer_data
]
transcript
for
_
,
transcript
in
infer_data
]
for
target
,
result
in
zip
(
target_transcripts
,
result_transcripts
):
for
target
,
result
in
zip
(
target_transcripts
,
result_transcripts
):
error_sum
+=
error_rate_func
(
target
,
result
)
error_sum
+=
error_rate_func
(
target
,
result
)
num_ins
+=
1
num_ins
+=
1
...
...
tools/tune.py
浏览文件 @
a0843941
...
@@ -164,9 +164,7 @@ def tune():
...
@@ -164,9 +164,7 @@ def tune():
for
i
in
xrange
(
len
(
infer_data
))
for
i
in
xrange
(
len
(
infer_data
))
]
]
target_transcripts
=
[
target_transcripts
=
[
transcript
for
_
,
transcript
in
infer_data
]
transcript
for
_
,
transcript
in
infer_data
]
num_ins
+=
len
(
target_transcripts
)
num_ins
+=
len
(
target_transcripts
)
# grid search
# grid search
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录