Reputation: 31
So I'm trying to develop an android VoIP application. I'm having trouble making the echo cancellation work and can still hear myself talk when on loudspeaker mode.
AudioRecord recorder = new AudioRecord(
MediaRecorder.AudioSource.VOICE_COMMUNICATION, mSampleRate,
AudioFormat.CHANNEL_IN_MONO,
AudioFormat.ENCODING_PCM_16BIT, bufferSize);
echoCanceler = AcousticEchoCanceler.create(recorder.getAudioSessionId());
echoCanceler.setEnabled(true);
Ive tried changing settings to CHANNEL_IN_STEREO
. Changing playback settings to MODE_IN_COMMUNICATON
but still no luck.
Im using a samsung S7 and Nexus 5 to test.
Upvotes: 3
Views: 907
Reputation: 99
Echo cancellation on android is not a simple task especially if you want to support multiple phones and multiple versions of Android. Start by some reading on the behavior and challenge of echo cancellation. Then, you can try an open source solution (e.g. Speex). If the open source does not work, then you should look for a professional echo cancellation. Simply google for echo cancellation software.
Upvotes: 1