]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/blob
b5e9797a9230f48b0f1a791b08c9c25bdc436d2a
[pkg/ggml/sources/whisper.cpp] /
1 package io.github.ggerganov.whispercpp.callbacks;
2
3 import com.sun.jna.Callback;
4 import com.sun.jna.Pointer;
5 import io.github.ggerganov.whispercpp.WhisperContext;
6 import io.github.ggerganov.whispercpp.model.WhisperState;
7
8 /**
9 * Callback before the encoder starts.
10 * If not null, called before the encoder starts.
11 * If it returns false, the computation is aborted.
12 */
13 public interface WhisperEncoderBeginCallback extends Callback {
14
15 /**
16 * Callback method before the encoder starts.
17 *
18 * @param ctx The whisper context.
19 * @param state The whisper state.
20 * @param user_data User data.
21 * @return True if the computation should proceed, false otherwise.
22 */
23 boolean callback(WhisperContext ctx, WhisperState state, Pointer user_data);
24 }