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-04-21 23:07:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2025-04-21 23:07:16 +0800
Commit
921c4370e65d639e9200c9433472c0312eb62a3a
921c4370
1 parent
7cbb1bc4
Fix building for open harmonyOS (#2142)
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
7 行增加
和
3 行删除
harmony-os/SherpaOnnxHar/sherpa_onnx/src/main/cpp/audio-tagging.cc
harmony-os/SherpaOnnxHar/sherpa_onnx/src/main/cpp/speaker-identification.cc
harmony-os/SherpaOnnxHar/sherpa_onnx/src/main/cpp/utils.cc
harmony-os/SherpaOnnxHar/sherpa_onnx/src/main/cpp/audio-tagging.cc
查看文件 @
921c437
...
...
@@ -196,7 +196,8 @@ static Napi::Object AudioTaggingComputeWrapper(const Napi::CallbackInfo &info) {
Napi
::
Number
::
New
(
env
,
events
[
i
]
->
index
));
obj
.
Set
(
Napi
::
String
::
New
(
env
,
"prob"
),
Napi
::
Number
::
New
(
env
,
events
[
i
]
->
prob
));
ans
[
i
]
=
obj
;
// ans[i] = obj; // see #2120
ans
.
Set
(
i
,
obj
);
}
SherpaOnnxAudioTaggingFreeResults
(
events
);
...
...
harmony-os/SherpaOnnxHar/sherpa_onnx/src/main/cpp/speaker-identification.cc
查看文件 @
921c437
...
...
@@ -766,7 +766,8 @@ static Napi::Array SpeakerEmbeddingManagerGetAllSpeakersWrapper(
Napi
::
Array
ans
=
Napi
::
Array
::
New
(
env
,
num_speakers
);
for
(
uint32_t
i
=
0
;
i
!=
num_speakers
;
++
i
)
{
ans
[
i
]
=
Napi
::
String
::
New
(
env
,
all_speaker_names
[
i
]);
// ans[i] = Napi::String::New(env, all_speaker_names[i]); // see #2120
ans
.
Set
(
i
,
Napi
::
String
::
New
(
env
,
all_speaker_names
[
i
]));
}
SherpaOnnxSpeakerEmbeddingManagerFreeAllSpeakers
(
all_speaker_names
);
return
ans
;
...
...
harmony-os/SherpaOnnxHar/sherpa_onnx/src/main/cpp/utils.cc
查看文件 @
921c437
...
...
@@ -66,7 +66,9 @@ static Napi::Array ListRawFileDir(const Napi::CallbackInfo &info) {
auto
files
=
GetFilenames
(
mgr
.
get
(),
dir
);
Napi
::
Array
ans
=
Napi
::
Array
::
New
(
env
,
files
.
size
());
for
(
int32_t
i
=
0
;
i
!=
files
.
size
();
++
i
)
{
ans
[
i
]
=
Napi
::
String
::
New
(
env
,
files
[
i
]);
// Fix #2120
// ans[i] = Napi::String::New(env, files[i]);
ans
.
Set
(
i
,
Napi
::
String
::
New
(
env
,
files
[
i
]));
}
return
ans
;
}
...
...
请
注册
或
登录
后发表评论