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-06-26 09:57:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-06-26 09:57:19 +0800
Commit
03ebdf3fc6bf30fa93d5b0248f5a13b826f9f015
03ebdf3f
1 parent
dfca4500
Fix possible segfault in C API. (#1059)
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
sherpa-onnx/c-api/c-api.cc
sherpa-onnx/c-api/c-api.cc
查看文件 @
03ebdf3
...
...
@@ -222,7 +222,7 @@ const SherpaOnnxOnlineRecognizerResult *GetOnlineStreamResult(
}
r
->
tokens_arr
=
tokens_temp
;
if
(
!
result
.
timestamps
.
empty
())
{
if
(
!
result
.
timestamps
.
empty
()
&&
result
.
timestamps
.
size
()
==
r
->
count
)
{
r
->
timestamps
=
new
float
[
r
->
count
];
std
::
copy
(
result
.
timestamps
.
begin
(),
result
.
timestamps
.
end
(),
r
->
timestamps
);
...
...
@@ -490,7 +490,7 @@ const SherpaOnnxOfflineRecognizerResult *GetOfflineStreamResult(
}
r
->
tokens_arr
=
tokens_temp
;
if
(
!
result
.
timestamps
.
empty
())
{
if
(
!
result
.
timestamps
.
empty
()
&&
result
.
timestamps
.
size
()
==
r
->
count
)
{
r
->
timestamps
=
new
float
[
r
->
count
];
std
::
copy
(
result
.
timestamps
.
begin
(),
result
.
timestamps
.
end
(),
r
->
timestamps
);
...
...
请
注册
或
登录
后发表评论