pub struct TurnDetector { /* private fields */ }Expand description
Client-side turn detector.
Implementations§
Source§impl TurnDetector
impl TurnDetector
Sourcepub fn new(config: TurnDetectionConfig) -> Self
pub fn new(config: TurnDetectionConfig) -> Self
Create a new turn detector.
Sourcepub fn update(&mut self, vad_is_speaking: bool) -> Option<TurnDetectionEvent>
pub fn update(&mut self, vad_is_speaking: bool) -> Option<TurnDetectionEvent>
Update with the current VAD state.
Returns a TurnDetectionEvent if a transition occurred.
Sourcepub fn is_speaking(&self) -> bool
pub fn is_speaking(&self) -> bool
Whether speech is currently in progress.
Sourcepub fn is_pending_turn_end(&self) -> bool
pub fn is_pending_turn_end(&self) -> bool
Whether we’re waiting for the end-of-speech delay.
Auto Trait Implementations§
impl Freeze for TurnDetector
impl RefUnwindSafe for TurnDetector
impl Send for TurnDetector
impl Sync for TurnDetector
impl Unpin for TurnDetector
impl UnwindSafe for TurnDetector
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