pub struct StreamWindow {
pub samples: Vec<f32>,
pub real_samples: usize,
pub window_start_secs: f32,
pub had_speech: bool,
pub trailing_silence_secs: f32,
pub cap_hit: bool,
pub forced_eou: bool,
}Fields§
§samples: Vec<f32>Exactly max_window_secs × 16 000 samples; zero-padded at the BACK when the
growing buffer hasn’t reached max_window_secs yet.
real_samples: usizeNumber of real (non-padding) samples in samples.
window_start_secs: f32Wall-clock offset since stream start of the first sample in the current utterance.
had_speech: boolTrue if any VAD-positive frame falls within the current utterance buffer.
trailing_silence_secs: f32Seconds since the last VAD-positive frame; for use by the endpointer.
cap_hit: boolTrue when the buffer hit max_window_secs. The consumer must call either
Chunker::trim_oldest or Chunker::reset_utterance before the next push;
otherwise the next cap will additionally set forced_eou=true.
forced_eou: boolTrue only on the second consecutive cap without an intervening trim or reset.
Treat as a forced EOU (finalize + reset_utterance) — the safety-net path when the
trim wasn’t applied (e.g. no prior commits to anchor against).
Auto Trait Implementations§
impl Freeze for StreamWindow
impl RefUnwindSafe for StreamWindow
impl Send for StreamWindow
impl Sync for StreamWindow
impl Unpin for StreamWindow
impl UnsafeUnpin for StreamWindow
impl UnwindSafe for StreamWindow
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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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>
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>
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