1

I'm working with WebRtc native AEC API.

int32_t WebRtcAec_Process(void* aecInst, const float* const* nearend,
                          size_t num_bands, float* const* out,
                          size_t nrOfSamples, int16_t msInSndCardBuf,
                          int32_t skew);

I want to cancel echo from audio which has 48K sample rate, single channel(mono) with AEC.

But I don't know whynum_bands is necessary. If I give value 1 for num_bands I got fatal (assertion error) inside AEC (RTC_DCHECK_EQ(aec->num_bands, num_bands); fails).

I checked the pre-calculated value of aec->num_bands which is 3 for 48K, From aec_core.cc:

if (sampFreq == 8000) {
   aec->num_bands = 1;
} else {
   aec->num_bands = (size_t)(sampFreq / 16000);
}

Even if I use 3 for num_bands, I got invalid-access crash. Do I need to split every frame into 3 part in some way?

Al Mamun
  • 944
  • 9
  • 27

1 Answers1

0

How many samples are you trying to process? I seem to remember it only supports 80 or 160.

Also, I wrote a Java wrapper for the webRTC echo cancellation module a long time ago. I seem to think there were two separate implementations of the AEC module, one for mobile and one for desktop.

The one I used was the mobile one and only supported 8Khz and 16Khz.

Dean Wild
  • 5,886
  • 3
  • 38
  • 45