Module barge_in

Module barge_in 

Source
Expand description

Barge-in (interruption) detection and handling.

Coordinates client-side VAD with jitter buffer flush and server signaling to achieve atomic barge-in with minimal latency.

When tentative mode is enabled (the default), the detector follows a three-step duck-confirm-flush sequence:

  1. Duck — On the first speech frame during ModelSpeaking, reduce playback volume instead of immediately silencing. This avoids jarring silence from false-positive VAD triggers (e.g., background noise).
  2. Interrupt — Once speech has been sustained for min_speech_frames, flush the jitter buffer and signal the server.
  3. Restore — If speech stops before reaching the confirmation threshold, restore the original playback volume (false positive resolved).

Structs§

BargeInConfig
Configuration for barge-in behavior.
BargeInDetector
Barge-in detector — checks whether user speech should interrupt model output.

Enums§

BargeInAction
Result of a barge-in check.