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
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
move(settings): CoreAudio experimental toggle to recording settings
Louis Beaumont60e8d419a831
diff --git a/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx b/apps/screenpipe-app-tauri/components/settings/privacy-section.tsxindex 22f51ac67..598298858 100644--- a/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx@@ -4,7 +4,6 @@"use client";import React, { useState, useCallback, useEffect, useMemo } from "react";-import { invoke } from "@tauri-apps/api/core";import { LockedSetting, ManagedSwitch } from "@/components/enterprise-locked-setting";import {Eye,@@ -204,18 +203,6 @@ export function PrivacySection() {const [filterView, setFilterView] = useState<"all" | "personal" | "team">("all");const [pushingFilter, setPushingFilter] = useState<string | null>(null);- // Gate for the experimental CoreAudio System Audio toggle. We only show the- // switch on macOS 14.4+ where the Process Tap API actually exists — on any- // other platform flipping it is a no-op, so the toggle would just be- // confusing. Probed once via a Tauri command that proxies to- // `screenpipe_audio::core::process_tap::is_process_tap_available()`.- const [coreaudioTapAvailable, setCoreaudioTapAvailable] = useState<boolean | null>(null);- useEffect(() => {- invoke<boolean>("check_coreaudio_process_tap_available")- .then(setCoreaudioTapAvailable)- .catch(() => setCoreaudioTapAvailable(false));- }, []);-const { items: windowItems, isLoading: isWindowItemsLoading } =useSqlAutocomplete("window");const { items: urlItems, isLoading: isUrlItemsLoading } =@@ -306,11 +293,6 @@ export function PrivacySection() {handleSettingsChange({ pauseOnDrmContent: checked }, true);};- const handleCoreaudioSystemAudioToggle = (checked: boolean) => {- handleSettingsChange({ experimentalCoreaudioSystemAudio: checked }, true);- posthog.capture("experimental_coreaudio_system_audio_toggled", { enabled: checked });- };-const handleRecordWhileLockedToggle = (checked: boolean) => {handleSettingsChange({ recordWhileLocked: checked }, true);};@@ -671,34 +653,6 @@ export function PrivacySection() {</CardContent></Card>- {/* Experimental: CoreAudio System Audio (macOS 14.4+ only) */}- {coreaudioTapAvailable && (- <Card>- <CardContent className="px-3 py-2.5">- <div className="flex items-center justify-between">- <div className="flex items-center space-x-2.5">- <Tv className="h-4 w-4 text-muted-foreground shrink-0" />- <div>- <h3 className="text-sm font-medium text-foreground flex items-center gap-1.5">- Experimental: CoreAudio System Audio- <Badge variant="outline" className="h-4 text-[10px] px-1">beta</Badge>- <HelpTooltip text="use the coreaudio process tap api (macos 14.4+) to capture system audio instead of screencapturekit. avoids sck display enumeration and sleep/wake issues. if disabled or on an older macos, system audio uses screencapturekit as before. restart recording after changing." />- </h3>- <p className="text-xs text-muted-foreground">- Capture System Audio via CoreAudio instead of ScreenCaptureKit- </p>- </div>- </div>- <Switch- id="experimentalCoreaudioSystemAudio"- checked={Boolean(settings.experimentalCoreaudioSystemAudio ?? false)}- onCheckedChange={handleCoreaudioSystemAudioToggle}- />- </div>- </CardContent>- </Card>- )}-{/* Record While Locked */}<Card><CardContent className="px-3 py-2.5">diff --git a/apps/screenpipe-app-tauri/components/settings/recording-settings.tsx b/apps/screenpipe-app-tauri/components/settings/recording-settings.tsxindex 48854a300..cc0ed16ae 100644--- a/apps/screenpipe-app-tauri/components/settings/recording-settings.tsx+++ b/apps/screenpipe-app-tauri/components/settings/recording-settings.tsx@@ -86,6 +86,7 @@ import { open } from "@tauri-apps/plugin-dialog";import { ToastAction } from "@/components/ui/toast";import { open as openUrl } from "@tauri-apps/plugin-shell";import { listen } from "@tauri-apps/api/event";+import { invoke } from "@tauri-apps/api/core";import { Dialog, DialogContent, DialogTitle, DialogDescription } from "@/components/ui/dialog";import { Progress } from "@/components/ui/progress";import { Card, CardContent } from "@/components/ui/card";@@ -500,6 +501,18 @@ export function RecordingSettings() {const [availableAudioDevices, setAvailableAudioDevices] = useState<AudioDeviceInfo[]>([]);++ // Gate for the experimental CoreAudio Process Tap toggle — we only show+ // the switch on macOS 14.4+ where the API exists. Probed once via a+ // Tauri command that proxies to+ // `screenpipe_audio::core::process_tap::is_process_tap_available()`.+ const [coreaudioTapAvailable, setCoreaudioTapAvailable] = useState<boolean | null>(null);+ useEffect(() => {+ invoke<boolean>("check_coreaudio_process_tap_available")+ .then(setCoreaudioTapAvailable)+ .catch(() => setCoreaudioTapAvailable(false));+ }, []);+const { toast } = useToast();const [isUpdating, setIsUpdating] = useState(false);const { health } = useHealthCheck();@@ -1598,6 +1611,32 @@ Your screen is a pipe. Everything you see, hear, and type flows through it. Scre</Card>)}+ {/* Experimental: CoreAudio System Audio (macOS 14.4+ only) */}+ {!settings.disableAudio && coreaudioTapAvailable && (+ <Card className="border-border bg-card">+ <CardContent className="px-3 py-2.5">+ <div className="flex items-center justify-between">+ <div className="flex items-center space-x-2.5">+ <Monitor className="h-4 w-4 text-muted-foreground shrink-0" />+ <div>+ <h3 className="text-sm font-medium text-foreground">+ Experimental: CoreAudio System Audio+ </h3>+ <p className="text-xs text-muted-foreground">+ Use the CoreAudio Process Tap API (macOS 14.4+) for System Audio. Avoids ScreenCaptureKit — lighter permission, no GPU wake, survives sleep/wake. Restart recording after changing.+ </p>+ </div>+ </div>+ <Switch+ id="experimentalCoreaudioSystemAudio"+ checked={Boolean(settings.experimentalCoreaudioSystemAudio ?? false)}+ onCheckedChange={(checked) => handleSettingsChange({ experimentalCoreaudioSystemAudio: checked }, true)}+ />+ </div>+ </CardContent>+ </Card>+ )}+{/* Audio Devices — grouped by input (microphones) vs output (system audio) */}{!settings.disableAudio && !settings.useSystemDefaultAudio && (() => {const inputDevices = availableAudioDevices.filter((d) => getAudioDeviceType(d.name) === "input");