Module recorder

Module recorder 

Source
Expand description

Stereo call recording for compliance and quality review.

CallRecorder writes a 16-bit PCM WAV with the caller on the left channel and the agent on the right, aligned to the call’s own clock:

  • Caller audio arrives in real time and is placed at the moment it arrived. A gap in delivery becomes silence.
  • Agent audio arrives faster than it plays, since the model streams ahead of the phone line. Each chunk is placed where playback reaches it: after the audio already queued, or now if the queue is empty.
  • On barge-in, flush cuts the agent audio that was queued but not yet played, so the recording holds what the caller heard, not what the model generated. It returns how much was cut.

Samples are written to disk as soon as they can no longer change (up to the current moment), so memory stays flat for a call of any length. Keypad masking applies upstream: while KeypadGuard silences the caller, the recorder receives the silence too.

Structs§

CallRecorder
A stereo WAV recording of one call. See the module docs.