It is not recommended to compile individual modules in the WEBRTC separately for use.
Yesterday, I was fortunate enough to ask the Google forum about the delay in computing the AECM module, and Project member said churn this delay actually didn't help the AECM effect, which only sped up the convergence of the built-in latency estimator when the AECM started, and if the delay in the update was incorrect, it would even make AE The CM built-in delay estimator was incorrectly offset, and he advised me to use a theoretical setting, which they used for 100ms. I've seen it in AECM before. It relies heavily on the built-in Delay_estimator binary delay estimator, which is almost entirely dependent on the results of the delay estimator. Therefore, whether the use of AECM will take time to calculate the system delay, Bill no longer comment, the effect of the results of their own practice and grasp.
Second, AECM's chirp Project member clarifies that this is not a bug, but that the AECM algorithm has this performance and is a normal phenomenon.
This article has been a year long, as I learn in the process of deepening understanding, as well as during the discussion with you after the article, worried that the successor according to this one year ago detours, Bill felt the need to make an update on the article, point out the detour to avoid misleading later.
1. The beginning of their own is the AECM, NS, VAD, AGC each module extracted separately use, now seems to be troublesome, and the effect is not very ideal. If everyone's project has no special requirements, large can be the entire speech engine Voiceengine compiled to use. As far as I am concerned, the current solution is to use the audio processing unit audioprocessingmodule independently, because APM is a pure audio processing unit, its interface is only related to audio processing, the use of APM plus the optimization of the upper code, Can guarantee the basic call effect (far from perfect), the Echo is basically not. There are two main problems, one is aecm out of the effect will have chirp, this sound can be improved by the continuous optimization of the delay calculation, and finally can do a few words after a 1~2 of chirp. The second is the voice during the call will suddenly small, I am now suspected by AECM double talk processing caused, the specific also to their own to go and sell.
2. On the calculation of the delay of the Echo cancellation filter, I have always thought that as long as the delay calculation is accurate, you can get the ideal echo cancellation effect, now found that this idea is too naïve, one is AECM algorithm itself has certain limitations, the second is the acquisition delay on Android without system API support, it is , and the playback API does not guarantee its accuracy. My ability to do so is to optimize the latency calculation at the top, minimizing the impact of the Android audio API on latency.
3. The optimization target can be turned to 1 AECM algorithm after the code of the Android upper optimization system audio delay reaches a certain bottleneck. 2 optimize AEC (PC) (so that it can operate on the phone, the current AEC-PC default filter length is 12 pieces, each 64 points, (12*64=768 sampling) that is, AEC-PC can only handle 48ms mono 16kHz delay data, While the Android audio system latency is mostly above 100ms, so it is necessary to increase the length of the AEC-PC filter and ensure its operational efficiency is the focus of optimization) 3 other module optimization (such as jitter buffer, etc.).
4. After the text of the source list is outdated, because I do not currently support the separate compilation of these modules, I do not update the list, if there is an independent compiler requirements, can be found in the WEBRTC project corresponding directory to find the required files.
Objective
The recent churn on how to use Google's webrtc--on Android and iOS is an Open-source project that has undoubtedly boosted Internet instant messaging and VoIP development. (Elesos Note: Even Google can not visit the country, deserved to lag behind.) )
WEBRTC offers a set of audio processing engine Voe, but Voe's overall compilation on Android and IOS has been a tedious and annoying problem, and the NS (Noise Suppression noise suppression), VAD (Voice) in Voe was extracted separately. Activity detection mute detection), AECM (Acoustic echo Canceller for Mobile acoustic echo cancellation), and AGC (auto Gain control automatic gain controls) and other modules to compile and use the method.
After their own two months of churn and testing, finally on Android and IOS successfully compiled modules and in the project using the NS/VAD/AECM three modules, the effect is relatively good.
Looking back, the compilation of these modules is actually very simple, but two months ago, I really took some effort.
Body
Because several large modules are compiled in the same way, this article only take the NS module as an example, the rest of the module please the reader to explore and experiment.
Step 1-Download Google WebRTC source
WEBRTC Current development version of the main version has been to r4152-3.32, but these large modules did not have a big change, so this article is still according to Bill at the time of version 3.31 to explain, please use SVN sync the following directory (as for the method of synchronization, please Google yourself):
http://webrtc.googlecode.com/svn/branches/3.31/can be accessed