Robust foreground/background filtering control for acoustic echo cancellation
Systems and methods are described for controlling adaptive filtering components. A far end signal may be filtered by each of a foreground filter and a background filter, where both filters are adaptive echo cancellation filters that output echo estimations. Control logic may halt adaptation by the background filter based on a deviation signal. To determine the deviation signal, cross-correlation coefficients for the echo estimations produced by both filters may be determined for each frequency bin of the far end signal. The determined cross-correlation coefficients may be summed across a plurality of the frequency bins. A hysteresis function may then be applied to the sum associated with the filter associated with the echo estimation used to generate a filtered result. The deviation signal may be activated in response to the hysteresis function outputting a high value, which the control logic uses to turn off adaptation by the background filter.
1 . A method for controlling foreground and background adaptive filtering components of an acoustic echo cancelling system, the method comprising:
filtering, by a foreground filter in communication with control logic, a received frequency-domain far end signal, the filtering by the foreground filter resulting in a foreground echo estimation, the foreground filter being an adaptive echo cancellation filter that operates based on foreground coefficients;
filtering, by a background filter in communication with the control logic, the received frequency-domain far end signal, the filtering by the background filter resulting in a background echo estimation, the background filter being an adaptive echo cancellation filter that operates based on background coefficients;
determining a filtered result, by the control logic, based on a near-end microphone signal and a selected one of the foreground echo estimation and the background echo estimation, the filtered result being subsequently used to generate a near-end voice signal, wherein the control logic is configured to select one of the foreground echo estimation and the background echo estimation based on a comparison of a difference between the near-end microphone signal and the foreground echo estimation and a difference between the near-end microphone signal and the background echo estimation; and
freezing, by the control logic, values of coefficients used in the background filter when a deviation signal is at a logical high, wherein determining the deviation signal by the control logic comprises:
determining a respective cross-correlation coefficient for both the foreground echo estimation and the background echo estimation for each frequency bin of the received frequency-domain far end signal, each cross-correlation coefficient being based on a comparison of received microphone input signals and respective echo estimations of each frequency bin;
summing the determined cross-correlation coefficients across a plurality of the frequency bins for each of the foreground echo estimation and the background echo estimation;
selecting one of the sum of the cross-correlation coefficients for the foreground echo estimation and the sum of the cross-correlation coefficients for the background echo estimation, wherein the selected sum corresponds to the selected one of the foreground echo estimation and the background echo estimation; and
applying a hysteresis function to the selected sum of cross-correlation coefficients, such that when the selected sum is less than a first threshold, the hysteresis function outputs a high value representing the logical high, and when the selected sum is greater than a second threshold, the hysteresis function outputs a low value.
2 . The method of claim 1 , wherein received near-end microphone signals are, prior to the determining of the respective cross-correlation coefficients, processed to determine a respective noise floor value for each frequency bin, the respective noise floor being used to determine the cross-correlation coefficients for each bin.
3 . The method of claim 2 , wherein the processing to determine the respective noise floor value is based on:
a first smoothing factor and a noise floor value for a preceding bin when a magnitude of the near-end microphone signal is less than or equal to a modified near-end microphone signal for the preceding bin; and
a second smoothing factor and the noise floor value for the preceding bin when the magnitude of the near-end microphone signal is greater than the modified near-end microphone signal for the preceding bin.
4 . The method of claim 3 , wherein the first smoothing factor has a lower value than the second smoothing value.
5 . The method of claim 1 , wherein the deviation signal is determined further based on filtering the determined respective cross-correlation coefficients such that cross-correlation coefficients are determined only for bins with greater than a threshold level of speech, and wherein bins with less than the threshold level of speech have cross-correlation coefficients set to a predetermined value.
6 . The method of claim 5 , wherein the threshold level of speech is based on a comparison of a magnitude of the near-end microphone signal to a noise floor value for a bin being greater than a predetermined signal-to-noise ratio threshold.
7 . The method of claim 5 , wherein the threshold level of speech is based on a magnitude of the near-end microphone signal being greater than a predetermined minimum level threshold.
8 . The method of claim 1 , wherein the summing the determined cross-correlation coefficients across the plurality of frequency bins comprises adding determined cross-correlation coefficients for frequency bins within a 300 Hz to 3400 Hz range.
9 . A non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
filtering, by a foreground filter, a received frequency-domain far end signal, the filtering by the foreground filter resulting in a foreground echo estimation, the foreground filter being an adaptive echo cancellation filter that operates based on foreground coefficients;
filtering, by a background filter, the received frequency-domain far end signal, the filtering by the background filter resulting in a background echo estimation, the background filter being an adaptive echo cancellation filter that operates based on background coefficients;
determining a filtered result based on a near-end microphone signal and a selected one of the foreground echo estimation and the background echo estimation, the filtered result being subsequently used to generate a near-end voice signal, wherein the one or more processors are configured to select one of the foreground echo estimation and the background echo estimation based on a comparison of a difference between the near-end microphone signal and the foreground echo estimation and a difference between the near-end microphone signal and the background echo estimation; and
freezing values of coefficients used in the background filter when a deviation signal is at a logical high, wherein determining the deviation signal comprises:
determining a respective cross-correlation coefficient for both the foreground echo estimation and the background echo estimation for each frequency bin of the received frequency-domain far end signal, each cross-correlation coefficient being based on a comparison of received microphone input signals and respective echo estimations of each frequency bin;
summing the determined cross-correlation coefficients across a plurality of the frequency bins for each of the foreground echo estimation and the background echo estimation;
selecting one of the sum of the cross-correlation coefficients for the foreground echo estimation and the sum of the cross-correlation coefficients for the background echo estimation, wherein the selected sum corresponds to the selected one of the foreground echo estimation and the background echo estimation; and
applying a hysteresis function to the selected sum of cross-correlation coefficients, such that when the selected sum is less than a first threshold, the hysteresis function outputs a high value representing the logical high, and when the selected sum is greater than a second threshold, the hysteresis function outputs a low value.
10 . The non-transitory computer-readable medium of claim 9 , wherein, in the operations, received near-end microphone signals are, prior to the determining of the respective cross-correlation coefficients, processed to determine a respective noise floor value for each frequency bin, the respective noise floor being used to determine the cross-correlation coefficients for each bin.
11 . The non-transitory computer-readable medium of claim 10 , wherein, in the operations, the processing to determine the respective noise floor value is based on:
a first smoothing factor and a noise floor value for a preceding bin when a magnitude of the near-end microphone signal is less than or equal to a modified near-end microphone signal for the preceding bin; and
a second smoothing factor and the noise floor value for the preceding bin when the magnitude of the near-end microphone signal is greater than the modified near-end microphone signal for the preceding bin.
12 . The non-transitory computer-readable medium of claim 11 , wherein, in the operations, the first smoothing factor has a lower value than the second smoothing value.
13 . The non-transitory computer-readable medium of claim 9 , wherein, in the operations, the deviation signal is determined further based on filtering determined cross-correlation coefficients such that cross-correlation coefficients are determined only for bins with greater than a threshold level of speech, and wherein bins with less than the threshold level of speech have cross-correlation coefficients set to a predetermined value.
14 . The non-transitory computer-readable medium of claim 13 , wherein, in the operations, the threshold level of speech is based on a comparison of a magnitude of the near-end microphone signal to a noise floor value for a bin being greater than a predetermined signal-to-noise ratio threshold.
15 . The non-transitory computer-readable medium of claim 14 , wherein, in the operations, the threshold level of speech is based on a magnitude of the near-end microphone signal being greater than a predetermined minimum level threshold.
16 . The non-transitory computer-readable medium of claim 9 , wherein, in the operations, the summing the determined cross-correlation coefficients across the plurality of frequency bins comprises adding determined cross-correlation coefficients for frequency bins within a 300 Hz to 3400 Hz range.
17 . An acoustic echo cancelling system, comprising:
a foreground filter that filters a received frequency-domain far end signal, the filtering by the foreground filter resulting in a foreground echo estimation, the foreground filter being an adaptive echo cancellation filter that operates based on foreground coefficients;
a background filter that filters the received frequency-domain far end signal, the filtering by the background filter resulting in a background echo estimation, the background filter being an adaptive echo cancellation filter that operates based on background coefficients; and
control logic in communication with each of the foreground filter and the background filter, the control logic being configured for:
determining a filtered result based on a near-end microphone signal and a selected one of the foreground echo estimation and the background echo estimation, the filtered result being subsequently used to generate a near-end voice signal, wherein the control logic is configured to select one of the foreground echo estimation and the background echo estimation based on a comparison of a difference between the near-end microphone signal and the foreground echo estimation and a difference between the near-end microphone signal and the background echo estimation; and
freezing values of coefficients used in the background filter when a deviation signal is at a logical high, wherein determining the deviation signal by the control logic comprises:
determining a respective cross-correlation coefficient for both the foreground echo estimation and the background echo estimation for each frequency bin of the received frequency-domain far end signal, each cross-correlation coefficient being based on a comparison of received microphone input signals and the respective echo estimations of each frequency bin;
summing the determined cross-correlation coefficients across a plurality of the frequency bins for each of the foreground echo estimation and the background echo estimation;
selecting one of the sum of the cross-correlation coefficients for the foreground echo estimation and the sum of the cross-correlation coefficients for the background echo estimation, wherein the selected sum corresponds to the selected one of the foreground echo estimation and the background echo estimation; and
applying a hysteresis function to the selected sum of cross-correlation coefficients, such that when the selected sum is less than a first threshold, the hysteresis function outputs a high value representing the logical high, and when the selected sum is greater than a second threshold, the hysteresis function outputs a low value.
18 . The system of claim 17 , wherein received near-end microphone signals are, prior to the determining of the respective cross-correlation coefficients, processed to determine a respective noise floor value for each frequency bin, the respective noise floor being used to determine the cross-correlation coefficients for each bin.
19 . The system of claim 18 , wherein the processing to determine the noise floor value is based on:
a first smoothing factor and a noise floor value for a preceding bin when a magnitude of the near-end microphone signal is less than or equal to a modified near-end microphone signal for the preceding bin; and
a second smoothing factor and the noise floor value for the preceding bin when the magnitude of the near-end microphone signal is greater than the modified near-end microphone signal for the preceding bin.
20 . The system of claim 19 , wherein the first smoothing factor has a lower value than the second smoothing value.