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.0.602
Louis Beaumontae1d5c35e641
diff --git a/apps/screenpipe-app-tauri/components/conversation-bubble.tsx b/apps/screenpipe-app-tauri/components/conversation-bubble.tsxindex aa8cb1f11..549400e69 100644--- a/apps/screenpipe-app-tauri/components/conversation-bubble.tsx+++ b/apps/screenpipe-app-tauri/components/conversation-bubble.tsx@@ -38,6 +38,7 @@ export interface ConversationBubbleProps {isFirstInGroup: boolean;isPlaying: boolean;startOffsetSecs?: number;+ highlighted?: boolean;onPlay: () => void;onSpeakerAssigned: (newId: number, newName: string) => void;onTimestampClick?: () => void;@@ -56,6 +57,7 @@ export function ConversationBubble({isFirstInGroup,isPlaying,startOffsetSecs,+ highlighted,onPlay,onSpeakerAssigned,onTimestampClick,@@ -74,7 +76,8 @@ export function ConversationBubble({getSpeakerColorClass(speakerId),isFirstInGroup ? "mt-3" : "mt-1",// Brand style: sharp corners, 150ms transitions- "animate-in fade-in-0 slide-in-from-bottom-2 duration-150"+ "animate-in fade-in-0 slide-in-from-bottom-2 duration-150",+ highlighted && "ring-1 ring-foreground/20 bg-muted/30")}>{/* Header - only show for first in group */}diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline/audio-transcript.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline/audio-transcript.tsxindex 893e90587..1da0e5d66 100644--- a/apps/screenpipe-app-tauri/components/rewind/timeline/audio-transcript.tsx+++ b/apps/screenpipe-app-tauri/components/rewind/timeline/audio-transcript.tsx@@ -421,21 +421,22 @@ export function AudioTranscript({const handleRetranscribe = useCallback(async () => {if (isRetranscribing) return; // prevent double-submitconst data = tabMode === "meeting" ? meetingConversationData : conversationData;- if (!data.items.length || !data.timeRange) return;+ if (!data.items.length) return;setShowRetranscribeDialog(false);setIsRetranscribing(true);try {+ // Collect unique audio_chunk_ids from visible items (avoids timestamp mismatch)+ const chunkIds = [...new Set(data.items.map((item) => item.audio.audio_chunk_id))];const body: Record<string, unknown> = {- start: data.timeRange.start.toISOString(),- end: data.timeRange.end.toISOString(),+ audio_chunk_ids: chunkIds,};if (retranscribePrompt.trim()) {body.prompt = retranscribePrompt.trim();}- console.log("[retranscribe] request:", JSON.stringify(body));+ console.log("[retranscribe] request:", chunkIds.length, "chunks");const res = await fetch("http://localhost:3030/audio/retranscribe", {method: "POST",@@ -730,15 +731,20 @@ export function AudioTranscript({<TooltipContent side="bottom"><p>{copied ? "copied!" : "copy"}</p></TooltipContent></Tooltip><DropdownMenu>- <DropdownMenuTrigger asChild>- <Button variant="ghost" size="sm" className="h-6 w-6 p-0">- {isRetranscribing ? (- <Loader2 className="h-3 w-3 animate-spin" />- ) : (- <MoreVertical className="h-3 w-3" />- )}- </Button>- </DropdownMenuTrigger>+ <Tooltip>+ <TooltipTrigger asChild>+ <DropdownMenuTrigger asChild>+ <Button variant="ghost" size="sm" className="h-6 w-6 p-0">+ {isRetranscribing ? (+ <Loader2 className="h-3 w-3 animate-spin" />+ ) : (+ <MoreVertical className="h-3 w-3" />+ )}+ </Button>+ </DropdownMenuTrigger>+ </TooltipTrigger>+ <TooltipContent side="bottom"><p>{isRetranscribing ? "retranscribing..." : "more"}</p></TooltipContent>+ </Tooltip><DropdownMenuContent align="end" className="w-44"><DropdownMenuItemonClick={() => setShowRetranscribeDialog(true)}@@ -798,6 +804,14 @@ export function AudioTranscript({WebkitOverflowScrolling: "touch",}}>+ {/* Retranscribing banner */}+ {isRetranscribing && (+ <div className="flex items-center gap-2 px-3 py-2 border-b border-border bg-muted/50 text-xs text-muted-foreground">+ <Loader2 className="h-3 w-3 animate-spin shrink-0" />+ <span>retranscribing audio — this may take a moment...</span>+ </div>+ )}+{tabMode === "meeting" && activeMeeting ? (// Full meeting transcript view<div className="p-3 pb-14 space-y-0">@@ -859,6 +873,7 @@ export function AudioTranscript({playing === item.audio.audio_file_path}startOffsetSecs={item.audio.start_offset}+ highlighted={transcriptionOverrides.has(item.audio.audio_chunk_id)}onPlay={() =>handlePlay(item.audio.audio_file_path)}@@ -914,6 +929,7 @@ export function AudioTranscript({isFirstInGroup={item.isFirstInGroup}isPlaying={playing === item.audio.audio_file_path}startOffsetSecs={item.audio.start_offset}+ highlighted={transcriptionOverrides.has(item.audio.audio_chunk_id)}onPlay={() => handlePlay(item.audio.audio_file_path)}onSpeakerAssigned={(newId, newName) =>handleSpeakerAssigned(@@ -949,10 +965,16 @@ export function AudioTranscript({<DialogTitle className="text-sm">retranscribe audio</DialogTitle></DialogHeader><div className="space-y-3">- <p className="text-xs text-muted-foreground">- re-run speech-to-text on all audio chunks in the current view.- optionally provide a prompt to guide transcription (e.g. speaker names, technical terms, language).- </p>+ {(() => {+ const data = tabMode === "meeting" ? meetingConversationData : conversationData;+ const chunkCount = new Set(data.items.map((item) => item.audio.audio_chunk_id)).size;+ return (+ <p className="text-xs text-muted-foreground">+ re-run speech-to-text on {chunkCount} audio chunk{chunkCount !== 1 ? "s" : ""}.+ optionally provide a prompt to guide transcription (e.g. speaker names, technical terms).+ </p>+ );+ })()}<Inputplaceholder="optional prompt (e.g. 'speakers: marc, ben. topic: AI startups')"value={retranscribePrompt}@@ -961,6 +983,7 @@ export function AudioTranscript({if (e.key === "Enter") handleRetranscribe();}}className="text-xs"+ autoFocus/></div><DialogFooter>diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lockindex fad9d46bb..4e5470eb4 100644--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock@@ -8183,7 +8183,7 @@ dependencies = [[[package]]name = "screenpipe-app"-version = "2.0.601"+version = "2.0.602"dependencies = ["anyhow","arboard",diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 3f078de52..75f204186 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.0.601"+version = "2.0.602"description = "24/7 memory for your desktop. 100% local."authors = ["you"]license = ""diff --git a/crates/screenpipe-db/src/db.rs b/crates/screenpipe-db/src/db.rsindex 98ec7c467..4e1e26701 100644--- a/crates/screenpipe-db/src/db.rs+++ b/crates/screenpipe-db/src/db.rs@@ -838,6 +838,34 @@ impl DatabaseManager {Ok(rows)}+ /// Get audio chunks by explicit IDs (used by re-transcribe when frontend sends chunk IDs).+ pub async fn get_audio_chunks_by_ids(+ &self,+ ids: &[i64],+ ) -> Result<Vec<AudioChunkInfo>, sqlx::Error> {+ if ids.is_empty() {+ return Ok(vec![]);+ }+ // Build placeholder list: (?1, ?2, ?3, ...)+ let placeholders: Vec<String> = (1..=ids.len()).map(|i| format!("?{}", i)).collect();+ let sql = format!(+ r#"SELECT ac.id, ac.file_path, at.transcription, at.transcription_engine,+ at.offset_index, COALESCE(at.timestamp, ac.timestamp) as timestamp,+ at.device, at.is_input_device+ FROM audio_chunks ac+ LEFT JOIN audio_transcriptions at ON ac.id = at.audio_chunk_id+ WHERE ac.id IN ({})+ ORDER BY ac.timestamp ASC"#,+ placeholders.join(", ")+ );+ let mut query = sqlx::query_as::<_, AudioChunkInfo>(&sql);+ for id in ids {+ query = query.bind(id);+ }+ let rows = query.fetch_all(&self.pool).await?;+ Ok(rows)+ }+pub async fn insert_speaker(&self, embedding: &[f32]) -> Result<Speaker, SqlxError> {let mut tx = self.begin_immediate_with_retry().await?;diff --git a/crates/screenpipe-server/src/routes/retranscribe.rs b/crates/screenpipe-server/src/routes/retranscribe.rsindex 0d410600a..98a499120 100644--- a/crates/screenpipe-server/src/routes/retranscribe.rs+++ b/crates/screenpipe-server/src/routes/retranscribe.rs@@ -13,14 +13,17 @@ use serde::{Deserialize, Serialize};use serde_json::json;use std::path::Path;use std::sync::Arc;-use tracing::{debug, error, info};+use tracing::{error, info};use crate::server::AppState;#[derive(Debug, Deserialize)]pub struct RetranscribeRequest {- pub start: DateTime<Utc>,- pub end: DateTime<Utc>,+ /// Explicit chunk IDs to retranscribe (preferred — avoids timestamp mismatches)+ pub audio_chunk_ids: Option<Vec<i64>>,+ /// Fallback: time range to query chunks (used when audio_chunk_ids is absent)+ pub start: Option<DateTime<Utc>>,+ pub end: Option<DateTime<Utc>>,/// Optional engine override: "whisper-large-v3", "deepgram", etc.pub engine: Option<String>,/// Custom vocabulary for this re-transcription@@ -50,29 +53,40 @@ pub async fn retranscribe_handler(State(state): State<Arc<AppState>>,Json(request): Json<RetranscribeRequest>,) -> Response {- info!(- "retranscribe request: {} to {}",- request.start, request.end- );-- // 1. Query audio chunks in range- let chunks = match state- .db- .get_audio_chunks_in_range(request.start, request.end)- .await- {- Ok(c) => c,- Err(e) => {- error!("failed to query audio chunks: {}", e);- return error_response(- StatusCode::INTERNAL_SERVER_ERROR,- format!("db query failed: {}", e),- );+ // 1. Query audio chunks — by explicit IDs (preferred) or time range (fallback)+ let chunks = if let Some(ref ids) = request.audio_chunk_ids {+ info!("retranscribe request: {} explicit chunk IDs", ids.len());+ match state.db.get_audio_chunks_by_ids(ids).await {+ Ok(c) => c,+ Err(e) => {+ error!("failed to query audio chunks by IDs: {}", e);+ return error_response(+ StatusCode::INTERNAL_SERVER_ERROR,+ format!("db query failed: {}", e),+ );+ }}+ } else if let (Some(start), Some(end)) = (request.start, request.end) {+ info!("retranscribe request: {} to {}", start, end);+ match state.db.get_audio_chunks_in_range(start, end).await {+ Ok(c) => c,+ Err(e) => {+ error!("failed to query audio chunks: {}", e);+ return error_response(+ StatusCode::INTERNAL_SERVER_ERROR,+ format!("db query failed: {}", e),+ );+ }+ }+ } else {+ return error_response(+ StatusCode::BAD_REQUEST,+ "must provide audio_chunk_ids or start+end time range".into(),+ );};if chunks.is_empty() {- info!("retranscribe: no audio chunks found in range");+ info!("retranscribe: no audio chunks found");return JsonResponse(json!({"chunks_processed": 0,"transcriptions": []@@ -80,7 +94,7 @@ pub async fn retranscribe_handler(.into_response();}- debug!("retranscribe: found {} raw rows (may include dupes)", chunks.len());+ info!("retranscribe: found {} raw rows (may include dupes)", chunks.len());// 2. Get transcription config from audio managerlet audio_manager = &state.audio_manager;