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
fix: use capture timestamp for audio DB records + guard empty meeting detection
Louis Beaumontdba04b41b3f0
diff --git a/crates/screenpipe-audio/src/audio_manager/manager.rs b/crates/screenpipe-audio/src/audio_manager/manager.rsindex e81c32729..623860e1d 100644--- a/crates/screenpipe-audio/src/audio_manager/manager.rs+++ b/crates/screenpipe-audio/src/audio_manager/manager.rs@@ -431,10 +431,17 @@ impl AudioManager {let mut was_paused = false;while meeting.is_in_meeting() {+ // Only defer if we can identify the meeting app.+ // Audio-based detection can fire with no app name+ // (e.g. YouTube + ambient mic noise) — skip those.+ let meeting_app = meeting.current_meeting_app().await;+ if meeting_app.is_none() {+ break;+ }if !was_paused {warn!("smart mode: meeting detected ({}), deferring transcription",- meeting.current_meeting_app().await.unwrap_or_default()+ meeting_app.unwrap_or_default());metrics.record_batch_pause();was_paused = true;diff --git a/crates/screenpipe-audio/src/transcription/transcription_result.rs b/crates/screenpipe-audio/src/transcription/transcription_result.rsindex b17f40227..4e899165f 100644--- a/crates/screenpipe-audio/src/transcription/transcription_result.rs+++ b/crates/screenpipe-audio/src/transcription/transcription_result.rs@@ -116,13 +116,12 @@ pub async fn process_transcription_result(}}}- // Use current time for DB insertion instead of capture_timestamp.- // The capture_timestamp is set when audio enters the processing channel,- // but smart mode meeting deferral creates a growing backlog — by the time- // audio is processed, the capture_timestamp can be 20+ minutes stale.- // Using None here makes the DB fall back to Utc::now(), which is close- // to when the audio was actually processed and the MP4 file was written.- let capture_ts: Option<DateTime<Utc>> = None;+ // Use the original capture timestamp so audio appears at the correct+ // position on the timeline. Previously this was None (falling back to+ // Utc::now() at processing time), which placed deferred audio at the+ // wrong time — e.g. a meeting recorded at 5:15 PM would show at 5:35 PM+ // if smart mode deferred transcription by 20 minutes.+ let capture_ts: Option<DateTime<Utc>> = DateTime::from_timestamp(result.timestamp as i64, 0);match db.insert_audio_chunk_and_transcription(