# US 10,771,633 B2 · Echo cancellation method and terminal, computer storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,771,633 B2
- Document ID: US10771633B2
- Status: Granted
- Kind: B2
- Application number: 16/198,167
- Filed: 2018-11-21
- Published: 2019-04-25
- Granted: 2020-09-08
- Earliest claimed: 2016-07-07
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Ningbo Qiao; Junbin Liang
- Web page: https://patentgrep.com/patent/US10771633B2

## CPC

- H04M 9/082: {using echo cancellers (echo cancellers per se H04B3/23)}
- H04M 9/08: Two-way loud-speaking telephone systems with means for conditioning the signal, e.g. for suppressing echoes for one or both directions of traffic
- H04M 1/58: Anti-side-tone circuits
- H04M: TELEPHONIC COMMUNICATION (circuits for controlling other apparatus via a telephone cable and not involving telephone switching apparatus G08)

## Abstract

Described is an echo cancellation method including buffering the at least one frame of a first voice signal, the at least one frame of the first voice signal including an echo signal, when the at least one frame of signal is preprocessed, separately obtaining, in a first timing period, the at least one frame of the first voice signal from a buffer and at least one frame of a reference signal matching the at least one frame of first voice signal from a reference signal queue, so that an estimated latency value, between each frame of first voice signal and a corresponding reference signal, remains within a preset range, performing echo cancellation processing on the echo signal in the at least one frame of first voice signal using the at least one frame of reference signal, to obtain a second voice signal, and outputting the second voice signal.

## Claims

### Claim 1

An echo cancellation method, comprising:
collecting frames of a first voice signal;
buffering the frames of the first voice signal, the frames of the first voice signal including an echo signal;
when the frames of the first voice signal are preprocessed, separately obtaining, in a first timing period, the frames of the first voice signal from a buffer and frames of a reference signal matching the frames of the first voice signal from a reference signal queue, so that an estimated latency value, between each frame of the first voice signal and the reference signal, remains within a preset range;
performing, by processing circuitry of a terminal device, echo cancellation processing on the echo signal in the frames of the first voice signal using the frames of the reference signal, to generate frames of a second voice signal; and
outputting the frames of the second voice signal, wherein
the estimated latency value is based on cross-correlation parameters, the cross-correlation parameters being determined based on a cross-correlation operation that is performed on first characteristic values of the frames of the first voice signal and second characteristic values of the frames of the reference signal.

### Claim 2 (depends on 1)

The method according to claim 1, wherein before the frames of the first voice signal is collected, the method further comprises:
receiving frames of a third voice signal;
buffering the frames of the third voice signal, wherein the frames of the first voice signal comprises at least a signal that is the same as the frames of the third voice signal;
obtaining the frames of the third voice signal in a second timing period; and
decoding the frames of the third voice signal to generate the frames of the reference signal, and adding the generated frames of the reference signal to the reference signal queue.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the first timing period or the second timing period is obtained based on a frame length that is selected by an audio encoder performing encoding.

### Claim 4 (depends on 2)

The method according to claim 2, further comprising:
obtaining a buffer size of the frames of the first voice signal based on a minimum buffer size of recording circuitry of an audio card in the terminal device and a first buffer coefficient.

### Claim 5 (depends on 4)

The method according to claim 4, further comprising:
obtaining a buffer size of the frames of the third voice signal based on a minimum buffer size of playback circuitry of the audio card in the terminal device and a second buffer coefficient.

### Claim 6 (depends on 5)

The method according to claim 5, further comprising:
filling the playback circuitry of the audio card and the reference signal queue with temporary data when there is no usable voice signal in the buffer in the first timing period, wherein the temporary data is a sequence including 0.

### Claim 7 (depends on 1)

A non-transitory computer storage medium, storing a computer executable instruction, the computer executable instruction being used to perform the echo cancellation method according to claim 1.

### Claim 8

A terminal for echo cancellation, comprising:
processing circuitry configured to
collect frames of a first voice signal,
buffer the frames of the first voice signal in a first buffer, the frames of the first voice signal including an echo signal,
when the frames of the first voice signal are preprocessed, separately obtain in a first timing period, the frames of the first voice signal from the first buffer and frames of a reference signal matching the frames of the first voice signal from a reference signal queue, so that an estimated latency value, between each frame of the first voice signal and the reference signal remains within a preset range,
perform, using the frames of the reference signal, echo cancellation processing on the echo signal in the frames of the first voice signal, to generate frames of a second voice signal, and
output the frames of the second voice signal, wherein the estimated latency value is based on cross-correlation parameters, the cross-correlation parameters being determined based on a cross-correlation operation that is performed on first characteristic values of the frames of the first voice signal and second characteristic values of the frames of the reference signal.

### Claim 9 (depends on 8)

The terminal according to claim 8, wherein the processing circuitry is further configured to
receive frames of a third voice signal,
buffer the frames of the third voice signal in a second buffer, wherein the frames of the first voice signal comprises at least a signal that is the same as the frames of the third voice signal,
obtain the frames of the third voice signal from the second buffer in a second timing period,
decode the frames of the third voice signal to generate the frames of the reference signal, and
add the generated frames of the reference signal to the reference signal queue.

### Claim 10 (depends on 9)

The terminal according to claim 9, wherein the first timing period of the second timing period is obtained based on a frame length that is selected by an audio encoder performing encoding.

### Claim 11 (depends on 9)

The terminal according to claim 9, wherein a buffer size of the first buffer is obtained based on a minimum buffer size of recording circuitry of an audio card in the terminal and a first buffer coefficient.

### Claim 12 (depends on 11)

The terminal according to claim 11, wherein a buffer size of the second buffer is obtained based on a minimum buffer size of playback circuitry of the audio card in the terminal and a second buffer coefficient.

### Claim 13 (depends on 12)

The terminal according to claim 12, wherein the processing circuitry is further configured to:
fill the playback circuitry of the audio card and the reference signal queue with temporary data when there is no usable voice signal in the first buffer in the first timing period, wherein the temporary data is a sequence including 0.

### Claim 14

An echo cancellation method, comprising:
controlling playing, using processing circuitry of a terminal, of a reference signal obtained from another terminal, the reference signal including frames of a first signal;
collecting an echo signal, the echo signal being obtained when the reference signal is played, the echo signal including frames of a second signal;
determining, when the frames of the first signal are preprocessed, first characteristic values from the frames of the first signal and second characteristic values from the frames of the second signal;
determining cross-correlation parameters based on a cross-correlation operation performed, by the processing circuitry, on the first characteristic values of the frames of the first signal and the second characteristic values of the frames of the second signal;
determining an echo latency value based on the cross-correlation parameters; and
performing echo cancellation processing, by the processing circuitry, based on the echo latency value.

### Claim 15 (depends on 14)

The method according to claim 14, wherein the performing of the echo cancellation processing further comprises:
performing a tracking filtering operation, by the processing circuitry, based on the cross-correlation parameters to obtain a filtering result;
determining the echo latency value based on the filtering result; and
performing the echo cancellation processing in a call using the echo latency value.

### Claim 16 (depends on 15)

The method according to claim 15, wherein the determining the first characteristic values further comprises:
generating a first FFT parameter by performing a FFT transformation on the frames of the first signal;
obtaining a first sampling frequency value;
generating a first power spectrum corresponding to each of the frames of the first signal based on the first FFT parameter, the first sampling frequency value, and a first frequency parameter value, and extracting the first power spectrum; and
generating a smoothed value of the first power spectrum based on the first power spectrum corresponding to each of the frames of the first signal, and extracting the smoothed value.

### Claim 17 (depends on 16)

The method according to claim 16, further comprising:
performing data binarization processing on the extracted first power spectrum corresponding to each of the frames of the first signal and the smoothed value of the first power spectrum;
recording a current value as 1 when the first power spectrum corresponding to each of the frames of the first signal is greater than the smoothed value of the first power spectrum, or otherwise, recording a current value as 0, wherein binarized data corresponding to each of the frames of the first signal is constructed by a combination of 1 and 0; and
performing multi-frame merging on the binarized data corresponding to each of the frames of the first signal to obtain a binary data merging value of the frames of the first signal.

### Claim 18 (depends on 15)

The method according to claim 15, wherein the determining the second characteristic values further comprises:
generating a second FFT parameter by performing a FFT transformation on the frames of the second signal;
obtaining a second sampling frequency value;
generating a second power spectrum corresponding to each of the frames of the second signal based on the second FFT parameter, the second sampling frequency value, and a second frequency parameter value, and extracting the second power spectrum; and
generating a smoothed value of the second power spectrum based on the second power spectrum corresponding to each of the frames of the second signal, and extracting the smoothed value.

### Claim 19 (depends on 18)

The method according to claim 18, further comprising:
performing data binarization processing on the extracted second power spectrum corresponding to each of the frames of the second signal and the smoothed value of the second power spectrum;
recording a current value as 1 when the second power spectrum corresponding to each of the frames of the second signal is greater than the smoothed value of the second power spectrum, or otherwise, recording a current value as 0, wherein binary data of each of the frames of the second signal is constructed by a combination of 1 and 0; and
performing multi-frame merging on the binarized data corresponding to each of the frames of the second signal to obtain a binary data merging value of the frames of the second signal.

### Claim 20 (depends on 19)

The method according to claim 19, wherein the determining the cross-correlation parameters comprises:
extracting the first characteristic values of the frames of the first signal from a buffer; and
performing Xor and Sum processing on the first characteristic values of the frames of the first signal and the second characteristic values of the frames of the second signal.

### Claim 21 (depends on 20)

The method according to claim 20, wherein the performing the tracking filtering operation further comprises:
performing weighted smoothing processing based on the cross-correlation parameters and a filtering coefficient to obtain the filtering result, wherein the filtering result comprises a plurality of values;
selecting a candidate latency value from the plurality of values according to a minimum rule; and
using, when the candidate latency value complies with an empirical value, the candidate latency value complying with the empirical value as the echo latency value.

### Claim 22 (depends on 14)

A non-transitory computer storage medium, storing a computer executable instruction, the computer executable instruction being used to perform the echo cancellation method according to claim 14.

### Claim 23

A terminal for echo cancellation, comprising:
processing circuitry configured to:
control playing of a reference signal obtained from another terminal, the reference signal including frames of a first signal,
collect an echo signal, the echo signal being obtained when the reference signal is played, the echo signal including frames of a second signal,
determine, when the frames of the first signal are preprocessed, first characteristic values from the frames of the first signal and second characteristic values from the frames of the second signal,
determine cross-reference parameters based on a cross-correlation operation performed on the first characteristic values of the frames of the first signal and the second characteristic values of the frames of the second signal,
determine an echo latency value based on the cross-reference parameters, and
perform echo cancellation processing based on the echo latency value.

### Claim 24 (depends on 23)

The terminal according to claim 23, wherein the processing circuitry is further configured to:
perform a tracking filtering operation based on the cross-correlation parameters to obtain a filtering result,
obtain the echo latency value based on the filtering result, and
perform the echo cancellation processing in a call using the echo latency value.

### Claim 25 (depends on 24)

The terminal according to claim 24, wherein the processing circuitry is further configured to:
generate a first FFT parameter by performing a FFT transformation on the frames of the first signal,
obtain a first sampling frequency value,
generate a first power spectrum corresponding to each of the frames of the first signal based on the first FFT parameter, the first sampling frequency value, and a first frequency parameter value, and extract the first power spectrum, and
generate a smoothed value of the first power spectrum based on the first power spectrum corresponding to each of the frames of the first signal, and extract the smoothed value.

### Claim 26 (depends on 25)

The terminal according to claim 25, wherein the processing circuitry is further configured to:
perform data binarization processing on the extracted first power spectrum corresponding to each of the frames of the first signal and the smoothed value of the first power spectrum,
record a current value as 1 when the first power spectrum corresponding to each of the frames of the first signal is greater than the smoothed value of the first power spectrum, or otherwise, record a current value as 0, wherein binary data of each of the frames of the first signal is constructed by a combination of 1 and 0, and
perform multi-frame merging on the binarized data corresponding to each of the frames of the first signal to obtain a binary data merging value of the frames of the first signal.

### Claim 27 (depends on 24)

The terminal according to claim 24, wherein the processing circuitry is further configured to:
generate a second FFT parameter by performing a FFT transformation on the frames of the second signal,
obtain a second sampling frequency value,
generate a second power spectrum corresponding to each of the frames of the second signal based on the second FFT parameter, the second sampling frequency value, and a second frequency parameter value, and extract the second power spectrum, and
generate a smoothed value of the second power spectrum based on the second power spectrum corresponding to each of the frames of the second signal, and extract the smoothed value.

### Claim 28 (depends on 27)

The terminal according to claim 27, wherein the processing circuitry is further configured to:
perform data binarization processing on the extracted second power spectrum corresponding to each of the frames of the second signal and the smoothed value of the second power spectrum,
record a current value as 1 when the second power spectrum corresponding to each of the frames of the second signal is greater than the smoothed value of the second power spectrum; otherwise, record a current value as 0, wherein binary data of each of the frames of the second signal is constructed by a combination of 1 and 0, and
perform multi-frame merging on the binarized data corresponding to each of the frames of the second signal to obtain a binary data merging value of the frames of the second signal.

### Claim 29 (depends on 28)

The terminal according to claim 28, wherein the processing circuitry is further configured to:
extract the first characteristic values of the frames of the first signal from a buffer, and
perform Xor and Sum processing on the first characteristic values of the frames of the first signal and the second characteristic values of the frames of the second signal.

### Claim 30 (depends on 29)

The terminal according to claim 29, wherein the processing circuitry is further configured to:
perform weighted smoothing processing based on the cross-correlation parameters and a filtering coefficient to obtain the filtering result, wherein the filtering result comprises a plurality of values;
select a candidate latency value from the plurality of values according to a minimum rule; and
use, when the candidate latency value complies with an empirical value, the candidate latency value complying with the empirical value as the echo latency value.
