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
2025-09-12 09:37:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2025-09-12 09:37:06 +0800
Commit
926b288525adb4234e4d6717001a92e4c843e5d5
926b2885
1 parent
04a98ca8
Fix initializing symbol table for OnlineRecognizer. (#2590)
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
2 行增加
和
3 行删除
sherpa-onnx/csrc/online-recognizer-ctc-impl.h
sherpa-onnx/csrc/online-recognizer-ctc-impl.h
查看文件 @
926b288
...
...
@@ -79,6 +79,7 @@ class OnlineRecognizerCtcImpl : public OnlineRecognizerImpl {
:
OnlineRecognizerImpl
(
config
),
config_
(
config
),
model_
(
OnlineCtcModel
::
Create
(
config
.
model_config
)),
sym_
(
config
.
model_config
.
tokens
),
endpoint_
(
config_
.
endpoint_config
)
{
PostInit
();
}
...
...
@@ -242,10 +243,8 @@ class OnlineRecognizerCtcImpl : public OnlineRecognizerImpl {
private
:
void
PostInit
()
{
if
(
!
config_
.
model_config
.
tokens_buf
.
empty
())
{
sym_
=
SymbolTable
(
config_
.
model_config
.
tokens_buf
,
false
);
}
else
{
/// assuming tokens_buf and tokens are guaranteed not being both empty
sym_
=
SymbolTable
(
config_
.
model_config
.
tokens
,
tru
e
);
sym_
=
SymbolTable
(
config_
.
model_config
.
tokens
_buf
,
fals
e
);
}
if
(
!
config_
.
model_config
.
wenet_ctc
.
model
.
empty
())
{
...
...
请
注册
或
登录
后发表评论