webrtc AEC algorithm
Asked Answered
C

3

9

I have made a software that uses WebRTC DSP libraries (AEC, NS, AGC, VAD). Now I need to know what algorithm uses each one to write my Master´s Thesis, but I don't find any information about that.

Someone knows the algorithms of this libraries, specially the Acoustic Echo Cancellation (like for example NLMS, that I know it's commonly used, but I don't know if WebRTC also uses it).

I've tryed to know the algorithm looking into the source code, but I don't understand enough.

Thanks in advance!

Cobweb answered 8/3, 2013 at 20:2 Comment(0)
M
2

I've just successfully using standalone WebRTC aecm module for android. and there's some tips:

1.the most important is the thing called "delay", you can find the definition of it in dir:

..\src\modules\audio_processing\include\audio_processing.h

quote:

Sets the |delay| in ms between AnalyzeReverseStream() receiving a far-end frame and ProcessStream() receiving a near-end frame containing the corresponding echo. On the client-side this can be expressed as delay = (t_render - t_analyze) + (t_process - t_capture)

where,

  • t_analyze is the time a frame is passed to AnalyzeReverseStream() and t_render is the time the first sample of the same frame is rendered by the audio hardware.
  • t_capture is the time the first sample of a frame is captured by the audio hardware and t_pull is the time the same frame is passed to
    ProcessStream().

if you wanna use aecm module in standalone mode, be sure you obey this doc strictly.

2.AudioRecord and AudioTrack sometimes block(due to minimized buffer size), so when you calc the delay, don't forget adding blocking time to it.

3.if you don't know how to compile aecm module, you may learn Android NDK first, and the module src path is

..\src\modules\audio_processing\aecm

BTW, this blog may help a lot in native dev. and debuging.

http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/

http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-debugging/

hope this may help you.

Maxia answered 24/4, 2013 at 3:37 Comment(10)
Sorry... but you have answered something that it is not according to my question. Maybe you have missed the post where you want to write that! Nobody knows the algorithm used within the AEC module of WebRTC?? I am desperate trying to know it in to write my Master's Thesis... I will be very gratefully for any answer!!Cobweb
sorry for my misunderstanding of your question. I'm just using the module but has little info. about the algorithm, i voted your question and best wishes!Maxia
Thank you very much for your votes and for your time trying to answer my question. I don´t have yet the answer to my question... but I have a different question that maybe you can answer me: I am trying to use the functions "AnalyzeReverseStream() and "ProcessStream()", but the parameter of these functions is of type "AudioFrame* " and I don´t know how to handle it. In my program I have 10ms of audio frames into a short*. Can you (or someone) help me? Thanks in advance!Cobweb
@Cobweb AudioFrame maybe a typedef on the latest update for webrtc, cus' i'm not sync from google at least one month, and the thing before is exactly int16_t * which means short * most of the time.Maxia
Thank you very much friend. I have solved the issue with the AudioFrame* typedef and now everything it´s working :DCobweb
sorry...I have another question. How should I compile the modules that I need? Now I am working with every files together in the same folder. But now I would like to left the webrtc folders structure as I have downloaded, but I don´t know how to compile it and get it work. Have you understand what I mean? Sorry for my bad english and I hope you or someone can help meCobweb
compile for what? android or? maybe you can find answer at WebRTC getting startedMaxia
sorry I forgot to say that I would like to compile in Linux. But I need to compile all my software, which includes some webrtc modules, without the needed to make an extra installation. But don´t worry friend, I will try to handle it by myself. Thanks!Cobweb
ok ah maybe you should compile these modules into shared library(i.e. webrtc_aec.so/webrtc_ns.so etc.) and load them dynamically in your software. good luck ;)Maxia
@BillHoo If there is someone still needs help regarding AEC-Algorithm, visit reference: introduction_to_webrtc_aec_aem. This link is holding the core algorithmic detail about AEC.Spar
L
1

From the code inspection of AGC algorithm in WebRtc, it matches closely with the description in http://www.ti.com/lit/wp/spraal1/spraal1.pdf

Lotuseater answered 5/6, 2015 at 17:11 Comment(0)
H
0

It's based on NLMS, but has a variable step length (mu).

Hydroelectric answered 10/2, 2019 at 11:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.