faq_ex.txt Version 23sep2005 Frequently asked questions on echo cancellation 1.) I hear my own voice in the loudspeaker. There are several reasons for this. We go from simple to complex. Check in your audio mixer application (gamix, kamix,...) that Mic Playback is off. Mic Playback is an electric shortcut from microphone to loudspeaker on the audio sound chip. This is convinient for a handset or headset, but it is not good for a speakerphone. 2.) Echo cancellation works fine. But sometimes it emits loud noise. This is typical for divergence of an adaptive filter. The filter is no longer stable and works like a noise generator. To tame the filter you can adjust the "noise floor" or ambient noise level. Increasing this parameter makes the adaptive filter less powerful, but more stable. The program option -a needs a decibel value for the noise floor. The default is -55 decibel. This is fine for a CELP codec like iLBC, because a compressing codec works as noise canceller, too. For the non- compressing G.711 codec a noise floor of -55 decibel is good. Start intercom with the option -a -60 to get -60 decibel ambient noise. 3.) My soundcard can not do hardware echo cancellation in the mixer. The Soundblaster SB Live or Audigy are very fine soundcards, but they can not do hardware echo cancellation in the mixer. You need a real AC97 soundchip for this. You find these today only as on-board sound chips, no longer as PCI soundcards. Your audio mixer application can tell you the soundchip. I was successful with the following chips: Analog Devices AD1985, ICEnsemble ICE1232, Realtek ALC650 and ALC655, SigmaTel STAC9750/51, VIA VT1612A. A last solution is to use external wireing between line-out and line-in for hardware echo cancellation. The microphone is connected to left line-in. Right line-out is connected to right line-in and to the speaker. This extern cable replaces the hardware mixer setup with different sources for left and right channel. This solution should work with every soundcard and with every operating system. 4.) Alternatives for hardware echo cancellation. If you do not use the -m or -l program option you get software echo cancellation. The quality is not as good as hardware echo cancellation because the operating systems introduces some jitter. Specially if you use software echo cancellation you should run your application with the real-time scheduler. Read the file /usr/local/bin/intercom starting on line 91. The RPM packet rtstools gives you the Linux command setpriority. With a little editing of the sudo file you do no longer have to enter the superuser password at program start. Attention: A realtime process has more priority then the kernel. A bug in such a process can freeze your Linux box. 5.) Background noise is too loud. The Double-Talk-Detector is always on. The AEC can work with two microphones. One is receiving the human talker and the background noise, the other is only receiving background noise. See the book from Simon Haykin, Adaptive Filter Theory, 4. Edition, chapter 5.3, application 4. The talker microphone is connected to left input, the background microphone to right input. The Double-Talk-Detector must be disabled in the software. The nlms_pw() function is called with update=1. 6.) After key press the other station shows red, but a ping is possible. The firewall software in SuSE 9.3 blocks the UDP Port 55004 that is used for signalling. Use YaST, Sicherheit und Benutzer, Firewall, Erlaubte Dienste, Erweitert, UDP-Ports 55004 to enable this port. By the way, UDP port 5004 is used for audio. 7.) "Update Speex lib to 1.1" is printed or problems with Speex codec. Speex is a very fine codec. The VoIP intercom uses the shared Speex lib of your Linux system. Some distributions come with an old version of the Speex lib. The VoIP intercom software was tested with Speex version 1.1.7 that you can get from www.speex.org. 8.) It is still not working. Well I do not like to blame other people or their software. But you should check your ALSA and Linux kernel versions. Best results I got with SuSE Linux 9.1 that has ALSA version 1.0.3 and Linux Kernel 2.6.4. The SuSE Linux versions 9.0, 9.2 and 9.3 are fine, too. After you tried the latest or at least an ALSA version >= 1.0 feel free to write an e-mail to me.