An echo cancellation processing method and device in a large loudspeaker loudness scenario
By introducing an adaptive compression scheme into the traditional echo cancellation algorithm to process the microphone signal, the problem of poor echo cancellation performance in scenarios with high speaker loudness is solved, and a faster and more stable echo cancellation effect is achieved.
Patent Information
- Application Number
- CN202510101943.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-01-22
AI Technical Summary
In outdoor communication equipment, due to the loudness of the speaker and the high sensitivity of the microphone, the intensity of the echo signal is much greater than that of the reference signal. Existing traditional echo cancellation algorithms are difficult to converge and have poor echo cancellation performance.
Based on the traditional echo cancellation algorithm, an adaptive compression scheme is introduced to adaptively compress the microphone acquisition signal, and the convergence capability of the linear echo cancellation filter is improved through a delay determination and compensation module.
In scenarios with high speaker loudness, the echo cancellation effect is improved, ensuring that the linear filter converges faster and more stably, thus enhancing the overall performance of echo cancellation.
Smart Images

Figure CN119943076B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of speech signal processing, and particularly relates to an echo cancellation processing method and device in a loudspeaker loudness large scene. BACKGROUND
[0002] Outdoor communication equipment needs to have a long sound propagation distance and pickup distance, and therefore requires loudspeaker playing sound loudness to be large and microphone sensitivity to be high. If physical isolation measures inside the communication equipment are lacking, strong echo coupling will occur inside the equipment cavity, and the energy intensity of the echo signal collected by the equipment will be much higher than the energy intensity of the reference signal.
[0003] In this scene, the echo signal intensity collected by the microphone and the reference signal intensity are quite different, and the adaptive linear echo cancellation filter of the existing traditional echo cancellation algorithm is difficult to converge, resulting in poor overall echo cancellation performance.
[0004] The traditional algorithm does not consider compressing the signal collected by the microphone beyond a certain threshold. Therefore, the present application introduces an adaptive compression scheme on the basis of the traditional algorithm, that is, adaptive compression of the microphone collected signal before linear echo cancellation.
[0005] Since the delay of the microphone collected signal and the reference signal of the hard echo collection equipment is usually small and fixed, the delay can be determined when the equipment is produced and written into the power-off non-loss medium. At the same time, according to the intensity difference between the microphone collected signal and the reference signal, the amplitude of the microphone collected signal is adaptively adjusted, which can effectively improve the convergence ability of the linear echo cancellation adaptive filter, and further improve the overall echo cancellation effect of the equipment. SUMMARY
[0006] The present application provides an echo cancellation processing method and device in a loudspeaker loudness large scene, which increases adaptive compression preprocessing of the microphone collected signal on the basis of the traditional echo cancellation algorithm. In the high scene of loudspeaker sound loudness and microphone sensitivity, the convergence ability of the adaptive filter in the linear echo cancellation stage of the traditional algorithm is improved, and the overall echo cancellation effect of the equipment is further improved.
[0007] The echo cancellation processing device is installed inside the equipment and includes an audio collection module, an adaptive threshold compression module, a delay determination module, a delay compensation module, an echo cancellation module, and an audio playing module.
[0008] First, a locally stored audio file is played, the audio collection module collects the echo signal, and the output delay τ is written into the power-off non-loss storage medium.
[0009] Then, the device is online, the audio acquisition module collects the far-end reference signal and the near-end speaker signal sent by the far-end device, and inputs them to the adaptive threshold compression module for compression. At the same time, according to the delay τ stored in advance, the far-end reference signal is delayed and compensated through the delay compensation module;
[0010] Finally, the echo cancellation module is used to perform echo cancellation on the far-end reference signal and the reference signal after delay compensation.
[0011] The echo cancellation processing method comprises the following steps:
[0012] Step one, for the calling device A in the process of calling, the audio acquisition module collects the far-end reference signal and the near-end microphone signal
[0013] N represents the number of sample points of the signal, which is set according to engineering experience;
[0014] Step two, the adaptive threshold compression module performs adaptive compression on the amplitude of the microphone signal d in the time domain to obtain the signal
[0015] The adaptive compression comprises the following processing steps:
[0016] Step 201, the root mean square value x of the far-end reference signal x is calculated rms , and is converted into an intensity decibel value x dB , that is
[0017]
[0018] x = [x0, x1, …, x i , …, x N-1 ], x[i] represents the i-th element in the far-end reference signal x;
[0019] Step 202, it is judged whether the intensity decibel value x dB is greater than the threshold T1, if yes, step 203 is executed; otherwise, step 206 is executed;
[0020] T1 represents the threshold for judging whether there is a speaker signal in the far-end, which is set in advance according to engineering experience;
[0021] Step 203, the near-end microphone signal d is compressed to obtain the compressed near-end microphone signal d';
[0022] The specific compression comprises the following steps:
[0023] Step I, according to the intensity decibel value d dB of the near-end microphone signal, the compression threshold T2 and the compression ratio R set in advance are combined to calculate the gain g:
[0024]
[0025] The compression threshold T2 and the compression ratio R are pre-set according to engineering experience;
[0026] Step II, calculating the compressed near-end microphone acquisition signal d' using the gain g,
[0027]
[0028] wherein d[i] represents the i-th element in the near-end microphone signal d, wherein 0≤i≤N-1;
[0029] Step 204, performing amplitude limiting processing on the compressed near-end microphone acquisition signal d', and the specific formula is:
[0030]
[0031] wherein 0≤i<N, T3 is an amplitude limiting threshold, and a is an amplitude attenuation coefficient; T3 and a are pre-set according to engineering experience.
[0032] Step 205, updating the compression threshold T2 using the amplitude-limited near-end microphone acquisition signal d' as the compression threshold for the next time;
[0033] The specific process is as follows:
[0034] First, calculating the root mean square value d' of the amplitude-limited near-end microphone acquisition signal d' using the amplitude-limited near-end microphone acquisition signal d', rms and converting it into an intensity decibel value d' dB ;
[0035] Then, calculating the signal intensity difference e between the intensity decibel value x dB of the far-end reference signal and the intensity decibel value d' dB of the amplitude-limited near-end microphone acquisition signal;
[0036] As shown below: e = d' dB -x dB ;
[0037] Next, when the signal intensity difference e is greater than a threshold T4, updating the compression threshold T2 using the intensity decibel value d' dB of the amplitude-limited near-end microphone acquisition signal:
[0038] The update formula is as follows: T2 = T2-(d' dB -x dB )×μ;
[0039] T4 is a threshold for determining the signal intensity difference, which is pre-set according to engineering experience; μ is an update step, which is pre-set according to engineering experience;
[0040] Step 206: Do not perform any processing on the signal acquired by the near-end microphone; that is, the compressed near-end microphone signal d′ is the near-end microphone signal d.
[0041] d′=d.
[0042] Step 3: The device A operation delay determination module obtains the delay τ value of its own device and compensates the remote reference signal x;
[0043] The delay compensation is applied only to the far-end reference signal x, which contains N sample points in the first frame. Specifically:
[0044] Calculate the number of delay sample points based on the pre-set delay τ in device A and the sampling rate f of the far-end reference signal:
[0045] K = f × τ;
[0046] Pad the front end of the far-end reference signal x with K zeros, i.e.
[0047] Take the first N sample points of the far-end reference signal after padding with zeros at the front end, i.e.
[0048] Use the remaining K sample points as the first K sample points of the far-end reference signal containing N sample points in the next frame;
[0049] To set the delay τ for device A, the specific steps are as follows:
[0050] First, in offline mode, device A plays a local audio file through its speaker, and the microphone picks up the signal. Adaptive compression processing is then performed to obtain the compressed microphone acquisition signal.
[0051] Then, the local audio file is used as a reference signal. According to the pre-defined candidate delay set {τ1,τ2,,τ... m}, respectively, perform delay compensation on the reference signal to obtain {r1,r2,,r} m};
[0052] Where m is the number of candidate delays, and the delay τ i Corresponding to the compensation signal r i , i∈[1,m];
[0053] Next, the compressed signal s′ and the compensation signal r are compared. i Perform segmented frequency domain adaptive filtering on each segment to obtain the linearly filtered result {y1,y2,,y...} m};
[0054] Finally, based on the results of the linear filtering {y1,y2,,y...} m} and the compressed signal s′ are used to calculate the echo return loss enhancement, resulting in {l1,l2,,l m}; based on the set {l1,l2,,l m The index i corresponding to the maximum value in the candidate delay set {τ1,τ2,,τ} is obtained from the candidate delay set {τ1,τ2,,τ}. m Choose a delay, i.e., τ = τ i As a delay in setting up device A.
[0055] Step 4: Perform segmented frequency domain adaptive filtering based on the compressed and limited signal d′ and the compensated delay far-end reference signal x;
[0056] The advantages of this invention are:
[0057] Compared to the classic segmented frequency domain adaptive filtering method, this invention enables the linear filter to converge faster and more stably in scenarios where the echo signal strength acquired by the microphone differs significantly from the far-end reference signal strength, thereby achieving a better echo cancellation effect. Attached Figure Description
[0058] Figure 1 This is a structural diagram of an echo cancellation processing device for high loudspeaker noise scenarios according to the present invention.
[0059] Figure 2 This is a flowchart illustrating an echo cancellation method for scenarios with high loudspeaker volume according to the present invention.
[0060] Figure 3 This is a schematic diagram of a far-end reference signal in a high-loudness horn scenario according to the present invention;
[0061] Figure 4 This is a schematic diagram of a near-end microphone collecting signals in a high-loudness scenario according to the present invention;
[0062] Figure 5 This is a schematic diagram of adaptive threshold compression processing in a high loudspeaker loudness scenario according to the present invention;
[0063] Figure 6 This is a schematic diagram illustrating the echo cancellation result under high loudspeaker volume conditions according to the present invention. Detailed Implementation
[0064] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are merely some, not all, embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort should fall within the scope of protection of the present invention.
[0065] The echo cancellation processing device is installed inside the equipment, such as Figure 1 As shown, it comprises an audio acquisition module, an adaptive threshold compression module, a delay determination module, a delay compensation module, an echo cancellation module and an audio playback module.
[0066] The audio acquisition module is used to pick up the target speaker and echo signals.
[0067] The adaptive threshold compression module is used to compress the near-end microphone acquisition signal.
[0068] The delay determination module obtains the delay between the near-end microphone acquisition signal and the far-end reference signal.
[0069] The audio playback module is used to play the far-end reference signal and the audio file stored locally.
[0070] The adaptive echo cancellation module is used to perform echo cancellation on the compressed microphone acquisition signal and the far-end reference signal.
[0071] First, the audio playback module plays the locally stored audio file; at the same time, the echo signal acquired by the audio acquisition module is input into the delay determination module, and the delay τ is output and written into the storage medium that does not lose power.
[0072] Then, when the equipment is online, the audio acquisition module acquires the far-end reference signal sent by the far-end equipment and the near-end speaker signal, and then inputs them into the adaptive threshold compression module for compression. At the same time, according to the delay τ stored in advance, the delay compensation module is used to compensate the delay of the far-end reference signal.
[0073] Finally, the echo cancellation module is used to perform echo cancellation on the far-end reference signal and the reference signal after compensation delay.
[0074] The echo cancellation processing method, as shown in Figure 2 It comprises the following steps:
[0075] Step 1, for the calling equipment A that is in the process of calling, the audio acquisition module acquires the far-end reference signal and the near-end microphone signal
[0076] N represents the number of signal sample points, which is set according to engineering experience;
[0077] The near-end microphone acquisition signal is the digital signal obtained by analog-to-digital conversion of the analog signal acquired by the microphone of the calling equipment A, as shown in Figure 4The far-end reference signal is a digital signal obtained by hard back sampling of the signal received by the calling device A after the called device B sends the signal, as shown in Figure 3 ;
[0078] As shown in Figure 3 and 4 , the signal collected by the microphone of the calling device A during double-talking includes echo and the speaker signal at the calling device A; the signal collected by the microphone during single-talking at the near end includes only the speaker signal at the calling device A; the collected echo signal has been clipped, and its strength is much higher than that of the far-end reference signal and much higher than the speaker signal collected by the microphone at the calling device A;
[0079] Step two, the adaptive threshold compression module performs adaptive compression on the amplitude of the microphone signal d in the time domain, and obtains a signal
[0080] The adaptive compression includes the following processing steps:
[0081] Step 201, calculate the root mean square value x of the far-end reference signal x rms , and convert it into the intensity decibel value x dB , that is,
[0082]
[0083] x = [x0, x1,, x i , x N-1 ], x[i] represents the i-th element in the far-end reference signal x;
[0084] Step 202, judge whether the intensity decibel value x dB is greater than the threshold T1, if yes, execute step 203; otherwise, execute step 206;
[0085] T1 represents the threshold for determining whether there is a speaker signal at the far end, which is pre-set according to engineering experience;
[0086] Step 203, compress the near-end microphone signal d to obtain the compressed near-end microphone signal d';
[0087] The specific compression includes the following steps:
[0088] First, according to the intensity decibel value d dB of the near-end microphone signal, the compression threshold T2 and the compression ratio R pre-set, calculate the gain g:
[0089]
[0090] The compression threshold T2 and the compression ratio R are pre-set according to engineering experience;
[0091] Then, the compressed near-end microphone acquisition signal d′ is calculated.
[0092]
[0093] Where d[i] represents the i-th element in the near-end microphone signal d, where 0≤i≤N-1;
[0094] Step 204: Perform amplitude limiting on the compressed near-end microphone acquisition signal d′, using the following formula:
[0095]
[0096] Where 0≤i<N, T3 is the amplitude limiting threshold, and α is the amplitude attenuation coefficient; T3 and α are preset based on engineering experience.
[0097] This example illustrates the adaptive threshold compression and limiting process, as shown below. Figure 5 As shown, the compression and limiting process reduces the intensity difference between the echo signal collected by the microphone of the calling device A and the speaker's signal, providing favorable conditions for subsequent segmented frequency domain adaptive filtering.
[0098] Step 205: Use the near-end microphone after amplitude limiting to collect signal d′, update the compression threshold T2, and use it as the compression threshold for the next time;
[0099] The specific process is as follows:
[0100] Calculate the root mean square value d′ of the near-end microphone signal after amplitude limiting. rms And convert it into an intensity decibel value d′ dB ;
[0101] Then, the intensity value x of the far-end reference signal in decibels is calculated. dB The intensity decibel value d′ of the signal acquired by the near-end microphone after amplitude limiting dB The signal strength difference e between them;
[0102] As shown below: e = d′ dB -x dB ;
[0103] Next, when the signal strength difference e is greater than the threshold T4, the signal strength decibel value d′ is collected using a near-end microphone after amplitude limiting. dB Update the compression threshold T2;
[0104] The updated formula is as follows: T2 = T2 - (d′) dB -x dB )×μ;
[0105] Where μ is the update step size, which is preset based on engineering experience; T4 is the threshold for judging signal strength difference, which is preset based on engineering experience;
[0106] Step 206, no processing is performed on the near-end microphone collected signal, i.e., d' = d;
[0107] Step three, the device A runs the delay determination module to obtain the delay τ value of the device itself, and compensates the far-end reference signal x;
[0108] The delay determination module is used to determine the delay (unit: ms) between the near-end microphone collected signal and the far-end reference signal obtained by the hard back-end device; when the device performs the echo cancellation function, the delay determination module is first run to obtain the delay τ, and then the echo cancellation is performed;
[0109] It is worth noting that when the delay compensation is performed on the far-end reference signal x, only the far-end reference signal x containing N sample points in the first frame is compensated for delay, and specifically:
[0110] According to the delay τ and the far-end reference signal sampling rate f set in advance in the device A, the number of delay sample points is calculated:
[0111] K = f x τ;
[0112] K zeros are added to the front end of the far-end reference signal x, i.e.,
[0113] The first N sample points of the far-end reference signal after the front-end 0 are taken, i.e.,
[0114] The remaining K sample points are taken as the first K sample points of the far-end reference signal containing N sample points in the next frame;
[0115] The delay τ of the device A is set, and the specific steps are as follows:
[0116] First, the microphone collected signal is the signal collected by the microphone after the microphone is turned on synchronously when the device loudspeaker plays a local audio file;
[0117] When the device runs the delay determination module, the read thread and the write thread are enabled;
[0118] The read thread is used to obtain the microphone collected data from the sound card buffer;
[0119] The write thread is used to write the data of the local audio file into the sound card buffer;
[0120] After the device determines the delay for the first time, the delay τ is written into the corresponding storage medium which does not lose power;
[0121] The microphone collected signal of the device A in the offline state is adaptively compressed to obtain the microphone collected signal after compression
[0122] The signal s is the signal collected by the microphone when device A's speaker plays a local audio file;
[0123] Then, the local audio file is used as a reference signal. According to the pre-defined candidate delay set {τ1,τ2,,τ... m}, respectively, perform delay compensation on the reference signal to obtain {r1,r2,,r} m};
[0124] Where m is the number of candidate delays, and the delay τ i Corresponding to the compensation signal r i , i∈[1,m];
[0125] Next, the compressed signal s′ and the compensation signal r are compared. i Partitioned Block Frequency Domain Adaptive Filter (PBFDAF) is performed on each segment to obtain the linearly filtered result {y1, y2, ..., y...} m};
[0126] Finally, based on the results of the linear filtering {y1,y2,,y...} m The echo return loss enhancement (EREL) is calculated for the compressed microphone acquisition signal s′ and the signal s′, respectively, to obtain {l1,l2,,l... m}; Indicators used to judge the effectiveness of echo cancellation;
[0127] Based on the set {l1,l2,,l... m The index i corresponding to the maximum value in the candidate delay set {τ1,τ2,,τ} is obtained from the candidate delay set {τ1,τ2,,τ}. m Choose a delay, i.e., τ = τ i As the delay for setting device A; where 1≤i≤m;.
[0128] Step 4: Based on the compressed and limited signal d′ and the compensated delay far-end reference signal x, perform segmented frequency domain adaptive filtering to eliminate echo.
[0129] The echo cancellation result is illustrated in the diagram below. Figure 6 As shown. The method used in this invention has no impact on the microphone signal acquired during single-person speaking at device A; in scenarios where the echo signal strength acquired by the microphone at device A is much greater than the speaker's signal strength, echo can be effectively suppressed during single-person or dual-person speaking at the far end.
[0130] It should be noted that those skilled in the art will appreciate that the embodiments described herein are presented for the purpose of aiding the reader in understanding the method of implementing the present application, and should be understood as not limiting the scope of protection of the present application to such specific recitations and embodiments. Those skilled in the art can make various other specific modifications and combinations according to the technical spirit of the present application disclosed herein without departing from the essence of the present application, and such modifications and combinations are still within the scope of protection of the present application.
Claims
1. An echo cancellation processing method in a large scene of loudspeaker loudness, characterized in that, The echo cancellation device based on the method is installed in the equipment, comprising an audio acquisition module, an adaptive threshold compression module, a delay determination module, a delay compensation module, an echo cancellation module and an audio playing module; First, play the local storage audio file, audio acquisition module for collection, the echo signal obtained is input into the delay determination module, and the output delay And write to the power loss without loss of storage medium; Then, when the device is online, the audio acquisition module acquires the remote reference signal sent by the remote device and the near-end speaker signal, and inputs them to the adaptive threshold compression module for compression; meanwhile, the delay compensation module is used to compensate the delay of the remote reference signal; finally, the echo cancellation module is used to perform echo cancellation on the remote reference signal and the reference signal after compensation delay. The echo cancellation processing method comprises the following steps: Step one, for the calling device A in the process of calling, the audio acquisition module collects the far-end reference signal and the near-end microphone signal ; The number of sample points of the representation signal is set according to engineering experience. Step 2: The adaptive threshold compression module performs time-domain compression of the microphone signal. The amplitude is adaptively compressed to obtain the signal. ; The adaptive compression comprises the following processing steps: Step 201, calculate the root mean square value of the far-end reference signal and convert to intensity decibel value i.e. , ; , denotes a far-end reference signal the first element of the array Step 202, judging intensity decibel value whether greater than threshold value if yes, then executing step 203; otherwise, executing step 206; Threshold value indicating the determination of whether the remote end exists a speaker signal, which is pre-set according to engineering experience; Step 203, compressing the near-end microphone signal to obtain a compressed near-end microphone signal Step 203, compressing the near-end microphone signal to obtain a compressed near-end microphone signal Step 203, compressing the near-end microphone signal to obtain a compressed near-end microphone signal The specific compression comprises the following steps: The specific compression comprises the following steps: Step I, calculating gain based on intensity decibel value of near-end microphone signal in combination with pre-set compression threshold and compression ratio : ; compression threshold with the compression ratio pre-set according to engineering experience; Step II, utilizing gain computing the compressed near-end microphone acquisition signal , ; wherein represents a near-end microphone signal the first element of the set, wherein ; Step 204, compressing the near-end microphone acquisition signal The amplitude limiting processing is specifically as follows: ; wherein, , is a clipping threshold, is an amplitude attenuation coefficient; and are pre-set according to engineering experience; Step 205, utilize the limited amplitude near-end microphone acquisition signal , the compression threshold is updated as the next compression threshold; Step 206, no processing is done to the near-end microphone signal, i.e. the compressed near-end microphone signal for the near-end microphone signal ; Step three, the device A runs the delay determination module to obtain the delay of its own device value, compensating for the far-end reference signal ; Step four, performing block segment frequency domain adaptive filtering on the compressed and clipped signal with the compensated delayed far-end reference signal , performing block segment frequency domain adaptive filtering.
2. The echo cancellation processing method of claim 1, wherein, In the step 205, the compression threshold The specific process of updating is as follows: First, the signal of the near-end microphone after amplitude limiting is collected The root mean square value is calculated and converted into an intensity decibel value ; Then, the intensity decibel value of the far-end reference signal is calculated The signal intensity difference between the intensity decibel value of the far-end reference signal and the intensity decibel value of the near-end microphone signal after amplitude limiting The signal intensity difference between the intensity decibel value of the far-end reference signal and the intensity decibel value of the near-end microphone signal after amplitude limiting ; As shown below: ; Next, when the signal strength difference is greater than the threshold value , the signal strength decibel value of the post-amplification near-end microphone is acquired The compression threshold value is updated : The update formula is as follows: ; The threshold value of the difference in signal strength is set in advance according to engineering experience; The update step is set in advance according to engineering experience.
3. The echo cancellation processing method of claim 1, wherein, In the third step, the delay compensation is only performed on the far-end reference signal containing sample points of the first frame delay compensation, specifically: According to the delay set in advance in the device A With the far-end reference signal sampling rate , the number of delay sample points is calculated: ; To a distal reference signal Front-end compensation One 0, i.e. ; The front end of the reference signal after taking zero padding at the front end Each sample point, i.e. ; The remaining sample points are taken as the first sample points of the far-end reference signal of the next frame. sample points.
4. The echo cancellation processing method of claim 1, wherein, In step three, device A sets its own delay The specific steps are as follows: First, the device A speaker plays a local audio file in an offline state, and the microphone collects signals and performs adaptive compression processing to obtain compressed microphone collected signals ; Then, the local audio file is taken as a reference signal , according to a pre-set candidate delay set , delay compensation is respectively performed on the reference signal, to obtain ; wherein is the number of candidate delays, delay corresponding to the compensation signal , ; Next, the compressed signal is compensated by the compensation signal , and then is subjected to block-based segmental frequency-domain adaptive filtering to obtain a linearly filtered result . Finally, according to the linear filtered result and the compressed signal , the echo return loss enhancement is calculated respectively, and the maximum value is obtained ; according to the index corresponding to the maximum value in the set , the delay is selected from the candidate delay set , that is , as the set delay of device A.
Citation Information
Patent Citations
Method and system for testing echo cancellation of television audio acquisition device
CN104796692A
Echo estimation method and device
CN111246036A