bodhi-realtime-agent / EchoGuard
Class: EchoGuard
Defined in: src/transport/echo-guard.ts:120
Per-session echo suppressor. Feed every OUTBOUND audio chunk through feedReference and run every INBOUND chunk through check; a suppress: true result means the inbound chunk is (part of) the assistant's own playback echoed back and should not be forwarded to the model or STT.
Constructors
Constructor
new EchoGuard(
config?):EchoGuard
Defined in: src/transport/echo-guard.ts:134
Parameters
config?
Returns
EchoGuard
Accessors
enabled
Get Signature
get enabled():
boolean
Defined in: src/transport/echo-guard.ts:152
Returns
boolean
suppressedCount
Get Signature
get suppressedCount():
number
Defined in: src/transport/echo-guard.ts:157
Total inbound windows suppressed this session (observability).
Returns
number
Methods
check()
check(
pcm,sampleRate,nowMs?):EchoCheckResult
Defined in: src/transport/echo-guard.ts:176
Check one inbound (mic) PCM chunk — s16le mono at sampleRate. Returns suppress=true when the chunk correlates with recent playback.
Parameters
pcm
Buffer
sampleRate
number
nowMs?
number = ...
Returns
feedReference()
feedReference(
pcm,sampleRate,nowMs?):void
Defined in: src/transport/echo-guard.ts:162
Feed one outbound (played) PCM chunk — s16le mono at sampleRate.
Parameters
pcm
Buffer
sampleRate
number
nowMs?
number = ...
Returns
void