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

windows native OCR WORKS SO FUCKING WELL 90% less CPU

Louis Beaumont696c50d7295f
diff --git a/examples/apps/screenpipe-app-tauri/app/page.tsx b/examples/apps/screenpipe-app-tauri/app/page.tsx
index 37ff6f9bb..4e8b4a248 100644
--- a/examples/apps/screenpipe-app-tauri/app/page.tsx
+++ b/examples/apps/screenpipe-app-tauri/app/page.tsx
@@ -17,6 +17,7 @@ import NotificationHandler from "@/components/notification-handler";
import ScreenpipeInstanceChecker from "@/components/screenpipe-instance-checker";
import Header from "@/components/header";
import { checkForAppUpdates } from "@/components/updater";
+import UpdateNotification from "@/components/update-notification";
export default function Home() {
const { settings } = useSettings();
@@ -29,6 +30,7 @@ export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center p-8">
<NotificationHandler />
+ {/* <UpdateNotification checkIntervalHours={3} /> */}
{/* <ScreenpipeInstanceChecker /> */}
<Header />
{settings.isLoading ? (
diff --git a/examples/apps/screenpipe-app-tauri/components/update-notification.tsx b/examples/apps/screenpipe-app-tauri/components/update-notification.tsx
new file mode 100644
index 000000000..27b0e5c6d
--- /dev/null
+++ b/examples/apps/screenpipe-app-tauri/components/update-notification.tsx
@@ -0,0 +1,68 @@
+import React, { useEffect, useState } from "react";
+import { sendNotification } from "@tauri-apps/plugin-notification";
+import { platform } from "@tauri-apps/plugin-os";
+
+const UpdateNotification: React.FC<{ checkIntervalHours: number }> = ({
+ checkIntervalHours = 3,
+}) => {
+ useEffect(() => {
+ const checkForUpdates = async () => {
+ const lastCheckTime = localStorage.getItem("lastUpdateCheckTime");
+ const currentTime = Date.now();
+
+ if (
+ !lastCheckTime ||
+ currentTime - parseInt(lastCheckTime) > checkIntervalHours * 3600000
+ ) {
+ const os = platform();
+ const releasePageUrl =
+ "https://web.crabnebula.cloud/mediar/screenpipe/releases";
+
+ try {
+ const response = await fetch(releasePageUrl);
+ const html = await response.text();
+
+ // Extract download links
+ const links =
+ html.match(
+ /https:\/\/cdn\.crabnebula\.app\/download\/mediar\/screenpipe\/latest[^\s"']*/g
+ ) || [];
+
+ let downloadLink = "";
+ if (os === "windows") {
+ downloadLink =
+ links.find((link) => link.includes("nsis-x86_64")) || "";
+ } else if (os === "macos") {
+ // For macOS, we can't determine ARM vs Intel, so we'll provide both options
+ const armLink =
+ links.find((link) => link.includes("aarch64.dmg")) || "";
+ const intelLink =
+ links.find((link) => link.includes("x64.dmg")) || "";
+ downloadLink = `ARM: ${armLink}\nIntel: ${intelLink}`;
+ }
+
+ if (downloadLink) {
+ sendNotification({
+ title: "Screenpipe Update Available",
+ body: `A new version of Screenpipe is available. Click to download:\n${downloadLink}`,
+ // icon: "update-icon", // Replace with your update icon
+ });
+ }
+ } catch (error) {
+ console.error("Error checking for updates:", error);
+ }
+
+ localStorage.setItem("lastUpdateCheckTime", currentTime.toString());
+ }
+ };
+
+ checkForUpdates();
+ const interval = setInterval(checkForUpdates, checkIntervalHours * 3600000);
+
+ return () => clearInterval(interval);
+ }, [checkIntervalHours]);
+
+ return null;
+};
+
+export default UpdateNotification;
diff --git a/examples/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/examples/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index 42c36674d..18b9aa054 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.21"
+version = "0.1.22"
description = ""
authors = ["you"]
license = ""
diff --git a/examples/apps/screenpipe-app-tauri/src-tauri/tauri.conf.json b/examples/apps/screenpipe-app-tauri/src-tauri/tauri.conf.json
index 10ef463f4..866207a6e 100644
--- a/examples/apps/screenpipe-app-tauri/src-tauri/tauri.conf.json
+++ b/examples/apps/screenpipe-app-tauri/src-tauri/tauri.conf.json
@@ -82,7 +82,7 @@
"security": {
"csp": {
"default-src": "'self' customprotocol: asset:",
- "connect-src": "ipc: http://ipc.localhost https://api.openai.com http://localhost:3030 http://127.0.0.1:11434 http://localhost:11434 https://api.github.com https://github.com https://*.githubusercontent.com https://*.github.com",
+ "connect-src": "ipc: http://ipc.localhost https://api.openai.com http://localhost:3030 http://127.0.0.1:11434 http://localhost:11434 https://web.crabnebula.cloud https://api.github.com https://github.com https://*.githubusercontent.com https://*.github.com",
"font-src": [
"https://fonts.gstatic.com",
"tauri://localhost",
diff --git a/screenpipe-server/src/bin/screenpipe-server.rs b/screenpipe-server/src/bin/screenpipe-server.rs
index f8bdea5aa..63f6d9c1e 100644
--- a/screenpipe-server/src/bin/screenpipe-server.rs
+++ b/screenpipe-server/src/bin/screenpipe-server.rs
@@ -231,6 +231,9 @@ async fn main() -> anyhow::Result<()> {
};
devices_status.insert(input_device, device_control);
}
+ // audio output only supported on linux atm
+ // see https://github.com/louis030195/screen-pipe/pull/106
+ #[cfg(target_os = "linux")]
if let Ok(output_device) = default_output_device() {
audio_devices.push(Arc::new(output_device.clone()));
let device_control = DeviceControl {
diff --git a/screenpipe-server/src/core.rs b/screenpipe-server/src/core.rs
index 718dc2e5c..efd4af532 100644
--- a/screenpipe-server/src/core.rs
+++ b/screenpipe-server/src/core.rs
@@ -96,8 +96,15 @@ pub async fn start_continuous_recording(
.await
});
- video_handle.await??;
- audio_handle.await??;
+ let video_result = video_handle.await;
+ let audio_result = audio_handle.await;
+
+ if let Err(e) = video_result {
+ error!("Video recording error: {:?}", e);
+ }
+ if let Err(e) = audio_result {
+ error!("Audio recording error: {:?}", e);
+ }
info!("Stopped recording");
Ok(())
@@ -171,7 +178,9 @@ async fn record_video(
frame_id.to_string(),
frame.text.clone(),
uid, // Pass the UID to the function
- ).await {
+ )
+ .await
+ {
error!("Failed to send screen data to friend wearable: {}", e);
} else {
debug!("Sent screen data to friend wearable for frame {}", frame_id);
@@ -361,7 +370,9 @@ async fn process_audio_result(
audio_chunk_id.to_string(),
transcription.clone(),
uid, // Pass the UID to the function
- ).await {
+ )
+ .await
+ {
error!("Failed to send data to friend wearable: {}", e);
} else {
debug!(
@@ -377,4 +388,4 @@ async fn process_audio_result(
result.input.device, e
),
}
-}
\ No newline at end of file
+}