Skip to content

Commit

Permalink
whisper.android.java : fix returns in JNI (ggerganov#1929)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouwg authored and jiahansu committed Apr 17, 2024
1 parent c058468 commit d6f908d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/whisper.android.java/app/src/main/jni/whisper/jni.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ Java_com_whispercpp_java_whisper_WhisperLib_benchMemcpy(JNIEnv *env, jobject thi
UNUSED(thiz);
const char *bench_ggml_memcpy = whisper_bench_memcpy_str(n_threads);
jstring string = (*env)->NewStringUTF(env, bench_ggml_memcpy);

return string;
}

JNIEXPORT jstring JNICALL
Expand All @@ -253,5 +255,7 @@ Java_com_whispercpp_java_whisper_WhisperLib_benchGgmlMulMat(JNIEnv *env, jobject
UNUSED(thiz);
const char *bench_ggml_mul_mat = whisper_bench_ggml_mul_mat_str(n_threads);
jstring string = (*env)->NewStringUTF(env, bench_ggml_mul_mat);

return string;
}

0 comments on commit d6f908d

Please sign in to comment.