Skip to content

Commit

Permalink
more verbose logs in jni (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Apr 10, 2024
1 parent 2e89994 commit bbb7067
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sherpa-ncnn/jni/jni.cc
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ SHERPA_EXTERN_C
JNIEXPORT jlong JNICALL Java_com_k2fsa_sherpa_ncnn_SherpaNcnn_newFromFile(
JNIEnv *env, jobject /*obj*/, jobject _config) {
sherpa_ncnn::RecognizerConfig config = sherpa_ncnn::ParseConfig(env, _config);
NCNN_LOGE("%s", config.ToString().c_str());
auto model = new sherpa_ncnn::SherpaNcnn(config);

return (jlong)model;
Expand All @@ -301,6 +302,7 @@ JNIEXPORT jlong JNICALL Java_com_k2fsa_sherpa_ncnn_SherpaNcnn_newFromAsset(
#endif

sherpa_ncnn::RecognizerConfig config = sherpa_ncnn::ParseConfig(env, _config);
NCNN_LOGE("%s", config.ToString().c_str());
auto model = new sherpa_ncnn::SherpaNcnn(
#if __ANDROID_API__ >= 9
mgr,
Expand Down

0 comments on commit bbb7067

Please sign in to comment.