pub struct StreamingSpeechDecoder { /* private fields */ }Expand description
Streaming CTC-greedy state: feed successive mono chunks; flush tokens.
Implementations§
Source§impl StreamingSpeechDecoder
impl StreamingSpeechDecoder
Sourcepub fn new(weights: SpeechEncoderWeights, hop: usize) -> Self
pub fn new(weights: SpeechEncoderWeights, hop: usize) -> Self
Creates a new instance.
Sourcepub fn model_hash(&self) -> u64
pub fn model_hash(&self) -> u64
model hash.
Sourcepub fn push_chunk(
&mut self,
mono: &[f32],
sample_rate: u32,
out: &mut [TranscriptToken],
) -> Result<usize, AudioError>
pub fn push_chunk( &mut self, mono: &[f32], sample_rate: u32, out: &mut [TranscriptToken], ) -> Result<usize, AudioError>
Decode one chunk into out (appended logical tokens; buffer overwritten from 0).
Auto Trait Implementations§
impl Freeze for StreamingSpeechDecoder
impl RefUnwindSafe for StreamingSpeechDecoder
impl Send for StreamingSpeechDecoder
impl Sync for StreamingSpeechDecoder
impl Unpin for StreamingSpeechDecoder
impl UnsafeUnpin for StreamingSpeechDecoder
impl UnwindSafe for StreamingSpeechDecoder
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