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
Bump app to v2.2.15
Louis Beaumont3b4421aae5d5
diff --git a/apps/screenpipe-app-tauri/components/settings/account-section.tsx b/apps/screenpipe-app-tauri/components/settings/account-section.tsxindex 5259f2f9c..f367d423f 100644--- a/apps/screenpipe-app-tauri/components/settings/account-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/account-section.tsx@@ -226,20 +226,11 @@ export function AccountSection() {<CreditCard className="w-3.5 h-3.5 mr-1.5" />Billing <ExternalLinkIcon className="w-3.5 h-3.5 ml-1.5" /></Button>- <Button- variant="outline"- size="sm"- onClick={() =>- openUrl("https://screenpi.pe/billing")- }- >- Billing <ExternalLinkIcon className="w-3.5 h-3.5 ml-1.5" />- </Button></div></div><div className="grid grid-cols-2 gap-2 text-sm text-muted-foreground"><div className="flex items-center gap-2">- <span>✓</span> encrypted cloud sync — 50GB, 3 devices+ <span>✓</span> encrypted cloud archive</div><div className="flex items-center gap-2"><span>✓</span> cloud transcription — higher qualitydiff --git a/apps/screenpipe-app-tauri/components/settings/apple-intelligence-card.tsx b/apps/screenpipe-app-tauri/components/settings/apple-intelligence-card.tsxindex f028112eb..311944c3f 100644--- a/apps/screenpipe-app-tauri/components/settings/apple-intelligence-card.tsx+++ b/apps/screenpipe-app-tauri/components/settings/apple-intelligence-card.tsx@@ -66,11 +66,25 @@ export function AppleIntelligenceCard() {setOs(platform());}, []);- // Load AI enabled state+ // Load AI enabled state — default to true only on macOS 26+ with 32GB+ RAMuseEffect(() => {try {const stored = localStorage?.getItem("apple-intelligence-enabled");- if (stored !== null) setEnabled(stored !== "false");+ if (stored !== null) {+ setEnabled(stored !== "false");+ return;+ }+ // No stored preference — auto-detect based on hardware+ if (platform() === "macos") {+ import("@/lib/utils/tauri").then(({ commands }) => {+ commands.getHardwareCapability().then((hw) => {+ const meetsRequirements = hw.totalMemoryGb >= 32;+ setEnabled(meetsRequirements);+ }).catch(() => {});+ });+ } else {+ setEnabled(false);+ }} catch {}}, []);diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lockindex d3a599021..6fc7be78d 100644--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock@@ -8223,7 +8223,7 @@ dependencies = [[[package]]name = "screenpipe-app"-version = "2.2.12"+version = "2.2.13"dependencies = ["anyhow","arboard",diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 1e0bc6e39..1ffb771e7 100644--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml@@ -1,6 +1,6 @@[package]name = "screenpipe-app"-version = "2.2.14"+version = "2.2.15"description = "24/7 memory for your desktop. 100% local."authors = ["you"]license = ""diff --git a/crates/screenpipe-audio/src/audio_manager/manager.rs b/crates/screenpipe-audio/src/audio_manager/manager.rsindex ae1c58c70..64d04c790 100644--- a/crates/screenpipe-audio/src/audio_manager/manager.rs+++ b/crates/screenpipe-audio/src/audio_manager/manager.rs@@ -163,6 +163,7 @@ impl AudioManager {let engine_ref = self.engine.clone();let on_insert_bg = self.on_transcription_insert.clone();let options_ref = self.options.clone();+ let seg_mgr = self.segmentation_manager.clone();tokio::spawn(async move {// Wait for model to load + initial recordingstokio::time::sleep(Duration::from_secs(120)).await;@@ -190,6 +191,7 @@ impl AudioManager {openai_config,langs,&vocab,+ Some(seg_mgr.clone()),).await;if count > 0 {@@ -524,6 +526,7 @@ impl AudioManager {openai_compatible_config.clone(),languages.clone(),&vocabulary,+ Some(segmentation_manager.clone()),).await;for _ in 0..count {diff --git a/crates/screenpipe-audio/src/audio_manager/reconciliation.rs b/crates/screenpipe-audio/src/audio_manager/reconciliation.rsindex b89953463..cde23d7bc 100644--- a/crates/screenpipe-audio/src/audio_manager/reconciliation.rs+++ b/crates/screenpipe-audio/src/audio_manager/reconciliation.rs@@ -9,7 +9,10 @@ use screenpipe_db::{DatabaseManager, UntranscribedChunk};use tracing::{debug, error, warn};use crate::core::engine::AudioTranscriptionEngine;+use crate::segmentation::segmentation_manager::SegmentationManager;+use crate::speaker::segment::get_segments;use crate::transcription::engine::{TranscriptionEngine, TranscriptionSession};+use crate::transcription::get_or_create_speaker_from_embedding;use crate::transcription::{AudioInsertCallback, AudioInsertInfo};use crate::transcription::VocabularyEntry;@@ -39,6 +42,7 @@ pub async fn reconcile_untranscribed(_openai_compatible_config: Option<OpenAICompatibleConfig>,_languages: Vec<Language>,_vocabulary: &[VocabularyEntry],+ segmentation_manager: Option<Arc<SegmentationManager>>,) -> usize {let since = chrono::Utc::now() - chrono::Duration::hours(24);let chunks = match db.get_untranscribed_chunks(since, 50).await {@@ -156,6 +160,13 @@ pub async fn reconcile_untranscribed(}};+ // Extract speaker embedding from the transcribed audio+ let speaker_id = if let Some(ref seg_mgr) = segmentation_manager {+ extract_speaker_id(db, &combined_samples, sample_rate, seg_mgr).await+ } else {+ None+ };+// Store the full batch transcription on the FIRST chunk.// Delete the remaining chunks (and their files) to avoid duplicates.let primary_chunk = valid_chunks[0];@@ -170,6 +181,7 @@ pub async fn reconcile_untranscribed(is_input,primary_chunk.timestamp,Some(batch_duration),+ speaker_id,).await{@@ -193,7 +205,7 @@ pub async fn reconcile_untranscribed(duration_secs: batch_duration,start_time: Some(0.0),end_time: Some(batch_duration),- speaker_id: None,+ speaker_id,capture_timestamp: capture_ts,});}@@ -218,6 +230,66 @@ pub async fn reconcile_untranscribed(success_count}+/// Run speaker segmentation on the audio samples and return the dominant speaker's DB id.+/// Falls back to None on any error so we never block transcription.+async fn extract_speaker_id(+ db: &DatabaseManager,+ samples: &[f32],+ sample_rate: u32,+ seg_mgr: &SegmentationManager,+) -> Option<i64> {+ let segments = match get_segments(+ samples,+ sample_rate,+ &seg_mgr.segmentation_model_path,+ seg_mgr.embedding_extractor.clone(),+ seg_mgr.embedding_manager.clone(),+ ) {+ Ok(iter) => iter,+ Err(e) => {+ debug!("reconciliation: speaker segmentation failed: {}", e);+ return None;+ }+ };++ // Find the segment with the longest duration (dominant speaker)+ let mut best_embedding: Option<Vec<f32>> = None;+ let mut best_duration: f64 = 0.0;++ for segment_result in segments {+ match segment_result {+ Ok(segment) => {+ if !segment.embedding.is_empty() {+ let duration = segment.end - segment.start;+ if duration > best_duration {+ best_duration = duration;+ best_embedding = Some(segment.embedding);+ }+ }+ }+ Err(e) => {+ debug!("reconciliation: segment extraction error: {}", e);+ }+ }+ }++ let embedding = best_embedding?;++ match get_or_create_speaker_from_embedding(db, &embedding).await {+ Ok(speaker) => {+ debug!(+ "reconciliation: matched speaker id={} for batch",+ speaker.id+ );+ Some(speaker.id)+ }+ Err(e) => {+ debug!("reconciliation: speaker matching failed: {}", e);+ None+ }+ }+}+/// Group chunks into batches of consecutive chunks from the same device./// Chunks are already ordered by timestamp ASC from the DB query.fn group_chunks_by_device(chunks: &[UntranscribedChunk]) -> Vec<Vec<&UntranscribedChunk>> {@@ -246,7 +318,8 @@ fn group_chunks_by_device(chunks: &[UntranscribedChunk]) -> Vec<Vec<&Untranscrib/// Extract device name and is_input from an audio file path./// Path format: `.../Device Name (output)_2026-02-27_23-15-38.mp4`-/// Returns (device_name, is_input).+/// Returns (device_name, is_input). The `(input)`/`(output)` suffix is stripped+/// to match the naming convention used by the normal transcription pipeline.fn extract_device_from_path(file_path: &str) -> (String, bool) {let filename = Path::new(file_path).file_stem()@@ -262,7 +335,15 @@ fn extract_device_from_path(file_path: &str) -> (String, bool) {};let is_input = device_part.contains("(input)");- (device_part.to_string(), is_input)++ // Strip the (input)/(output) suffix to match normal pipeline naming+ let clean_name = device_part+ .replace(" (input)", "")+ .replace(" (output)", "")+ .trim()+ .to_string();++ (clean_name, is_input)}#[cfg(test)]@@ -274,7 +355,7 @@ mod tests {let (name, is_input) = extract_device_from_path("/Users/user/.screenpipe/data/Display 3 (output)_2026-02-27_23-15-38.mp4",);- assert_eq!(name, "Display 3 (output)");+ assert_eq!(name, "Display 3");assert!(!is_input);}@@ -283,7 +364,7 @@ mod tests {let (name, is_input) = extract_device_from_path("/Users/user/.screenpipe/data/input (input)_2026-02-27_23-15-38.mp4",);- assert_eq!(name, "input (input)");+ assert_eq!(name, "input");assert!(is_input);}diff --git a/crates/screenpipe-audio/src/transcription/mod.rs b/crates/screenpipe-audio/src/transcription/mod.rsindex 371b992d8..9feb4c991 100644--- a/crates/screenpipe-audio/src/transcription/mod.rs+++ b/crates/screenpipe-audio/src/transcription/mod.rs@@ -36,6 +36,7 @@ pub mod text_utils;mod transcription_result;+pub use transcription_result::get_or_create_speaker_from_embedding;pub use transcription_result::process_transcription_result;pub use transcription_result::TranscriptionResult;mod handle_new_transcript;diff --git a/crates/screenpipe-audio/src/transcription/transcription_result.rs b/crates/screenpipe-audio/src/transcription/transcription_result.rsindex abe8c6a1b..a013f8683 100644--- a/crates/screenpipe-audio/src/transcription/transcription_result.rs+++ b/crates/screenpipe-audio/src/transcription/transcription_result.rs@@ -158,7 +158,7 @@ pub async fn process_transcription_result(}))}-async fn get_or_create_speaker_from_embedding(+pub async fn get_or_create_speaker_from_embedding(db: &DatabaseManager,embedding: &[f32],) -> Result<Speaker, anyhow::Error> {diff --git a/crates/screenpipe-db/src/db.rs b/crates/screenpipe-db/src/db.rsindex d3b630893..bf83834f7 100644--- a/crates/screenpipe-db/src/db.rs+++ b/crates/screenpipe-db/src/db.rs@@ -790,8 +790,15 @@ impl DatabaseManager {is_input_device: bool,timestamp: DateTime<Utc>,duration_secs: Option<f64>,+ speaker_id: Option<i64>,) -> Result<(), sqlx::Error> {- let text_length = transcription.len() as i64;+ // Skip empty transcriptions+ let trimmed = transcription.trim();+ if trimmed.is_empty() {+ return Ok(());+ }++ let text_length = trimmed.len() as i64;let start_time: f64 = 0.0;let end_time: f64 = duration_secs.unwrap_or(0.0);let mut tx = self.begin_immediate_with_retry().await?;@@ -802,11 +809,11 @@ impl DatabaseManager {.await?;sqlx::query(- "INSERT INTO audio_transcriptions (audio_chunk_id, transcription, text_length, offset_index, timestamp, transcription_engine, device, is_input_device, start_time, end_time)- VALUES (?1, ?2, ?3, 0, ?4, ?5, ?6, ?7, ?8, ?9)",+ "INSERT INTO audio_transcriptions (audio_chunk_id, transcription, text_length, offset_index, timestamp, transcription_engine, device, is_input_device, start_time, end_time, speaker_id)+ VALUES (?1, ?2, ?3, 0, ?4, ?5, ?6, ?7, ?8, ?9, ?10)",).bind(audio_chunk_id)- .bind(transcription)+ .bind(trimmed).bind(text_length).bind(timestamp).bind(engine)@@ -814,6 +821,7 @@ impl DatabaseManager {.bind(is_input_device).bind(start_time).bind(end_time)+ .bind(speaker_id).execute(&mut **tx.conn()).await?;diff --git a/crates/screenpipe-server/src/routes/retranscribe.rs b/crates/screenpipe-server/src/routes/retranscribe.rsindex 61bc84be6..71261db69 100644--- a/crates/screenpipe-server/src/routes/retranscribe.rs+++ b/crates/screenpipe-server/src/routes/retranscribe.rs@@ -233,6 +233,7 @@ pub async fn retranscribe_handler(is_input,timestamp,Some(duration_secs),+ None,).await{