pub struct TurnAnalyzerStop { /* private fields */ }Expand description
End the turn after the user stops speaking (VAD) and the turn analyzer says
the turn is semantically complete and a transcript has arrived. A finalized
transcript triggers immediately; otherwise the configured stt_timeout_ms of
post-stop silence is the fallback. Mirrors TurnAnalyzerUserTurnStopStrategy
(the timeout-driven path, reduced to its decision core).
Implementations§
Source§impl TurnAnalyzerStop
impl TurnAnalyzerStop
Sourcepub fn new(stt_timeout_ms: f32) -> Self
pub fn new(stt_timeout_ms: f32) -> Self
stt_timeout_ms: post-stop wait for a final transcript before triggering.
Sourcepub fn set_turn_complete(&mut self, complete: bool) -> TurnStopDecision
pub fn set_turn_complete(&mut self, complete: bool) -> TurnStopDecision
Feed an end-of-turn prediction from the turn analyzer (the processor calls
this when its TurnAnalyzer returns a complete/incomplete result).
Trait Implementations§
Source§impl Clone for TurnAnalyzerStop
impl Clone for TurnAnalyzerStop
Source§impl Debug for TurnAnalyzerStop
impl Debug for TurnAnalyzerStop
Source§impl TurnStopStrategy for TurnAnalyzerStop
impl TurnStopStrategy for TurnAnalyzerStop
Source§fn on_frame(&mut self, frame: &Frame) -> TurnStopDecision
fn on_frame(&mut self, frame: &Frame) -> TurnStopDecision
Inspect one frame and (maybe) decide the turn ended.
Source§fn on_silence_tick(&mut self, elapsed_ms: f32) -> TurnStopDecision
fn on_silence_tick(&mut self, elapsed_ms: f32) -> TurnStopDecision
Advance
elapsed_ms of post-VAD-stop silence; may push past a timeout.Auto Trait Implementations§
impl Freeze for TurnAnalyzerStop
impl RefUnwindSafe for TurnAnalyzerStop
impl Send for TurnAnalyzerStop
impl Sync for TurnAnalyzerStop
impl Unpin for TurnAnalyzerStop
impl UnsafeUnpin for TurnAnalyzerStop
impl UnwindSafe for TurnAnalyzerStop
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