Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
xuning
/
sherpaonnx
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Fangjun Kuang
2024-04-26 16:40:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-04-26 16:40:42 +0800
Commit
f2d074aea9a86e2ae97535eeb5d1d851a9d792c4
f2d074ae
1 parent
612002da
Fix a bug for offline paraformer (#816)
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
10 行增加
和
2 行删除
.gitignore
sherpa-onnx/csrc/offline-paraformer-greedy-search-decoder.cc
.gitignore
查看文件 @
f2d074a
...
...
@@ -96,3 +96,8 @@ spoken-language-identification-test-wavs
my-release-key*
vits-zh-hf-fanchen-C
sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01
*.dll
*.lib
*.tar.gz
*.tar.bz2
*.zip
...
...
sherpa-onnx/csrc/offline-paraformer-greedy-search-decoder.cc
查看文件 @
f2d074a
...
...
@@ -40,7 +40,7 @@ OfflineParaformerGreedySearchDecoder::Decode(
}
if
(
us_cif_peak
)
{
int32_t
dim
=
us_cif_peak
.
GetTensorTypeAndShapeInfo
().
GetShape
()
[
1
]
;
int32_t
dim
=
us_cif_peak
.
GetTensorTypeAndShapeInfo
().
GetShape
()
.
back
()
;
const
auto
*
peak
=
us_cif_peak
.
GetTensorData
<
float
>
()
+
i
*
dim
;
std
::
vector
<
float
>
timestamps
;
...
...
@@ -57,7 +57,10 @@ OfflineParaformerGreedySearchDecoder::Decode(
timestamps
.
push_back
(
k
*
scale
);
}
}
timestamps
.
pop_back
();
if
(
!
timestamps
.
empty
())
{
timestamps
.
pop_back
();
}
if
(
timestamps
.
size
()
==
results
[
i
].
tokens
.
size
())
{
results
[
i
].
timestamps
=
std
::
move
(
timestamps
);
...
...
请
注册
或
登录
后发表评论