pub struct PuncModel { /* private fields */ }Expand description
BERT-based punctuation restoration model (FireRedPunc).
Adds punctuation and capitalization to unpunctuated ASR output. Particularly useful for CTC-based backends (wav2vec2, omniasr, fastconformer-ctc, firered-asr) that output lowercase text.
use crispasr::PuncModel;
let punc = PuncModel::open("fireredpunc-q8_0.gguf").unwrap();
let text = punc.process("and so my fellow americans ask not");
println!("{text}"); // "And so my fellow americans, ask not..."Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Sync for PuncModel
impl Freeze for PuncModel
impl RefUnwindSafe for PuncModel
impl Unpin for PuncModel
impl UnsafeUnpin for PuncModel
impl UnwindSafe for PuncModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more