C API for speaker diarization (#1402)
This commit is contained in:
@@ -20,8 +20,8 @@ struct FastClusteringConfig {
|
||||
|
||||
// distance threshold.
|
||||
//
|
||||
// The lower, the more clusters it will generate.
|
||||
// The higher, the fewer clusters it will generate.
|
||||
// The smaller, the more clusters it will generate.
|
||||
// The larger, the fewer clusters it will generate.
|
||||
float threshold = 0.5;
|
||||
|
||||
FastClusteringConfig() = default;
|
||||
|
||||
@@ -43,6 +43,16 @@ bool OfflineSpeakerDiarizationConfig::Validate() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (min_duration_on < 0) {
|
||||
SHERPA_ONNX_LOGE("min_duration_on %.3f is negative", min_duration_on);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (min_duration_off < 0) {
|
||||
SHERPA_ONNX_LOGE("min_duration_off %.3f is negative", min_duration_off);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "sherpa-onnx/csrc/wave-reader.h"
|
||||
|
||||
static int32_t ProgressCallback(int32_t processed_chunks, int32_t num_chunks,
|
||||
void *arg) {
|
||||
void *) {
|
||||
float progress = 100.0 * processed_chunks / num_chunks;
|
||||
fprintf(stderr, "progress %.2f%%\n", progress);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user