From 8a5ec4c22825a9016b541bdc04da414a6e0cfe75 Mon Sep 17 00:00:00 2001 From: Haixuan Xavier Tao Date: Wed, 16 Jul 2025 14:52:33 +0200 Subject: [PATCH] Use inferred word as print instead of previous word Currently the word that is printed at time t is the one from the previous iteration making it just one iteration slow. This should fix it although I'm not exactly sure why it used to be as is before. --- stt-rs/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stt-rs/src/main.rs b/stt-rs/src/main.rs index 4f81327..60e2c8d 100644 --- a/stt-rs/src/main.rs +++ b/stt-rs/src/main.rs @@ -204,10 +204,10 @@ impl Model { print!(" {word}"); std::io::stdout().flush()? } else { + last_word = Some((word, *start_time)); if let Some((word, prev_start_time)) = last_word.take() { println!("[{prev_start_time:5.2}-{start_time:5.2}] {word}"); } - last_word = Some((word, *start_time)); } } }