Background of the Invention
The present invention relates to communications systems, and more particularly, to echo suppression in bi-directional communications links.
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 modem 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. In either case, the degree of attenuation 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, which is incorporated herein in its entirety by reference. An alternative clipping type suppressor, known as an AC-Center clipper, is described in parent 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, which is also 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 referenced U.S. Pat. No. 5,475,731 to Rasmusson et al. An advanced Normalized Least Mean Squares based canceler is described in parent application Ser. No. 08/852,729, entitled "An Improved Echo Canceler for use in Communications Systems" and filed May 7, 1997.
The control output, or control metric 144 indicates, for example, the instantaneous cancelation achieved by the acoustic echo canceler 140 and is used, for example, by the echo suppressor 130 to determine the 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 or a scaling suppressor. When following the echo canceler 140, the echo suppressor 130 can also 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). The control metric 144 is thus adjusted, as is described for example in the above cited patents and patent applications, based upon the type of echo suppressor 130 being utilized. Advanced techniques for controlling echo suppressors generally are also 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, which is incorporated herein in its entirety by reference.
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. Advanced methods for generating and utilizing comfort noise are described, for example, in copending U.S. patent application Ser. No. 09/005,145, entitled "Methods and Apparatus for Providing Comfort Noise in Communications Systems" and filed on even date herewith, which is incorporated herein in its entirety by reference.
While the above described systems provide sophisticated echo suppression, they also suffer from several significant drawbacks. For example, known clipping and scaling echo suppressors can introduce bothersome artifacts into the near-end telephone signal. Additionally, known methods for controlling echo suppressors (i.e., for providing suitable control metrics) can result in undue near-end signal distortion and/or inadequate echo suppression under certain conditions. Consequently, there is a need for improved methods and apparatus for providing echo suppression and echo suppression control.
Summary of the Invention
The present invention fulfills the above-described and other needs by providing an improved echo suppressor, referred to herein as an AC-center attenuator, which attenuates the echo component of a communications signal by multiplying a portion of the communications signal by an appropriate scale factor. Specifically, the AC-center attenuator scales that portion of the communications signal lying within a sliding attenuation window. Advantageously, the attenuation window tracks a value (e.g., the signed amplitude) of the communications signal so that the AC-center attenuator can suppress the echo component while passing other signal components of interest (e.g., near-end speech and noise). The scale factor within the attenuation window and the size of the attenuation window itself can be dynamically adjusted so that the AC-center attenuator introduces minimum signal distortion and few audible artifacts.
Since the AC-center attenuator includes both scaling and clipping aspects, it can properly be considered a hybrid form of echo suppressor. In other words, the AC-center attenuator behaves like a scaling suppressor with respect to that portion of the communications signal lying within the attenuation window (i.e., it multiplies that portion of the signal by an attenuation factor) and like a clipping suppressor with respect to that portion of the communications signal lying outside the attenuation window (i.e., it passes that portion of the signal through). As a result, the AC-center attenuator provides superior echo suppression with a minimum of signal distortion.
In addition to the AC-center attenuator, the present invention also provides improved methods and apparatus for controlling echo suppressors generally. For example, the present invention provides techniques for dynamically measuring a loop echo gain which can be used to properly adjust the attenuation provided by any type of echo suppressor. Advantageously, the measured loop echo gain indicates the degree to which an echo-causing signal is being attenuated by the various aspects of a bi-directional communications system (e.g., by volume adjustment and/or by natural fading across an acoustic path from a loudspeaker to a microphone) and thus indicates the additional echo suppression needed to reduce the echo-causing signal to a particular goal level. As a result, the measured loop gain can be used to adjust the attenuation provided by a scaling, clipping or hybrid suppressor.
Advantageously, the measured loop echo gain can include the echo suppression being provided by a front-end linear echo canceler. Accordingly, the present invention provides a variety of techniques for dynamically measuring the suppression achieved by a linear echo canceler. For example, a comparison of signal energies at the input and output of any echo canceler can be used to provide an appropriate indication of dynamic echo cancelation. Additionally, for blockwise-updating echo cancelers, a comparison of update energy to canceler input energy can be used to provide an appropriate dynamic indicator. In each case, the present invention provides practical techniques for obtaining and utilizing the measurements.
In a first exemplary embodiment, an echo suppression device according to the invention includes an echo suppressor configured to process a first communications signal in order to suppress an echo component resulting from a reflection of a second communications signal. According to the embodiment, the echo suppressor scales a first portion of the first communications signal and passes a second portion of the first communications signal to provide an echo-suppressed output signal. The first portion of the first communications signal is selected using an attenuation window of the echo suppressor, and the center of the attenuation window is adjusted based on a value of the first communications signal. For example, the center of the attenuation window can be adjusted in accordance with a signed amplitude of the first communications signal. Additionally, the center of the attenuation window can be adjusted recursively such that, at each instant in time, the center is set equal to a previously computed value of the echo-suppressed output signal.
Advantageously, the echo suppressor can scale the first portion of the first communications signal using an adjustable attenuation factor, and the attenuation factor can be adjusted so that the echo suppression device provides echo attenuation based on the performance of other devices in a communications system in which the echo suppression device is implemented. For example, the attenuation factor can be adjusted based on a volume control signal which is used to adjust a volume of an audio output of the communications system. Additionally, the size of the attenuation window can be adjusted based on the second communications signal and/or on echo attenuation provided by other devices within the communications system.
According to an alternative embodiment, an echo suppression device according to the invention includes an echo suppressor configured to process an echo-containing input signal and an echo-causing reference signal in order to provide an echo-suppressed output signal. The echo suppression device also includes a gain control processor configured to estimate an echo gain of the echo suppressor. The estimate is computed based on a ratio of first and second measurements, wherein the first measurement indicates energy in the echo-suppressed output signal, and the second measurement indicates energy in the echo-containing input signal or the echo-causing reference signal.
For example, the first measurement can be derived as a square root of a sum of squares of samples of the echo-suppressed output signal, and the second measurement can be derived as a square root of a sum of squares of samples of either the echo-containing input signal or the echo-causing reference signal. Alternately, the first measurement can be derived as a root-mean-square value of samples of the echo-suppressed output signal, and the second measurement can be derived as a root-mean-square value of samples of either the echo-containing input signal or the echo-causing reference signal. Further, the estimate can be computed as a square root of the ratio of first and second measurements, where the first measurement is derived as a sum of squares of samples of the echo-suppressed output signal, and the second measurement is derived as a sum of squares of samples of either the echo-containing input signal or the echo-causing reference signal.
According to another exemplary embodiment, an echo suppression device according to the invention includes a front-end echo suppressor, a residual echo suppressor and a gain control processor. The front-end echo suppressor is configured to process an echo-containing signal and an echo-causing signal in order to provide an intermediate signal, and the residual echo suppressor is configured to selectively attenuate the intermediate signal to provide an echo-suppressed output signal. The gain control processor is configured to estimate an echo gain of the front-end echo suppressor based on a ratio of first and second measurements, and the echo gain estimate is used to adjust echo attenuation provided by the residual echo suppressor.
An alternative echo suppression device according to the invention includes an echo canceler, including one or more adaptive filter coefficients, configured to process an echo-containing input signal and an echo-causing reference signal in order to provide an echo-canceled output signal. The echo suppression device also includes a gain control processor configured to estimate an echo gain of the echo canceler based on a ratio of first and second measurements, wherein the first measurement indicates a change in at least one of the adaptive filter coefficients of the echo canceler during a time interval, and wherein the second measurement is based on either the echo-containing input signal or the echo-causing reference signal during the time interval.
For example, the first measurement can be derived as a peak of measured changes in the filter coefficients during the time interval, or as a square root of a sum of squares of measured changes in the filter coefficients during the time interval. Additionally, the second measurement can be derived as a square root of a sum of squares of samples of either the echo-containing input signal or the echo causing reference signal, or as a root-mean-square value of samples of either the echo-containing input signal or the echo causing reference signal.
In an additional exemplary embodiment, an echo suppression device according to the invention includes an echo canceler, a residual echo suppressor and a gain control processor. The echo canceler includes one or more adaptive filter coefficients and is configured to process an echo-containing signal and an echo-causing signal in order to provide an echo-canceled signal. The residual echo suppressor is configured to selectively attenuate the echo-canceled signal to provide an echo-suppressed signal, and the gain control processor is configured to estimate an echo gain of the echo canceler based on a ratio of first and second measurements. The first measurement indicates a change in at least one of the adaptive filter coefficients during a time interval, and the echo gain estimate is used to adjust echo attenuation provided by the residual echo suppressor.
The first measurement can be derived, for example, as a peak of measured changes in the filter coefficients during a time interval, or as a square root of a sum of squares of measured changes in the filter coefficients during the time interval. Additionally, the second measurement can be derived, for example, as a square root of a sum of squares of samples of either the echo-containing input signal or the echo causing reference signal, or as a root-mean-square value of samples of either the echo-containing input signal or the echo causing reference signal. Further, the ratio can be computed as a square root of the first and second measurements, wherein the first measurement is derived as a sum of squares of measured changes in the filter coefficients during a time interval, and wherein the second measurement is derived as a sum of squares of samples of either the echo-containing input signal or the echo-causing reference signal during the time interval.
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 exemplary echo suppression system in which the teachings of the present invention can be implemented.
FIG. 2 depicts operation of an improved echo suppressor, referred to herein as an AC-center clipper, according to the present invention.
FIG. 3 depicts operation of an alternative improved echo suppressor, referred to herein as an AC-center attenuator, according to the present invention.
FIG. 4 depicts an exemplary echo suppression system including the AC-center attenuator of FIG. 3.
FIG. 5 depicts an alternative exemplary echo suppression system including the AC-center attenuator of FIG. 3.
FIG. 6 depicts an exemplary echo canceler which can be used to implement the echo suppression system of FIG. 5.
FIG. 7 depicts exemplary audio signals which demonstrate operation of the echo suppression system of FIG. 5.
FIG. 8 provides an alternative representation of the exemplary audio signals of FIG. 7.
Detailed Description of the Invention
As described in the Background of the Invention above, parent application Ser. No. 08/775,797 discloses an improved echo suppressor known as an AC-center clipper. By way of contrast to conventional center clippers which fully attenuate, or clip input signals falling within a fixed clipping window (typically centered around zero), the AC-center clipper provides a variable clipping window having a center which approximately tracks the envelope of the input signal. As a result, the AC-center clipper provides superior performance as compared to a conventional center clipper, particularly in situations where an echo component of an input signal is superimposed on desired speech or noise components of the input signal.
Recent empirical studies have shown, however, that the AC-center clipper can still introduce bothersome distortion when echo is clipped during periods of speech and/or noise. The present invention teaches that such distortion results from the discontinuity in signal gain which is introduced by the AC-center clipper. In other words, the distortion results from the fact that input signals falling within the adjustable window of the AC-center clipper are completely clipped, while input signals falling outside the adjustable window are not attenuated at all.
This aspect of the AC-center clipper is perhaps best understood with reference to FIG. 2, wherein output of the AC-center clipper at a particular moment time is depicted as a function of the AC-center clipper input. As described in parent application Ser. No. 08/775,797, the AC-center clipper includes an adjustable clipping window defined by an adjustable clipping threshold .DELTA. and an adjustable window center which is set based on the most recent output of the AC-center clipper. Then, for a prevailing clipping window, any portion of the input signal falling within the window is clipped, while any portion of the input signal falling outside the window is allowed to pass through unattenuated as shown in FIG. 2. As a result, the AC-center clipper can distort speech and noise signals as described above.
To remedy this problem, the present invention provides an alternative improved echo suppressor, referred to herein as an AC-center attenuator. Like the AC-center clipper, the AC-center attenuator includes a sliding window which is defined by an adjustable threshold .DELTA. and which moves to approximately track the envelope of the input signal. However, unlike the AC-center clipper, the AC-center attenuator does not completely remove that portion of the input signal falling within the sliding window. Rather, the AC-center attenuator scales that portion of the input signal using an appropriate attenuation factor .alpha..
As a result, the discontinuity in signal gain at the boundaries of the attenuation window can be made less severe, and the AC-center attenuator can be adjusted to introduce fewer audible artifacts as compared to the AC-center clipper. Further, the AC-center attenuator retains the advantages of the AC-center clipper with respect to reduced signal distortion. In other words, because the attenuation window of the AC-center attenuator moves to approximately track the envelope of the input signal, the AC-center attenuator can suppress echo while passing other signal components of interest. As described in detail below, the attenuation factor .alpha. and the window size .DELTA. of the AC-center attenuator can be dynamically adjusted so that the AC-center attenuator can continually provide a proper balance between maximal echo suppression and minimal signal distortion.
The above described operation of the AC-center attenuator is depicted in FIG. 3, wherein output of the AC-center attenuator at a particular moment in time is depicted as a function of the AC-center attenuator input. Note from FIGS. 2 and 3 that the AC-center clipper is actually a special case of the AC-center attenuator. In other words, the AC-center clipper is actually an AC-center attenuator in which the attenuation factor .alpha. is set to zero. Also note from FIG. 3 that the AC-center attenuator can be put in a pass-through mode (i.e., a mode in which the output is always equal to the input) by setting the attenuation factor .alpha. to unity and/or by setting the window size .DELTA. to zero.
The AC-center attenuator can be implemented, for example, using the following pseudo-code:
In FIG. 3 and in the pseudo-code above, the center of the AC-center attenuator window is made to closely track the envelope of the input signal by dynamically shifting the center of the attenuation window to continually match the AC-center attenuator output. However, the AC-center attenuator window can also be made to more loosely track the envelope of the input signal. For example, the window center can be shifted to match the AC-center attenuator output when the input signal falls outside the prevailing window and left alone, or made to decay toward zero, otherwise. Alternatively, the window center can be limited so that the boundaries of the window never exceed the full-scale range of the input signal (e.g., when the window size spans the full-scale range of the input signal, the window center is forced to zero). Doing either or both of these things prevents the AC-center attenuator from introducing unnecessary signal distortion (due to continual shifting of the attenuation window) when the input signal consists primarily of echo (and there is no need to track the input envelope in an attempt to pass other signal components).
Advantageously, the AC-center attenuator can be used as a stand alone echo suppressor in a system such as that described above with respect to FIG. 1A. Accordingly, FIG. 4 depicts an exemplary system 400 in which the echo suppressor 130 of FIG. 1A is implemented as an AC-center attenuator. As shown, the exemplary system 400 includes the microphone 110, the loudspeaker 120 and the AC-center attenuator 130, as well as a gain control processor 410, a multiplier 420, an envelope detector 430 and a volume gain block 440.
In FIG. 4, the microphone output 115 is coupled to a first reference input of the gain control processor 410 and to the audio input of the AC-center attenuator 130. The audio output 135 of the AC-center attenuator 130 serves as the audio input to the telephone (not shown), and an audio output 445 from the telephone is coupled to an audio input of the volume gain block 440. An audio output 125 of the volume gain block 440 serves as audio input to the loudspeaker 120 and is coupled to the envelope detector 430 and to a second reference input of the gain control processor 410.
A volume control signal 444 is coupled to a control input of the volume gain block 440 and to a third reference input of the gain control processor 410. A first control output 414a of the gain control processor 410 is coupled to a first control input of the AC-center attenuator 130, and a second control output 414b of the gain control processor 410 is coupled to a first input of the multiplier 420. A reference output 435 of the envelope detector 430 is coupled to a second input of the multiplier 420, and an output 425 of the multiplier 420 is coupled to a second control input of the AC-center attenuator 130.
Generally, operation of the system 400 of FIG. 4 is similar to that of the system 100 of FIG. 1A. In other words, the AC-center attenuator 130 processes the microphone signal 115, in dependence upon the loudspeaker signal 125, so that acoustic echo from the loudspeaker 120 to the microphone 110 is not passed back to the far-end telephone user. In the system 400 of FIG. 4, however, the gain control processor 410 adjusts the attenuation provided by the AC-center attenuator 130 via the control signals 414a, 414b.
The volume gain block 440 is included in the system 400 of FIG. 4 to better illustrate operation of the gain control processor 410. Generally, the volume gain block 440 attenuates the telephone audio signal 445, in accordance with the volume control signal 444, and passes the attenuated audio signal 125 to the loudspeaker 120. The volume control signal 444 can be adjusted, for example, by the near-end user.
The gain control processor 410 utilizes the volume control signal 444, the microphone signal 115 and/or the loudspeaker signal 125 to adjust the attenuation provided by the AC-center attenuator 130. More specifically, the gain control processor 410 utilizes the reference signals 115, 444, 125 to dynamically estimate a loop, or round-trip, echo gain which is in turn used to compute the control signals 414a, 414b. The estimated loop gain indicates the degree to which far-end speech in the telephone audio signal 445 is being attenuated as it passes through the volume control block 440 and across the acoustic path from the loudspeaker 120 to the microphone 110. The estimated loop gain can thus be used to compute the amount of additional attenuation the AC-center attenuator 130 should provide.
For example, the window size .DELTA. of the AC-center attenuator 130 can be set just large enough to capture the estimated echo component of the input audio signal 115 (but no larger than necessary, since increases in window size result in increased signal distortion), and the attenuation factor .alpha. of the AC-center attenuator can be set such that any residual echo component in the output audio signal 135 is attenuated to a particular goal level. Advanced methods for setting the window size .DELTA. and the attenuation factor .alpha. based on an estimated loop gain are described for example in the above referenced copending patent application Ser. No. 09/005,144, entitled "Methods and Apparatus for Controlling Echo Suppression in Communications Systems" and filed on even date herewith. A particular exemplary technique is also described by way of pseudo-code below.
To estimate the overall loop echo gain, the control processor 410 computes the echo attenuation provided by the volume gain block 440 and by the acoustic path from the loudspeaker 120 to the microphone 110. The attenuation provided by the volume gain block 440 is inherent in the volume control signal 444. However, the attenuation provided by the acoustic path (which is referred to as the channel gain) is estimated based on the microphone and loudspeaker signals 115, 125. Advanced methods for estimating the channel gain are described by way of pseudo-code below. Note also that, instead of dynamically estimating the channel gain during operation, a fixed worst-case channel gain estimate can be set a priori based on the environment in which the system 400 is intended to operate.
As shown in FIG. 4, the gain control processor 410 computes an appropriate attenuation factor .alpha. which is passed directly to the AC-center attenuator 130 via the first control signal 414a. The gain control processor 410 also computes an appropriate window size (e.g., a window size just large enough to capture the estimated echo component of the audio signal 115) which is conveyed by the second control signal 414b. The second control signal 414b is not used directly as the window size .DELTA. of the AC-center attenuator 130 however. Rather, the second control signal 414b is multiplied by the output 435 of the envelope detector 430, and the output 425 of the envelope detector 430 is used as the window size .DELTA. for the AC-center attenuator 130. Multiplying the estimated window size by the detector output 435 ensures that the AC-center attenuator 130 is active only when necessary.
For example, when the far-end user is silent, the amplitude of the loudspeaker signal 125 and the output 435 of the envelope detector 430 are approximately zero. Thus, the output 425 of the multiplier 420 is zero and the AC-center attenuator 130 acts as a pass-through, having no effect on the near-end signal 115. Alternatively, when the far-end user is speaking, the loudspeaker signal 125 and the output 435 of the envelope detector 430 are non-zero. Therefore, the output 425 of the multiplier 420 is non-zero, and the AC-center attenuator 130 operates as described above.
Since the AC-center attenuator 130 is active only when the far-end user is speaking, it does not distort near-end voice and noise in near-end single-talk situations. During far-end single talk and double-talk situations, however, the AC-center attenuator 130 is active and does distort near-end voice and/or noise in addition to suppressing echo. Nonetheless, since the distortion introduced by the AC-center attenuator 130 is slight as compared to that introduced by conventional suppressors, the AC-center attenuator 130 never need be completely deactivated, even during periods of double-talk. As a result, the AC-center attenuator 130 can serve as an effective full-time echo suppressor, even without a front-end echo canceler.
The envelope detector 430 of FIG. 4 can be constructed, for example, as an exponential-decay peak detector. In such case, a time constant of the detector 430 is set so that the decay rate of the detector output 435 is no faster than the decay rate associated with the acoustic path between the loudspeaker 120 and the microphone 110. In other words, a peak in the detector output 435 (induced by a peak in the loudspeaker signal 125) should fall off no faster than the corresponding echo signal (including reverberations) picked up at the microphone 110. The decay rate of the detector 430 should not be made so slow, however, that near-end transmissions are significantly distorted. Note also that any DC offset which may be present in the loudspeaker signal 125, or which may be introduced during analog-to-digital conversion of the loudspeaker signal 125, can be removed from the input to the envelope detector 430 (e.g., by AC-coupling or high-pass filtering) so that the window size .DELTA. of the AC-center attenuator 130 is not made artificially and unnecessarily high.
Advantageously, the AC-center attenuator of the present invention can also be combined with a front-end echo canceler such as that described above with respect to FIG. 1B. Accordingly, FIG. 5 depicts an exemplary system 500 in which the echo suppressor 130 of FIG. 1B is implemented as an AC-center attenuator. As shown, the exemplary system 500 includes the microphone 110, the loudspeaker 120, the AC-center attenuator 130, the echo canceler 140, the multiplier 420, the envelope detector 430 and the volume gain block 440.
In FIG. 5, the microphone output 115 is coupled to the audio input of the echo canceler 140, and the audio output 145 of the echo canceler 140 is coupled to the audio input of the AC-center attenuator 130. The audio output 135 of the AC-center attenuator 130 serves as the audio input to the telephone (not shown), and the audio output 445 from the telephone is coupled to the audio input of the volume gain block 440. The audio output 125 of the volume gain block 440 is coupled to the audio input of the loudspeaker 120, the reference input of the envelope detector 430 and a first reference input of the echo canceler 140.
The volume control signal 444 is coupled to the control input of the volume gain block 440 and to a second reference input of the echo canceler 140. A first control output 144a of the echo canceler 140 is coupled to the first control input of the AC-center attenuator 130, and a second control output 144b of the echo canceler 140 is coupled to the first input of the multiplier 420. The reference output 435 of the envelope detector 430 is coupled to the second input of the multiplier 420, and the output 425 of the second multiplier 420 is coupled to the second control input of the AC-center attenuator 130.
Generally, operation of the system 500 of FIG. 5 is similar to that of the system 101 of FIG. 1B. In other words, the acoustic echo canceler 140 dynamically models the acoustic path from the loudspeaker 120 to the microphone 110 and attempts to cancel any loudspeaker sound picked up by the microphone 110. The AC-center attenuator 130 then provides additional echo attenuation as necessary, and comfort noise is optionally added to the output signal 135 to compensate for near-end noise attenuated by the AC-center attenuator 130. In the system 500 of FIG. 5, however, the echo canceler 140 includes gain control processing analogous to that provided by the gain control processor 410 of FIG. 4.
Specifically, the echo canceler 140 of FIG. 5 estimates a loop echo gain from the far-end input 445, through the volume gain block 440, across the acoustic path from the loudspeaker 120 to the microphone 110 and through the echo canceler 140 itself. The loop echo gain is estimated based on the microphone, loudspeaker and canceler output signals 115, 125, 145, and the loop echo gain is used to compute the first and second control signals 144a, 144b for the. AC-center attenuator 130. Like the first control signal 414a of FIG. 4, the first control signal 144a of FIG. 5 is used directly as the attenuation factor .alpha. for the AC-center attenuator 130, and like the second control signal 414b of FIG. 4, the second control signal 144b of FIG. 5 is multiplied by the output of the envelope detector 430 to provide the window size .DELTA. for the AC-center attenuator 130.
To estimate the loop echo gain, the echo canceler 140 of FIG. 5 computes the attenuation provided by the volume gain block 440, the acoustic path and the echo canceler 140 itself. As in the system 400 of FIG. 4, the attenuation provided by the volume gain block 440 is inherent in the volume control signal 444, and the attenuation provided by the acoustic path is either dynamically estimated based on the microphone and loudspeaker signals 115, 125 or set to a fixed worst-case value. Advantageously, the attenuation provided by the echo canceler 140 can be computed in accordance with any one of multiple techniques provided by the present invention.
In a first exemplary embodiment, the echo canceler 140 estimates the instantaneous echo attenuation it is providing based on the microphone signal 115 and the canceler output signal 145. More specifically, the echo canceler 140 computes the attenuation estimate as a ratio of first and second values, wherein the first and second values provide an indication of energy in the canceler output and input signals 145, 115, respectively.
For example, the first value (i.e., the numerator of the ratio) can be computed as the square root of an accumulation of squared magnitudes, each squared magnitude corresponding to a sample of the canceler output signal 145. In such case, the second value (i.e., the denominator of the ratio) is computed similarly as the square root of an accumulation of squared samples of the canceler input signal 115. Alternately, the numerator and denominator of the ratio can be computed as root-mean-square (RMS) values of the canceler output and input signals 115, respectively.
Advantageously, such a ratio provides an accurate indication of the cancelation being achieved by the echo canceler 140 during periods of far-end single talk. In other words, when only the far-end user is speaking, the energy in the microphone and canceler output signals 115, 145 results primarily from echo (though background noise will contribute as well), and a ratio based on the relative energies provides a direct indication of how much echo is being removed by the echo canceler 140.
Those skilled in the art will appreciate that methods for detecting periods of far-end single talk (i.e., to ensure that the ratio of energies is computed only when it is appropriate to do so) are well known. Additionally, advanced methods for detecting far-end single talk are described below by way of exemplary pseudo-code. Since specific details of far-end single talk detection are not critical to an understanding of the present invention, however, such details are omitted here.
Advantageously, the denominator of the ratio can also be computed (as described above) based on the loudspeaker signal 125 instead of the microphone signal 115. In such case, the ratio provides an indication of the instantaneous echo attenuation from the input of the loudspeaker 120, across the acoustic path from the loudspeaker 120 to the microphone 110 and through the echo canceler 140 (i.e., the ratio encompasses both the channel gain and the canceler gain).
In any case, estimates of the noise in the microphone, loudspeaker and/or canceler output signals 115, 125, 140 can be subtracted from those signals before computations are performed in order to improve accuracy of the resulting ratio. Those skilled in the art will appreciate that methods for estimating the noise level in an audio signal are known. Additionally, advanced methods for obtaining noise level estimates are described below by way of exemplary pseudo-code. Again, however, since specific details relating to noise level estimation are not critical to an understanding of the presently claimed invention, such details are omitted here.
Note that the above described ratio provides a valuable indication of echo cancelation no matter what type of echo canceler 140 is utilized. In other words, the ratio of input and output energies reflects the degree of echo cancelation (during far-end single talk) irrespective of the precise way in which the echo canceler 140 processes the audio signal 115 to suppress echo. Thus, the above described technique for estimating the echo attenuation provided by an echo canceler is applicable to literally any type of echo canceler. Indeed, the technique is generally applicable to linear and non-linear echo suppressors of any kind, including the clipping, scaling and hybrid suppressors described above.
Advantageously, the present invention also provides more specialized techniques for estimating the echo suppression provided by particular types of echo cancelers. For example, the present invention provides techniques for estimating the echo suppression provided by blockwise-updating echo cancelers (i.e., echo cancelers in which the coefficients of an adaptive filter are updated in a blockwise fashion). An exemplary blockwise-updating echo canceler is described in copending U.S. patent application Ser. No. 08/578,944, entitled "Gauging Convergence of Adaptive Filters" and filed Dec. 27, 1995, which is incorporated herein in its entirety by reference. Additionally, an advanced blockwise-updating echo canceler is described in parent application Ser. No. 08/852,729.
To illuminate the techniques of the present invention, a modified version of the blockwise-updating echo canceler of parent application Ser. No. 08/852,729 is depicted in FIG. 6. As shown, the exemplary canceler 140 of FIG. 6 includes a coefficient register 610, an update register 620, a sample register 630, a gain control processor 640, a max-squares block 650, a max block 652, first through fourth summing devices 660, 662, 664, 666, first through fourth multipliers 670, 672, 674, 676, and first through sixth sum-of-squares accumulators 680, 682, 684, 686, 688, 690.
In FIG. 6, the microphone output 115 is coupled to an input of the first sum-of-squares accumulator 680 and to an additive input of the first summing device 660. An output 145 of the first summing device 660 serves as the audio output for the echo canceler 140 and is coupled to an input of the second sum-of-squares accumulator 682 and to a scaler input of the first multiplier 670. Outputs 681, 683, 685 of the first, second and third sum-of-squares accumulators 680, 682, 684 are coupled to first, second and third reference inputs of the gain control processor 640, respectively. A first control output 645 of the gain control processor 640 is coupled to a scaler input of the fourth multiplier 676, and second and third control outputs 144a, 144b of the gain control processor 640 serve as the first and second control outputs of the echo canceler 140.
The audio output 125 from the volume gain block 440 is coupled to a queue input of the sample register 630 and to the audio input of the loudspeaker 120, and the volume control signal 444 is coupled to a fourth reference input of the gain control processor 640. A vector output 635 of the sample register 630 is coupled to vector inputs of the first and second multipliers 670, 672. First and second taps 637, 639 of the sample register output 635 are coupled to inputs of the fourth and fifth sum-of-squares accumulators 686, 688, respectively. Outputs 687, 689 of the fourth and fifth sum-of-squares accumulators 686, 688 are coupled to first and second inputs of the max block 652, respectively, and an output 653 of the max block 652 is coupled to a fifth reference input of the gain control processor 640.
A vector output 671 of the first multiplier 670 is coupled to a first vector input of the third summing device 664, and a vector output 665 of the first summing device 664 is coupled to a vector input of the update register 620. A vector output 625 of the update register 620 is coupled to a second vector input of the third summing device 664 and to vector inputs of the fourth multiplier 676, the sixth sum-of-squares accumulator 690 and the max-squares block 650. Outputs 691, 651 of the sixth sum-of-squares accumulator 690 and the max-squares block 650 are coupled to sixth and seventh reference inputs of the gain control processor 640, respectively.
A vector output 677 of the fourth multiplier 676 is coupled to a vector input of the fourth summing device 666, and a vector output 667 of the fourth summing device 666 is coupled to a vector input of the coefficient register 610. A vector output 615 of the coefficient register 610 is coupled to a vector input of the fourth summing device 666 and to a vector input of the third multiplier 674. A profile vector is coupled to a second vector input of the third multiplier 674, and a vector output 675 of the third multiplier 674 is coupled to a second vector input of the second multiplier 672. A vector output 673 of the second multiplier 672 is coupled to a vector input of the second summing device 662, and a scaler output 663 of the second summing device 662 is coupled to a subtractive input of the first summing device 660 and to an input of the third sum-of-squares accumulator 684.
Detailed operation of the echo canceler 140 of FIG. 6 is described for example in parent application Ser. No. 08/852,729. Generally speaking, the echo canceler 140 operates as an adaptive filter in which the canceler output signal 145, or error signal, is minimized according to a Least-Mean-Squares (LMS) or Normalized LMS (NLMS) algorithm and in which the transfer function of the adaptive filter (defined by a set of filter coefficients in the coefficient register 610) thus converges toward that of the echo path between the loudspeaker 120 and the microphone 110. As shown, the contents of the sample register 630 and the coefficient register 610 are convolved to provide an estimate 663 of the echo component of the microphone signal 115, and the echo estimate 663 is subtracted from the microphone signal 115 to provide the canceler output signal 145. A set of update coefficients (stored in the update register 620) are modified on a sample-wise basis in dependence upon the canceler output signal 145 and the contents of the sample register 630, and the update coefficients are used to adapt the coefficients in the coefficient register 610 in a block-wise manner (e.g., once per 160 audio samples in a TDMA telephone application). The gain control processor 640 selectively utilizes the reference signals 444, 651, 653, 681, 683, 685, 691 to compute the variable update gain 645 and to thus control the rate at which the coefficients in the coefficient register 610 are adapted.
Advantageously, the present invention teaches that the update coefficients (i.e., the contents of the update register 620) can be used to provide an indication of the instantaneous echo suppression being achieved by the echo canceler 140. To see this, first realize that, as is described in parent application Ser. No. 08/852,729, the values of the update coefficients at the end of a block provide a crude indication of how well the echo canceler 140 is doing. For example, as the echo canceler 140 converges (i.e., as the transfer function of the adaptive filter approaches the transfer function of the acoustic path, for example upon power up or following an abrupt change in the acoustic path), the values of the update coefficients at the end of each block diminish. In other words, as the adaptive filter of the echo canceler 140 begins to match the true acoustic echo path, the filter coefficients in the coefficient register 610 stabilize.
Thus, according to embodiments of the present invention, a measurement of the instantaneous echo attenuation or gain provided by the echo canceler 140 is obtained by normalizing one or more of the update coefficients at the end of each block. More specifically, the attenuation estimate is computed at the end of each block as a ratio of first and second values, wherein the first value is based on one or more of the update coefficients and the second value provides an indication of energy in the canceler input signal 115.
For example, the first value (i.e., the numerator of the ratio) can be computed as the square root of an accumulation of squared update coefficients at the end of each block (e.g., as the square root of the output of the sum-of-squares accumulator 691). Alternately, the numerator of the ratio can be set equal to the peak update coefficient at the end of each block (e.g., set equal to the square root of the output of the max-squares device 651). In either case, the denominator of the ratio can be computed, as described above, as the square root of an accumulation of squared samples of the canceler input signal 115.
Advantageously, such a ratio provides a measurement of echo attenuation provided by the echo canceler 140 and can be used in computing the system loop gain as described above. Alternatively, the denominator of the ratio can be computed based on the loudspeaker signal 125 to obtain an indication of echo attenuation provided by a combination of the acoustic path and the echo canceler 140 (i.e., a combination of the channel gain and the canceler gain). Although this embodiment of the present invention is described with respect to the particular blockwise-updating echo canceler described in parent application Ser. No. 08/852,729, the embodiment is equally applicable to any echo canceler in which update coefficients are retained.
By way of example, aspects of the present invention are described in further detail in the pseudo-code provided below. The pseudo-code is written to simulate an exemplary echo suppression system as implemented using a 32-bit digital signal processor. Those skilled in the art will appreciate that such code is exemplary in nature and that equivalents can be implemented using a wide variety of hardware configurations. The exemplary echo suppression system includes a modified version of the improved echo canceler described in parent application Ser. No. 08/852,729 in combination with the AC-center attenuator described above.
FIGS. 7 and 8 depict sample audio signals generated via the pseudo-code above and are intended to illuminate operation of the AC-center attenuator of the present invention. Specifically, FIG. 7 depicts an example of the audio input to the AC-center attenuator 130 (e.g., signal 145 in FIG. 5) and a corresponding example of the audio output of the AC-center attenuator 130 (e.g., signal 135 in FIG. 5). In FIG. 7, the exemplary AC-center attenuator input signal is shown as a solid line 145, and the corresponding AC-center attenuator output signal is shown as a dashed line 135. FIG. 8 then depicts both of the audio signals of FIG. 7 as solid lines 135, 145 so that detail lost by using a dashed line for the attenuator output signal 135 in FIG. 7 can be seen. As shown, the exemplary audio input signal 145 includes a relatively high-frequency, low-amplitude echo component superimposed on a relatively low-frequency, high-amplitude noise component. Such a signal is encountered frequently in practice (e.g., during far-end single talk with a noisy near-end background) and can be difficult to process using conventional echo suppressors. As shown, however, the AC-center attenuator provides an audio output 135 in which the echo component is largely suppressed while the noise component remains as desired.
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.