Skip to content

Commit

Permalink
feat: VAD sensitivity in CLI & app ui settings
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Sep 18, 2024
1 parent fc1f927 commit 9936ae3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions screenpipe-app-tauri/src-tauri/src/sidecar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ fn spawn_sidecar(app: &tauri::AppHandle) -> Result<CommandChild, String> {
})
.map_err(|e| e.to_string())?;

let vad_sensitivity = with_store(app.clone(), stores.clone(), path.clone(), |store| {
Ok(store
.get("vadSensitivity")
.and_then(|v| v.as_str().map(String::from))
.unwrap_or(String::from("high")))
})
.map_err(|e| e.to_string())?;

let port_str = port.to_string();
let mut args = vec!["--port", port_str.as_str()];
let fps_str = fps.to_string();
Expand Down Expand Up @@ -269,6 +277,11 @@ fn spawn_sidecar(app: &tauri::AppHandle) -> Result<CommandChild, String> {
args.push(current_pid_str.as_str());
}

if vad_sensitivity != "high" {
args.push("--vad-sensitivity");
args.push(vad_sensitivity.as_str());
}

// args.push("--debug");

if cfg!(windows) {
Expand Down

0 comments on commit 9936ae3

Please sign in to comment.