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-03-26 13:35:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-03-26 13:35:33 +0800
Commit
d3646106052dfbf0084e000c1bfedaf696606913
d3646106
1 parent
305c3731
Use a single thread when loading models (#703)
显示空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
12 行增加
和
0 行删除
sherpa-onnx/csrc/offline-ctc-model.cc
sherpa-onnx/csrc/offline-recognizer-impl.cc
sherpa-onnx/csrc/online-transducer-model.cc
sherpa-onnx/csrc/speaker-embedding-extractor-impl.cc
sherpa-onnx/csrc/offline-ctc-model.cc
查看文件 @
d364610
...
...
@@ -34,6 +34,8 @@ static ModelType GetModelType(char *model_data, size_t model_data_length,
bool
debug
)
{
Ort
::
Env
env
(
ORT_LOGGING_LEVEL_WARNING
);
Ort
::
SessionOptions
sess_opts
;
sess_opts
.
SetIntraOpNumThreads
(
1
);
sess_opts
.
SetInterOpNumThreads
(
1
);
auto
sess
=
std
::
make_unique
<
Ort
::
Session
>
(
env
,
model_data
,
model_data_length
,
sess_opts
);
...
...
sherpa-onnx/csrc/offline-recognizer-impl.cc
查看文件 @
d364610
...
...
@@ -40,6 +40,9 @@ std::unique_ptr<OfflineRecognizerImpl> OfflineRecognizerImpl::Create(
Ort
::
Env
env
(
ORT_LOGGING_LEVEL_ERROR
);
Ort
::
SessionOptions
sess_opts
;
sess_opts
.
SetIntraOpNumThreads
(
1
);
sess_opts
.
SetInterOpNumThreads
(
1
);
std
::
string
model_filename
;
if
(
!
config
.
model_config
.
transducer
.
encoder_filename
.
empty
())
{
model_filename
=
config
.
model_config
.
transducer
.
encoder_filename
;
...
...
@@ -167,6 +170,9 @@ std::unique_ptr<OfflineRecognizerImpl> OfflineRecognizerImpl::Create(
Ort
::
Env
env
(
ORT_LOGGING_LEVEL_ERROR
);
Ort
::
SessionOptions
sess_opts
;
sess_opts
.
SetIntraOpNumThreads
(
1
);
sess_opts
.
SetInterOpNumThreads
(
1
);
std
::
string
model_filename
;
if
(
!
config
.
model_config
.
transducer
.
encoder_filename
.
empty
())
{
model_filename
=
config
.
model_config
.
transducer
.
encoder_filename
;
...
...
sherpa-onnx/csrc/online-transducer-model.cc
查看文件 @
d364610
...
...
@@ -39,6 +39,8 @@ static ModelType GetModelType(char *model_data, size_t model_data_length,
bool
debug
)
{
Ort
::
Env
env
(
ORT_LOGGING_LEVEL_WARNING
);
Ort
::
SessionOptions
sess_opts
;
sess_opts
.
SetIntraOpNumThreads
(
1
);
sess_opts
.
SetInterOpNumThreads
(
1
);
auto
sess
=
std
::
make_unique
<
Ort
::
Session
>
(
env
,
model_data
,
model_data_length
,
sess_opts
);
...
...
sherpa-onnx/csrc/speaker-embedding-extractor-impl.cc
查看文件 @
d364610
...
...
@@ -25,6 +25,8 @@ static ModelType GetModelType(char *model_data, size_t model_data_length,
bool
debug
)
{
Ort
::
Env
env
(
ORT_LOGGING_LEVEL_WARNING
);
Ort
::
SessionOptions
sess_opts
;
sess_opts
.
SetIntraOpNumThreads
(
1
);
sess_opts
.
SetInterOpNumThreads
(
1
);
auto
sess
=
std
::
make_unique
<
Ort
::
Session
>
(
env
,
model_data
,
model_data_length
,
sess_opts
);
...
...
请
注册
或
登录
后发表评论