pub struct FixedLengthSplitter {}Expand description
No-VAD splitter: walks the waveform in bounds.max_samples()-sized
strides, aligning non-final chunks to bounds.align_to_samples().
Zero model load. Suitable when the caller already segmented the input,
for short utterances that fit a single chunk, or for tests. Boundary
context degrades transcription quality at chunk seams — for production
long-form ASR prefer
SileroVadSplitter.
align_to_samples dividing max_samples is not guaranteed; the final
aligned chunk is the floor of len_remaining / align_to_samples times
align_to_samples (so its mel length stays an integer multiple of
subsampling_factor). The very last chunk keeps its unaligned tail —
the JIT pads it.
Implementations§
Trait Implementations§
Source§impl Clone for FixedLengthSplitter
impl Clone for FixedLengthSplitter
Source§fn clone(&self) -> FixedLengthSplitter
fn clone(&self) -> FixedLengthSplitter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FixedLengthSplitter
impl Debug for FixedLengthSplitter
Source§impl Default for FixedLengthSplitter
impl Default for FixedLengthSplitter
Source§fn default() -> FixedLengthSplitter
fn default() -> FixedLengthSplitter
Returns the “default value” for a type. Read more
Source§impl Splitter for FixedLengthSplitter
impl Splitter for FixedLengthSplitter
type Error = Infallible
fn split( &mut self, waveform: &[f32], bounds: &EncoderBounds, ) -> Result<Vec<AudioChunk>, Self::Error>
Source§fn max_chunk_samples(&self, bounds: &EncoderBounds) -> usize
fn max_chunk_samples(&self, bounds: &EncoderBounds) -> usize
Upper bound (in samples) on the longest chunk this splitter could
emit. Consumed by the transcriber to size JIT buffers — a tighter
advertised bound trades peak memory for tighter chunk handling.
Default: full encoder capacity.
Auto Trait Implementations§
impl Freeze for FixedLengthSplitter
impl RefUnwindSafe for FixedLengthSplitter
impl Send for FixedLengthSplitter
impl Sync for FixedLengthSplitter
impl Unpin for FixedLengthSplitter
impl UnsafeUnpin for FixedLengthSplitter
impl UnwindSafe for FixedLengthSplitter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more