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

feat: add parakeet-mlx engine — 8x faster than whisper on Apple GPU

Louis Beaumonta65c2a0c38ed
diff --git a/Cargo.lock b/Cargo.lock
index 94b421b59..dd338ae89 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=3afd3f8#3afd3f88e235e223504f05393895560fe0265ba3"
+source = "git+https://github.com/screenpipe/audiopipe.git?rev=123212e#123212e0d10ef24357993e8dcfe2e896ba6126a3"
dependencies = [
"cc",
]
@@ -540,16 +540,18 @@ dependencies = [
[[package]]
name = "audiopipe"
version = "0.2.0"
-source = "git+https://github.com/screenpipe/audiopipe.git?rev=3afd3f8#3afd3f88e235e223504f05393895560fe0265ba3"
+source = "git+https://github.com/screenpipe/audiopipe.git?rev=123212e#123212e0d10ef24357993e8dcfe2e896ba6126a3"
dependencies = [
"antirez-asr-sys",
"half",
"hf-hub 0.4.3",
+ "mlx-rs",
"ndarray",
"ort",
"ort-sys",
"qwen3-asr-sys",
"realfft",
+ "safetensors",
"serde",
"serde_json",
"thiserror 2.0.18",
@@ -782,6 +784,26 @@ dependencies = [
"which 4.4.2",
]
+[[package]]
+name = "bindgen"
+version = "0.70.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f"
+dependencies = [
+ "bitflags 2.11.0",
+ "cexpr",
+ "clang-sys",
+ "itertools 0.12.1",
+ "log",
+ "prettyplease",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "rustc-hash 1.1.0",
+ "shlex",
+ "syn 2.0.117",
+]
+
[[package]]
name = "bindgen"
version = "0.72.1"
@@ -1283,7 +1305,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
- "windows-sys 0.48.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -1762,6 +1784,41 @@ dependencies = [
"syn 2.0.117",
]
+[[package]]
+name = "darling"
+version = "0.21.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.21.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim 0.11.1",
+ "syn 2.0.117",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.21.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn 2.0.117",
+]
+
[[package]]
name = "dashmap"
version = "6.1.0"
@@ -2022,6 +2079,12 @@ version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
+[[package]]
+name = "dyn-clone"
+version = "1.0.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
+
[[package]]
name = "ecdsa"
version = "0.16.9"
@@ -3179,7 +3242,7 @@ dependencies = [
"hyper",
"libc",
"pin-project-lite",
- "socket2 0.5.10",
+ "socket2 0.6.3",
"tokio",
"tower-service",
"tracing",
@@ -3296,6 +3359,12 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
[[package]]
name = "idna"
version = "1.1.0"
@@ -3989,6 +4058,15 @@ dependencies = [
"pkg-config",
]
+[[package]]
+name = "mach-sys"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48460c2e82a3a0de197152fdf8d2c2d5e43adc501501553e439bf2156e6f87c7"
+dependencies = [
+ "fastrand",
+]
+
[[package]]
name = "mach2"
version = "0.4.3"
@@ -4141,6 +4219,66 @@ dependencies = [
"windows-sys 0.61.2",
]
+[[package]]
+name = "mlx-internal-macros"
+version = "0.25.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a7c4444d624bf6b93db5cc22ebff4fdfa13593fd56154fe33b1f302a557c2c6"
+dependencies = [
+ "darling",
+ "itertools 0.14.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.117",
+]
+
+[[package]]
+name = "mlx-macros"
+version = "0.25.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a819ee8b4434690572b6feb9c3ef0b6e90137e4190b340cf00150703b410aaf9"
+dependencies = [
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.117",
+]
+
+[[package]]
+name = "mlx-rs"
+version = "0.25.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3a0f592c5839b0237b3072530b1d3c503923579a2009ee0761df3edd1b1f27b"
+dependencies = [
+ "dyn-clone",
+ "half",
+ "itertools 0.14.0",
+ "libc",
+ "mach-sys",
+ "mlx-internal-macros",
+ "mlx-macros",
+ "mlx-sys",
+ "num-complex",
+ "num-traits",
+ "num_enum",
+ "parking_lot",
+ "paste",
+ "smallvec",
+ "strum",
+ "thiserror 2.0.18",
+]
+
+[[package]]
+name = "mlx-sys"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2e3bc3880111918b2d5018f845d48fd995f9901f16efc81d1fcfd2f4210b8219"
+dependencies = [
+ "bindgen 0.70.1",
+ "cc",
+ "cmake",
+]
+
[[package]]
name = "moka"
version = "0.12.14"
@@ -5681,7 +5819,7 @@ dependencies = [
"quinn-udp",
"rustc-hash 2.1.1",
"rustls 0.23.37",
- "socket2 0.5.10",
+ "socket2 0.6.3",
"thiserror 2.0.18",
"tokio",
"tracing",
@@ -5718,7 +5856,7 @@ dependencies = [
"cfg_aliases",
"libc",
"once_cell",
- "socket2 0.5.10",
+ "socket2 0.6.3",
"tracing",
"windows-sys 0.60.2",
]
@@ -5741,7 +5879,7 @@ checksum = "640c9bd8497b02465aeef5375144c26062e0dcd5939dfcbb0f5db76cb8c17c73"
[[package]]
name = "qwen3-asr-sys"
version = "0.1.0"
-source = "git+https://github.com/screenpipe/audiopipe.git?rev=3afd3f8#3afd3f88e235e223504f05393895560fe0265ba3"
+source = "git+https://github.com/screenpipe/audiopipe.git?rev=123212e#123212e0d10ef24357993e8dcfe2e896ba6126a3"
dependencies = [
"cc",
"cmake",
@@ -6434,6 +6572,16 @@ dependencies = [
"bytemuck",
]
+[[package]]
+name = "safetensors"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44560c11236a6130a46ce36c836a62936dc81ebf8c36a37947423571be0e55b6"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
[[package]]
name = "salsa20"
version = "0.10.2"
@@ -6569,6 +6717,7 @@ dependencies = [
"libpulse-simple-binding",
"libsamplerate-sys",
"log",
+ "mlx-rs",
"mp3lame-encoder",
"ndarray",
"oasgen",
@@ -7746,6 +7895,27 @@ dependencies = [
"syn 2.0.117",
]
+[[package]]
+name = "strum"
+version = "0.27.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.27.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.117",
+]
+
[[package]]
name = "subprocess"
version = "0.2.15"
@@ -9344,7 +9514,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
- "windows-sys 0.48.0",
+ "windows-sys 0.61.2",
]
[[package]]
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index 42297b21b..24b2624ef 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -201,6 +201,8 @@ apple-intelligence = ["screenpipe-engine/apple-intelligence"]
qwen3-asr = ["screenpipe-engine/qwen3-asr"]
parakeet = ["screenpipe-engine/parakeet"]
+# macOS only — requires Apple MLX (Metal)
+parakeet-mlx = ["screenpipe-engine/parakeet-mlx"]
jemalloc = ["tikv-jemallocator"]
diff --git a/crates/screenpipe-audio/Cargo.toml b/crates/screenpipe-audio/Cargo.toml
index a52c2804b..737abdcc3 100644
--- a/crates/screenpipe-audio/Cargo.toml
+++ b/crates/screenpipe-audio/Cargo.toml
@@ -83,7 +83,8 @@ ort = { version = "=2.0.0-rc.6", default-features = false, features = ["ndarray"
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 = "3afd3f8", default-features = false, features = ["qwen3-asr-antirez-blas", "parakeet"], optional = true }
+audiopipe = { git = "https://github.com/screenpipe/audiopipe.git", rev = "123212e", default-features = false, features = ["qwen3-asr-antirez-blas", "parakeet"], optional = true }
+mlx-rs = { version = "0.25", optional = true }
bytes = { version = "1.9.0", features = ["serde"] }
rand = "0.9.0"
@@ -145,6 +146,7 @@ vulkan = ["audiopipe?/vulkan-ggml"]
pulseaudio = ["dep:libpulse-binding", "dep:libpulse-simple-binding"]
qwen3-asr = ["dep:audiopipe"]
parakeet = ["dep:audiopipe"]
+parakeet-mlx = ["dep:audiopipe", "audiopipe?/parakeet-mlx", "dep:mlx-rs"]
[[example]]
name = "screenpipe-audio"
diff --git a/crates/screenpipe-audio/examples/bench_engines.rs b/crates/screenpipe-audio/examples/bench_engines.rs
index d5b234212..0323a0f11 100644
--- a/crates/screenpipe-audio/examples/bench_engines.rs
+++ b/crates/screenpipe-audio/examples/bench_engines.rs
@@ -176,6 +176,8 @@ async fn main() -> anyhow::Result<()> {
(AudioTranscriptionEngine::WhisperLargeV3TurboQuantized, "whisper-large-v3-turbo-q8"),
#[cfg(feature = "parakeet")]
(AudioTranscriptionEngine::Parakeet, "parakeet-tdt-0.6b-v3-int8"),
+ #[cfg(feature = "parakeet-mlx")]
+ (AudioTranscriptionEngine::ParakeetMlx, "parakeet-mlx (GPU)"),
#[cfg(feature = "qwen3-asr")]
(AudioTranscriptionEngine::Qwen3Asr, "qwen3-asr-0.6b"),
];
diff --git a/crates/screenpipe-audio/src/core/engine.rs b/crates/screenpipe-audio/src/core/engine.rs
index 154985f41..2127ab17b 100644
--- a/crates/screenpipe-audio/src/core/engine.rs
+++ b/crates/screenpipe-audio/src/core/engine.rs
@@ -17,6 +17,7 @@ pub enum AudioTranscriptionEngine {
OpenAICompatible,
Qwen3Asr,
Parakeet,
+ ParakeetMlx,
Disabled,
}
@@ -34,6 +35,7 @@ impl std::str::FromStr for AudioTranscriptionEngine {
"openai-compatible" => Ok(Self::OpenAICompatible),
"qwen3-asr" => Ok(Self::Qwen3Asr),
"parakeet" | "parakeet-tdt-0.6b-v2" => Ok(Self::Parakeet),
+ "parakeet-mlx" => Ok(Self::ParakeetMlx),
"disabled" => Ok(Self::Disabled),
_ => Err(format!("unknown audio engine: {s}")),
}
@@ -57,6 +59,7 @@ impl fmt::Display for AudioTranscriptionEngine {
AudioTranscriptionEngine::OpenAICompatible => write!(f, "OpenAICompatible"),
AudioTranscriptionEngine::Qwen3Asr => write!(f, "Qwen3Asr"),
AudioTranscriptionEngine::Parakeet => write!(f, "Parakeet"),
+ AudioTranscriptionEngine::ParakeetMlx => write!(f, "ParakeetMlx"),
AudioTranscriptionEngine::Disabled => write!(f, "Disabled"),
}
}
diff --git a/crates/screenpipe-audio/src/transcription/engine.rs b/crates/screenpipe-audio/src/transcription/engine.rs
index 281965c69..e8ca7bb1f 100644
--- a/crates/screenpipe-audio/src/transcription/engine.rs
+++ b/crates/screenpipe-audio/src/transcription/engine.rs
@@ -14,7 +14,7 @@ use anyhow::{anyhow, Result};
use reqwest::Client;
use screenpipe_core::Language;
use std::sync::Arc;
-#[cfg(any(feature = "qwen3-asr", feature = "parakeet"))]
+#[cfg(any(feature = "qwen3-asr", feature = "parakeet", feature = "parakeet-mlx"))]
use std::sync::Mutex as StdMutex;
use tracing::{error, info};
use whisper_rs::{WhisperContext, WhisperState};
@@ -39,6 +39,11 @@ pub enum TranscriptionEngine {
model: Arc<StdMutex<audiopipe::Model>>,
vocabulary: Vec<VocabularyEntry>,
},
+ #[cfg(feature = "parakeet-mlx")]
+ ParakeetMlx {
+ model: Arc<StdMutex<audiopipe::Model>>,
+ vocabulary: Vec<VocabularyEntry>,
+ },
Deepgram {
api_key: String,
languages: Vec<Language>,
@@ -139,6 +144,29 @@ impl TranscriptionEngine {
}
}
+ AudioTranscriptionEngine::ParakeetMlx => {
+ #[cfg(feature = "parakeet-mlx")]
+ {
+ let model = tokio::task::spawn_blocking(|| {
+ audiopipe::Model::from_pretrained("parakeet-tdt-0.6b-v3-mlx")
+ })
+ .await
+ .map_err(|e| anyhow!("parakeet-mlx model loading task panicked: {}", e))?
+ .map_err(|e| anyhow!("failed to load parakeet-mlx model: {}", e))?;
+ info!("parakeet-tdt-0.6b-v3-mlx (GPU) model loaded successfully");
+ Ok(Self::ParakeetMlx {
+ model: Arc::new(StdMutex::new(model)),
+ vocabulary,
+ })
+ }
+ #[cfg(not(feature = "parakeet-mlx"))]
+ {
+ Err(anyhow!(
+ "parakeet-mlx engine selected but the 'parakeet-mlx' feature is not enabled"
+ ))
+ }
+ }
+
// All Whisper variants
_ => {
let engine_for_download = config.clone();
@@ -216,6 +244,11 @@ impl TranscriptionEngine {
model: model.clone(),
vocabulary: vocabulary.clone(),
}),
+ #[cfg(feature = "parakeet-mlx")]
+ Self::ParakeetMlx { model, vocabulary } => Ok(TranscriptionSession::ParakeetMlx {
+ model: model.clone(),
+ vocabulary: vocabulary.clone(),
+ }),
Self::Deepgram {
api_key,
languages,
@@ -264,6 +297,8 @@ impl TranscriptionEngine {
Self::Qwen3Asr { .. } => AudioTranscriptionEngine::Qwen3Asr,
#[cfg(feature = "parakeet")]
Self::Parakeet { .. } => AudioTranscriptionEngine::Parakeet,
+ #[cfg(feature = "parakeet-mlx")]
+ Self::ParakeetMlx { .. } => AudioTranscriptionEngine::ParakeetMlx,
Self::Deepgram { .. } => AudioTranscriptionEngine::Deepgram,
Self::OpenAICompatible { .. } => AudioTranscriptionEngine::OpenAICompatible,
Self::Disabled => AudioTranscriptionEngine::Disabled,
@@ -292,6 +327,11 @@ pub enum TranscriptionSession {
model: Arc<StdMutex<audiopipe::Model>>,
vocabulary: Vec<VocabularyEntry>,
},
+ #[cfg(feature = "parakeet-mlx")]
+ ParakeetMlx {
+ model: Arc<StdMutex<audiopipe::Model>>,
+ vocabulary: Vec<VocabularyEntry>,
+ },
Deepgram {
api_key: String,
languages: Vec<Language>,
@@ -394,6 +434,16 @@ impl TranscriptionSession {
Ok(result.text)
}
+ #[cfg(feature = "parakeet-mlx")]
+ Self::ParakeetMlx { model, .. } => {
+ let mut engine = model.lock().map_err(|e| anyhow!("stt model lock: {}", e))?;
+ let opts = audiopipe::TranscribeOptions::default();
+ let result = engine
+ .transcribe_with_sample_rate(audio, sample_rate, opts)
+ .map_err(|e| anyhow!("{}", e))?;
+ Ok(result.text)
+ }
+
Self::Whisper {
state,
languages,
@@ -449,6 +499,8 @@ impl TranscriptionSession {
Self::Qwen3Asr { vocabulary, .. } => vocabulary,
#[cfg(feature = "parakeet")]
Self::Parakeet { vocabulary, .. } => vocabulary,
+ #[cfg(feature = "parakeet-mlx")]
+ Self::ParakeetMlx { vocabulary, .. } => vocabulary,
Self::Deepgram { vocabulary, .. } => vocabulary,
Self::OpenAICompatible { vocabulary, .. } => vocabulary,
Self::Disabled => return Ok(text),
diff --git a/crates/screenpipe-engine/Cargo.toml b/crates/screenpipe-engine/Cargo.toml
index d6abe7870..12b13060d 100644
--- a/crates/screenpipe-engine/Cargo.toml
+++ b/crates/screenpipe-engine/Cargo.toml
@@ -144,6 +144,7 @@ pulseaudio = ["screenpipe-audio/pulseaudio"]
apple-intelligence = ["dep:screenpipe-apple-intelligence"]
qwen3-asr = ["screenpipe-audio/qwen3-asr"]
parakeet = ["screenpipe-audio/parakeet"]
+parakeet-mlx = ["screenpipe-audio/parakeet-mlx"]
jemalloc = ["tikv-jemallocator"]
[[bin]]