Skip to content

Conversation

@chenghao-mou
Copy link
Member

@chenghao-mou chenghao-mou commented Nov 20, 2025

  • New barge-in detector under inference
  • Two stream implementation:
    • HTTP endpoints for working with hosted model
    • WS for working with gateway proxy

Detailed spec can be found in the notion page

@chenghao-mou chenghao-mou force-pushed the chenghaomou/agt-2182-barge-in-detector-interface branch 2 times, most recently from 1fe7b1b to 783b91a Compare November 21, 2025 15:48
@chenghao-mou chenghao-mou changed the title Add barge plugin and examples Add inference bargein and examples Nov 21, 2025
@chenghao-mou chenghao-mou force-pushed the chenghaomou/agt-2182-barge-in-detector-interface branch from 783b91a to 3d9d0af Compare November 24, 2025 11:51
Copy link
Member

@theomonnom theomonnom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@chenghao-mou chenghao-mou marked this pull request as ready for review November 24, 2025 21:10
@chenghao-mou chenghao-mou requested a review from a team November 24, 2025 21:11
@chenghao-mou chenghao-mou force-pushed the chenghaomou/agt-2182-barge-in-detector-interface branch 4 times, most recently from 7b11b1d to 13a6fed Compare November 28, 2025 10:07
@chenghao-mou chenghao-mou force-pushed the chenghaomou/agt-2182-barge-in-detector-interface branch 2 times, most recently from 6dfc839 to 45b5664 Compare December 4, 2025 09:34
@chenghao-mou chenghao-mou changed the title Add inference bargein and examples AGT-2182: Add inference bargein and examples Dec 9, 2025
@chenghao-mou chenghao-mou force-pushed the chenghaomou/agt-2182-barge-in-detector-interface branch 3 times, most recently from 120b12c to bab9b18 Compare December 15, 2025 15:13
@chenghao-mou chenghao-mou force-pushed the chenghaomou/agt-2182-barge-in-detector-interface branch from 5868880 to dbf4dbc Compare December 17, 2025 14:20
self._log(DEV_LEVEL, message, args, **kwargs)


logging.setLoggerClass(Logger)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL we can do that

BargeinError,
BargeinEvent,
BargeinEventType,
BargeinStreamBase,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BargeinStreamBase,

Should this one stays internal?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point!

self.update_vad(None)
self.update_bargein_detector(None)

def start_barge_in_monitoring(self) -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's totally fine to name this:
on_agent_started_speaking

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Looking at the names we have today:
Screenshot 2025-12-18 at 09 57 44

I think this set matches better:
Screenshot 2025-12-18 at 09 58 15

wdyt?


self._bargein_ch.send_nowait(inference.BargeinStreamBase._OverlapSpeechEndedSentinel())

def end_barge_in_monitoring(self, ignore_until: float) -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on_agent_stopped_speaking


self._bargein_ch.send_nowait(inference.BargeinStreamBase._OverlapSpeechEndedSentinel())

def end_barge_in_monitoring(self, ignore_until: float) -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make it a kwargs & rename the parameter, otherwise it isn't obvious when reading the code from other places

Suggested change
def end_barge_in_monitoring(self, ignore_until: float) -> None:
def end_barge_in_monitoring(self, *, ignore_transcript_until: float) -> None:

@chenghao-mou chenghao-mou force-pushed the chenghaomou/agt-2182-barge-in-detector-interface branch from 2a2c610 to 817caa5 Compare December 18, 2025 09:27
@chenghao-mou chenghao-mou changed the base branch from main to chenghaomou/v1.3.9 December 18, 2025 14:46
@chenghao-mou chenghao-mou merged commit 9fa7362 into chenghaomou/v1.3.9 Dec 18, 2025
18 checks passed
@chenghao-mou chenghao-mou deleted the chenghaomou/agt-2182-barge-in-detector-interface branch December 18, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants