主权项 |
1. An echo canceller, comprising: a self-adaptive filter, a voice signal detection portion and a path change detection portion, wherein, a far-end voice signal is propagated in an echo path through a speaker and is picked up by a microphone to form an echo signal, wherein,
the self-adaptive filter is configured to receive the far-end voice signal as a training signal to simulate the echo path, and cancel the echo signal in a near-end signal; the voice signal detection portion is configured to: detect a communication status, control the self-adaptive filter according to the communication status, and control startup of the path change detection portion according to the communication status; and the path change detection portion is configured to: detect whether a change occurs on the echo path, and control the self-adaptive filter according to whether the change occurs on the echo path; wherein, an initial coefficient of the self-adaptive filter is 0; wherein the voice signal detection portion comprises a detection threshold initialization unit, a near-end voice judgment unit, a far-end voice judgment unit and a control signal sending unit, wherein: the detection threshold initialization unit is configured to: store the near-end signal when establishing the communication link, and estimate an initial value of a voice detection threshold by adopting the stored near-end signal, wherein the initial value is as an initial value of a near-end voice detection threshold of the near-end voice judgment unit and an initial value of a far-end voice detection threshold of the far-end voice judgment unit; the near-end voice judgment unit is configured to: judge whether there is a near-end voice signal, and input a result of a near-end voice judging into the control signal sending unit; the far-end voice judgment unit is configured to: judge whether there is a far-end voice signal, and input a result of a far-end voice judging into the control signal sending unit; and the control signal sending unit is configured to: send a control signal to control the self-adaptive filter and the path change detection portion after receiving the result of the near-end voice judging and the result of the far-end voice judging; wherein, the control signal send unit is configured to send the control signal to control the self-adaptive filter and the path change detection portion according to the following way: closing the self-adaptive filter during a near-end communication or muting; locking the self-adaptive filter during a double-end communication, which is equivalent to not updating coefficients of the self-adaptive filter; starting the path change detection portion during non near-end communication, non-muting, and non double-end communication; wherein, the near-end voice judgment unit is configured to judge whether there is a near-end voice signal according to the following way: adding 1 to a counter C(n) when d1 (n)2>Threshold, and judging that there is the near-end voice signal in the near-end signal whenSUMC=∑i=MM+N1-1C(i)>Threshold2, wherein, d1 (n) is a convolution of coefficients of the first L orders of the self-adaptive filter and the far-end voice signal, the Threshold is a first near-end voice detection threshold, and the Threshold2 is a second near-end voice detection threshold, Ni is a length of a sliding window, M=M+S, wherein M is a starting point of the sliding window and S is a sliding length of the sliding window; or, adding 1 to the counter C(n)when∑i=1N3d(i)2>Threshold, and judging that there is the near-end voice signal in the near-end signal whenSUMC=∑i=MM+N1-1C(i)>Threshold2,wherein, d(n) is the near-end signal, N3 is a frame length, the Threshold is the first near-end voice detection threshold, and the Threshold2 is the second near-end voice detection threshold, Ni is a length of the sliding window, M=M+S, wherein M is the starting point of the sliding window and S is the sliding length of the sliding window;
the far-end voice judgment unit is configured to judge whether there is a far-end voice signal according to the following way: adding 1 to a counter D(n) when x(n)2>Threshold1, and judging that there is the far-end voice signal in the far-end signal whenSUMD=∑i=MM+N2-1D(i)>Threshold3, wherein, the Threshold1 is a first far-end voice detection threshold, the Threshold3 is a second far-end voice detection threshold, and N2 is a length of a sliding window; wherein, the first near-end voice detection threshold is equal to the first far-end voice detection threshold, and the second near-end voice detection threshold is equal to the second far-end voice detection threshold. |