diff --git a/rust-whisper-lib/src/lib.rs b/rust-whisper-lib/src/lib.rs index 2ba6ade..4ea5699 100644 --- a/rust-whisper-lib/src/lib.rs +++ b/rust-whisper-lib/src/lib.rs @@ -414,8 +414,10 @@ mod tests { ).expect("failed to make new engine2"); let data = f32_from_wav_file(&"../gitea-whisper-rs/sys/whisper.cpp/bindings/go/samples/jfk.wav".to_string()).expect("failed to read jfk.wav"); let start = std::time::Instant::now(); - let result = engine_2.transcribe(&data).expect("failed to transcribe"); - println!("rwhisper = {}s", start.elapsed().as_secs_f32()); - assert_eq!(" And so my fellow American asked not what your country can do for you, ask what you can do for your country.".to_string(), result.to_string()); + for i in 0..2 { + let result = engine_2.transcribe(&data).expect("failed to transcribe"); + println!("rwhisper = {}s", start.elapsed().as_secs_f32()); + assert_eq!(" And so my fellow American asked not what your country can do for you, ask what you can do for your country.".to_string(), result.to_string()); + } } }