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

Bump app to v2.0.591

Louis Beaumont6f47211a7ec6
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index ebd94e4e4..c3b56f356 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.590"
+version = "2.0.591"
dependencies = [
"anyhow",
"arboard",
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index e3fb88b97..dce0d9b84 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.590"
+version = "2.0.591"
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.rs
index 2c38d07a9..5a5ca09c0 100644
--- a/crates/screenpipe-audio/src/audio_manager/manager.rs
+++ b/crates/screenpipe-audio/src/audio_manager/manager.rs
@@ -40,7 +40,7 @@ use crate::{
stt::{process_audio_input, SAMPLE_RATE},
whisper::model::{create_whisper_context_parameters, download_whisper_model},
},
- utils::{audio::{normalize_v2, resample}, ffmpeg::{get_new_file_path, write_audio_to_file}},
+ utils::{audio::resample, ffmpeg::{get_new_file_path, write_audio_to_file}},
vad::{silero::SileroVad, webrtc::WebRtcVad, VadEngine, VadEngineEnum},
AudioInput, TranscriptionResult,
};
@@ -493,15 +493,13 @@ impl AudioManager {
while let Ok(audio) = whisper_receiver.recv() {
info!("Received audio from device: {:?}", audio.device.name);
- // Audio-based call detection: normalize first so the threshold works
- // consistently across devices with different native gain levels
+ // Audio-based call detection: update meeting detector with speech activity
if let Some(ref meeting) = meeting_detector {
- let normalized = normalize_v2(&audio.data);
let rms = {
- let sum_sq: f32 = normalized.iter().map(|&x| x * x).sum();
- (sum_sq / normalized.len() as f32).sqrt()
+ let sum_sq: f32 = audio.data.iter().map(|&x| x * x).sum();
+ (sum_sq / audio.data.len() as f32).sqrt()
};
- meeting.on_audio_activity(&audio.device.device_type, rms > 0.08);
+ meeting.on_audio_activity(&audio.device.device_type, rms > 0.05);
}
// ALWAYS persist audio to disk immediately, before any deferral.
diff --git a/crates/screenpipe-audio/src/vad/silero.rs b/crates/screenpipe-audio/src/vad/silero.rs
index 8f31522ec..06e594e7e 100644
--- a/crates/screenpipe-audio/src/vad/silero.rs
+++ b/crates/screenpipe-audio/src/vad/silero.rs
@@ -182,58 +182,41 @@ impl SileroVad {
impl VadEngine for SileroVad {
fn is_voice_segment(&mut self, audio_chunk: &[f32]) -> anyhow::Result<bool> {
- // Silero VAD v5 requires fixed 512 samples for 16kHz (~32ms).
- // Process all windows but only update history once per frame (with max prob)
- // to preserve FRAME_HISTORY as a history across frames, not within a frame.
+ // Silero VAD v5 requires fixed 512 samples for 16kHz (~32ms)
const CHUNK_SIZE: usize = 512;
let threshold = self.effective_speech_threshold();
- let mut max_prob: f32 = 0.0;
- for window in audio_chunk.chunks(CHUNK_SIZE) {
- let mut chunk_data = window.to_vec();
- chunk_data.resize(CHUNK_SIZE, 0.0);
+ let mut chunk_data: Vec<f32> = audio_chunk.to_vec();
+ chunk_data.resize(CHUNK_SIZE, 0.0);
- let result = self.vad.compute(&chunk_data).map_err(|e| {
- debug!("SileroVad Error computing VAD: {}", e);
- anyhow::anyhow!("Vad compute error: {}", e)
- })?;
+ let result = self.vad.compute(&chunk_data).map_err(|e| {
+ debug!("SileroVad Error computing VAD: {}", e);
+ anyhow::anyhow!("Vad compute error: {}", e)
+ })?;
- if result.prob > max_prob {
- max_prob = result.prob;
- }
- }
+ let status = self.update_status(result.prob);
- self.update_status(max_prob);
- Ok(max_prob > threshold)
+ Ok(status == VadStatus::Speech && result.prob > threshold)
}
fn audio_type(&mut self, audio_chunk: &[f32]) -> anyhow::Result<VadStatus> {
- // Silero VAD v5 requires fixed 512 samples for 16kHz (~32ms).
- // Process all windows but only update history once per frame (with max prob)
- // to preserve FRAME_HISTORY as a history across frames, not within a frame.
+ // Silero VAD v5 requires fixed 512 samples for 16kHz (~32ms)
const CHUNK_SIZE: usize = 512;
let threshold = self.effective_speech_threshold();
- let mut max_prob: f32 = 0.0;
-
- for window in audio_chunk.chunks(CHUNK_SIZE) {
- let mut chunk_data = window.to_vec();
- chunk_data.resize(CHUNK_SIZE, 0.0);
- let result = self.vad.compute(&chunk_data).map_err(|e| {
- debug!("SileroVad Error computing VAD: {}", e);
- anyhow::anyhow!("Vad compute error: {}", e)
- })?;
+ let mut chunk_data: Vec<f32> = audio_chunk.to_vec();
+ chunk_data.resize(CHUNK_SIZE, 0.0);
- if result.prob > max_prob {
- max_prob = result.prob;
- }
- }
+ let result = self.vad.compute(&chunk_data).map_err(|e| {
+ debug!("SileroVad Error computing VAD: {}", e);
+ anyhow::anyhow!("Vad compute error: {}", e)
+ })?;
- let status = self.update_status(max_prob);
+ let status = self.update_status(result.prob);
- if max_prob > threshold {
+ if status == VadStatus::Speech && result.prob > threshold {
return Ok(VadStatus::Speech);
}