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-06-18 16:48:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2025-06-18 16:48:48 +0800
Commit
38781709916585d2895145ab23bf97eaff7f1f8f
38781709
1 parent
b4716e29
Fixes #2172 (#2301)
Handle the case when the input audio contains no speeches.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
5 行增加
和
0 行删除
sherpa-onnx/csrc/offline-speaker-diarization-pyannote-impl.h
sherpa-onnx/csrc/offline-speaker-diarization-pyannote-impl.h
查看文件 @
3878170
...
...
@@ -160,6 +160,11 @@ class OfflineSpeakerDiarizationPyannoteImpl
std
::
vector
<
int32_t
>
cluster_labels
=
clustering_
->
Cluster
(
&
embeddings
(
0
,
0
),
embeddings
.
rows
(),
embeddings
.
cols
());
if
(
cluster_labels
.
empty
())
{
SHERPA_ONNX_LOGE
(
"No speakers found in the audio samples"
);
return
{};
}
int32_t
max_cluster_index
=
*
std
::
max_element
(
cluster_labels
.
begin
(),
cluster_labels
.
end
());
...
...
请
注册
或
登录
后发表评论