vllm_omni.engine.duplex.session.overlap_policy ¶
How one duplex session reacts to input that arrives while it is speaking.
Short acknowledgement, barge-in, or keep listening: the rules read the session config and the incoming append, and nothing else. Extracted from DuplexSessionRunner because they were a decision function wearing a method's clothes -- the only runner state they ever touched was session -- and because reaching them previously meant driving a whole append through the runner.
decide ¶
decide(
session: DuplexEngineSession,
event: dict[str, object],
payload: dict[str, object],
*,
auto_responds: bool,
) -> dict[str, object]
defer_unsupported_barge_in ¶
defer_unsupported_barge_in(
session: DuplexEngineSession,
*,
duration_ms: int,
is_speech: bool,
) -> dict[str, object]
input_audio_duration_ms ¶
input_looks_like_speech ¶
input_looks_like_speech(
session: DuplexEngineSession,
event: dict[str, object],
payload: dict[str, object],
) -> bool
is_short_ack_transcript_hint ¶
merge_audio_payloads ¶
should_force_listen_for_auto_response_overlap ¶
should_force_listen_for_auto_response_overlap(
event: dict[str, object],
payload: dict[str, object],
*,
auto_responds: bool,
) -> bool