Skip to content

Okabintaro/kaldi-fbank-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Minimal bindings for kaldi-native-fbank

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published