diff --git a/rust-whisper-baked/src/main.rs b/rust-whisper-baked/src/main.rs index 235854d..6683fce 100644 --- a/rust-whisper-baked/src/main.rs +++ b/rust-whisper-baked/src/main.rs @@ -111,7 +111,7 @@ impl Destutterer { next }; let trailing_punctuation = next[without_trailing_punctuation.len() ..].to_string(); - let next = without_trailing_punctuation; + let next = without_trailing_punctuation.clone(); let next = { let mut n = prev.len().clamp(0, next.len()); while n > 0 { @@ -125,7 +125,7 @@ impl Destutterer { if next.len() == 0 { return "".to_string(); } - self.prev = Some(next.clone()); + self.prev = Some(without_trailing_punctuation); next + &trailing_punctuation }, }