Abstract:
Speech noise gating for gain control functions such as automatic gain control, dynamic range compression, and digital volume control scales the gain control function gain according to the ratio of noise energy to input energy.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims priority from provisional application No. 60/948,227, filed Jul. 6, 2007. The following co-assigned co-pending patent applications disclose related subject matter: application Ser. No. 11/165,902, filed Jun. 24, 2005. All of which are herein incorporated by reference. 
     
    
     BACKGROUND OF THE INVENTION 
       [0002]    The present invention relates to signal processing, and more particularly to digital audio gain control devices and methods. 
         [0003]    Speech gain control modules, such as Automatic Gain Controller (AGC), Dynamic Range Compressor (DRC), and Digital Volume Controller (DVC), are important items in mobile phone acoustic systems. Gain control modules can be implemented as Digital Baseband (DBB) software, Analog Baseband (ABB) hardware, or combinations of DBB software and ABB hardware. Gain control modules allow a handset terminal to provide a speech level sufficient for an ear-piece or loudspeaker output of the far-end (receiving or downlink) signal and for a near-end transmission signal (sending or uplink signal). However, background noise handling presents problems for gain control module design. Indeed, a gain control module may amplify background noise to undesirable levels and significantly degrade perceptual quality of handset terminal. 
         [0004]    Generally, a speech gain control module can be described as illustrated in  FIG. 2   a  as applying a gain to the input speech signal: 
         [0000]        y ( k )= G x ( k ) 
         [0000]    where x(k) and y(k) are digital input and output of the gain control module, and G is the applied gain which is a constant in Digital Volume Control (DVC) and is a variable dependent upon the input signal in AGC and DRC. 
         [0005]    Generally, DRC includes a fixed noise gate to avoid background noise amplification. DRC with a fixed noise gate typically applies a gain of 0 dB or less to the input signal when the input level is lower than a pre-determined threshold. However, it is difficult to select a fixed noise gate threshold that prevents background and idle channel noise amplification while properly amplifying low-level speech signals. Conventional AGC does not include a noise gate, but it is possible to integrate protection against excessive noise level amplification by using a Voice Activity Detector (VAD); see cross-referenced patent application Ser. No. 11/165,902. For example, the AGC described therein does not increase gain while the VAD decision is off (i.e., input signal is not speech). This prevents the AGC from excessively amplifying any background noise signal, but it allows the AGC to apply the same gain to speech and pause segments, and thus background noise level is still amplified. 
         [0006]    The straightforward idea of completely avoiding noise level amplification is to apply gain to the input signal only during speech segments. However, this could cause two types of distortion. The first type of distortion is noise sputtering. It is difficult for a VAD to identify speech and noise without decision error. If a VAD makes a decision error during pause segments, the AGC amplifies the noise signal level in isolated short time intervals and will cause noise sputtering distortion. The second distortion is noise level difference between speech and pause segments. Background or idle channel noise is present even in speech segments. If gain is applied to the input signal only during speech segments, there will be a noise level gap between speech and pause segments. This gap would cause audible noise level fluctuation. 
       SUMMARY OF THE INVENTION 
       [0007]    The present invention provides adaptive noise gating for a speech gain control module by estimating noise and correspondingly scaling the gain. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0008]    So that the manner in which the above recited features of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this invention and are therefore not to be considered limiting of its scope, for the invention may admit to other equally effective embodiments. 
           [0009]      FIG. 1  shows a system with adaptive noise gating. 
           [0010]      FIGS. 2   a - 2   c  show a gain control module, a processor, and network communication. 
       
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     1. Overview 
       [0011]    Preferred embodiment methods provide adjustment of the gain output by a gain control module to limit the amplification of noise (noise gating) by estimating the noise and correspondingly scaling the gain.  FIG. 1  illustrates the adaptive noise gate applied to the output of a gain control module. 
         [0012]    The preferred embodiment adaptive noise gate prevents background noise amplification during pause segments while preserving gain computed in a gain control module during speech segments. This is a post-processing module for gain control function, and applicable to any speech gain control functions. 
         [0013]    Preferred embodiment systems (e.g., hands-free cellphones, speakerphones, etc.) perform preferred embodiment methods with any of several types of hardware: digital signal processors (DSPs), general purpose programmable processors, application specific circuits, or systems on a chip (SoC) such as combinations of a DSP and a RISC processor together with various specialized programmable accelerators.  FIG. 2   b  shows functional blocks of an example of a mobile system capable of hands-free support. A stored program in an onboard or external (flash EEP)ROM or FRAM could implement the signal processing. Analog-to-digital converters and digital-to-analog converters can provide coupling to the real world, modulators and demodulators (plus antennas for air interfaces) can provide coupling for transmission waveforms, and packetizers can provide formats for transmission over networks such as packetized over the Internet (VoIP); see  FIG. 2   c.    
       2. Adaptive Noise Gating 
       [0014]    Initially consider  FIG. 2   a  which shows a generic block diagram of a gain control module. The gain control module could be AGC, DRC, DVC, or any function that determines gain G with a given input signal x(k) and external parameter(s) such as target output level or pre-determined constant gain. Then, gain G computed in gain control function is applied to the input signal x(k). The notation is for digital speech, such as sampled at 8 or 16 kHz with 8-, 12-, or 16-bit data and partitioned into 10 or 20 ms frames (e.g., 80, 160, or 320 samples). A sum of the squares of a signal over a frame provides an energy measurement of the signal. 
         [0015]    In contrast to the gain control module system in  FIG. 2   a,  a preferred embodiment system has a gain control module together with an adaptive noise gate for the output of the gain control module;  FIG. 1  shows a block diagram. As shown in the figure, the adaptive noise gate is a separate post-processing module from the gain control module. The noise gate modifies gain G from the gain control module into G ang  applied to a given input signal to avoid background or idle channel noise amplification during pause segments. 
         [0016]    Gain control module without an adaptive noise gate as shown in  FIG. 2   a  applies gain G to input signal x(k) which is the sum of a speech signal s(k) and a noise signal n(k). This means that gain G is applied to both the speech and the noise signals, and thus the output y(k) is: 
         [0000]    
       
         
           
             
               
                 
                   
                     y 
                      
                     
                       ( 
                       k 
                       ) 
                     
                   
                   = 
                   
                     Gx 
                      
                     
                       ( 
                       k 
                       ) 
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     G 
                      
                     
                       ( 
                       
                         
                           s 
                            
                           
                             ( 
                             k 
                             ) 
                           
                         
                         + 
                         
                           n 
                            
                           
                             ( 
                             k 
                             ) 
                           
                         
                       
                       ) 
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     
                       Gs 
                        
                       
                         ( 
                         k 
                         ) 
                       
                     
                     + 
                     
                       Gn 
                        
                       
                         ( 
                         k 
                         ) 
                       
                     
                   
                 
               
             
           
         
       
     
         [0017]    However, the adaptive noise gate function modifies G to G ang  so that gain G is effectively only applied to the speech signal s(k). In particular, requiring both 
         [0000]        y ( k )= G   ang   x ( k ) 
         [0000]    and 
         [0000]        y ( k )= G s ( k )+ n ( k ) 
         [0000]    gives 
         [0000]        G   ang   x ( k )= G s ( k )+ n ( k ) 
         [0018]    Next, taking expectations of the energies gives: 
         [0000]        G   ang   2    E[x ( k ) 2   ]=G   2    E[s ( k ) 2 ]+2 G E[s ( k )  n ( k )]+ E[n ( k ) 2 ] 
         [0019]    Then assuming that the speech and noise signals are statistically de-correlated (i.e., E[s(k) n(k)]=0) implies 
         [0000]        G   ang   2    E[x ( k ) 2   ]=G   2    E[s ( k ) 2   ]+E[n ( k ) 2 ] 
         [0020]    Finally, recalling x(k)=s(k)+n(k), and thus E[x(k) 2 ]=E[s(k) 2 ]+E[n(k) 2 ], allows for elimination of the E[s(k) 2 ] term: 
         [0000]        G   ang   2   E[x ( k ) 2   ]=G   2 ( E[x ( k ) 2   ]−E[n ( k ) 2 ])+ E[n ( k ) 2 ] 
         [0000]    Simplifying notation by writing E x =E[x(k) 2 ] and E n =E[n(k) 2 ] gives 
         [0000]        G   ang   2    E   x   =G   2 ( E   x   −E   n )+ E   n    
         [0000]    and thus dividing by E x : 
         [0000]    
       
         
           
             
               
                 
                   
                     G 
                     ang 
                     2 
                   
                   = 
                   
                     
                       
                         G 
                         2 
                       
                        
                       
                         ( 
                         
                           1 
                           - 
                           
                             
                               E 
                               n 
                             
                             / 
                             
                               E 
                               x 
                             
                           
                         
                         ) 
                       
                     
                     + 
                     
                       
                         E 
                         n 
                       
                       / 
                       
                         E 
                         x 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     
                       G 
                       2 
                     
                     + 
                     
                       
                         ( 
                         
                           1 
                           - 
                           
                             G 
                             2 
                           
                         
                         ) 
                       
                        
                       
                         
                           E 
                           n 
                         
                         / 
                         
                           E 
                           x 
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0000]    or taking square roots: 
         [0000]        G   ang   =[G   2 +(1 −G   2 ) E   n   /E   x ] 1/2    
         [0000]    Because E x  and E n  are estimated, the inequality E n ≦E x  (i.e., 0≦E s ) may not hold for the estimates, so take: 
         [0000]    
       
         
           
             
               
                 
                   
                     G 
                     ang 
                   
                   = 
                     
                    
                   
                     
                       [ 
                       
                         
                           G 
                           2 
                         
                         + 
                         
                           
                             ( 
                             
                               1 
                               - 
                               
                                 G 
                                 2 
                               
                             
                             ) 
                           
                            
                           
                             
                               E 
                               n 
                             
                             / 
                             
                               E 
                               x 
                             
                           
                         
                       
                       ] 
                     
                     
                       1 
                       / 
                       2 
                     
                   
                 
               
               
                 
                     
                    
                   
                     
                       if 
                        
                       
                           
                       
                        
                       
                         E 
                         n 
                       
                     
                     &lt; 
                     
                       E 
                       x 
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   1.0 
                 
               
               
                 
                     
                    
                   otherwise 
                 
               
             
           
         
       
     
         [0021]    The noise level E n  can be estimated with the input signal x(k) in many different ways. First preferred embodiments used the noise level estimation method described in the cross-referenced patent application Ser. No. 11/165,902 in which the noise level is estimated with asymmetric time constants: slow upward time constant C u  and fast downward time constant C d . The following is pseudocode for this noise estimation method. 
         [0000]                                            if (E x  &gt; E n  * C u )             E n  = E n  * C u             else if (E x  &lt; E n  * C d )             E n  = E n  * C d             else             E n  = E x                          
Example values are C d =0.895 (so with 20 ms frames, a decrease of −24 dB/s) and C u =1.014 (again with 20 ms frames, an increase of 3 dB/s).
 
         [0022]    In summary, the first preferred embodiment adaptive noise gating for a gain control function (gain control module output) includes the steps of: 
         [0023]    (a) estimating noise energy; 
         [0024]    (b) estimating input signal energy; and 
         [0025]    (c) adjusting a gain, G, by adjusting G 2  to G 2 +(1−G 2 )R where R is the ratio of said estimated noise energy divided by said estimated input energy. 
       3. Noise Fluctuations 
       [0026]    Under high-level background noise conditions (e.g. noise SNR is 10 dB or lower), the first preferred embodiment adaptive noise gate introduces audible noise fluctuations due to the noise level gap between speech and pause segments (the noise level remains high during speech, but is reduced to low levels during pause segments). The second preferred embodiments handle noise fluctuations by automatically disabling the adaptive noise gate for high-level background noise conditions without binary switching artifacts. 
         [0027]    In particular, pick two noise level thresholds T_H and T_L(T_H&gt;T_L) expressed in dB for the noise fluctuation handling process. Then, depending on input background noise level E n , apply either adaptive noise gate gain G ang , original gain G, or an interpolated value of G ang  and G, to the input signal. The following is pseudo code of an implementation. 
         [0000]                                            if 10*log10(E n ) &lt; T_L             G′ = G ang             else if 10*log10(E n ) &gt; T_H             G′ = G           else             w = (10*log10(E n ) − T_L) / (T_H − T_L)             G′ = w * G + (1 − w) * G ang                          
where G′ is the gain applied to the input signal. As shown above, adaptive noise gate gain G ang  is used if the background noise level is low because the noise level gap between speech and pause is not very audible. If background noise level is high, the original gain from the gain control module, G, is used to avoid noise fluctuations. Finally, if background noise level falls between T_L and T_H, an interpolated gain of G ang  and G will be used. This allows the noise fluctuation handling process to smoothly disable an adaptive noise gate depending on background noise level.
 
         [0028]    In one implementation, T_H and T_L were set to −20 dBm0 and −50 dBm0 (or −26 dBFS and −56 dBFS), respectively. 
       4. Pause Segment Noise Reduction 
       [0029]    The adaptive noise gate does not apply gain (or applies gain of 0 dB) to the input signal when E x ≦E n  (i.e., during pause segments). If an application requires suppressing the noise level to some extent, then the foregoing can be re-formulated as follows where α&lt;1 is a noise suppression factor. 
         [0000]        G   ang   2    E   x   =G   2 ( E   x   −E   n )+α 2    E   n    
         [0000]    And then the modified adaptive noise gated gain can be derived as follows. 
         [0000]    
       
         
           
             
               
                 
                   
                     G 
                     ang 
                     2 
                   
                   = 
                   
                     
                       
                         G 
                         2 
                       
                        
                       
                         ( 
                         
                           1 
                           - 
                           
                             
                               E 
                               n 
                             
                             / 
                             
                               E 
                               x 
                             
                           
                         
                         ) 
                       
                     
                     + 
                     
                       
                         α 
                         2 
                       
                        
                       
                         
                           E 
                           n 
                         
                         / 
                         
                           E 
                           x 
                         
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                   
                     
                       G 
                       2 
                     
                     + 
                     
                       
                         ( 
                         
                           
                             α 
                             2 
                           
                           - 
                           
                             G 
                             2 
                           
                         
                         ) 
                       
                        
                       
                         
                           E 
                           n 
                         
                         / 
                         
                           E 
                           x 
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0000]    or taking square roots: 
         [0000]        G   ang   =[G   2 +(α 2   −G   2 ) E   n   /E   x ] 1/2    
         [0000]    In one implementation, α is set to −3 dB (i.e. α=10 (−3*0.05) ). Note that, if α is set very low (e.g. −6 dB or lower), it will cause audible noise fluctuation artifacts. 
       5. Modifications 
       [0030]    The adaptive noise gate is an independent post-processing module for a gain control module (gain control function). It can be applied to any speech gain control functions such as DRC, AGC, digital volume control, etc. The method does not depend on signal sampling rate, so it can be applied to 8 kHz, 16 kHz or any other sampling rate. The various constants and thresholds described in the preferred embodiments can be replaced with other reasonable values. Other background noise estimation methods can be used, such as simple smoothing. The adaptive noise gate can be applied with or without noise fluctuation handling and/or background noise level reduction. 
         [0031]    While the foregoing is directed to embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.