Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

feat: disable audio in app settings

Louis Beaumontbf61694eebd3
diff --git a/examples/apps/screenpipe-app-tauri/components/recording-settings.tsx b/examples/apps/screenpipe-app-tauri/components/recording-settings.tsx
index c613f58a6..d3e8b5985 100644
--- a/examples/apps/screenpipe-app-tauri/components/recording-settings.tsx
+++ b/examples/apps/screenpipe-app-tauri/components/recording-settings.tsx
@@ -148,6 +148,7 @@ export function RecordingSettings({
audioDevices: localSettings.audioDevices,
usePiiRemoval: localSettings.usePiiRemoval,
restartInterval: localSettings.restartInterval,
+ disableAudio: localSettings.disableAudio,
};
console.log("Settings to update:", settingsToUpdate);
await updateSettings(settingsToUpdate);
@@ -205,6 +206,10 @@ export function RecordingSettings({
setLocalSettings({ ...localSettings, restartInterval: newValue });
};
+ const handleDisableAudioChange = (checked: boolean) => {
+ setLocalSettings({ ...localSettings, disableAudio: checked });
+ };
+
return (
<>
<div className="relative">
@@ -398,9 +403,6 @@ export function RecordingSettings({
<br />
before saving to the database or returning in search
results
- <br />
- this will avoid sending these information to openai
- for example
</p>
</TooltipContent>
</Tooltip>
@@ -446,6 +448,35 @@ export function RecordingSettings({
/>
</div>
+ <div className="flex flex-col space-y-2">
+ <div className="flex items-center space-x-2">
+ <Switch
+ id="disableAudio"
+ checked={localSettings.disableAudio}
+ onCheckedChange={handleDisableAudioChange}
+ />
+ <Label
+ htmlFor="disableAudio"
+ className="flex items-center space-x-2"
+ >
+ <span>disable audio recording</span>
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger>
+ <HelpCircle className="h-4 w-4" />
+ </TooltipTrigger>
+ <TooltipContent>
+ <p>
+ useful if you don&apos;t need audio or if you have
+ memory/CPU issues
+ </p>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ </Label>
+ </div>
+ </div>
+
<div className="flex flex-col space-y-2">
<Button
onClick={handleUpdate}
diff --git a/examples/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx b/examples/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx
index ff9c8c92d..bb07026aa 100644
--- a/examples/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx
+++ b/examples/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx
@@ -34,6 +34,7 @@ const defaultSettings: Settings = {
restartInterval: 0,
port: 3030,
dataDir: "default",
+ disableAudio: false,
};
export interface Settings {
@@ -54,6 +55,7 @@ export interface Settings {
restartInterval: number;
port: number;
dataDir: string;
+ disableAudio: boolean;
}
let store: Store | null = null;
@@ -125,6 +127,8 @@ export function useSettings() {
((await store!.get("restartInterval")) as number) || 0;
const savedPort = ((await store!.get("port")) as number) || 3030;
const savedDataDir = ((await store!.get("dataDir")) as string) || "";
+ const savedDisableAudio =
+ ((await store!.get("disableAudio")) as boolean) || false;
setSettings({
openaiApiKey: savedKey,
useOllama: savedUseOllama,
@@ -143,6 +147,7 @@ export function useSettings() {
restartInterval: savedRestartInterval,
port: savedPort,
dataDir: savedDataDir,
+ disableAudio: savedDisableAudio,
});
} catch (error) {
console.error("Failed to load settings:", error);
diff --git a/examples/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/examples/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index 36554cfe8..170972fbc 100644
--- a/examples/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/examples/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "0.1.71"
+version = "0.1.72"
description = ""
authors = ["you"]
license = ""
diff --git a/examples/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/examples/apps/screenpipe-app-tauri/src-tauri/src/main.rs
index 7a6b5ba5c..de16bb67f 100755
--- a/examples/apps/screenpipe-app-tauri/src-tauri/src/main.rs
+++ b/examples/apps/screenpipe-app-tauri/src-tauri/src/main.rs
@@ -206,6 +206,13 @@ fn spawn_sidecar(app: &tauri::AppHandle) -> Result<CommandChild, String> {
.map_err(|e| e.to_string())?
.unwrap_or(String::from("default"));
+ let disable_audio = with_store(app.clone(), stores.clone(), path.clone(), |store| {
+ Ok(store
+ .get("disableAudio")
+ .and_then(|v| v.as_bool())
+ .unwrap_or(false))
+ })
+ .map_err(|e| e.to_string())?;
let port_str = port.to_string();
let mut args = vec!["--port", port_str.as_str()];
@@ -271,6 +278,10 @@ fn spawn_sidecar(app: &tauri::AppHandle) -> Result<CommandChild, String> {
}
}
+ if disable_audio {
+ args.push("--disable-audio");
+ }
+
// hardcode TESSDATA_PREFIX for windows
if cfg!(windows) {
let exe_dir = env::current_exe()