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: delete silent chunks instead of storing empty transcription rows
Louis Beaumontcb2cc205f4c1
diff --git a/crates/screenpipe-audio/src/audio_manager/reconciliation.rs b/crates/screenpipe-audio/src/audio_manager/reconciliation.rsindex 23a63c52b..91ebf51af 100644--- a/crates/screenpipe-audio/src/audio_manager/reconciliation.rs+++ b/crates/screenpipe-audio/src/audio_manager/reconciliation.rs@@ -215,6 +215,23 @@ pub async fn reconcile_untranscribed(}};+ // Silent audio: delete all chunks in this batch so they don't zombie-loop+ if full_text.trim().is_empty() {+ debug!(+ "reconciliation: batch for {} produced empty transcription, deleting {} silent chunks",+ device_name,+ valid_chunks.len()+ );+ for chunk in &valid_chunks {+ if let Err(e) = db.delete_audio_chunk(chunk.id).await {+ warn!("reconciliation: failed to delete silent chunk {}: {}", chunk.id, e);+ }+ let _ = std::fs::remove_file(&chunk.file_path);+ }+ success_count += valid_chunks.len();+ continue;+ }+// Extract speaker embedding from the transcribed audiolet speaker_id = if let Some(ref seg_mgr) = segmentation_manager {extract_speaker_id(db, &combined_samples, sample_rate, seg_mgr).awaitdiff --git a/crates/screenpipe-db/src/db.rs b/crates/screenpipe-db/src/db.rsindex 3555da8c4..c22b35ed4 100644--- a/crates/screenpipe-db/src/db.rs+++ b/crates/screenpipe-db/src/db.rs@@ -792,10 +792,11 @@ impl DatabaseManager {duration_secs: Option<f64>,speaker_id: Option<i64>,) -> Result<(), sqlx::Error> {- // For empty/silent transcriptions, store a marker so the chunk is marked as- // "done" and won't be re-picked by reconciliation sweeps forever.+ // Skip empty transcriptionslet trimmed = transcription.trim();- let trimmed = if trimmed.is_empty() { "" } else { trimmed };+ if trimmed.is_empty() {+ return Ok(());+ }let text_length = trimmed.len() as i64;let start_time: f64 = 0.0;