C++ API for speaker diarization (#1396)

This commit is contained in:
Fangjun Kuang
2024-10-09 12:01:20 +08:00
committed by GitHub
parent 70165cb42d
commit 59407edcad
39 changed files with 1652 additions and 108 deletions

View File

@@ -21,18 +21,16 @@ std::string FastClusteringConfig::ToString() const {
}
void FastClusteringConfig::Register(ParseOptions *po) {
std::string prefix = "ctc";
ParseOptions p(prefix, po);
po->Register(
"num-clusters", &num_clusters,
"Number of cluster. If greater than 0, then cluster threshold is "
"ignored. Please provide it if you know the actual number of "
"clusters in advance.");
p.Register("num-clusters", &num_clusters,
"Number of cluster. If greater than 0, then --cluster-thresold is "
"ignored. Please provide it if you know the actual number of "
"clusters in advance.");
p.Register("cluster-threshold", &threshold,
"If --num-clusters is not specified, then it specifies the "
"distance threshold for clustering. smaller value -> more "
"clusters. larger value -> fewer clusters");
po->Register("cluster-threshold", &threshold,
"If num_clusters is not specified, then it specifies the "
"distance threshold for clustering. smaller value -> more "
"clusters. larger value -> fewer clusters");
}
bool FastClusteringConfig::Validate() const {