whisper_lang_auto_detect method

int whisper_lang_auto_detect(
  1. Pointer<whisper_context> ctx,
  2. int offset_ms,
  3. int n_threads,
  4. Pointer<Float> lang_probs,
)

Use mel data at offset_ms to try and auto-detect the spoken language Make sure to call whisper_pcm_to_mel() or whisper_set_mel() first Returns the top language id or negative on failure If not null, fills the lang_probs array with the probabilities of all languages The array must be whisper_lang_max_id() + 1 in size ref: https://github.com/openai/whisper/blob/main/whisper/decoding.py#L18-L69

Implementation

int whisper_lang_auto_detect(
  ffi.Pointer<whisper_context> ctx,
  int offset_ms,
  int n_threads,
  ffi.Pointer<ffi.Float> lang_probs,
) {
  return _whisper_lang_auto_detect(
    ctx,
    offset_ms,
    n_threads,
    lang_probs,
  );
}