本文介绍了独立的AGC(自动增益控制)的WebRTC中的应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用WebRTC技术库中创建一个独立的AGC。 (输入 - wav文件,输出 - 与调节增益wav文件)。但就在这个时候,我有一些问题,这个问题。

I'm trying to create a standalone AGC using WebRtc library. (Input - wav file, output - wav file with adjusted gain). But at this time I have some problems with this issue.

我想使用的在 gain_control.h 文件中声明功能。当我使用WebRtcAgc_Process(....)我获得恒定的增益,它适用于整个信号,而不是非线性增益取决于从输入信号幅度。

I'm trying to use functions which are declared in gain_control.h file. When I'm using WebRtcAgc_Process(....) I obtain constant gain, which applies to whole signal, but not nonlinear gain which depends from input signal magnitude.

也许我应该使用其他功能为我的目的是什么?如何通过WebRTC技术库实现AGC?

May be I should use another functions for my purpose? How can I implement AGC via WebRTC library?

推荐答案

的AGC的主要目的是提供一种用户预期通过OS来设置一个建议的系统的麦克风的音量。如果你想申请一个纯粹的数字增益,可以在两种模式(一个配置从模块/ audio_processing /有/ audio_processing.h ,但 gain_control.h 有类似的模式):

The AGC's main purpose is to provide a recommended system mic volume which the user is expected to set through the OS. If you would like to apply a purely digital gain, you can configure it in one of two modes (from modules/audio_processing/include/audio_processing.h, but gain_control.h has analogous modes):

// Adaptive mode intended for situations in which an analog volume control
// is unavailable. It operates in a similar fashion to the adaptive analog
// mode, but with scaling instead applied in the digital domain. As with
// the analog mode, it additionally uses a digital compression stage.
kAdaptiveDigital,

// Fixed mode which enables only the digital compression stage also used by
// the two adaptive modes.
//
// It is distinguished from the adaptive modes by considering only a
// short time-window of the input signal. It applies a fixed gain through
// most of the input level range, and compresses (gradually reduces gain
// with increasing level) the input signal at higher levels. This mode is
// preferred on embedded devices where the capture signal level is
// predictable, so that a known gain can be applied.
kFixedDigital

您可以通过 WebRtcAgc_Init设置这些(),但除非你需要避免的开销,我建议只使用AudioProcessing类。

You can set these through WebRtcAgc_Init(), though unless you need to avoid the overhead, I'd recommend just using the AudioProcessing class.

这篇关于独立的AGC(自动增益控制)的WebRTC中的应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-11 18:32