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:
parent
baf0c75bba
commit
8a5ec4c228
|
|
@ -204,10 +204,10 @@ impl Model {
|
||||||
print!(" {word}");
|
print!(" {word}");
|
||||||
std::io::stdout().flush()?
|
std::io::stdout().flush()?
|
||||||
} else {
|
} else {
|
||||||
|
last_word = Some((word, *start_time));
|
||||||
if let Some((word, prev_start_time)) = last_word.take() {
|
if let Some((word, prev_start_time)) = last_word.take() {
|
||||||
println!("[{prev_start_time:5.2}-{start_time:5.2}] {word}");
|
println!("[{prev_start_time:5.2}-{start_time:5.2}] {word}");
|
||||||
}
|
}
|
||||||
last_word = Some((word, *start_time));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user