Re: Some Speex AGC Questions
Tristan Matthews <[email protected]> Wed, 8 Jan 2014 15:28:33 -0500
| Newsgroups | gmane.comp.audio.compression.speex.devel |
|---|---|
| Message-ID | <CAN8HRDn9c0cGLfHPkoKAtb59pkr5AOGCEx67FL2y7TyyWU+aEQ@mail.gmail.com> |
Hi Kenneth, On Wed, Jan 8, 2014 at 3:09 PM, Kenneth Lerman <[email protected]>wrote: > > I'm attempting to use speex preprocess for automatic gain control in an > application I'm working on and could use some help. > > I'm using Opus as my codec. In order to keep the number of packets down, > I'm using 60msec frames. I'm sampling at 48KHz as is recommended for Opus. > > So, the frame length is 2880 samples and the sampling rate is 48000. The > source of the data is a microphone using ALSA. That platform is Ubuntu. > The version of speex is 1.2rc1. > > When I run with the default settings, the audio seems OK. It's not clear > if preprocess is actually doing anything. > > If I turn AGC on, the sound level becomes almost inaudible. > > When I print the control parameters (the defaults), I get: > DENOISE = 1 > AGC = 0 > AGC_LEVEL = 1174011904 > AGC_INCREMENT = 12 > AGC_DECREMENT = -40 > AGC_MAX_GAIN = 30 > VAD = 0 > DEREVERB = 0 > NOISE_SUPPRESS = -15 > > QUESTION number 1: Is there a guide to "tuning" the AGC? Is there a > document that tells what they really mean and how to adjust them? > You might want to try calling SPEEX_PREPROCESS_SET_AGC_TARGET, like so: int target = 16000; speex_preprocess_ctl(state, SPEEX_PREPROCESS_SET_AGC_TARGET, &target); > > QUESTION number 2: I see that VAD, DEREVERB, DENOISE, ... have values of > 0 or 1. The documentation says that 1 means ON and 2 means OFF. Can > someone explain the apparent discrepancy, please? (I assume that AGC = 0 > means that AGC is off.) > This is a typo in the documentation, it has since been fixed (but not pushed online I guess): http://git.xiph.org/?p=speex.git;a=commitdiff;h=6da046b6c1afbe11f4efead4723df6a9f04d2097 > > QUESTION number 3: Is there an easy way to search the archives of this > list? > Append "from site:http://lists.xiph.org/pipermail/speex-dev/" to your search. Best, Tristan -- Tristan Matthews _______________________________________________ Speex-dev mailing list [email protected] http://lists.xiph.org/mailman/listinfo/speex-dev