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

fix: revert ort to rc.6 for x86_64 macOS compatibility, keep int8 parakeet

Louis Beaumonte69b9eadbc10
diff --git a/Cargo.lock b/Cargo.lock
index a0846194d..d4f3eddd1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -242,7 +242,7 @@ dependencies = [
[[package]]
name = "antirez-asr-sys"
version = "0.1.0"
-source = "git+https://github.com/screenpipe/audiopipe.git?rev=1f76ba0#1f76ba0ce178a3696e07fa84a037c4a9d3f8d399"
+source = "git+https://github.com/screenpipe/audiopipe.git?rev=ab853b7#ab853b7cfc1f15045d342fcb98e499ed85ceb4dc"
dependencies = [
"cc",
]
@@ -540,12 +540,12 @@ dependencies = [
[[package]]
name = "audiopipe"
version = "0.2.0"
-source = "git+https://github.com/screenpipe/audiopipe.git?rev=1f76ba0#1f76ba0ce178a3696e07fa84a037c4a9d3f8d399"
+source = "git+https://github.com/screenpipe/audiopipe.git?rev=ab853b7#ab853b7cfc1f15045d342fcb98e499ed85ceb4dc"
dependencies = [
"antirez-asr-sys",
"half",
"hf-hub 0.4.3",
- "ndarray 0.17.2",
+ "ndarray",
"ort",
"ort-sys",
"qwen3-asr-sys",
@@ -1177,7 +1177,7 @@ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
dependencies = [
"glob",
"libc",
- "libloading 0.8.9",
+ "libloading",
]
[[package]]
@@ -1961,7 +1961,7 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a"
dependencies = [
- "libloading 0.8.9",
+ "libloading",
]
[[package]]
@@ -3010,12 +3010,6 @@ dependencies = [
"digest 0.10.7",
]
-[[package]]
-name = "hmac-sha256"
-version = "1.1.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec9d92d097f4749b64e8cc33d924d9f40a2d4eb91402b458014b781f5733d60f"
-
[[package]]
name = "home"
version = "0.5.12"
@@ -3626,7 +3620,7 @@ checksum = "15ebe7cf9eae245a44ab76cabdd06c0b3769972fd06050ed9aea6a22ff0d682f"
dependencies = [
"eyre",
"knf-rs-sys",
- "ndarray 0.16.1",
+ "ndarray",
]
[[package]]
@@ -3786,16 +3780,6 @@ dependencies = [
"windows-link 0.2.1",
]
-[[package]]
-name = "libloading"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60"
-dependencies = [
- "cfg-if",
- "windows-link 0.2.1",
-]
-
[[package]]
name = "libm"
version = "0.2.16"
@@ -3994,12 +3978,6 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
-[[package]]
-name = "lzma-rust2"
-version = "0.15.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1670343e58806300d87950e3401e820b519b9384281bbabfb15e3636689ffd69"
-
[[package]]
name = "lzma-sys"
version = "0.1.20"
@@ -4261,21 +4239,6 @@ dependencies = [
"rawpointer",
]
-[[package]]
-name = "ndarray"
-version = "0.17.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "520080814a7a6b4a6e9070823bb24b4531daac8c4627e08ba5de8c5ef2f2752d"
-dependencies = [
- "matrixmultiply",
- "num-complex",
- "num-integer",
- "num-traits",
- "portable-atomic",
- "portable-atomic-util",
- "rawpointer",
-]
-
[[package]]
name = "ndk"
version = "0.8.0"
@@ -5071,28 +5034,28 @@ dependencies = [
[[package]]
name = "ort"
-version = "2.0.0-rc.12"
+version = "2.0.0-rc.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7de3af33d24a745ffb8fab904b13478438d1cd52868e6f17735ef6e1f8bf133"
+checksum = "a5f95fe501e1cb81dec2f66ee3129025759b602817aa2c77ff421390c418cc34"
dependencies = [
"half",
- "libloading 0.9.0",
- "ndarray 0.17.2",
+ "libloading",
+ "ndarray",
"ort-sys",
- "smallvec",
"tracing",
- "ureq 3.2.0",
]
[[package]]
name = "ort-sys"
-version = "2.0.0-rc.12"
+version = "2.0.0-rc.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7b497d21a8b6fbb4b5a544f8fadb77e801a09ae0add9e411d31c6f89e3c1e90"
+checksum = "b4174960a7b93a17564a05b26e05889f0dea9ee70e68db5841f27b40c0c9804e"
dependencies = [
- "hmac-sha256",
- "lzma-rust2",
- "ureq 3.2.0",
+ "flate2",
+ "pkg-config",
+ "sha2 0.10.9",
+ "tar",
+ "ureq 2.12.1",
]
[[package]]
@@ -5778,7 +5741,7 @@ checksum = "640c9bd8497b02465aeef5375144c26062e0dcd5939dfcbb0f5db76cb8c17c73"
[[package]]
name = "qwen3-asr-sys"
version = "0.1.0"
-source = "git+https://github.com/screenpipe/audiopipe.git?rev=1f76ba0#1f76ba0ce178a3696e07fa84a037c4a9d3f8d399"
+source = "git+https://github.com/screenpipe/audiopipe.git?rev=ab853b7#ab853b7cfc1f15045d342fcb98e499ed85ceb4dc"
dependencies = [
"cc",
"cmake",
@@ -6607,7 +6570,7 @@ dependencies = [
"libsamplerate-sys",
"log",
"mp3lame-encoder",
- "ndarray 0.17.2",
+ "ndarray",
"oasgen",
"objc",
"once_cell",
@@ -6695,6 +6658,7 @@ dependencies = [
"cron",
"dirs 5.0.1",
"ffmpeg-sidecar",
+ "futures",
"hex",
"hmac",
"lazy_static",
@@ -6706,6 +6670,7 @@ dependencies = [
"rand 0.8.5",
"regex",
"reqwest",
+ "screenpipe-events",
"serde",
"serde_json",
"serde_yaml",
@@ -8857,17 +8822,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdc97a28575b85cfedf2a7e7d3cc64b3e11bd8ac766666318003abbacc7a21fc"
dependencies = [
"base64 0.22.1",
- "der 0.7.10",
"flate2",
"log",
- "native-tls",
"percent-encoding",
"rustls 0.23.37",
"rustls-pki-types",
- "socks",
"ureq-proto",
"utf-8",
- "webpki-root-certs",
"webpki-roots 1.0.6",
]
@@ -8940,10 +8901,10 @@ dependencies = [
[[package]]
name = "vad-rs"
version = "0.2.0"
-source = "git+https://github.com/screenpipe/vad-rs-1.git#592ae9170def450ab0d26a4fe9da6346cdbe3492"
+source = "git+https://github.com/screenpipe/vad-rs-1.git#dd4d7cdf97635d2e74fc0b11b3f1035ae91609fc"
dependencies = [
"eyre",
- "ndarray 0.17.2",
+ "ndarray",
"ort",
"ort-sys",
"ringbuffer",
@@ -9236,15 +9197,6 @@ dependencies = [
"wasm-bindgen",
]
-[[package]]
-name = "webpki-root-certs"
-version = "1.0.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "804f18a4ac2676ffb4e8b5b5fa9ae38af06df08162314f96a68d2a363e21a8ca"
-dependencies = [
- "rustls-pki-types",
-]
-
[[package]]
name = "webpki-roots"
version = "0.24.0"
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index 7f01aa8a8..4e0d1b4bf 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -405,7 +405,7 @@ dependencies = [
[[package]]
name = "antirez-asr-sys"
version = "0.1.0"
-source = "git+https://github.com/screenpipe/audiopipe.git?rev=1f76ba0#1f76ba0ce178a3696e07fa84a037c4a9d3f8d399"
+source = "git+https://github.com/screenpipe/audiopipe.git?rev=ab853b7#ab853b7cfc1f15045d342fcb98e499ed85ceb4dc"
dependencies = [
"cc",
]
@@ -822,12 +822,12 @@ dependencies = [
[[package]]
name = "audiopipe"
version = "0.2.0"
-source = "git+https://github.com/screenpipe/audiopipe.git?rev=1f76ba0#1f76ba0ce178a3696e07fa84a037c4a9d3f8d399"
+source = "git+https://github.com/screenpipe/audiopipe.git?rev=ab853b7#ab853b7cfc1f15045d342fcb98e499ed85ceb4dc"
dependencies = [
"antirez-asr-sys",
"half",
"hf-hub 0.4.3",
- "ndarray 0.17.2",
+ "ndarray",
"ort",
"ort-sys",
"qwen3-asr-sys",
@@ -4521,12 +4521,6 @@ dependencies = [
"digest 0.10.7",
]
-[[package]]
-name = "hmac-sha256"
-version = "1.1.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec9d92d097f4749b64e8cc33d924d9f40a2d4eb91402b458014b781f5733d60f"
-
[[package]]
name = "home"
version = "0.5.12"
@@ -5414,7 +5408,7 @@ checksum = "15ebe7cf9eae245a44ab76cabdd06c0b3769972fd06050ed9aea6a22ff0d682f"
dependencies = [
"eyre",
"knf-rs-sys",
- "ndarray 0.16.1",
+ "ndarray",
]
[[package]]
@@ -5666,16 +5660,6 @@ dependencies = [
"windows-link 0.2.1",
]
-[[package]]
-name = "libloading"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60"
-dependencies = [
- "cfg-if 1.0.4",
- "windows-link 0.2.1",
-]
-
[[package]]
name = "libm"
version = "0.2.16"
@@ -5902,12 +5886,6 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
-[[package]]
-name = "lzma-rust2"
-version = "0.15.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1670343e58806300d87950e3401e820b519b9384281bbabfb15e3636689ffd69"
-
[[package]]
name = "lzma-sys"
version = "0.1.20"
@@ -6340,21 +6318,6 @@ dependencies = [
"rawpointer",
]
-[[package]]
-name = "ndarray"
-version = "0.17.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "520080814a7a6b4a6e9070823bb24b4531daac8c4627e08ba5de8c5ef2f2752d"
-dependencies = [
- "matrixmultiply",
- "num-complex",
- "num-integer",
- "num-traits",
- "portable-atomic",
- "portable-atomic-util",
- "rawpointer",
-]
-
[[package]]
name = "ndk"
version = "0.8.0"
@@ -7386,28 +7349,28 @@ dependencies = [
[[package]]
name = "ort"
-version = "2.0.0-rc.12"
+version = "2.0.0-rc.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7de3af33d24a745ffb8fab904b13478438d1cd52868e6f17735ef6e1f8bf133"
+checksum = "a5f95fe501e1cb81dec2f66ee3129025759b602817aa2c77ff421390c418cc34"
dependencies = [
"half",
- "libloading 0.9.0",
- "ndarray 0.17.2",
+ "libloading 0.8.9",
+ "ndarray",
"ort-sys",
- "smallvec",
"tracing",
- "ureq 3.3.0",
]
[[package]]
name = "ort-sys"
-version = "2.0.0-rc.12"
+version = "2.0.0-rc.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7b497d21a8b6fbb4b5a544f8fadb77e801a09ae0add9e411d31c6f89e3c1e90"
+checksum = "b4174960a7b93a17564a05b26e05889f0dea9ee70e68db5841f27b40c0c9804e"
dependencies = [
- "hmac-sha256",
- "lzma-rust2",
- "ureq 3.3.0",
+ "flate2",
+ "pkg-config",
+ "sha2 0.10.9",
+ "tar",
+ "ureq 2.12.1",
]
[[package]]
@@ -8444,7 +8407,7 @@ checksum = "478e0585659a122aa407eb7e3c0e1fa51b1d8a870038bd29f0cf4a8551eea972"
[[package]]
name = "qwen3-asr-sys"
version = "0.1.0"
-source = "git+https://github.com/screenpipe/audiopipe.git?rev=1f76ba0#1f76ba0ce178a3696e07fa84a037c4a9d3f8d399"
+source = "git+https://github.com/screenpipe/audiopipe.git?rev=ab853b7#ab853b7cfc1f15045d342fcb98e499ed85ceb4dc"
dependencies = [
"cc",
"cmake",
@@ -9643,7 +9606,7 @@ dependencies = [
"libsamplerate-sys",
"log",
"mp3lame-encoder",
- "ndarray 0.17.2",
+ "ndarray",
"oasgen",
"objc",
"once_cell",
@@ -9727,6 +9690,7 @@ dependencies = [
"cron",
"dirs 5.0.1",
"ffmpeg-sidecar",
+ "futures",
"hex",
"hmac",
"lazy_static",
@@ -9738,6 +9702,7 @@ dependencies = [
"rand 0.8.5",
"regex",
"reqwest 0.12.12",
+ "screenpipe-events",
"serde",
"serde_json",
"serde_yaml",
@@ -13224,7 +13189,6 @@ dependencies = [
"percent-encoding",
"rustls 0.23.37",
"rustls-pki-types",
- "socks",
"ureq-proto",
"utf8-zero",
"webpki-root-certs",
@@ -13351,10 +13315,10 @@ dependencies = [
[[package]]
name = "vad-rs"
version = "0.2.0"
-source = "git+https://github.com/screenpipe/vad-rs-1.git#592ae9170def450ab0d26a4fe9da6346cdbe3492"
+source = "git+https://github.com/screenpipe/vad-rs-1.git#dd4d7cdf97635d2e74fc0b11b3f1035ae91609fc"
dependencies = [
"eyre",
- "ndarray 0.17.2",
+ "ndarray",
"ort",
"ort-sys",
"ringbuffer",
diff --git a/crates/screenpipe-audio/Cargo.toml b/crates/screenpipe-audio/Cargo.toml
index 30edf79ec..bd2af3d38 100644
--- a/crates/screenpipe-audio/Cargo.toml
+++ b/crates/screenpipe-audio/Cargo.toml
@@ -77,13 +77,13 @@ dirs = "5.0.1"
sysinfo = "0.29.0"
lazy_static = { version = "1.4.0" }
realfft = "3.4.0"
-ndarray = "0.17"
+ndarray = "0.16"
# Base ort dep — each platform overrides with specific features below
-ort = { version = "=2.0.0-rc.12", default-features = false, features = ["ndarray", "half"] }
-ort-sys = { version = "=2.0.0-rc.12", default-features = false }
+ort = { version = "=2.0.0-rc.6", default-features = false, features = ["ndarray", "half"] }
+ort-sys = { version = "=2.0.0-rc.6", default-features = false }
knf-rs = "0.3.2"
futures = "0.3.31"
-audiopipe = { git = "https://github.com/screenpipe/audiopipe.git", rev = "1f76ba0", default-features = false, features = ["qwen3-asr-antirez-blas", "parakeet"], optional = true }
+audiopipe = { git = "https://github.com/screenpipe/audiopipe.git", rev = "ab853b7", default-features = false, features = ["qwen3-asr-antirez-blas", "parakeet"], optional = true }
bytes = { version = "1.9.0", features = ["serde"] }
rand = "0.9.0"
@@ -92,7 +92,7 @@ libpulse-binding = { version = "2.28", optional = true }
libpulse-simple-binding = { version = "2.28", optional = true }
# Bundle ONNX Runtime on Linux (same as macOS). load-dynamic was tried but
# broke systems without a system-installed libonnxruntime.so (see #2506).
-ort = { version = "=2.0.0-rc.12", features = ["download-binaries"] }
+ort = { version = "=2.0.0-rc.6", features = ["download-binaries"] }
# Windows COM API for querying the "Default Communications Device" role.
# MS Teams/Zoom route audio to the eCommunications endpoint, which may
@@ -106,7 +106,7 @@ windows = { version = "0.58", features = [
] }
[target.'cfg(all(target_os = "windows", target_arch = "x86_64"))'.dependencies]
-ort = { version = "=2.0.0-rc.12", features = [
+ort = { version = "=2.0.0-rc.6", features = [
"download-binaries",
"copy-dylibs",
] }
@@ -116,8 +116,8 @@ libsamplerate-sys = "0.1.10"
# Windows ARM64: use our own ONNX Runtime DLL at runtime (load-dynamic); no compile-time link, no ort.pyke.io cache
[target.'cfg(all(target_os = "windows", target_arch = "aarch64"))'.dependencies]
-ort = { version = "=2.0.0-rc.12", default-features = false, features = ["load-dynamic"] }
-ort-sys = { version = "=2.0.0-rc.12", default-features = false }
+ort = { version = "=2.0.0-rc.6", default-features = false, features = ["load-dynamic"] }
+ort-sys = { version = "=2.0.0-rc.6", default-features = false }
esaxx-rs = "0.1.10"
samplerate = { version = "0.2.4" }
libsamplerate-sys = "0.1.10"
@@ -125,7 +125,7 @@ libsamplerate-sys = "0.1.10"
[target.'cfg(target_os = "macos")'.dependencies]
once_cell = "1.17.1"
objc = "0.2.7"
-ort = { version = "=2.0.0-rc.12", features = ["download-binaries"] }
+ort = { version = "=2.0.0-rc.6", features = ["download-binaries"] }
[dev-dependencies]
tempfile = "3.3.0"
diff --git a/crates/screenpipe-audio/src/speaker/embedding.rs b/crates/screenpipe-audio/src/speaker/embedding.rs
index 91d1d8fb9..65d94d158 100644
--- a/crates/screenpipe-audio/src/speaker/embedding.rs
+++ b/crates/screenpipe-audio/src/speaker/embedding.rs
@@ -1,6 +1,6 @@
use anyhow::{Context, Result};
use ndarray::Array2;
-use ort::session::Session;
+use ort::Session;
use std::path::Path;
#[derive(Debug)]
@@ -14,23 +14,17 @@ impl EmbeddingExtractor {
Ok(Self { session })
}
pub fn compute(&mut self, samples: &[f32]) -> Result<impl Iterator<Item = f32>> {
- let fbank = knf_rs::compute_fbank(samples)
+ let features: Array2<f32> = knf_rs::compute_fbank(samples)
.map_err(anyhow::Error::msg)
.context("compute_fbank failed")?;
- // knf-rs uses ndarray 0.16, convert to ndarray 0.17 by extracting raw data
- let shape = fbank.shape();
- let (rows, cols) = (shape[0], shape[1]);
- let raw_data: Vec<f32> = fbank.iter().copied().collect();
- let features = Array2::from_shape_vec((rows, cols), raw_data)
- .context("failed to reconstruct fbank array")?;
let features = features.insert_axis(ndarray::Axis(0)); // Add batch dimension
- let inputs = ort::inputs! ["feats" => ort::value::TensorRef::from_array_view(features.view())?];
+ let inputs = ort::inputs! ["feats" => features.view()]?;
let ort_outs = self.session.run(inputs)?;
let ort_out = ort_outs
.get("embs")
.context("Output tensor not found")?
- .try_extract_array::<f32>()
+ .try_extract_tensor::<f32>()
.context("Failed to extract tensor")?;
// Collect the tensor data into a Vec to own it
diff --git a/crates/screenpipe-audio/src/speaker/mod.rs b/crates/screenpipe-audio/src/speaker/mod.rs
index 21d37a0c9..3c310dbc5 100644
--- a/crates/screenpipe-audio/src/speaker/mod.rs
+++ b/crates/screenpipe-audio/src/speaker/mod.rs
@@ -3,17 +3,14 @@ pub mod embedding;
use std::path::Path;
use anyhow::Result;
-use ort::session::{builder::GraphOptimizationLevel, Session};
+use ort::{GraphOptimizationLevel, Session};
pub fn create_session<P: AsRef<Path>>(path: P) -> Result<Session> {
- let mut builder = Session::builder()?
- .with_optimization_level(GraphOptimizationLevel::Level3)
- .map_err(|e| anyhow::anyhow!("{e}"))?
- .with_intra_threads(1)
- .map_err(|e| anyhow::anyhow!("{e}"))?
- .with_inter_threads(1)
- .map_err(|e| anyhow::anyhow!("{e}"))?;
- let session = builder.commit_from_file(path.as_ref())?;
+ let session = Session::builder()?
+ .with_optimization_level(GraphOptimizationLevel::Level3)?
+ .with_intra_threads(1)?
+ .with_inter_threads(1)?
+ .commit_from_file(path.as_ref())?;
Ok(session)
}
pub mod embedding_manager;
diff --git a/crates/screenpipe-audio/src/speaker/segment.rs b/crates/screenpipe-audio/src/speaker/segment.rs
index 06c13ec9c..30fc852f6 100644
--- a/crates/screenpipe-audio/src/speaker/segment.rs
+++ b/crates/screenpipe-audio/src/speaker/segment.rs
@@ -121,7 +121,7 @@ fn handle_new_segment(
pub struct SegmentIterator {
samples: Vec<f32>,
sample_rate: u32,
- session: ort::session::Session,
+ session: ort::Session,
embedding_extractor: Arc<Mutex<EmbeddingExtractor>>,
embedding_manager: Arc<Mutex<EmbeddingManager>>,
current_position: usize,
@@ -176,7 +176,7 @@ impl SegmentIterator {
.insert_axis(Axis(1))
.to_owned();
- let inputs = ort::inputs![ort::value::Tensor::from_array(array)?];
+ let inputs = ort::inputs![array].context("Failed to prepare inputs")?;
let ort_outs = self
.session
.run(inputs)
@@ -184,7 +184,7 @@ impl SegmentIterator {
let ort_out = ort_outs.get("output").context("Output tensor not found")?;
let ort_out = ort_out
- .try_extract_array::<f32>()
+ .try_extract_tensor::<f32>()
.context("Failed to extract tensor")?;
let mut result = None;