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
9728Lin
2024-06-03 16:26:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-06-03 16:26:12 +0800
Commit
9edb78e21b80c76160d27eb0d421be16b289a5ae
9edb78e2
1 parent
a02e43d8
Update c-api.h to hotwords (#962)
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
20 行增加
和
0 行删除
sherpa-onnx/c-api/c-api.cc
sherpa-onnx/c-api/c-api.h
sherpa-onnx/c-api/c-api.cc
查看文件 @
9edb78e
...
...
@@ -79,6 +79,10 @@ SherpaOnnxOnlineRecognizer *CreateOnlineRecognizer(
SHERPA_ONNX_OR
(
config
->
model_config
.
model_type
,
""
);
recognizer_config
.
model_config
.
debug
=
SHERPA_ONNX_OR
(
config
->
model_config
.
debug
,
0
);
recognizer_config
.
model_config
.
modeling_unit
=
SHERPA_ONNX_OR
(
config
->
model_config
.
modeling_unit
,
"cjkchar"
);
recognizer_config
.
model_config
.
bpe_vocab
=
SHERPA_ONNX_OR
(
config
->
model_config
.
bpe_vocab
,
""
);
recognizer_config
.
decoding_method
=
SHERPA_ONNX_OR
(
config
->
decoding_method
,
"greedy_search"
);
...
...
@@ -357,6 +361,10 @@ SherpaOnnxOfflineRecognizer *CreateOfflineRecognizer(
SHERPA_ONNX_OR
(
config
->
model_config
.
provider
,
"cpu"
);
recognizer_config
.
model_config
.
model_type
=
SHERPA_ONNX_OR
(
config
->
model_config
.
model_type
,
""
);
recognizer_config
.
model_config
.
modeling_unit
=
SHERPA_ONNX_OR
(
config
->
model_config
.
modeling_unit
,
"cjkchar"
);
recognizer_config
.
model_config
.
bpe_vocab
=
SHERPA_ONNX_OR
(
config
->
model_config
.
bpe_vocab
,
""
);
recognizer_config
.
lm_config
.
model
=
SHERPA_ONNX_OR
(
config
->
lm_config
.
model
,
""
);
...
...
sherpa-onnx/c-api/c-api.h
查看文件 @
9edb78e
...
...
@@ -82,6 +82,12 @@ SHERPA_ONNX_API typedef struct SherpaOnnxOnlineModelConfig {
const
char
*
provider
;
int32_t
debug
;
// true to print debug information of the model
const
char
*
model_type
;
// Valid values:
// - cjkchar
// - bpe
// - cjkchar+bpe
const
char
*
modeling_unit
;
const
char
*
bpe_vocab
;
}
SherpaOnnxOnlineModelConfig
;
/// It expects 16 kHz 16-bit single channel wave format.
...
...
@@ -383,6 +389,12 @@ SHERPA_ONNX_API typedef struct SherpaOnnxOfflineModelConfig {
int32_t
debug
;
const
char
*
provider
;
const
char
*
model_type
;
// Valid values:
// - cjkchar
// - bpe
// - cjkchar+bpe
const
char
*
modeling_unit
;
const
char
*
bpe_vocab
;
}
SherpaOnnxOfflineModelConfig
;
SHERPA_ONNX_API
typedef
struct
SherpaOnnxOfflineRecognizerConfig
{
...
...
请
注册
或
登录
后发表评论