pub struct MinWordsInterrupt { /* private fields */ }Expand description
Interrupt the bot only once the user has spoken at least min_words (counted
across the accumulated transcriptions of the in-progress turn). Mirrors
pipecat’s MinWordsInterruptionStrategy — filters spurious one-word barge-ins.
Implementations§
Trait Implementations§
Source§impl Clone for MinWordsInterrupt
impl Clone for MinWordsInterrupt
Source§impl Debug for MinWordsInterrupt
impl Debug for MinWordsInterrupt
Source§impl InterruptionStrategy for MinWordsInterrupt
impl InterruptionStrategy for MinWordsInterrupt
Source§fn should_interrupt(&self) -> bool
fn should_interrupt(&self) -> bool
Should the accumulated user speech-so-far interrupt the bot? Called when a
turn-start is proposed while the bot is speaking.
Source§fn append_transcription(&mut self, frame: &Frame)
fn append_transcription(&mut self, frame: &Frame)
Feed a transcription frame so word/char-count strategies accumulate.
Source§fn append_audio_volume(&mut self, _volume: f32)
fn append_audio_volume(&mut self, _volume: f32)
Feed an audio frame’s volume so amplitude strategies accumulate.
Auto Trait Implementations§
impl Freeze for MinWordsInterrupt
impl RefUnwindSafe for MinWordsInterrupt
impl Send for MinWordsInterrupt
impl Sync for MinWordsInterrupt
impl Unpin for MinWordsInterrupt
impl UnsafeUnpin for MinWordsInterrupt
impl UnwindSafe for MinWordsInterrupt
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