Skip to content

Commit 8c2a464

Browse files
whybRikorose
authored andcommitted
Fixed rust capi RuntimeParams default value.
1 parent f1d19bf commit 8c2a464

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

libDF/src/capi.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ impl DFState {
2424
} else {
2525
None
2626
};
27-
let r_params = RuntimeParams::default_with_ch(channels).with_atten_lim(atten_lim);
27+
let mut r_params = RuntimeParams::default();
28+
r_params = r_params.with_atten_lim(atten_lim).with_thresholds(
29+
-15.0f32, //min_db_thresh
30+
35.0f32, //max_db_erb_thresh
31+
35.0f32, //max_db_df_thresh
32+
);
33+
r_params = r_params.with_post_filter(0.0f32); //post_filter_beta
34+
r_params = r_params.with_mask_reduce(ReduceMask::MAX); //reduce_mask
2835
let df_params =
2936
DfParams::new(PathBuf::from(model_path)).expect("Could not load model from path");
3037
let m =

0 commit comments

Comments
 (0)