3 releases
0.1.2 | Mar 20, 2023 |
---|---|
0.1.1 | Mar 17, 2023 |
0.1.0 | Mar 17, 2023 |
#265 in WebSocket
51 downloads per month
520KB
392 lines
Overview
rust api for
Attention:Implementation by test websocket lib, still in primary version
Usage
let mut c = AliNlsToSr::from(AliNlsConfig {
app_key: "$app_key".to_owned(),
host: "wss://nls-gateway.cn-shanghai.aliyuncs.com".to_owned(),
});
let cur_p = &env::current_dir().unwrap();
let f = Path::new(cur_p).join("test").join("16000_2_s16le.wav");
let ret = c.sr_from_slicefile(f.as_path()).await;
match ret {
Ok(r) => {
if let Some(r_) = r {
println!("json result is :{:?}", r_);
}
}
Err(e) => {
println!("[error]{}", e.to_string());
}
}
Test
> cargo test --package ali-nls-sr --lib -- test_sr --exact --nocapture
Dependencies
~8–17MB
~213K SLoC