Skip to content

Commit

Permalink
whisper.android : use new API
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Oct 6, 2023
1 parent 41bc044 commit 22ab809
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/whisper.android/app/src/main/jni/whisper/jni.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static struct whisper_context *whisper_init_from_asset(
.close = &asset_close
};

return whisper_init(&loader);
return whisper_init_with_params(&loader, whisper_context_default_params());
}

JNIEXPORT jlong JNICALL
Expand All @@ -147,7 +147,7 @@ Java_com_whispercppdemo_whisper_WhisperLib_00024Companion_initContext(
UNUSED(thiz);
struct whisper_context *context = NULL;
const char *model_path_chars = (*env)->GetStringUTFChars(env, model_path_str, NULL);
context = whisper_init_from_file(model_path_chars);
context = whisper_init_from_file_with_params(model_path_chars, whisper_context_default_params());
(*env)->ReleaseStringUTFChars(env, model_path_str, model_path_chars);
return (jlong) context;
}
Expand Down

0 comments on commit 22ab809

Please sign in to comment.