Compare commits
2 Commits
d94cbd6927
...
743c8c5f67
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
743c8c5f67 | ||
|
|
d32f7a4c40 |
@@ -25,6 +25,7 @@ pub fn wav_channel<F>(
|
||||
) where F: FnMut(Result<rust_whisper_lib::Transcribed, String>) + Send + 'static {
|
||||
flags.model_path = None;
|
||||
flags.model_buffer = Some(include_bytes!("../../models/ggml-base.en.bin").to_vec());
|
||||
flags.model_buffer = Some(include_bytes!("../../models/ggml-distil-medium.en.bin").to_vec());
|
||||
rust_whisper_lib::wav_channel(flags, handler_fn);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user