DesignAEC

Version 15 (Adrian Georgescu, 11/16/2009 06:04 pm)

1 2 Adrian Georgescu
= Echo cancellation =
2 1 Adrian Georgescu
3 1 Adrian Georgescu
[[TOC(Design*, depth=1)]]
4 1 Adrian Georgescu
5 1 Adrian Georgescu
SIP SIMPLE client is a Python software library that allows for easy development of Internet communications end-points based on SIP and related protocols for voice, rich presence, session based instant messaging (IM), file transfers and desktop sharing. Other media types can be easily added by using an extensible high-level API. SIP SIMPLE client uses [http://www.pjsip.org/pjmedia/docs/html/index.htm PJSIP media library] for audio processing (sound card abstraction, audio codec and acoustic echo cancellation).
6 1 Adrian Georgescu
7 1 Adrian Georgescu
For more information see http://sipsimpleclient.com
8 1 Adrian Georgescu
9 1 Adrian Georgescu
== Background ==
10 1 Adrian Georgescu
11 1 Adrian Georgescu
The present implementation of the echo canceller from PJSIP media library is not performing to the desired level of quality. Practically, the speaker phone function of SIP SIMPLE client is not reliable and not performing satisfactory unless a headset is used.
12 1 Adrian Georgescu
13 1 Adrian Georgescu
[[Image(http://www.pjsip.org/images/media-flow.jpg)]]
14 1 Adrian Georgescu
15 1 Adrian Georgescu
== Project goal ==
16 1 Adrian Georgescu
17 14 Adrian Georgescu
Replace the existing AEC from Pjmedia library (what is displayed as echo.h in the above diagram whihc employes the AEC of the speex project) with an alternative to be developed solution that provides a high quality speakerphone user experience. The acoustic echo cancelation should perform comparable with any other proven VoIP commercial solution like Skype or iChat making the need of a headset un-necessary.
18 1 Adrian Georgescu
19 1 Adrian Georgescu
The developed software will be released under an open source licence and distributed with SIP SIMPLE client library.
20 1 Adrian Georgescu
21 11 Adrian Georgescu
The deliverable is C written program that can be applied to the pjsip  cvs trunk 1.0 with the '''patch''' command.
22 11 Adrian Georgescu
23 1 Adrian Georgescu
== Resources ==
24 1 Adrian Georgescu
25 7 Adrian Georgescu
General
26 1 Adrian Georgescu
27 7 Adrian Georgescu
 * Digital Signal Processing http://www.dsptutor.freeuk.com/
28 7 Adrian Georgescu
 * Graduation thesis about AEC  http://innovexpo.itee.uq.edu.au/2003/exhibits/s365914/
29 9 Adrian Georgescu
 * DSP concepts: http://www.bores.com/courses/intro/basics/index.htm
30 7 Adrian Georgescu
31 7 Adrian Georgescu
PJSIP media library
32 7 Adrian Georgescu
33 1 Adrian Georgescu
 * PJSIP media library http://pjsip.org, used by this project, AEC is implemented based on the Speex library, the code in pjsip/pjmedia/src/pjmedia/echo_speex.c 
34 1 Adrian Georgescu
 * Media flow - http://trac.pjsip.org/repos/wiki/media-flow
35 12 Adrian Georgescu
 * PJSIP AEC API http://www.pjsip.org/pjmedia/docs/html/group__PJMEDIA__Echo__Cancel.htm
36 1 Adrian Georgescu
37 15 Adrian Georgescu
=== Speex AEC ===
38 1 Adrian Georgescu
39 15 Adrian Georgescu
This is the standard used AEC algorithm in PJSIP
40 15 Adrian Georgescu
41 1 Adrian Georgescu
 * Speex project http://speex.org, the echo canceller implements AEC based on the MDF algorithm, see speex/libspeex/mdf.c. A test client is available in speex/speexclient, this has been used for developing pjmedia equivalent
42 6 Adrian Georgescu
 * http://speex.org/docs/api/speex-api-reference/group__SpeexEchoState.html
43 1 Adrian Georgescu
44 15 Adrian Georgescu
=== Andree Adrian AEC ===
45 1 Adrian Georgescu
46 1 Adrian Georgescu
 * Draft AEC http://www.andreadrian.de/echo_cancel/draft-aec-03.txt
47 1 Adrian Georgescu
 * http://www.andreadrian.de/intercom/ implements AEC based on NLMS algorithm (not tested yet)
48 1 Adrian Georgescu
 * Kphone AEC implemented using above AEC http://www.andreadrian.de/echo_cancel/ (not tested)
49 15 Adrian Georgescu
50 15 Adrian Georgescu
This AEC has been implemented in C and added as a working patch to the SIP SIMPLE project. It does not work properly, audio artifacts being present and further debugging requires DSP knowledge.
51 15 Adrian Georgescu
52 15 Adrian Georgescu
The actual implementation can be used as working example for how a third party AEC algorithm can be integrated with the SIP SIMPLE project.