Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
c4a5be30
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看板
提交
c4a5be30
编写于
3月 07, 2022
作者:
S
SmileGoat
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add comment
上级
77e60de7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
4 addition
and
2 deletion
+4
-2
speechx/speechx/codelab/feat_test/linear_spectrogram_main.cc
speechx/speechx/codelab/feat_test/linear_spectrogram_main.cc
+0
-1
speechx/speechx/frontend/normalizer.cc
speechx/speechx/frontend/normalizer.cc
+4
-1
未找到文件。
speechx/speechx/codelab/feat_test/linear_spectrogram_main.cc
浏览文件 @
c4a5be30
...
@@ -113,7 +113,6 @@ int main(int argc, char* argv[]) {
...
@@ -113,7 +113,6 @@ int main(int argc, char* argv[]) {
++
cur_idx
;
++
cur_idx
;
}
}
}
}
std
::
cout
<<
"xxx: "
<<
feats
[
0
].
Data
()[
0
];
feat_cmvn_check_writer
.
Write
(
utt
,
features_check
);
feat_cmvn_check_writer
.
Write
(
utt
,
features_check
);
if
(
num_done
%
50
==
0
&&
num_done
!=
0
)
if
(
num_done
%
50
==
0
&&
num_done
!=
0
)
...
...
speechx/speechx/frontend/normalizer.cc
浏览文件 @
c4a5be30
...
@@ -104,6 +104,7 @@ void CMVN::Read(kaldi::VectorBase<BaseFloat>* feat) {
...
@@ -104,6 +104,7 @@ void CMVN::Read(kaldi::VectorBase<BaseFloat>* feat) {
return
;
return
;
}
}
// feats contain num_frames feature.
void
CMVN
::
ApplyCMVN
(
bool
var_norm
,
VectorBase
<
BaseFloat
>*
feats
)
{
void
CMVN
::
ApplyCMVN
(
bool
var_norm
,
VectorBase
<
BaseFloat
>*
feats
)
{
KALDI_ASSERT
(
feats
!=
NULL
);
KALDI_ASSERT
(
feats
!=
NULL
);
int32
dim
=
stats_
.
NumCols
()
-
1
;
int32
dim
=
stats_
.
NumCols
()
-
1
;
...
@@ -128,6 +129,8 @@ void CMVN::ApplyCMVN(bool var_norm, VectorBase<BaseFloat>* feats) {
...
@@ -128,6 +129,8 @@ void CMVN::ApplyCMVN(bool var_norm, VectorBase<BaseFloat>* feats) {
Vector
<
BaseFloat
>
offset
(
feats
->
Dim
());
Vector
<
BaseFloat
>
offset
(
feats
->
Dim
());
SubVector
<
double
>
mean_stats
(
stats_
.
RowData
(
0
),
dim
);
SubVector
<
double
>
mean_stats
(
stats_
.
RowData
(
0
),
dim
);
Vector
<
double
>
mean_stats_apply
(
feats
->
Dim
());
Vector
<
double
>
mean_stats_apply
(
feats
->
Dim
());
//fill the datat of mean_stats in mean_stats_appy whose dim is equal with the dim of feature.
//the dim of feats = dim * num_frames;
for
(
int32
idx
=
0
;
idx
<
feats
->
Dim
()
/
dim
;
++
idx
)
{
for
(
int32
idx
=
0
;
idx
<
feats
->
Dim
()
/
dim
;
++
idx
)
{
SubVector
<
double
>
stats_tmp
(
mean_stats_apply
.
Data
()
+
dim
*
idx
,
dim
);
SubVector
<
double
>
stats_tmp
(
mean_stats_apply
.
Data
()
+
dim
*
idx
,
dim
);
stats_tmp
.
CopyFromVec
(
mean_stats
);
stats_tmp
.
CopyFromVec
(
mean_stats
);
...
@@ -174,4 +177,4 @@ bool CMVN::Compute(const VectorBase<BaseFloat>& input,
...
@@ -174,4 +177,4 @@ bool CMVN::Compute(const VectorBase<BaseFloat>& input,
}
}
}
// namespace ppspeech
}
// namespace ppspeech
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录