Question about running WebRTC AEC at 32kHz sample rate

171 views
Skip to first unread message

Mauritz Jameson

unread,
Jan 25, 2015, 12:10:44 AM1/25/15
to discuss...@googlegroups.com

I would like to run the WebRTC AEC at 32kHz sample rate. After studying the source code, it looks like the microphone data has to be split into two bands (0-8kHz) and (8-16kHz) using QMF analysis.

So I'm calling the AEC like this:

WebRtcAec_Process(aecInst, &aecInput[0], 2, &aecOutput[0], 160, 0, 0);

where aecInput[0] is a pointer to 160 samples of low-band data and aecInput[1] is a pointer to 160 samples of high-band data.

The same principle applies to aecOutput. The AEC will output data for the lower band at location 'aecOutput[0]' and data for the higher band at location 'aecOutput[1]'. As a final operation, QMF synthesis is used to reconstruct the AEC output signal at a sample rate of 32kHz.

My questions are:

  1. Is this the correct way to pass in the two-band data ?
  2. If not, then how is the two-band data supposed to be passed in?
  3. How is the speaker data (far-end) supposed to be passed in? Again, from looking at the code it looks like it's only the lower-band of the speaker data which is passed in -- like this:
WebRtcAec_BufferFarend(aecInst, speakerDataLowBand, 160);

where speakerDataLowBand is the lower band (0-8kHz) of the original speaker signal. The lower band of the speaker data is obtained (again) using QMF analysis.

Is the above correct?

Thank you.

Simon Perreault

unread,
Jan 26, 2015, 8:29:17 AM1/26/15
to discuss...@googlegroups.com

On Sun, Jan 25, 2015 at 12:10 AM, Mauritz Jameson <mjame...@gmail.com> wrote:
I would like to run the WebRTC AEC at 32kHz sample rate.

Out of curiosity: why?

Thanks,
Simon

Andrew MacDonald

unread,
Jan 26, 2015, 11:34:12 AM1/26/15
to discuss...@googlegroups.com
I'd recommend using the AudioProcessing interface:
https://code.google.com/p/webrtc/source/browse/trunk/webrtc/modules/audio_processing/include/audio_processing.h

It takes care of all these details for you.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages