mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-12 04:37:10 +02:00
Update jni.c
This commit is contained in:
parent
667d2476a7
commit
6b8b91ad81
@ -163,7 +163,7 @@ Java_com_whispercpp_whisper_WhisperLib_00024Companion_freeContext(
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_whispercpp_whisper_WhisperLib_00024Companion_fullTranscribe(
|
||||
JNIEnv *env, jobject thiz, jlong context_ptr, jint num_threads, jfloatArray audio_data) {
|
||||
JNIEnv *env, jobject thiz, jlong context_ptr, jint num_threads, jfloatArray audio_data, jboolean token_timestamps, jboolean split_on_word, jint max_len) {
|
||||
UNUSED(thiz);
|
||||
struct whisper_context *context = (struct whisper_context *) context_ptr;
|
||||
jfloat *audio_data_arr = (*env)->GetFloatArrayElements(env, audio_data, NULL);
|
||||
@ -181,9 +181,9 @@ Java_com_whispercpp_whisper_WhisperLib_00024Companion_fullTranscribe(
|
||||
params.offset_ms = 0;
|
||||
params.no_context = true;
|
||||
params.single_segment = false;
|
||||
params.token_timestamps = false; // Set true for word level timestamps
|
||||
params.split_on_word = false; // Set true for word level timestamps
|
||||
params.max_len = 1; // Set number of words in a line
|
||||
params.token_timestamps = token_timestamps;
|
||||
params.split_on_word = split_on_word;
|
||||
params.max_len = max_len;
|
||||
|
||||
whisper_reset_timings(context);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user