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

Revert "fix(audio): cap recording/transcription channel capacity (stop multi-GB audio backlog)"

Ezra Ellettefb55bd002154
diff --git a/crates/screenpipe-config/src/defaults.rs b/crates/screenpipe-config/src/defaults.rs
index 6d0099942..5c80e4035 100644
--- a/crates/screenpipe-config/src/defaults.rs
+++ b/crates/screenpipe-config/src/defaults.rs
@@ -88,7 +88,7 @@ pub fn detect_tier() -> DeviceTier {
/// Database configuration tuned per device tier.
///
/// Controls SQLite PRAGMA values and connection pool sizes.
-/// `Default` returns the High-tier channel caps.
+/// `Default` returns the High-tier values matching the previous hardcoded settings.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct DbConfig {
/// SQLite `mmap_size` pragma in bytes.
@@ -192,7 +192,7 @@ pub const WAL_SAFETY_PRAGMAS: [(&str, &str); 4] = [
/// Audio/transcription channel capacities tuned per device tier.
///
/// Controls the `crossbeam::channel::bounded` sizes in `AudioManager`.
-/// `Default` returns the High-tier channel caps.
+/// `Default` returns the High-tier values matching the previous hardcoded settings.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ChannelConfig {
/// Capacity for the audio recording channel.
@@ -207,26 +207,23 @@ impl ChannelConfig {
match tier {
DeviceTier::High => Self::default(),
DeviceTier::Mid => Self {
- recording_capacity: 12,
- transcription_capacity: 12,
+ recording_capacity: 500,
+ transcription_capacity: 500,
},
DeviceTier::Low => Self {
- recording_capacity: 8,
- transcription_capacity: 8,
+ recording_capacity: 100,
+ transcription_capacity: 100,
},
}
}
}
impl Default for ChannelConfig {
- /// High-tier cap for the audio recording + transcription channels.
- /// Items are multi-MB audio segments; the previous 1000 allowed ~24GB of
- /// buffered audio to accumulate when transcription lagged. Bounded low so a
- /// slow transcriber drops old audio instead of leaking memory.
+ /// High-tier defaults — identical to the previous hardcoded values (1000).
fn default() -> Self {
Self {
- recording_capacity: 16,
- transcription_capacity: 16,
+ recording_capacity: 1000,
+ transcription_capacity: 1000,
}
}
}