Dart API for speaker diarization (#1418)

This commit is contained in:
Fangjun Kuang
2024-10-11 21:17:41 +08:00
committed by GitHub
parent 1851ff6337
commit 1ed803adc1
21 changed files with 733 additions and 17 deletions

View File

@@ -204,7 +204,8 @@ Java_com_k2fsa_sherpa_onnx_OfflineSpeakerDiarization_processWithCallback(
jfloat *p = env->GetFloatArrayElements(samples, nullptr);
jsize n = env->GetArrayLength(samples);
auto segments =
sd->Process(p, n, callback_wrapper, (void *)arg).SortByStartTime();
sd->Process(p, n, callback_wrapper, reinterpret_cast<void *>(arg))
.SortByStartTime();
env->ReleaseFloatArrayElements(samples, p, JNI_ABORT);
return ProcessImpl(env, segments);