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.
This commit is contained in:
Haixuan Xavier Tao 2025-07-16 14:52:33 +02:00 committed by GitHub
parent baf0c75bba
commit 8a5ec4c228
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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));
}
}
}