I tried to dig a little in... I run "pjsystest" (found in pjsip-apps/bin) to test my audio device, focusing on test 07: "AEC/AES Test". After playing it I listened to the audio recorded and it was without echo, I clearly heard only one voice! Since the hint says: "We are now playing the captured audio from the mic. Check if echo (of the audio played back previously) is present. The recording is stored in PJSYSTEST_AECREC.WAV for offline analysis" I thought it was all okay. But then a doubt flashed into my mind: "If AEC was working properly the resulting WAV would have to be completely silent, no?" In fact inspecting the source code I see: /* * Create player and recorder */ status = create_player(PJ_ARRAY_SIZE(ref_wav_paths), ref_wav_paths, &player_id); // ? code that check results ? // status = pjsua_recorder_create(pj_cstr(&tmp, add_path(doc_path, AEC_REC_PATH)), 0, 0, -1, 0, &writer_id); // ? code that check results ? // /* * Start playback and recording. */ pjsua_conf_connect(pjsua_player_get_conf_port(player_id), 0); pj_thread_sleep(100); pjsua_conf_connect(0, pjsua_recorder_get_conf_port(writer_id)); Audio file goes to the speakers while mic do the recording (here AEC should do its work) and then resulting audio gets saved on file. There's no direct connection "player_id" > "writer_id" so the result, with AEC enabled, should be only silence. Am I wrong? 2013/1/24 Dede: > Thanks John and Andres for the hints! > I applied Samuel patch ( > http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2012-September/015216.html) > and certainly the situation has improved. > > Now I'm wondering if it makes sense to set a value like: > media_cfg.ec_tail_len = 150; > or if everything is overridden by CoreAudio inner settings. > > The result I have reached with that patch is to avoid the annoying Larsen > effect but I still find myself in the situation where I hear "one and only > one echo return wave" for every word said. Since mic and speakers are both > internal (and those shipped originally with my Mac) I think that they're > synced. > > Is there anything else I can do? > > 2013/1/24 Andreas Ahland: > > Hi, >> On Win, it is the speex preprocessor. I have found that 1200ms is too >> large to for the speex echo canceller to converge. Try 100 to 300 ms max. >> Most acoustic echo is in this range. >> >> If recording and playback is not in sync, i.e. different soundcards, it >> won't work either. >> >> >> Am 24.01.2013 21:16, schrieb John Mah: >> >> On 2013-01-24 11:15 AM, Dede wrote: >>> >>>> Hello all, >>>> I read docs and I can see that there's echo cancellation support in >>>> PJSUA. >>>> It seems also that on Mac OS, CoreAudio should do the trick. >>>> >>> >>> i think that you need to patch your sources to use the CoreAudio >>> backend. if i remember correctly, the portaudio backend is used by default >>> on mac osx builds. (see message by samuel vinson in the archives >>> >> >> >> ______________________________**_________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip at lists.pjsip.org >> http://lists.pjsip.org/**mailman/listinfo/pjsip_lists.**pjsip.org<http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130126/02547309/attachment-0001.html>