Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed rust capi RuntimeParams struct default value. #607

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion libDF/src/capi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ impl DFState {
} else {
None
};
let r_params = RuntimeParams::default_with_ch(channels).with_atten_lim(atten_lim);
let mut r_params = RuntimeParams::default_with_ch(channels); //channel
r_params = r_params.with_atten_lim(atten_lim).with_thresholds(
-15.0f32, //min_db_thresh
35.0f32, //max_db_erb_thresh
35.0f32, //max_db_df_thresh
);
r_params = r_params.with_post_filter(0.0f32); //post_filter_beta
r_params = r_params.with_mask_reduce(ReduceMask::MAX); //reduce_mask
let df_params =
DfParams::new(PathBuf::from(model_path)).expect("Could not load model from path");
let m =
Expand Down