kaldi-fbank-rust-kautism

Crates.iokaldi-fbank-rust-kautism
lib.rskaldi-fbank-rust-kautism
version0.1.0
created_at2025-03-17 12:47:12.186386+00
updated_at2025-03-17 12:47:12.186386+00
descriptionKautism's fork of https://github.com/Okabintaro/kaldi-fbank-rust
homepagehttps://github.com/darkautism/kaldi-fbank-rust
repository
max_upload_size
id1595431
size340,462
kautism (darkautism)

documentation

README

Kaldi Native FBank Rust Bindings

Minimal bindings for kaldi-native-fbank.

Still WIP. Only bound the things I needed.

Example:

let mut fbank = OnlineFbank::new(16_000f32);
fbank.accept_waveform(16_000f32, &[0.0; 16000 * 10]);
fbank.input_finished();
let frame = fbank.get_frame(0);
// Use frame/features

Notes

Generate bindings using bindgen like this:

bindgen kaldi-native-fbank/kaldi-native-fbank/c-api/c-api.h -o src/lib_sys.rs

Compile using cmake with compile commands for clangd.

cmake -S kaldi-native-fbank/ -B build -D BUILD_SHARED_LIBS=0 -D KALDI_NATIVE_FBANK_BUILD_PYTHON=0 -D KALDI_NATIVE_FBANK_BUILD_TESTS=0 -D CMAKE_EXPORT_COMPILE_COMMANDS=1
cmake --build build
ln -s build/compile_commands.json .

TODO:

  • Expose all the options needed

License

MIT or Apache 2

Commit count: 0

cargo fmt