Opened 15 years ago

Closed 15 years ago

#1042 closed defect (worksforme)

The pjmedia echo cancellation wrapper causes Speex AEC to stop working (thanks Bill Gardner for the report)

Reported by: bennylp Owned by: nanang
Priority: major Milestone: release-1.6
Component: pjmedia Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description

As it is, the pjmedia echo canceller (which uses Speex AEC by default on desktop platforms) would barely reduce any echo. Experimenting with plain Speex AEC API shows that it works, so there must be something in the wrapper/framework that causes it to stop working.

Change History (1)

comment:1 Changed 15 years ago by nanang

  • Resolution set to worksforme
  • Status changed from new to closed

The pjmedia AEC implementation requires minimum latency (between reference and echo signal) to be at least frame time + PJMEDIA_WSOLA_DELAY_MSEC for its internal buffering. Otherwise, the reference signal will come too late (AEC misses the reference signal), hence no cancellation can be done by AEC.

Revisiting the experiment showed that there was zero latency between reference and echo. After shifting/delaying the echo file about 40ms (> required minimum latency), the AEC wrapper worked fine.

In r3115:

  • Added requirement of AEC minimal latency between reference and echo in aectest sample app.
  • Fixed audio length calculation (for logging) in aectest.
  • Modified AEC latency in sound port to 3/4 of playback latency.
  • Minor clean up in echo_common.c: unused vars, a bit stricter latency check (to be at least as much as PTIME).
Note: See TracTickets for help on using tickets.