The full version substantially slows the processor and should probably be run on ARM7 only. Note also that WebRtc has mobile and full version of echo cancellation. The delay needs to be adjusted for each device though. I applied the buffer technique described in P2 and it finally started to work. The echo was still present but the library obviously was trying to cancel it. I wrapped WebRtc echo cancellation part with JNI and called its methods before sending packets to encoder. The delay was removed with this approach but echo was still not cancelled This way packet were sent to echo_playback roughly at the time when AudioTrack send packets to the sound card from its internal buffer. The size of the queue should be roughly equal to the size of internal AudioTrack buffer. No echo was canceled no matter what Speex settings I tried.īecause Speex is very sensitive to delay between playback and echo frames I implemented a queue and queued all packets sent to AudioTrack. I wrapped Speex with JNI and called echo processing routines before sending PCM frames to encoder. I was finally able to get echo cancellation to work on my Arm5 (WM8650) processor.
Maybe it is because I'm using a Samsung galaxy tab p1000 and it run with android 2.2? Any idea? Throw new IllegalArgumentException("Bad arguments on AudioRecorder creation", e) M_AudioRecorder = new AudioRecord (_COMMUNICATION,SAMPLE_RATE,CHANNEL_CONFIGURATION,BIT_ENCODING,m_i32BufferSize) M_i32BufferSize = AudioRecord.getMinBufferSize(SAMPLE_RATE, CHANNEL_CONFIGURATION, BIT_ENCODING) This is done by using the audio that is played to the speakers as a reference audio signal. Private static final int CHANNEL_CONFIGURATION = AudioFormat.CHANNEL_CONFIGURATION_MONO Acoustic Echo Cancellation (AEC) is a method of removing the echo from the audio signal captured by the microphone. Private static final int BIT_ENCODING = AudioFormat.ENCODING_PCM_16BIT
My code is: private static final int SAMPLE_RATE = 16000 _COMMUNICATION how source, when AudioRecorder object isĬreated, a IllegalArgumentException throws, but I don't know why: , the aplication works, but when I try to use