1 package io.github.ggerganov.whispercpp.callbacks;
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;
9 * Callback before the encoder starts.
10 * If not null, called before the encoder starts.
11 * If it returns false, the computation is aborted.
13 public interface WhisperEncoderBeginCallback extends Callback {
16 * Callback method before the encoder starts.
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.
23 boolean callback(WhisperContext ctx, WhisperState state, Pointer user_data);