Abstract:
An estimate is made of the power of a speech portion of a speech signal that includes speech portions separated by non-speech portions, the power for the speech portion being estimated based on a power envelope that spans the speech portion. The gain of an automatic gain control is not adjusted during the speech portions.

Description:
BACKGROUND  
         [0001]    This description relates to automatic gain control.  
           [0002]    Automatic gain control (AGC) is used to maintain an output signal level nearly constant notwithstanding variations of an input signal level within a predefined dynamic range The input signal may be, for example, a signal received from a telephone channel.  
           [0003]    As shown in FIG. 1, a telephone channel can be characterized as having a frequency response H(jω) and an attenuation A:  
           0&lt;| H ( j ω)|&lt;1 (0&lt;ω&lt;4(kHz))and A&lt;=1).  
           [0004]    As shown in FIG. 2, a goal of AGC is to maintain the output signal level  20  at almost a constant value, even though the input signal may change within a predefined range  22  between X1 and X2.  
           [0005]    When the signal carried on the telephone channel is a modulated data signal, the dynamic range of the signal is typically within the capacity of the AGC, e.g., within range  22 . A speech signal, on the other hand, may have a wide dynamic range that changes over time. A conventional AGC tries to keep the power of the signal constant, thus distorting the speech.  
           [0006]    The AGC process can be defined in the following way. Consider a sampled input signal x(n), where n identifies the sample interval, and the input signal spans a time interval of N samples (n=0 . . . N−1). The gain of the AGC, which changes over time may be expressed as g(n) (n=0 . . . N−1). The output of the AGC may then be expressed as:  
             y ( n )= x ( n ) g ( n ), n=0 . . . N−1  (1)  
           [0007]    Expression (1) can be interpreted as a weighting of the original signal x(n) by the samples of y(n), which plays the role of a window function. In this case the spectrum of y(n) is a result of the convolution:  
             Y ( w )= X ( w )* G ( w )  (2)  
           [0008]    where:  
           [0009]    w is the frequency in radians,  
           [0010]    Y(w) is the spectrum of the signal at the output of the AGC,  
           [0011]    X(w) is the Fourier transform of the input signal for the interval N, and  
           [0012]    G(w) is the Fourier transform of the AGC gain function for the interval N.  
         SUMMARY  
         [0013]    In general, in one aspect, the invention features a method that includes (a) performing automatic gain control on portions of a speech signal that includes speech portions separated by non-speech portions, and (b) controlling the gain of the automatic gain control differently depending on whether the portions are speech portions or non-speech portions. In general, in another aspect, the invention features a method that includes (a) estimating power of a speech portion of a speech signal that includes speech portions separated by non-speech portions, the power for the speech portion being estimated based on a power envelope that spans the speech portion, and (b) refraining from adjusting the gain of an automatic gain control during the speech portions.  
           [0014]    Implementations of the invention may include one or more of the following features. Each of the non-speech portions comprises silence. Each of the speech portions comprises a speech signal, e.g., a word. For each of the speech portions, the gain is controlled to be constant. The gain is controlled during non-speech portions. The estimating includes estimating a power of the speech signal separately for each of the speech portions. The estimating includes an averaging of the estimated powers of the speech portions. The estimating includes detecting a maximum power that occurs during each of the speech portions. Voice activity is detected as an indication of the start of each portion of the signal.  
           [0015]    In general, in another aspect, the invention features a method that includes (a) estimating power of a speech portion of a speech signal that includes speech portions separated by non-speech portions, the power for the speech portion being estimated based on a power envelope that spans the speech portion, and (b) controlling an automatic gain control based on the power estimate.  
           [0016]    Implementations of the invention may include one or more of the following features. Estimating the power for each of the speech portions includes estimating a peak power level. The estimating includes an averaging process. A presence or absence of voice activity is detected as an indication of the boundaries of the speech and non-speech portions. A gain of an AGC is adjusted based on the estimating of the power of the speech signal.  
           [0017]    In general, in another aspect, the invention features an apparatus that includes (a) a port to receive a speech signal and (b) an automatic gain control configured to apply a constant gain to a speech portion of the signal and to adjust the gain during non-speech portions of the signal based on power estimates done during a previous speech portion.  
           [0018]    Implementations of the invention may include one or more of the following features. The automatic gain control includes power estimating elements configured to generate an estimate of a power of the speech portions of the speech signal. The automatic gain control includes voice activity detection elements.  
           [0019]    In general, in another aspect, the invention features a system comprising (a) a port to receive speech signals, (b) an automatic gain control configured to estimate power of a speech portion of a speech signal that includes speech portions separated by non-speech portions, the power for the speech portion being estimated based on a power envelope that spans the speech portion, and refrain from adjusting the gain of an automatic gain control during the speech portions, and (c) elements configured to perform speech functions based on an output of the automatic gain control. The system may be embodied in a multi-channel voice processing board.  
           [0020]    Among the advantages of the invention are one or more of the following. Optimal gain for a continuous speech signal is achieved without introducing non-linear distortion. The result is higher fidelity speech in interactive voice response (IVR) and automatic speech recognition (ASR) applications. The implementation can be simple.  
           [0021]    Other advantages and features will become apparent from the following description and from the claims. 
       
    
    
     DESCRIPTION  
       [0022]    [0022]FIG. 1 is a block diagram.  
         [0023]    [0023]FIG. 2 is a graph of output versus input.  
         [0024]    [0024]FIG. 3 is a flow chart.  
         [0025]    [0025]FIG. 4 is a block diagram.  
         [0026]    [0026]FIG. 5 is a timing chart.  
         [0027]    [0027]FIG. 6 is a block diagram. 
     
    
       [0028]    In general, computation of the convolution (expression 2) causes the emergence of new spectral components that were not present in the original signal x(n) and that indicate the presence of non-linear distortions.  
         [0029]    However, there are two trivial cases for which non-linear distortions will not occur:  
         [0030]    Case 1. g(n) is constant for the interval N. In this case:  
           Y ( w )= CX ( w ),  
         [0031]    that is, the input signal undergoes only a constant change in level.  
         [0032]    Case 2. x(n)=0, n=0 . . . N−1,  
         [0033]    which means that the input signal is only silence.  
         [0034]    Combining 1 and 2 yields a principle that can be used to create a non-distorting AGC: change the AGC gain only when the input signal is not present, and, when the input signal is present, keep the gain constant and perform the estimate of the speech loudness.  
         [0035]    This approach is well suited to speech signals in which typically 10% to 20% of the signal is silence (e.g., in the form of pauses between the words), but it can be used in other situations also.  
         [0036]    A flow diagram of an example process for AGC is shown in FIG. 3. A circuit arrangement is shown in FIG. 4. And timing diagrams related to the circuit are shown in FIG. 5. Other processes and other circuit arrangements could be used also.  
         [0037]    As shown in FIG. 4, the incoming signal  50  (shown at the top of FIG. 5) is sampled every 125 microseconds, for example, to generate samples x(i) where i is the index of the input sample. Based on the samples x(i), the AGC  26  (FIG. 4) generates a series of gain values G(n) which are multiplied in element  28  by the incoming speech signal samples x(i) to produce gain adjusted signals for use later, for example, in automated speech recognition or interactive voice response.  
         [0038]    At the beginning of the process, the gain values G(n) and low pass filters  30 ,  32  are initialized (step  29 , FIG. 3). Each sample x(i) that occurs within a time interval Δt of, say, 5 milliseconds is multiplied 31 by a current gain value G(n) in the multiplication element  28  (FIG. 4).  
         [0039]    Then the following steps are performed.  
         [0040]    Step 1: A power estimation  33  is performed in element  38  with respect to the samples x(i) that appeared in the most recent Δt interval. The power estimation is performed by summing over the interval Δt the absolute values of those samples to form a value S 1 ( j ), where j is the index of the 5 ms interval:  
           S   1 ( j )=Σ| x ( i )|, Δt=5  ms    
         [0041]    Thus, the power estimator  38  generates a sequence of values 52 (FIG. 5) spaced at intervals of Δt, each of the values representing the level of the signal in the samples that appeared in the interval that just ended.  
         [0042]    Step 2: A voice activity detector (VAD  40 ) then decides  35  whether the value S 1 ( j ) represents speech  37  or silence  39 . The state of the VAD (speech or silence) remains unchanged until a sequence of values S 1 ( j ) appears that would signal a switch from pause to speech  41  (because a period of pause has just been ended by the beginning of speech) or from speech to pause  43  (because a period of speech has just been ended by the beginning of silence). The VAD has two outputs  60 ,  62 . Output  60  is triggered when the VAD state changes to pause. Output  62  is triggered when the VAD state changes to speech.  
         [0043]    When the VAD switches to the speech state, the low pass filter  30  is reset  45  as is a maximum envelope detector  66 . Thereafter, until the state switches back to silence, the power estimates S 1 ( j ) are multiplied in an element  64  by the current value of the AGC gain (G(n)) and passed to the input of the low pass filter  30 . The low pass filter in effect determines  47  the power envelope  54  of the input signal.  
         [0044]    Conversely, if the VAD detects  39  the start of a pause (in effect, the end of the current word), step 4, below, is performed.  
         [0045]    Step 3: While the VAD is in the speech state, the successive outputs of the low pass filter  30  (S 3 ( j )) are passed through a maximum envelope generator  66  which produces  49 , after a word has been completed, a signal S 4 ( n ) representing the maximum  56  of the envelope of the power estimates for the most recent utterance, e.g., word, where n is the index of an utterance (e.g., a period of speech that is sandwiched between a preceding period of silence and a following period of silence.) The maximum of the power envelope is used as an estimate of the “loudness” of the word. The process returns to step 1 for each successive interval Δt during a word segment.  
         [0046]    Step 4: When the end of the current word is detected, the value of S 4 ( n ) is computed as:  
           S   4 ( n )=max ( S   3 ( j )),  
         [0047]    where S 4 ( n ) is an estimate of the “loudness” for the word n, j ε Tn, where Tn is the duration of the n th  word.  
         [0048]    S 4 ( n ) is passed to the input of low-pass filter  32 , which performs  51  a weighted averaging of S 4 ( n ) for all words detected over a period of time. LPF 2  is implemented as a first-order infinite impulse response (IIR) filter. The output of the LPF 2 , S 5 ( n ), is an estimate of the loudness of the speech after n words have been detected.  
         [0049]    Step 5: The estimate of the loudness of the incoming speech S 5 ( n ) is compared  53  to a reference value for loudness, Gref, and the new AGC gain is computed by a gain computation element  68  as follows:  
           G ( n )= G ( n− 1)+( Gref−S   5 ( n ))* k,    
         [0050]    where k=constant&lt;&lt;1. In effect, the prior gain is updated by a small fraction (k) of the amount by which the average maximum envelope power (S 5 ( n )) differs from a reference level (Gref).  
         [0051]    The process then returns to step 1.  
         [0052]    The gain value for the nth word G(n) is multiplied by the input samples x(i) for that word to produce the samples of the gain-revised signal.  
         [0053]    The gain level G(n)  59  is thus updated at the beginning  71  of each period of silence, and is kept constant during other periods  73  including during speech.  
         [0054]    In the algorithm, the loudness of speech is defined on a word-by-word basis rather than on the basis of power measurement for separate sounds which form an utterance. The loudness of each word is defined in terms of the maximum of the power envelope for that word.  
         [0055]    The gain is not changed (is kept constant) with respect to all of the samples for a word. As explained earlier, the speech will not be distorted by the AGC process if the gain is not changed during speech. Rather, the gain is changed during the pause after each word.  
         [0056]    The algorithm does not require an especially accurate (or complex) VAD. All that is needed is to define the maximums of the power envelopes for separate words and the presence of the pause, to perform the update of the S 3 , S 4 , S 5 .If the VAD does not detect the start of the utterance accurately, the algorithm may miss the first soft sounds of the utterance. But the algorithm will not miss the loud part which defines the maximum level that is being sought. Conversely, if the VAD misses the start of the non-speech interval, the gain adjustment may be performed a little later during the pause, which is not a problem because the gain can be adjusted at any time during the pause. Thus, the VAD can be implemented in a simple way according to the following rule: If the power estimate for a 5 ms interval exceeds a threshold T, N times in a row, the VAD determines that a speech interval has begun. If the power estimate drops below the threshold T, N times in a row, the VAD determines that a non-speech interval (pause) has begun.  
         [0057]    The AGC compensates for the speech attenuation introduced by the channel without distorting the speech signal. Tests have demonstrated that the algorithm has a robust performance over a variety of different speakers and channel conditions.  
         [0058]    The AGC algorithm may be implemented in hardware, software, or a combination of them. One implementation is embedded firmware for a multichannel voice processing board used for interactive voice response (IVR), based on a Texas Instruments TI549 digital signal processor requiring only a small portion of the processing capability (e.g., less than 0.25MIPs).  
         [0059]    As shown in FIG. 6, more generally, the AGC can be implemented as part of a wide variety of speech processing systems  102  that provide any possible speech-related function  104 . The speech signal  106  that is the input to the AGC may be received from any source  108  including a telephone line, the internet, a local area or wide area network or an internal bus or line within another system.  
         [0060]    Although we have described certain implementations, other implementations are also within the scope of the following claims.