Crates.io | aprilasr |
lib.rs | aprilasr |
version | 0.2.0 |
source | src |
created_at | 2024-02-13 14:12:43.383174 |
updated_at | 2024-02-25 19:36:34.194023 |
description | High-level wrapper for the april-asr C api (libaprilasr) using aprilasr-sys. |
homepage | |
repository | https://codeberg.org/vhs/aprilasr-rs |
max_upload_size | |
id | 1138523 |
size | 121,548 |
High-level wrapper for the april-asr C api (libaprilasr) using aprilasr-sys.
Read the documentation here: https://abb128.github.io/april-asr/
use aprilasr::{init_april_api, Model, Session};
fn main() {
init_april_api(1);
let model = Model::new("april-english-dev-01110_en.april").unwrap();
let asynchronous = true;
let no_rt = true;
let callback = |result_type| println!("{:?}", result_type);
let session = Session::new(
&model, callback, asynchronous, no_rt
).unwrap();
session.feed_pcm16(vec![]);
}
Run tests and example after building aprilasr-sys:
$ ./getmodel.sh
$ cargo test
$ ./makewav.sh
$ cargo run --example sync