IP Library › Granted Patent US 10,205,830
Granted Patent B2
US 10,205,830 · App. 15/651,757 · Granted Feb 12, 2019

Echo cancellation data synchronization control method, terminal, and storage medium

Inventors: Xiaoxing Zhou (Guangdong, CN); Yuanjiang Peng (Guangdong, CN)
Assignee: Tencent Technology (Shenzhen) Company Limited
H04M9/082H04M9/08H04W88/02
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,205,830
App. No.
15/651,757
Granted
Feb 12, 2019
Kind
B2
Abstract

An echo cancellation data synchronization control method is disclosed. The method includes: estimating a sound card delay value; initializing and accumulating a near-end audio buffer queue and a reference audio buffer queue until a difference obtained by subtracting a length of the near-end audio buffer queue from a length of the reference audio buffer queue is greater than or equal to an audio data length corresponding to the sound card delay value; extracting, in accordance with audio frames, audio data from the head of the reference audio buffer queue and the head of the near-end audio buffer queue for echo cancellation processing; obtaining a relative delay value generated by performing echo cancellation processing; and adjusting the sound card delay value according to the relative delay value.

Claims (48)

1. An echo cancellation data synchronization control method for a computer sound card, the method implemented on a terminal including a memory and a processor, the memory storing instructions, which when executed by the processor, enable the processor to perform the method comprising:

initializing a delay confirming flag value to be an initial flag value;

estimating a sound card delay value of the computer sound card;

initializing and accumulating a near-end audio buffer queue and a reference audio buffer queue until a difference obtained by subtracting a length of the near-end audio buffer queue from a length of the reference audio buffer queue is greater than or equal to an audio data length corresponding to the sound card delay value;

extracting, in accordance with audio frames, audio data from the reference audio buffer queue and head of the near-end audio buffer queue for echo cancellation processing;

obtaining a relative delay value generated by performing echo cancellation processing;

obtaining an echo return loss enhancement generated by performing the echo cancellation processing;

determining whether the relative delay value satisfies a preset stability condition and whether the echo return loss enhancement exceeds a preset enhancement threshold;

adjusting the sound card delay value according to the relative delay value and thereafter setting the delay confirming flag value from an initial flag value to a non-initial flag value; and

determining whether the relative delay value is less than a preset relative delay minimum value if the delay confirming flag value is not the initial flag value; if the relative delay value is less than the preset relative delay minimum value, removing, from the head of the reference audio buffer queue, an audio data length corresponding to a difference obtained by subtracting the relative delay value from the preset relative delay minimum value; or if the relative delay value is not less than the preset relative delay minimum value, adding, to tail of the near-end audio buffer queue, an audio data length corresponding to a difference obtained by subtracting a preset relative delay maximum value from the relative delay value, when it is determined that the relative delay value exceeds the preset relative delay maximum value.

2. The method according to claim 1 , wherein before adjusting the sound card delay value according to the relative delay value, the method further comprises:

obtaining an echo return loss enhancement generated by performing echo cancellation processing; and

determining that the relative delay value satisfies a preset stability condition and the echo return loss enhancement exceeds a preset enhancement threshold.

3. The method according to claim 1 , further comprising:

resetting, if the relative delay value does not satisfy the preset stability condition or the echo return loss enhancement does not exceed the preset enhancement threshold, the delay confirming flag value to the initial flag value when it is detected that a state in which the relative delay value does not satisfy the preset stability condition lasts longer than a preset period of time or occurs more than a preset number of times.

4. A terminal, comprising a memory storing instructions and a processor in communication with the memory, and when executing the instructions, the processor is configured to:

initialize a delay confirming flag value to be an initial flag value;

estimate a sound card delay value of a computer sound card;

initialize and accumulate a near-end audio buffer queue and a reference audio buffer queue until a difference obtained by subtracting a length of the near-end audio buffer queue from a length of the reference audio buffer queue is greater than or equal to an audio data length corresponding to the sound card delay value;

extract, in accordance with audio frames, audio data from the reference audio buffer queue and head of the near-end audio buffer queue for echo cancellation processing;

obtain a relative delay value generated by performing echo cancellation processing;

obtain an echo return loss enhancement generated by performing the echo cancellation processing;

determine whether the relative delay value satisfies a preset stability condition and whether the echo return loss enhancement exceeds a preset enhancement threshold;

adjust the sound card delay value according to the relative delay value and thereafter setting the delay confirming flag value from an initial flag value to a non-initial flag value; and

determine whether the relative delay value is less than a preset relative delay minimum value if the delay confirming flag value is not the initial flag value; if the relative delay value is less than the preset relative delay minimum value, remove, from the head of the reference audio buffer queue, an audio data length corresponding to a difference obtained by subtracting the relative delay value from the preset relative delay minimum value; or if the relative delay value is not less than the preset relative delay minimum value, add, to tail of the near-end audio buffer queue, an audio data length corresponding to a difference obtained by subtracting a preset relative delay maximum value from the relative delay value, when it is determined that the relative delay value exceeds the preset relative delay maximum value.

5. The terminal according to claim 4 , wherein the processor, when executing the instructions, is further configured to, before adjusting the sound card delay value according to the relative delay value:

obtain an echo return loss enhancement generated by performing echo cancellation processing; and

determine that the relative delay value satisfies a preset stability condition and the echo return loss enhancement exceeds a preset enhancement threshold.

6. A terminal, comprising a memory storing instructions and a processor in communication with the memory, and when executing the instructions, the processor is configured to:

initialize a delay confirming flag value to be an initial flag value;

estimate a sound card delay value of a computer sound card;

initialize and accumulate a near-end audio buffer queue and a reference audio buffer queue until a difference obtained by subtracting a length of the near-end audio buffer queue from a length of the reference audio buffer queue is greater than or equal to an audio data length corresponding to the sound card delay value;

extract, in accordance with audio frames, audio data from the reference audio buffer queue and head of the near-end audio buffer queue for echo cancellation processing;

obtain a relative delay value generated by performing echo cancellation processing;

obtain an echo return loss enhancement generated by performing the echo cancellation processing;

determine whether the relative delay value satisfies a preset stability condition and whether the echo return loss enhancement exceeds a preset enhancement threshold;

adjust the sound card delay value according to the relative delay value and thereafter setting the delay confirming flag value from an initial flag value to a non-initial flag value; and

reset, if the relative delay value does not satisfy the preset stability condition or the echo return loss enhancement does not exceed the preset enhancement threshold, the delay confirming flag value to the initial flag value when it is detected that a state in which the relative delay value does not satisfy the preset stability condition lasts longer than a preset period of time or occurs more than a preset number of times.

7. One or more non-transitory computer readable storage media storing a computer executable instruction, when the computer executable instruction, when executed by one or more processors, cause one or more processors to:

initialize a delay confirming flag value to be an initial flag value;

estimate a sound card delay value of a computer sound card;

initialize and accumulate a near-end audio buffer queue and a reference audio buffer queue until a difference obtained by subtracting a length of the near-end audio buffer queue from a length of the reference audio buffer queue is greater than or equal to an audio data length corresponding to the sound card delay value;

extract, in accordance with audio frames, audio data from the reference audio buffer queue and head of the near-end audio buffer queue for echo cancellation processing;

obtain a relative delay value generated by performing echo cancellation processing;

obtain an echo return loss enhancement generated by performing the echo cancellation processing;

determine whether the relative delay value satisfies a preset stability condition and whether the echo return loss enhancement exceeds a preset enhancement threshold;

adjust the sound card delay value according to the relative delay value and thereafter setting the delay confirming flag value from an initial flag value to a non-initial flag value; and

determine whether the relative delay value is less than a preset relative delay minimum value if the delay confirming flag value is not the initial flag value; if the relative delay value is less than the preset relative delay minimum value, remove, from the head of the reference audio buffer queue, an audio data length corresponding to a difference obtained by subtracting the relative delay value from the preset relative delay minimum value; or if the relative delay value is not less than the preset relative delay minimum value, add, to tail of the near-end audio buffer queue, an audio data length corresponding to a difference obtained by subtracting a preset relative delay maximum value from the relative delay value, when it is determined that the relative delay value exceeds the preset relative delay maximum value.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 19, 2017
From: ZHOU, XIAOXING; PENG, YUANJIANG
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 043040/0186 →
Priority Claims (1)
CN 2015 1 0197994 · Apr 23, 2015 · national
Continuity (2)
Continuation PCTCN2016078661 · Apr 7, 2016
Related Publication 20170318161A1 · Nov 2, 2017