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
2023-09-12 16:44:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2023-09-12 16:44:33 +0800
Commit
d46b7ec178b88ecfe6ad51796ad5cf4448cca2e3
d46b7ec1
1 parent
debab7c0
Catch exception from non-streaming paraformer. (#307)
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
8 行增加
和
1 行删除
sherpa-onnx/csrc/offline-recognizer-paraformer-impl.h
sherpa-onnx/csrc/offline-recognizer-paraformer-impl.h
查看文件 @
d46b7ec
...
...
@@ -184,7 +184,14 @@ class OfflineRecognizerParaformerImpl : public OfflineRecognizerImpl {
// i.e., -23.025850929940457f
Ort
::
Value
x
=
PadSequence
(
model_
->
Allocator
(),
features_pointer
,
0
);
auto
t
=
model_
->
Forward
(
std
::
move
(
x
),
std
::
move
(
x_length
));
std
::
pair
<
Ort
::
Value
,
Ort
::
Value
>
t
{
nullptr
,
nullptr
};
try
{
t
=
model_
->
Forward
(
std
::
move
(
x
),
std
::
move
(
x_length
));
}
catch
(
const
Ort
::
Exception
&
ex
)
{
SHERPA_ONNX_LOGE
(
"
\n\n
Caught exception:
\n\n
%s
\n\n
Return an empty result"
,
ex
.
what
());
return
;
}
auto
results
=
decoder_
->
Decode
(
std
::
move
(
t
.
first
),
std
::
move
(
t
.
second
));
...
...
请
注册
或
登录
后发表评论