Background of the Invention
The present invention relates to communications systems, and more particularly, to echo suppression in a bidirectional communications link.
In many communications systems, for example landline and wireless telephone systems, voice signals are often transmitted between two system users via a bi-directional communications link. In such systems, speech of a near-end user is typically detected by a near-end microphone at one end of the communications link and then transmitted over the link to a far-end loudspeaker for reproduction and presentation to a far-end user. Conversely, speech of the far-end user is detected by a far-end microphone and then transmitted via the communications link to a near-end loudspeaker for reproduction and presentation to the near-end user. At either end of the communications link, loudspeaker output detected by a proximate microphone may be inadvertently transmitted back over the communications link, resulting in what may be unacceptably disruptive feedback, or echo, from a user perspective.
Therefore, in order to avoid transmission of such undesirable echo signals, the microphone acoustic input should be isolated from loudspeaker output as much as possible. With a conventional telephone handset, in which the handset microphone is situated close to the user's mouth while the handset speaker essentially covers the user's ear, the requisite isolation is easily achieved. However, as the physical size of portable telephones has decreased, and as hands-free speaker-phones have become more popular, manufacturers have moved toward designs in which the acoustic path from the loudspeaker to the microphone is not blocked by the user's head or body. As a result, the need for more sophisticated echo suppression techniques has become paramount in modern systems.
The need is particularly pronounced in the case of hands-free automobile telephones, where the closed vehicular environment can cause multiple reflections of a loudspeaker signal to be coupled back to a high-gain hands-free microphone. Movement of the user in the vehicle and changes in the relative directions and strengths of the echo signals, for example as windows are opened and closed or as the user moves his head while driving, further complicate the task of echo suppression in the automobile environment. Additionally, more recently developed digital telephones process speech signals through voice encoders which introduce significant signal delays and create non-linear signal distortions. Such prolonged delays tend to magnify the problem of signal echo from a user perspective, and the additional non-linear distortions make echo suppression by the network equipment more difficult.
In response to the above described challenges, telephone manufacturers have developed a wide variety of echo suppression mechanisms. An exemplary echo suppression system 100 is depicted in FIG. 1A. As shown, the exemplary system 100 includes a microphone 110, a loudspeaker 120 and an echo suppressor 130. An audio output 115 of the microphone 110 is coupled to an audio input of the echo suppressor 130, and an audio output 135 of the echo suppressor 130 serves as a near-end audio input to a telephone (not shown). Additionally, a far-end audio output 125 from the telephone is coupled to an audio input of the loudspeaker 120 and to a reference input of the echo suppressor 130.
In operation, the echo suppressor 130 processes the microphone signal 115 to provide the audio output signal 135 to a far-end telephone user. More specifically, the echo suppressor 130 attenuates the microphone signal 115, in dependence upon the far-end audio signal 125, so that acoustic echo from the loudspeaker 120 to the microphone 110 is not passed back to the far-end telephone user.
Typically, the echo suppressor 130 is either a non-linear, clipping type suppressor or a linear, scaling type suppressor. Clipping type suppressors generally attenuate the microphone output signal 115 by removing a portion of the signal falling within a particular range of values (i.e., within a particular clipping window). Scaling type suppressors, on the other hand, attenuate the microphone output signal 115 by multiplying the signal with an appropriate scale factor. Recently developed hybrid suppressors incorporate both clipping and scaling aspects, for example by scaling a portion of the microphone signal falling within a particular attenuation window. In any case, the level of attenuation (i.e., the clipping window and/or the scale factor) is generally adjusted, either directly or indirectly, in accordance with the amplitude of the far-end audio signal 125 so that the microphone output 115 is attenuated only to the extent the far-end user is speaking.
A conventional clipping type suppressor, known in the art as a center clipper, is described for example in U.S. Pat. No. 5,475,731, entitled "Echo-Canceling System and Method Using Echo Estimate to Modify Error Signal" and issued Dec. 12, 1995 to Rasmusson et al. An alternative clipping type suppressor, known as an AC-Center clipper, is described in copending U.S. patent application Ser. No. 08/775,797, entitled "An AC-Center Clipper for Noise and Echo Suppression in a Communications System" and filed Dec. 31, 1996. An exemplary scaling type suppressor is described in U.S. Pat. No. 5,283,784, entitled "Echo Canceller Processing Techniques and Processing" and issued Feb. 1, 1994 to Genter. An advanced hybrid suppressor, referred to herein as an AC-center attenuator, is described in copending U.S. patent application Ser. No. 09/005,149, entitled "Methods and Apparatus for Improved Echo Suppression in Communications Systems" and filed on even date herewith. Advanced control of these and other clipping, scaling and hybrid type suppressors is described in copending U.S. patent application Ser. No. 09/005,144, entitled "Methods and Apparatus for Controlling Echo Suppression in Communications Systems" and filed on even date herewith. Each of the above identified patents, as well as each of the above identified copending patent applications, is incorporated herein in its entirety by reference.
The echo suppressor 130 of FIG. 1A can also be combined with a linear echo canceler to provide a more sophisticated echo suppression system. FIG. 1B depicts an exemplary system 101 including the microphone 110, the loudspeaker 120 and the echo suppressor 130 of FIG. 1A, and an acoustic echo canceler 140. As shown, the audio output 115 of the microphone 110 is coupled to an audio input of the acoustic echo canceler 140, and control and audio outputs 144, 145 of the acoustic echo canceler 140 are coupled to control and audio inputs of the echo suppressor 130, respectively. The audio output 135 of the echo suppressor 130 serves as the near-end audio input to the telephone (not shown), and the far-end audio output 125 from the telephone is coupled to the audio input of the loudspeaker 120 and to reference inputs of the acoustic echo canceler 140 and the echo suppressor 130.
In operation, the acoustic echo canceler 140 dynamically models the acoustic path from the loudspeaker 120 to the microphone 110 and attempts to cancel, from the microphone output signal 115, any loudspeaker sound that is picked up by the microphone 110. Algorithms commonly used for modeling the acoustic echo path include the well known Least Mean Squares (LMS) algorithm and variants such as Normalized Least Mean Squares (NLMS). An exemplary Least Mean Squares based canceler is described in the above cited U.S. Pat. No. 5,475,731 to Rasmusson et al. Additionally, an advanced Normalized Least Mean Squares based canceler is described in copending U.S. patent application Ser. No. 08/852,729, entitled "An Improved Echo Canceler for use in Communications Systems" and filed May 7, 1997, which is incorporated herein in its entirety by reference.
The control output, or control metric 144 indicates the instantaneous level of cancelation achieved by the acoustic echo canceler 140 and is used by the echo suppressor 130 to determine the level of additional attenuation needed to suppress any residual echo component to a particular goal level. As in the system 100 of FIG. 1A, the echo suppressor 130 can be a clipping suppressor, a scaling suppressor or a hybrid suppressor. The control metric 144 is thus adjusted accordingly as described for example in the above cited patents and patent applications. Additionally, the echo suppressor 130 can, when following the echo canceler 140, be a simple switch which selectively mutes the audio output 135 at appropriate times (e.g., during periods in which a near-end voice activity detector indicates that the microphone signal 115 contains no near-end speech).
Note that in both of the exemplary systems 100, 101 of FIGS. 1A and 1B, the echo suppressor 130 attenuates the entire audio signal. Thus, in addition to attenuating the echo, the echo suppressor 130 also attenuates any background noise and/or near-end speech which may be present. In fact, the background noise can be suppressed to the point that the far-end user may erroneously believe that the call has been disconnected when the echo suppressor 130 is active. Therefore, to improve the quality of communication for the far-end user, today's systems often add comfort noise to the telephone audio signal 135 when the echo suppressor 130 is active.
For example, some systems replace muted audio signals with white noise produced by a pseudo-random number generator (PRNG), wherein a variance of the noise samples is set based on an estimate of the energy in the actual background noise. Additionally, the above cited U.S. Pat. No. 5,283,784 to Genter describes a similar approach in which white noise samples are band-limited to the telephone system bandwidth and stored in a read only memory (ROM) table. Comfort noise is then generated as needed by selecting samples from the table. Yet another solution is described in U.S. patent application Ser. No. 08/375,144, entitled "Method of and Apparatus for Echo Reduction in a Hands-Free Cellular Radio Communication System" and filed Jan. 19, 1995, which is incorporated herein in its entirety by reference. There a block of samples of actual background noise is stored in memory, and comfort noise is generated by outputting segments of successively stored samples beginning with random starting points within the block.
While the above described systems provide certain advantages, none provides comfort noise which closely and consistently matches the actual environment noise in terms of both spectral content and magnitude. For example, the spectral content of comfort noise produced by generating white noise samples is, by definition, uniform across the audible frequency band, while automobile background noise is typically biased toward the low end of the band. Also, since the degree of spectral tilt varies from car to car and depends on prevailing driving conditions, storing an exemplary tilted spectrum in ROM is insufficient. Further, comfort noise generated by repeatedly outputting segments of actual noise samples includes a significant periodic component and therefore often sounds as if it includes a distorted added tone.
Thus, with conventional noise generation techniques, the far-end user perceives continual changes in the character and content of the transmitted background noise, as comfort noise is selectively added or substituted only when the echo suppressor 130 is active. Such changes in the perceived background noise can be annoying or even intolerable. For example, with the relatively long delay in today's digital cellular phones, differences between actual background noise and modeled comfort noise are often perceived as whisper echoes. Consequently, there is a need for improved methods and apparatus for generating comfort noise in echo suppression systems.
Summary of the Invention
The present invention fulfills the above-described and other needs by providing methods and apparatus for parametrically modeling acoustic background noise in echo suppression systems. By way of contrast to conventional systems in which comfort noise is produced by generating white noise samples or by repeatedly outputting stored noise sample sequences, the present invention teaches that higher quality comfort noise (i.e., comfort noise that more closely matches actual system environment noise) can be produced effectively based on a set of noise model parameters which are in turn based on measurements of actual system noise.
According to the invention, noise model parameters are computed during periods of speech inactivity (i.e., when only noise is present) and frozen during periods of speech activity. Prevailing noise model parameters are then used to generate high quality comfort noise which is substituted for actual noise whenever the actual noise is muted or attenuated by an echo suppressor. Since the comfort noise closely matches the actual background noise in terms of both character and level, far-end users perceive signal continuity and are not distracted by the artifacts introduced by conventional systems.
According to a first exemplary embodiment, a parametric noise model is based on the autocorrelation function of a frame of audio samples output by a microphone. The autocorrelation function is smoothed or averaged over multiple sample frames, and the prevailing, smoothed autocorrelation function is used to compute coefficients for an all-pole spectral shaping filter. The shaping filter is then used to synthesize comfort noise based on an excitation of white noise samples having a variance which is proportional to the first, zero-lag element of the smoothed autocorrelation function.
According to a second exemplary embodiment, a parametric noise model is based on an autocorrelation function and on a set of fixed filter coefficients which are used in combination to create an autoregressive moving-average (ARMA) spectral shaping filter. Specifically, a frame of audio samples output by a microphone is passed through an all-pole filter constructed from the fixed filter coefficients, and the filtered samples are used to compute the autocorrelation function. The autocorrelation function is smoothed over multiple frames, and the prevailing, smoothed autocorrelation function is used to compute coefficients for an all-pole filter. The all-pole filter is cascaded with an all-zero filter derived from the fixed filter coefficients to create the autoregressive moving-average spectral shaping filter. The spectral shaping filter is then used to synthesize comfort noise based on an excitation of white noise samples having a variance proportional to the first, zero-lag element of the autocorrelation function.
According to a third exemplary embodiment, a parametric noise model is based on a vector of discrete spectral magnitudes. The spectral magnitudes are computed based on a frame of audio samples output by a microphone. Specifically, the spectral magnitudes are computed as a discrete Fourier transform of the audio sample frame. Alternatively, when a frequency-domain acoustic echo suppressor is used to process the microphone signal, the spectral magnitudes are taken directly from an audio sample frame output by the acoustic echo suppressor. In either case, the vector of spectral magnitudes is smoothed over multiple frames, and the prevailing, smoothed magnitude vector is used to synthesize comfort noise as necessary. Specifically, an excitation of uniform random phases is applied to the prevailing, smoothed magnitude vector, and the resulting complex spectrum samples are transformed to the time domain using an inverse discrete Fourier transform.
According to a fourth exemplary embodiment, a parametric noise model includes an autoregressive moving-average spectral shaping filter having a single fixed zero and a single variable pole. The variable pole for the spectral shaping filter is computed during periods of speech inactivity using a Normalized Least-Mean Squares algorithm to recursively adjust an adaptive filter corresponding to the inverse of the spectral shaping filter. The prevailing spectral shaping filter is then used to synthesize comfort noise based on an excitation of white noise samples having energy equal to the actual system noise, wherein the white noise samples are generated by randomly selecting single samples from a buffer of actual system noise samples. Advantageously, the single fixed zero and the single variable pole of the spectral shaping filter are sufficient to provide appropriate spectral tilt in the resulting comfort noise, and the single fixed zero ensures that the adaptive inverse filter is unconditionally stable. As a result, the exemplary embodiment is both robust and of low-complexity.
Advantageously, the above described techniques can be utilized in any communications system in which noise modeling is needed or desired. For example, an exemplary echo suppression device according to the invention includes a noise modeling processor and a noise generation processor. The device is configured to attenuate an echo component of a communications signal, and the noise modeling processor is configured to generate one or more noise modeling parameters based on the communications signal. The noise modeling parameters define a parametric model of a noise component of the communications signal, and the noise generation processor is configured to provide modeled noise samples based on the noise modeling parameters. In an exemplary embodiment, the modeled noise samples are added to an output of the echo suppression device to replace the attenuated noise component.
An alternative echo suppression device according to the invention includes an echo suppressor, a sample buffer and a noise generation processor. The echo suppressor is configured to attenuate echo and noise components of a communications signal, and the sample buffer is used to store frames of samples of the communications signal. The noise generation processor is configured to pseudo-randomly select single samples from the buffer in order to provide a sequence of white noise samples having a power level equal to a power level of the frame of samples. In an exemplary embodiment, the sequence of white noise samples is filtered to provide comfort noise which is added to an output of the echo suppressor.
Another alternative echo suppression device according to the invention includes an echo suppressor, a noise modeling and generation processor, a voice activity detector and a noise level estimator. The echo suppressor is configured to attenuate echo and noise components of a communications signal, and the noise modeling and generation processor is configured to model the noise component of the communications signal and to provide comfort noise for the echo suppression device based on the model. The voice activity detector provides an indication of whether the communications signal includes a voice component, and the noise level estimator computes an estimate of a noise level of the communications signal and provides an indication of whether an energy level of the communications signal is less than the computed estimate. According to the invention, the noise model is updated only when the voice activity detector indicates that there is no voice component in the communications signal and the noise level estimator indicates that the energy level of the communications signal is less than the computed noise level estimate. As a result, it is unlikely that the noise model will be erroneously updated based on portions of the communications signal which include speech.
Still another alternative echo suppression device according to the invention includes an echo suppressor and a comfort noise generator. The echo suppressor is configured to attenuate echo and noise components of a communications signal, and the comfort noise generator is configured to provide comfort noise for the echo suppression device. In the echo suppressor, a portion of the communications signal falling within an attenuation window is multiplied by a scale factor. Accordingly, an output of the comfort noise generator is limited to the attenuation window and scaled based on the scale factor to provide an appropriate limited and scaled comfort noise output which can be added to an audio output of the echo suppressor.
The above-described and other features of the present invention are explained in detail hereinafter with reference to the illustrative examples shown in the accompanying drawings. Those skilled in the art will appreciate that the described embodiments are provided for purposes of illustration and understanding and that numerous equivalent embodiments are contemplated herein.
Brief Description of the Drawings
FIG. 1A depicts an exemplary echo suppression system in which the teachings of the present invention can be implemented.
FIG. 1B depicts an alternative echo suppression system in which the teachings of the present invention can be implemented.
FIG. 2A depicts an exemplary echo suppression system including a noise modeling and generation processor according to the present invention.
FIG. 2B depicts an alternative echo suppression system including a noise modeling and generation processor according to the present invention.
FIG. 3 depicts an exemplary first-order autoregressive moving-average noise generation filter according to the present invention.
FIG. 4 depicts an exemplary first-order noise model training processor which can be used in conjunction with the exemplary noise generation filter of FIG. 3.
FIG. 5 depicts an exemplary echo suppression system in which a noise modeling and generation processor according to the invention is integrated with an exemplary hybrid residual echo suppressor.
Detailed Description of the Invention
FIG. 2A depicts an exemplary echo suppression system 200 in which comfort noise aspects of the present invention are integrated with the echo suppression configuration of FIG. 1A. In addition to the microphone 110, the loudspeaker 120 and the echo suppressor 130, the exemplary echo suppression system 200 includes a voice activity detector 210, a first switch 220, a noise modeling and generation processor 230 (including an excitation block 240, a model computation block 250 and a spectral shaping block 260) and a second switch 270.
The audio output 115 of the microphone 110 is coupled to the audio input of the echo suppressor 130 and to an audio input of the voice activity detector 210. The audio output 115 of the microphone 110 is also coupled to a first pole of the first switch 220. A binary output 215 of the voice activity detector 210 is coupled to a throw input of the first switch 220, and an audio output 225 from a second pole of the first switch 220 is coupled to an audio input of the model computation block 250.
An excitation parameter output 255 of the model computation block 250 is coupled to a control input of the excitation block 240, and an excitation signal 245 output by the excitation block 240 is coupled to an excitation input of the spectral shaping block 260. A shaping parameter output 256 of the model computation block 250 is coupled to a control input of the spectral shaping filter 260, and a modeled noise output 265 of the spectral shaping block 260 is coupled to a first input pole of the second switch 270.
Audio output 135 from the echo suppressor 130 is coupled to a second input pole of the second switch 270, and an output pole of the second switch 270 provides an audio input 275 to the telephone (not shown). The audio output 125 from the telephone is coupled to the audio input of the loudspeaker 120 and to the reference input of the echo suppressor 130.
In operation, the voice activity detector (VAD) 210 outputs a binary flag indicating the presence or absence of speech in the microphone output signal 115 (e.g., 1=voice, 0=no voice). Methods for implementing the voice activity detector 210 are well known. For example, European Telecommunications Standards Institute (ETSI) document GSM-06.82 describes an implementation suitable for purposes of the present invention.
When the voice activity detector 210 indicates that no speech is present (i.e., that only noise is present) in the microphone signal 115, the microphone signal 115 is connected via the first switch 220 to the audio input of the noise modeling and generation processor 230 (more specifically, to the audio input of the model computation block 250), and the noise modeling and generation processor 230 uses the audio signal 115, 225 to compute and/or update a parametric noise model. However, when the voice activity detector 210 indicates that speech is present in the microphone signal 115, the first switch 220 is opened, the noise model parameters are frozen, and the noise modeling and generation processor 230 uses the prevailing parametric noise model to generate samples of the comfort noise 265.
In the configuration of FIG. 2A, the second switch 275 is used to selectively substitute the comfort noise 265 for the suppressor output 135 as the near-end audio signal 275 for the telephone. In other words, when the echo suppressor 130 is active and attenuating the noise component of the microphone signal 115, the comfort noise signal 265 is passed to the far-end user. Otherwise, the audio output 135 from the echo suppressor 130 is passed to the far-end user. In alternative configurations, the second switch 270 is replaced with a summing device, and a scaled version of the comfort noise 265 is added to the echo suppressor output 135 to provide comfort noise which compensates for the noise attenuation provided by the echo suppressor 130. In other words, as the echo suppressor 130 becomes more active and attenuates the background noise to a greater degree, the level of added comfort noise is increased, and vice versa.
FIG. 2B depicts an exemplary echo suppression system 201 in which comfort noise aspects of the system 200 of FIG. 2A are combined with the echo suppression configuration of FIG. 1B. As shown, the exemplary system 201 includes the microphone 110, the loudspeaker 120, the echo suppressor 130 and the acoustic echo canceler 140 of FIG. 1B, as well as the voice activity detector 210, the first switch 220 and the noise modeling and generation processor 230 of FIG. 2A. The exemplary system 201 also includes a .gamma. attenuation block 280 and a summing device 290.
The audio output 115 of the microphone 110 is coupled to the audio input of the acoustic echo canceler 140 and to the audio input of the voice activity detector 210. The control output 144 of the acoustic echo canceler 140 is coupled to the control input of the residual echo suppressor 130 and to a control input of the .gamma. attenuation block 280. The audio output 145 of the acoustic echo canceler 140 is coupled to the audio input of the echo suppressor 130 and to the first pole of the first switch 220. The binary output 215 of the voice activity detector 210 is coupled to the throw input of the switch 220, and the audio output 225 from the second pole of the switch 220 is coupled to the audio input of the noise modeling and generation processor 230.
The internal connections of the noise modeling and generation processor 230 are as described above with respect to the embodiment of FIG. 2A. The modeled noise output 265 of the noise modeling and generation processor 230 is coupled to a signal input of the .gamma. attenuation block 280, and an adjusted noise output 285 of the .gamma. attenuation block 280 is coupled to a first additive input of the summing device 290. The audio output 135 of the echo suppressor 130 is coupled to a second additive input of the summing device 290, and an output 295 of the summing device 290 serves as audio input to the telephone (not shown). The audio output 125 from the telephone is coupled to the audio input of the loudspeaker 120 and to the reference inputs of the acoustic echo canceler 140 and the echo suppressor 130.
In operation, the voice activity detector 210 functions generally as described above with respect to FIG. 2A. More specifically, when the voice activity detector 210 indicates that no speech is present in the microphone signal 115, the audio input 145 to the echo suppressor 130 is connected via the first switch 220 to the audio input of the noise modeling and generation processor 230. The noise modeling and generation processor 230 then uses the audio signal 145, 225 to compute and/or update a parametric noise model. However, when the voice activity detector 210 indicates that speech is present in the microphone signal 115, the first switch 220 is opened, the noise model parameters are frozen, and the noise modeling and generation processor 230 uses the prevailing noise model to generate the comfort noise 265.
As shown, the comfort noise samples 265 are scaled and/or clipped, via the .gamma. attenuation block 280, in accordance with the control metric 144 to provide adjusted comfort noise samples 285 having a level which matches that of the noise attenuated by the non-linear echo suppressor 130. The adjusted comfort noise samples 285 are added to the suppressor output 135 via the summing device 290, and the resulting audio signal 295 is passed to the far-end user. Alternatively, the second switch 275 of FIG. 2A can be substituted for the .gamma. attenuation block 280 and the summing device 290 to provide simple switching between the suppressor audio signal 135 and the comfort noise samples 265.
In the exemplary systems 200, 201 of FIGS. 2A and 2B, the parametric noise model provided by the noise modeling and generation processor 230 generally includes two parts. Namely, a spectral shaping filter and an excitation signal. The spectral shaping filter and the excitation signal are implemented via the spectral shaping block 260 and the excitation block 240, respectively, using spectral shaping parameters (e.g., filter coefficients) 255 and at least one excitation parameter 256 provided by the model computation block 250. The excitation and spectral shaping parameters are stored in static memory and are used to generate the comfort noise samples 265 as necessary (i.e., when the non-linear echo suppressor 130 is active).
Advantageously, the model parameters can be updated on either a frame-by-frame or a sample-by-sample basis, depending for example upon the particular type of acoustic echo canceler 140 being implemented. In frame-wise implementations, the noise model parameters are smoothed over multiple update periods, using known techniques, to prevent abrupt, user-perceptible changes from period to period. Such abrupt changes can result, for example, when the noise model parameters are erroneously updated based on audio samples including a voice component (i.e., when the voice activity detector 210 mistakes voice and noise for noise only). Note, however, that the degree of smoothing is balanced in practice with the need to quickly adapt to changes in the character and level of the background noise.
According to a first exemplary embodiment, the comfort noise 265 is modeled as an autoregressive (AR) random process having a spectral shaping filter given by: ##EQU1## where G is a gain constant and the a.sub.i, i=1 to N, are filter coefficients.
In a first embodiment, the N filter coefficients a.sub.i are determined by computing the first N+1 coefficients of the autocorrelation function r of a frame of samples of the audio signal 225 and then using these values to form the matrix relationship R a=r', where R is an N-by-N matrix with the element of the i.sup.th row and j.sup.th column given by R.sub.ij =r.sub..vertline.i-j.vertline., a=[a.sub.1, a.sub.2, . . . , a.sub.N ].sup.T is the column vector of unknown filter coefficients a.sub.i, and r'=[r.sub.1, r.sub.2, . . . , r.sub.N ].sup.T is a column vector of the last N autocorrelation coefficients. Those skilled in the art will recognize that there are many methods for deriving the unknown filter coefficients a.sub.i from this matrix relationship. For example, in an exemplary embodiment, the well known Levinson-Durbin algorithm is used to derive the unknown filter coefficients a.sub.i recursively.
Advantageously, the autocorrelation r provides a full set of noise model parameters, describing both the spectral shaping filter and the excitation signal. Specifically, the spectral shaping filter is defined by the N coefficients a.sub.i as shown in the above equation, and the excitation signal is implemented as a zero-mean pseudo-random sequence having a variance proportional to the zero-lag autocorrelation value R.sub.o. Multiple values of the autocorrelation function r are smoothed either recursively or non-recursively. The smoothed version of the autocorrelation function r is kept in static memory within the noise modeling and generation processor 230 and is used to compute the filter coefficients a.sub.i whenever comfort noise synthesis is necessary.
The filter coefficients a.sub.i of the autoregressive model are computed, in an alternative embodiment, on a sample-wise basis. Specifically, a well known adaptive algorithm, such as Least Mean Squares (LMS) or Recursive Least Squares (RLS), is used to update or adapt the filter coefficients a.sub.i directly from sample to sample. Thus, the N filter coefficients a.sub.i define the spectral shaping filter as above, and the excitation signal is modeled using an alternative variance .sigma..sub.e.sup.2 which is proportional to the power of the residual error signal provided by the adaptive algorithm.
According to another exemplary embodiment, the comfort noise 265 is modeled as an autoregressive-moving-average (ARMA) random process having a spectral shaping filter given by: ##EQU2## where G is a gain constant and the a.sub.i (i=1 to N) and the b.sub.i (i=1 to M) are filter coefficients.
Advantageously, the autoregressive moving-average model is flexible enough to closely match complex background noise spectra using a lower order spectral shaping filter as compared to the autoregressive model. However, since conventional methods for dynamically estimating the filter coefficients b.sub.i from the audio signal 225 are relatively complex and potentially unstable, fixed values for the filter coefficients b.sub.i are set based on a priori information relating to general properties of the background noise environment in which the echo suppression system will be operating (e.g., a car noise environment for a vehicle hands-free accessory application). Given the fixed values for the coefficients b.sub.i, the audio signal 225 is first filtered as follows: ##EQU3##
Doing so removes the influence of the moving-average portion of the overall model and allows the remaining autoregressive portion to be modeled using the techniques described above with respect to the first exemplary embodiment. For a frame-based system, the autoregressive moving-average model is defined by the fixed filter coefficients b.sub.i and the autocorrelation function r. In such case, the excitation signal is implemented as a pseudo-random sequence with a variance proportional to the zero-lag autocorrelation value R.sub.o. An exemplary sample-based autoregressive moving-average model is described in detail below with reference to FIGS. 3-4.
Advantageously, the parametric modeling techniques of the present invention are not restricted to parameter sets from the time domain. Alternately, a linear orthogonal transformation can be used to convert frames of time-domain audio samples to another domain in which the parameter set can be constructed. Examples of such orthogonal transformations include the Discrete Fourier Transform, Discrete Cosine Transform and Discrete Wavelet Transform, and those of skill in the art will recognize many others. In one exemplary embodiment of the invention, a frequency-domain parametric model is defined by a set of N spectral magnitudes, given by:
where the .omega.(i), i=1 to N, are discrete frequency points, and the vector x.sub.n represents a frame of samples of the audio output signal 225. The "DFT" operation represents the well known Discrete Fourier Transform, and is realized in practice using a low-complexity implementation such as the also well known Fast Fourier Transform (FFT). In this embodiment, the spectral shaping parameters are included in the magnitude vector M, which is evaluated only at positive frequencies due to spectral symmetry about .omega.=0 for real x.sub.n (such as samples of an audio signal).
The set of discrete frequencies .omega.(i) can be all, or just a subset, of the discrete frequencies in the Fast Fourier Transform output. Multi-frame smoothing, if required, is performed directly on the magnitude vector M. The excitation signal is generated by applying pseudo-random phase values to the spectral amplitudes. A uniform pseudo-random noise generator is used to generate phase values in the fixed range [0, 2.pi.). Time-domain comfort noise is then generated by passing the magnitude vector M, with the pseudo-random phase values, through an inverse Fast Fourier Transform. Note also that this type of model is extremely useful for frequency-domain echo suppressors. In such case, the magnitude vector M can be taken directly from a frame of frequency-domain samples output by the suppressor.
As noted above, another exemplary embodiment of the present invention utilizes a sample-based autoregressive moving-average comfort noise model. More specifically, the exemplary embodiment utilizes a first-order autoregressive moving-average model having a single fixed zero and a single variable pole. Recent empirical studies have shown that such a first-order autoregressive moving-average model provides sufficient spectrum accuracy for comfort noise with a minimum of modeling complexity. Indeed, the first-order model provides performance equal to that of the tenth-order autoregressive model used in most modern Linear Predictive Coding (LPC) based voice encoders.
According to the embodiment, a single fixed zero is positioned near Z=-1 in the spectral shaping filter to attenuate high frequency audio components. The single variable pole is then used to provide spectrum biasing or tilt as necessary (recall, for example, that the spectrum of automobile background noise is typically biased toward low end frequencies). Thus, the present invention teaches that a relatively simple and easily implemented first order filter can be used to closely match the spectral content of actual background noise. Further, the fixed zero in the spectral shaping filter implies a fixed pole in the adaptive filter which is used to obtain coefficients for the spectral shaping filter during the modeling stage. The single fixed pole in the adaptive filter in turn implies that the adaptive filter is unconditionally stable. Thus, the embodiment is also extremely robust.
FIGS. 3 and 4 depict, respectively, a first order spectral shaping filter 300 and a complimentary Normalized Least Mean Squares adaptive filter 400 according to the exemplary embodiment. The first order spectral shaping filter 300 corresponds to the spectral shaping block 260 of FIGS. 2A and 2B, and the complimentary adaptive filter 400 corresponds to the model computation block 250 of FIGS. 2A and 2B.
In FIG. 3, the first order spectral shaping filter includes a first delay block 310, a 13/16.sup.ths gain block 320, a summing device 330, a 1-a gain block 340, a second delay block 350 and an a gain block 360. A white noise excitation signal, analogous to the excitation signal 245 of FIGS. 2A and 2B, is coupled to a first additive input of the summing device 330 and to an input of the first delay block 310. An output 315 of the first delay block 310 is coupled to an input of the 13/16.sup.ths gain block 320, and an output 325 of the 13/16.sup.ths gain block 320 is coupled to a second additive input of the summing device 330. An output 335 of the summing device 330 is coupled to an input of the 1-a gain block 340 and to an input of the second delay block 350. An output 355 of the second delay block 350 is coupled to an input of the a gain block 360, and an output 365 of the a gain block 360 is coupled to a third additive input of the summing device 330. An output of the 1-a gain block 340 serves as the modeled background noise, corresponding to the comfort noise 265 of FIGS. 2A and 2B.
In FIG. 4, the complimentary first order adaptive filter 400 includes a first delay block 410, a first multiplier 420, a second delay block 430, a first summing device 440, a second multiplier 450, a second summing device 460, a 13/16.sup.ths gain block 470, a third delay block 480 and a normalizing gain block 490. A colored background noise signal, corresponding to the audio signal 225 of FIGS. 2A and 2B, is coupled to an additive input of the second summing device 460 and to an input of the first delay block 410. An output 415 of the first delay block 410 is coupled to a first input of the first multiplier 420 and to a first input of the second multiplier 450. An output 425 of the first multiplier 420 is coupled to a subtractive input of the second summing device 460, and an output 455 of the second multiplier 450 is coupled to a first input of the first summing device 440.
An output 445 of the first summing device 440 is coupled to an input of the second delay block 430, and an output a of the second delay block 430 is coupled to a second input of the first multiplier 420 and to a second input of the first summing device 440. The output a of the second delay block 430 serves as the filter shaping parameter (i.e., as the single filter coefficient) for the spectral shaping filter 300 of FIG. 3 and corresponds to the filter shaping parameter 256 of FIGS. 2A and 2B.
An output 465 of the second summing device 460 is coupled to an input of the third delay block 480 and to an input of the normalizing gain block 490. An output 485 of the third delay block 480 is coupled to an input of the 13/16.sup.ths gain block 470, and an output 475 of the 13/16.sup.ths gain block 470 is coupled to a second subtractive input of the second summing device 460. An output 495 of the normalizing gain block 490 is coupled to a second input of the second multiplier 450.
In operation, the adaptive filter 400 of FIG. 4 whitens the actual background noise 225 using a Normalized Least Mean Squares algorithm. The resulting filter coefficient a is then used in the inverse spectral shaping filter 300 of FIG. 3 to produce the modeled comfort noise 265 based on a white noise excitation signal 245.
According to the embodiment, the white noise excitation signal 245 is generated by reading single noise samples, from a buffer of actual noise samples, using a random pointer for each single sample. Generating the excitation signal 245 in this way produces white noise samples having a power level equal to that of the actual background noise. Advantageously, the whiteness of the excitation signal 245 is not affected even when the buffer of actual noise samples contains a speech component by mistake. This feature is significant since the voice activity detector 210 can sometimes erroneously indicate no speech (e.g., when the background noise level is changing due to acceleration or deceleration of an automobile in a hands-free application).
As shown in FIGS. 3 and 4, the fixed zero/pole of the noise generation and adaptive filters 300, 400 is set at Z=-13/16. Doing so limits the high-frequency boost to 20 dB in the adaptive filter 400 and thus avoids overflow problems in practice. Further, the fixed 20 dB attenuation of high frequencies provided by the noise generation filter 300 is sufficient, when combined with the single variable pole, to provide 40 dB of spectral tilt (which empirical studies have shown to be typical for actual background noise in the context of an automobile hands-free application).
Including the fixed pole in the adaptive filter 400, as opposed to adapting an all-zero filter, improves the model's ability to accurately adapt to match the spectral content of the actual background noise. Additionally, including the 1-a gain multiplier in the spectral shaping filter 300 fixes the DC gain of the filter 300 at 29/16, which empirical studies have shown to provide good level matching between modeled and actual noise when the decision of the voice activity detector 210 is qualified by that of a noise level estimator (as is described in detail below with reference to FIG. 5). By way of contrast, empirical studies have also shown that including the same power in the input and output signals produces modeled noise which sounds much quieter than the actual noise when the decision of the voice activity detector 210 is qualified via a noise level estimator.
While the level of actual background noise can change rapidly in practice, the spectral shape of actual background noise typically changes more gradually. Thus, the adaptive filter 400 is configured so that the spectrum of the comfort noise 265 changes gradually as well. Specifically, a relatively small update gain constant is chosen for the normalizing block 490 so that adaptation cannot occur too quickly. Empirical studies have shown that a denominator gain multiplier of 4 provides a good compromise between tracking speed and smoothing. By normalizing the update gain with a blockwise measurement of the energy in the audio signal 225 (as shown in FIG. 4), the adaptation rate is made independent of the background noise level.
In addition to minimizing perceived discontinuities in the character of the comfort noise 265, the relatively small update gain of the adaptive filter 400 also provides further immunity against erroneous adaptations based on audio sample blocks containing voice. Note, however, that since the white noise excitation signal 245 is updated as soon as the voice activity detector 210 indicates noise only, changes in the level of the background noise are incorporated almost immediately. As a result, the exemplary embodiment of FIGS. 3 and 4 quickly tracks background noise level while keeping the spectral shape of the comfort noise 265 stable.
Note that using the Least Mean Squares algorithm with an autoregressive model to compute spectral shaping coefficients based on a block of audio samples requires about the same number of DSP cycles as does calculating the autocorrelation coefficients for the block of samples and then using the Levinson algorithm with an autoregressive model to compute the filter coefficients. However, the Levinson algorithm also requires additional DSP cycles to smooth the model over several blocks or frames. Thus, since the smoothing function is inherent in the Least Mean Squares algorithm, the Least Mean Squares method results in a net savings of DSP cycles.
Note also that, given the Least Mean Squares algorithm, going from a tenth-order autoregressive model to a first-order autoregressive model results in a DSP cycle savings of about eighty percent (overhead prevents the complexity from being strictly proportional to the order). However, adding the extra fixed pole for the autoregressive moving-average model, and adding the extra multiply for the Normalized Least Mean Squares algorithm, increases the number of DSP cycles required. Nonetheless, going from a tenth-order autoregressive model with the Least Mean Squares algorithm to a first-order autoregressive moving-average model with the Normalized Least Mean Squares algorithm results in a DSP cycle savings of at least fifty percent.
Advantageously, the exemplary embodiment of FIGS. 3 and 4 can be incorporated into any of the echo suppression systems 100, 101, 200, 201 shown in FIGS. 1A, 1B, 2A and 2B. In other words, the exemplary embodiment can be integrated with any type of echo canceler and/or any type of echo suppressor. FIG. 5 depicts an exemplary system 500 in which the exemplary embodiment is integrated with an echo suppression system of the type depicted in FIGS. 1B and 2B.
As shown, the exemplary system 500 includes the microphone 110, the loudspeaker 120, the acoustic echo canceler 140, and the non-linear echo suppressor 130 of FIG. 1B and the voice activity detector 210, the first switch 220, the model computation block 250, the spectral shaping block 260 and the summing device 290 of FIG. 2B. The echo suppression system 500 also includes a noise level estimator 510, a sample buffer 520, a limiter 530, a first multiplier 540, a second summing device 550, a second multiplier 560 and an envelope detector 570.
The audio output 115 of the microphone 110 is coupled to the audio input of the voice activity detector 210 and to the audio input of the acoustic echo canceler 140. The binary output 215 of the voice activity detector 210 is coupled to a control input of the noise level estimator 510, and a binary output 515 of the noise level estimator 510 is coupled to the throw input of the switch 220. The audio output 145 of the acoustic echo canceler 140 is coupled to an audio input of the noise level estimator 510, to the first pole of the switch 220 and to the audio input of the non-linear echo suppressor 130. A first control metric 144a of the acoustic echo canceler 140 is coupled to a first control input of the non-linear echo suppressor 130 and to a subtractive input of the second summing device 550. A second control metric 144b of the acoustic echo canceler 140 is coupled to a first input of the second multiplier 560, and the output 225 of the second pole of the switch 220 is coupled to the audio input of the model training block 250 and to a queue input of the sample buffer 520.
A random pointer 525 is coupled to a control input of the sample buffer 520, and an output of the sample buffer 520 serves as the excitation input 245 to the spectral shaping filter 260. The filter coefficient output 256 of the model training block 250 provides the control input to the spectral shaping filter 260, and the modeled car noise 265 output by the spectral shaping filter 260 is coupled to a noise input of the limiter 530. A limited noise output 535 of the limiter 530 is coupled to a first input of the first multiplier 540, and a scaled noise output 545 of the first multiplier 540 is coupled to the first input of the first summing device 290. The audio output 135 of the non-linear echo suppressor 130 is coupled to the second input of the first summing device 290, and the output 295 of the first summing device 290 serves as the audio input to the telephone (not shown).
The audio output from the telephone is coupled to reference inputs of the envelope detector 570, the acoustic echo canceler 140 and the loudspeaker 120. An output 575 of the envelope detector 570 is coupled to a second input of the second multiplier 560, and an output 565 of the second multiplier 560 is coupled to a second control input of the non-linear echo suppressor 130 and to a control input of the limiter 530. A constant one (1) is coupled to an additive input of the second summing device 550, and an output 555 of the second summing device 550 is coupled to a second input of the first multiplier 540.
In operation, the residual echo suppressor 130 and the acoustic echo canceler 140 function generally as described above with respect to FIGS. 1B and 2B. By way of example, the residual suppressor 130 of FIG. 5 is shown to be a hybrid suppressor of the type described in the above cited U.S. patent application Ser. No. 09/005,149 (entitled "Methods and Apparatus for Improved Echo Suppression in Communications Systems" and filed on even date herewith). As shown in FIG. 5, the hybrid residual suppressor 130 is referred to as an AC-center attenuator.
Generally, the AC-center attenuator 130 scales a portion of the audio input signal 145 using an appropriate attenuation factor .alpha.. More specifically, the AC-center attenuator 130 scales that portion of the audio signal 145 falling within an attenuation window defined by a window size .DELTA.. The center of the attenuation window moves with the amplitude of the audio signal 145, and the attenuator 130 provides excellent residual suppression with a minimum of signal distortion.
The acoustic echo canceler 140 of FIG. 5 can be, for example, of the type described in the above cited copending U.S. patent application Ser. No. 08/852,729 (entitled "An Improved Echo Canceler for use in Communications Systems" and filed May 7, 1997). Such an echo canceler can dynamically measure the level of echo cancelation it is providing and thus supply the appropriate control metrics 144a, 144b to the AC-center attenuator 130.
As shown, the first control metric 144a is used directly as the attenuation factor .alpha.. The second control metric 144b is multiplied by the envelope of the far-end audio signal 125 (via the multiplier 560 and the envelope detector 570), and the resulting control signal 565 is used as the window size .DELTA.. Detailed operation and integration of the echo canceler 140 and the AC-center attenuator 130 is described in the above referenced U.S. patent applications and is omitted here for sake of brevity.
The comfort noise aspects of FIG. 5 are generally as described above with reference to FIGS. 2B, 3 and 4. Generally, the audio signal 145 is passed to the sample buffer 520 during periods of no speech, and the training processor 250 (i.e., the adaptive filter 400) processes the contents of the sample buffer 520 to provide a shaping parameter 256 (i.e., the filter coefficient a) to the noise generation processor 260 (i.e., the spectral shaping filter 300). During periods of speech, the shaping parameter 256 is frozen, and the noise generation processor 260 filters the excitation signal 245 to provide the comfort noise samples 265.
As described above, the excitation signal 245 is generated by randomly selecting samples, via the random pointer 525, from the sample buffer 520. The excitation signal 245 thus consists of white noise samples having power equal to that of the actual background noise. Note that since the sample buffer 520 is not bound by the frame size of the overall system (e.g., 160 samples in many TDMA telephone applications), the configuration of FIG. 5 can be implemented in both sample-based and frame-based communications systems.
Note also that the decision of the voice activity detector 210 in FIG. 5 is qualified by a decision provided by the noise level estimator 510. In other words, the noise model is updated only when a) the voice activity detector 210 indicates that there is no speech and b) the noise level estimator 510 indicates that the energy in the audio signal 145 is less than an estimate of the noise level in the audio signal 145. Qualifying the voice activity detector decision in this way reduces the probability that the noise model will be erroneously adapted based on sample blocks containing voice.
Note, however, that qualifying the voice activity detector 210 in this way also results in modeled comfort noise which tends to have a lower power level than that of the actual background noise. In other words, since the noise level estimator 510 requires that the energy in the audio signal 145 be less than a prevailing noise level estimate before the noise model is trained, the actual noise used to train the noise model is biased toward the low end. This can be remedied, however, by providing an appropriate compensating gain factor in the noise generation processor 260 (i.e., in the spectral shaping filter 300) as is described above with respect to FIGS. 3 and 4.
Those skilled in the art will appreciate that appropriate noise level estimates can be computed using known techniques. Additionally, novel methods for computing noise level estimates are described below by way of exemplary pseudo-code. However, since specific operation of the noise level estimator 510 is not critical to the presently claimed invention, a detailed description is omitted here.
Since the AC-center attenuator 130 does not attenuate that portion of the audio signal 145 falling outside the attenuation window defined by .DELTA., the modeled noise signal 265 is limited to .+-..DELTA., via the limiter 530, as shown in FIG. 5. Also, since the audio signal 145 falling within the attenuation window is multiplied by the attenuation factor .alpha., the modeled noise within the window (i.e., the limited noise signal 535) is multiplied by 1-.alpha., via the first multiplier 540 and the second summing device 500. The resulting limited and scaled noise signal 545 is thus of the same character and level as the actual noise removed by the AC-center attenuator 130. As shown, the limited and scaled noise signal 545 is then added to the AC-center attenuator output 135 to provide the near-end audio signal 295 as desired.
For a lower-complexity echo suppression system that does not include an acoustic echo canceler front end (i.e., for a system such as that shown in FIGS. 1A and 2A), the control signals 144a, 144b can be set to constants and the comfort noise features can be implemented in the same way. Also, for systems in which a noise suppressor is inserted between the acoustic echo canceler 140 and the residual echo suppressor 130, the level and character of the comfort noise can be adjusted appropriately by providing the audio output of the noise suppressor, rather than the audio output 145 of the echo canceler, to the noise modeling and generation processor (i.e., to the first pole of the first switch 220 in FIG. 5).
Note that when a pure clipping type residual suppressor is used, the first control signal 144a is not necessary. In such case, the comfort noise level is adjusted using the second control signal 144b and the limiter 530, and the first multiplier 540 and the second summing device 550 are not required. Conversely, when a purely scaling type residual suppressor is used, the second control signal 144b is not necessary. Thus, the comfort noise level is adjusted using the first control signal 144a, the first multiplier 540 and the second summing device 550, and the limiter 530 is not required.
To further illustrate the various features and advantages of the present invention, an echo suppression system similar to that of FIG. 5 is described hereinafter by way of pseudo-code. The pseudo-code is written to simulate the exemplary system as it is implemented using a 32-bit digital signal processor. Those skilled in the art will appreciate that the pseudo-code is exemplary in nature and that the embodiment can be implemented using a wide variety of hardware configurations.
Those skilled in the art will appreciate that the present invention is not limited to the specific exemplary embodiments which have been described herein for purposes of illustration. For example, the various operational blocks of the disclosed embodiments are conceptual in nature. Actual implementation of the functions of such blocks can be accomplished using a variety of techniques. Furthermore, each exemplary system can be implemented, for example, using multiple standard digital signal processing chips, a single application-specific integrated circuit, or an appropriately configured computer. Note also that, although the exemplary embodiments have been described in the context of acoustic echo canceling, the teachings of the present invention are equally applicable in the context of network echo canceling (e.g., where the near-end user is a landline user and the far-end user is a mobile user). Further, certain aspects of the present invention are applicable to communications systems generally and are not limited to echo suppression systems. Thus, the scope of the invention is defined by the claims which are appended hereto, rather than the foregoing description, and all equivalents which are consistent with the meaning of the claims are intended to be embraced therein.