From 3926c94c7f7bb840d1dff40207ace84e094246e9 Mon Sep 17 00:00:00 2001 From: leohwang Date: Thu, 28 Mar 2024 04:12:32 -0300 Subject: [PATCH] Fixed jni compiling error associated with tts --- sherpa-onnx/jni/jni.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sherpa-onnx/jni/jni.cc b/sherpa-onnx/jni/jni.cc index 1dbf96a7d..aef2010b1 100644 --- a/sherpa-onnx/jni/jni.cc +++ b/sherpa-onnx/jni/jni.cc @@ -793,7 +793,7 @@ class SherpaOnnxOfflineTts { GeneratedAudio Generate( const std::string &text, int64_t sid = 0, float speed = 1.0, - std::function callback = nullptr) const { + std::function callback = nullptr) const { return tts_.Generate(text, sid, speed, callback); } @@ -1308,8 +1308,8 @@ Java_com_k2fsa_sherpa_onnx_OfflineTts_generateWithCallbackImpl( const char *p_text = env->GetStringUTFChars(text, nullptr); SHERPA_ONNX_LOGE("string is: %s", p_text); - std::function callback_wrapper = - [env, callback](const float *samples, int32_t n) { + std::function callback_wrapper = + [env, callback](const float *samples, int32_t n, float /*p*/) { jclass cls = env->GetObjectClass(callback); jmethodID mid = env->GetMethodID(cls, "invoke", "([F)V");