Acoustic Echo Cancellation

Author: Andre Adrian
Version: 20apr2007

work: Andre DoT Adrian AT dfs DoT de
home: adrianandre AT compuserve DoT de


This directory is about Acoustic Echo Cancellation for Voice over IP. If you have two-way communication with speakerphone (hands-free telephone) you need Acoustic Echo Cancellation (AEC). The following files explain AEC and can patch the sources of the Kphone GNU/Linux program to a Kphone program with AEC.

Note: The AEC in Kphone and Simph323 are outdated. The latest AEC version is included in intercom. See
There is also a Frequently Asked Questions file.
echounterdruck.pdf German article about AEC
draft-aec-03.txt Paper that explains AEC (with source-code)
kphone_2004-10-11-06-55.tgz Patch Source files for Kphone 4.0.3 (GPL)
simph323_aec_1.0.install Simph323 AEC installation
simph323_aec_1.0.tgz Patch Source files for Simph323

Kphone Acoustic Echo Cancellation installation

Install the Source files
First get Kphone 4.0.3 sources from

Put the kphone-4.0.3.tar.gz and kphone_2004-10-11-06-55.tgz in one directory. cd in this directory and

# prepare compile kphone
tar xzf kphone-4.0.3.tar.gz
cd kphone

# load AEC patch
cd ..
tar xzf kphone_2004-10-11-06-55.tgz
cd kphone

# check stereo mode settings (mic-in or line-in)
# read the file and follow the instructions
vi kphone/

# compile kphone AEC version
make install

# Start kphone with
kphone &

# Kphone Configuration (the IP-addresses are examples - use your own!)

# Menu "Identity..."
# Full Name = Andre s2
# User Part of SIP URL = EDDF_LAP2
# Host Part of SIP URL =
# Auto Register = No

# Menu "Audio Preferences..."
# OSS Device Mode = ReadOnly/WriteOnly
# Preferred Codec = iLBC
# Ringing tone (system bell) = Use ringing tone

# Menu "Phone Book"
# Add
# Person = Andre s2
# Identity = EDDF_LAP1@
# Add Identity to Contacts List = Yes

Have fun and don't hesitate to write me an e-mail if you have problems.
Remember, AEC is a real-time algorithm normally run on a DSP. This
is not Visual Basic for Apprentice we are doing here. It is more like
rocket science (okay, it is more like computer science). You mess with
Mrs. Murphy here. Please believe me, this source code is working.

The iLBC Codec is from Global IP Sound, see

Kphone was originally developed by Billy Biggs.
Today it is maintained by Wirlab.

Read the file for more information about VoIP telephone conference (with C++ source code).