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(audio): timedout issue (#977)
tribhuwanbea702b0c1e1
diff --git a/screenpipe-audio/build.rs b/screenpipe-audio/build.rsindex 668674a4e..08567264a 100644--- a/screenpipe-audio/build.rs+++ b/screenpipe-audio/build.rs@@ -79,6 +79,9 @@ fn find_unzip() -> Option<std::path::PathBuf> {#[cfg(target_os = "windows")]fn install_onnxruntime() {+ use std::time::Duration;+ use reqwest::blocking::Client;+ use std::{process::Command, path::Path};// Set static CRT for Windows MSVC targetif env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default() == "msvc" {println!("cargo:rustc-env=KNF_STATIC_CRT=1");@@ -86,22 +89,30 @@ fn install_onnxruntime() {}let url = "https://github.com/microsoft/onnxruntime/releases/download/v1.19.2/onnxruntime-win-x64-gpu-1.19.2.zip";- let resp = reqwest::blocking::get(url).expect("request failed");+ let client = Client::builder()+ .timeout(Duration::from_secs(300))+ .build()+ .expect("failed to build client");+ let resp = client.get(url).send().expect("request failed");let body = resp.bytes().expect("body invalid");- fs::write("./onnxruntime-win-x64-gpu-1.19.2.zip", &body);+ fs::write("./onnxruntime-win-x64-gpu-1.19.2.zip", &body).expect("failed to write");let unzip_path = find_unzip().expect("could not find unzip executable - please install it via GnuWin32 or add it to PATH");let status = Command::new(unzip_path)- .args(["onnxruntime-win-x64-gpu-1.19.2.zip"])+ .args(["-o", "onnxruntime-win-x64-gpu-1.19.2.zip"]).status().expect("failed to execute unzip");if !status.success() {panic!("failed to install onnx binary");}+ let target_dir = Path::new("../screenpipe-app-tauri/src-tauri/onnxruntime-win-x64-gpu-1.19.2");+ if target_dir.exists() {+ fs::remove_dir_all(target_dir).expect("failed to remove existing directory");+ }fs::rename("onnxruntime-win-x64-gpu-1.19.2",- "../screenpipe-app-tauri/src-tauri/onnxruntime-win-x64-gpu-1.19.2",- );+ target_dir,+ ).expect("failed to rename");println!("cargo:rustc-link-search=native=../screenpipe-app-tauri/src-tauri/onnxruntime-win-x64-gpu-1.19.2/lib");}