Skip to content

Commit c4c2380

Browse files
authored
Update jni.c for enabling word level timestamps in whisper.cpp android
Updated jni.c for enabling word level timestamps in whisper.cpp android
1 parent d682e15 commit c4c2380

File tree

1 file changed

+3
-0
lines changed
  • examples/whisper.android/lib/src/main/jni/whisper

1 file changed

+3
-0
lines changed

examples/whisper.android/lib/src/main/jni/whisper/jni.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ Java_com_whispercpp_whisper_WhisperLib_00024Companion_fullTranscribe(
181181
params.offset_ms = 0;
182182
params.no_context = true;
183183
params.single_segment = false;
184+
params.token_timestamps = true; // Enable for word level timestamps
185+
params.split_on_word = true; // Enable for word level timestamps
186+
params.max_len = 1; // Set number of words in a line
184187

185188
whisper_reset_timings(context);
186189

0 commit comments

Comments
 (0)