最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

audio - AcousticEchoCanceler not working in android recording - Stack Overflow

programmeradmin0浏览0评论

I'm experiencing an issue with the official AcousticEchoCanceler and WebRtc libraries on many test devices, including Samsung S23, Pixel 8a, Pixel 7, and Galaxy Tab A9. Despite implementing the code correctly and importing it into AudioRecorder, there is still a loud noise when I export the recording to a file. Here's what I've tried so far:

  • AcousticEchoCanceler Implementation:

    AcousticEchoCanceler echoCanceler = AcousticEchoCanceler.create(audioSessionId);
    if (echoCanceler != null) {
       echoCanceler.setEnabled(true);
    }
    

My sample rate is 16k
Additionally, I set up AudioManager.MODE_IN_COMMUNICATION
The same happen when I try NoiseSuppressor

  NoiseSuppressor mNoiseSuppressor = NoiseSuppressor.create(audioSessionId);
  if (mNoiseSuppressor != null) {
      int res = mNoiseSuppressor.setEnabled(true);
  }
  • WebRtc Library Implementation

     WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true);
     WebRtcAudioUtils.setWebRtcBasedNoiseSuppressor(true);
    

But none of them can work, the recording still contains loud noise when exported to a file.
I wonder what is the correct way to support Acoustic Echo Cancellation (AEC) on android device?
Or is there other third party library?

发布评论

评论列表(0)

  1. 暂无评论