whisper_encode method

int whisper_encode(
  1. Pointer<whisper_context> ctx,
  2. int offset,
  3. int n_threads
)

Run the Whisper encoder on the log mel spectrogram stored inside the default state in the provided whisper context. Make sure to call whisper_pcm_to_mel() or whisper_set_mel() first. offset can be used to specify the offset of the first frame in the spectrogram. Returns 0 on success

Implementation

int whisper_encode(
  ffi.Pointer<whisper_context> ctx,
  int offset,
  int n_threads,
) {
  return _whisper_encode(
    ctx,
    offset,
    n_threads,
  );
}