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

fixing tests

matthew-heartfulb40f88c96280
diff --git a/screenpipe-audio/tests/core_tests.rs b/screenpipe-audio/tests/core_tests.rs
index f4372b09d..41b00135d 100644
--- a/screenpipe-audio/tests/core_tests.rs
+++ b/screenpipe-audio/tests/core_tests.rs
@@ -13,6 +13,7 @@ mod tests {
use std::sync::Arc;
use std::time::{Duration, Instant};
use tokio::sync::mpsc::unbounded_channel;
+ use screenpipe_audio::vad_engine::{VadEngineEnum, WebRtcVad};
fn setup() {
// Initialize the logger with an info level filter
@@ -50,10 +51,12 @@ mod tests {
let whisper_model =
WhisperModel::new(Arc::new(AudioTranscriptionEngine::WhisperTiny)).unwrap();
+ let mut vad_engine = WebRtcVad::new();
let text = stt(
"./test_data/selah.mp4",
&whisper_model,
Arc::new(AudioTranscriptionEngine::WhisperTiny),
+ &mut vad_engine
)
.unwrap();
let duration = start.elapsed();
@@ -231,9 +234,12 @@ mod tests {
PathBuf::from(format!("test_output_{}.mp4", Utc::now().timestamp_millis()));
let output_path_2 = output_path.clone();
let (whisper_sender, mut whisper_receiver, _) =
- create_whisper_channel(Arc::new(AudioTranscriptionEngine::WhisperTiny))
- .await
- .unwrap();
+ create_whisper_channel(
+ Arc::new(AudioTranscriptionEngine::WhisperTiny),
+ VadEngineEnum::WebRtc
+ )
+ .await
+ .unwrap();
let is_running = Arc::new(AtomicBool::new(true));
// Start recording in a separate thread
let recording_thread = tokio::spawn(async move {