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(audio): add ..Default to TranscribeOptions literals in bench examples (#4235)

Louis Beaumont48907ab4f092
diff --git a/crates/screenpipe-audio/examples/bench_quality.rs b/crates/screenpipe-audio/examples/bench_quality.rs
index cac1211fa..18e71bdbb 100644
--- a/crates/screenpipe-audio/examples/bench_quality.rs
+++ b/crates/screenpipe-audio/examples/bench_quality.rs
@@ -171,6 +171,7 @@ fn transcribe_chunked(
let opts = audiopipe::TranscribeOptions {
language: lang.map(|s| s.to_string()),
word_timestamps: false,
+ ..Default::default()
};
if audio.len() <= chunk_samples {
@@ -188,6 +189,7 @@ fn transcribe_chunked(
let opts = audiopipe::TranscribeOptions {
language: lang.map(|s| s.to_string()),
word_timestamps: false,
+ ..Default::default()
};
let result = engine.transcribe_with_sample_rate(chunk, sample_rate, opts);
let text = result
diff --git a/crates/screenpipe-audio/examples/bench_quality2.rs b/crates/screenpipe-audio/examples/bench_quality2.rs
index 18217b48e..b4f130cde 100644
--- a/crates/screenpipe-audio/examples/bench_quality2.rs
+++ b/crates/screenpipe-audio/examples/bench_quality2.rs
@@ -275,6 +275,7 @@ fn transcribe_full(model: &mut audiopipe::Model, audio: &[f32], sr: u32) -> Stri
let opts = audiopipe::TranscribeOptions {
language: None,
word_timestamps: false,
+ ..Default::default()
};
model
.transcribe_with_sample_rate(audio, sr, opts)
@@ -305,6 +306,7 @@ fn transcribe_fixed_chunks(
let opts = audiopipe::TranscribeOptions {
language: None,
word_timestamps: false,
+ ..Default::default()
};
let text = model
.transcribe_with_sample_rate(chunk, sr, opts)
@@ -356,6 +358,7 @@ fn transcribe_vad_segments(
let opts = audiopipe::TranscribeOptions {
language: None,
word_timestamps: false,
+ ..Default::default()
};
let text = model
.transcribe_with_sample_rate(chunk, sr, opts)
@@ -474,6 +477,7 @@ async fn main() -> anyhow::Result<()> {
let opts = audiopipe::TranscribeOptions {
language: None,
word_timestamps: false,
+ ..Default::default()
};
match model.transcribe(chunk, opts) {
Ok(r) => {