Expand description
Low-level FFI bindings for nemotron-asr.cpp
This crate provides raw, unsafe bindings to the C API of nemotron-asr.cpp.
For a safe, idiomatic Rust API, use the nemotron-asr crate instead.
§Usage
The bindings are automatically generated from the C header files using bindgen. All functions are unsafe and require careful handling of pointers and memory management.
§Example
use nemotron_asr_sys::*;
use std::ffi::CString;
use std::ptr;
unsafe {
// Initialize model with default backend
let model_path = CString::new("/path/to/model.gguf").unwrap();
let ctx = c_nemo_init_with_backend(model_path.as_ptr(), ptr::null());
if !ctx.is_null() {
// Create streaming context with default config
let stream_ctx = c_nemo_stream_init(ctx, ptr::null());
// Process audio...
// Cleanup
c_nemo_stream_free(stream_ctx);
c_nemo_free(ctx);
}
}Structs§
Enums§
Functions§
- c_
nemo_ ⚠free - c_
nemo_ ⚠free_ string - c_
nemo_ ⚠get_ backend_ name - c_
nemo_ ⚠init_ with_ backend - c_
nemo_ ⚠stream_ finalize - c_
nemo_ ⚠stream_ free - c_
nemo_ ⚠stream_ get_ transcript - c_
nemo_ ⚠stream_ init - c_
nemo_ ⚠stream_ process_ incremental - c_
nemo_ ⚠stream_ reset - ggml_
backend_ ⚠dev_ count - ggml_
backend_ ⚠dev_ get - ggml_
backend_ ⚠dev_ name - ggml_
backend_ ⚠load_ all_ from_ path - nemo_
cache_ ⚠config_ default - nemo_
cache_ ⚠config_ get_ chunk_ mel_ frames - nemo_
cache_ ⚠config_ get_ chunk_ samples - nemo_
cache_ ⚠config_ get_ latency_ ms - nemo_
cache_ ⚠config_ get_ shift_ mel_ frames_ val - nemo_
cache_ ⚠config_ get_ valid_ out_ len - nemo_
cache_ ⚠config_ with_ latency