whisper_lang_auto_detect method
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,
);
}