whisper_decode method

int whisper_decode(
  1. Pointer<whisper_context> ctx,
  2. Pointer<whisper_token> tokens,
  3. int n_tokens,
  4. int n_past,
  5. int n_threads,
)

Run the Whisper decoder to obtain the logits and probabilities for the next token. Make sure to call whisper_encode() first. tokens + n_tokens is the provided context for the decoder. n_past is the number of tokens to use from previous decoder calls. Returns 0 on success TODO: add support for multiple decoders

Implementation

int whisper_decode(
  ffi.Pointer<whisper_context> ctx,
  ffi.Pointer<whisper_token> tokens,
  int n_tokens,
  int n_past,
  int n_threads,
) {
  return _whisper_decode(
    ctx,
    tokens,
    n_tokens,
    n_past,
    n_threads,
  );
}