Sound source positioning and speech enhancement method and device
By performing frequency domain phase compensation and gain factor processing on the multi-microphone array, the problems of poor directivity and noise amplification in low frequencies of the summation algorithm and the difference algorithm are solved, and more efficient sound source localization and speech enhancement effects are achieved.
Patent Information
- Application Number
- CN202311055231.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-08-21
AI Technical Summary
Existing summation and difference algorithms suffer from poor directivity and noise amplification at low frequencies, making it difficult to effectively suppress noise in complex acoustic environments.
By pairing multiple microphones, the frequency domain phase compensation slope tensor and frequency domain cross-correlation coefficient are calculated. The quantile method is used to locate the sound source position, and the delay summation algorithm and differential array method are applied to the target position for speech enhancement. The corresponding gain factor and compensation factor are set to solve the low frequency problem.
It improves the accuracy of sound source localization and speech enhancement in the low-frequency band, enhances the ability to suppress ambient noise, and is suitable for complex acoustic environments with multi-microphone arrays.
Smart Images

Figure CN116863951B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of audio signal processing technology, and in particular to a method and apparatus for sound source localization and speech enhancement. Background Technology
[0002] Speech enhancement technology, generally speaking, refers to noise reduction processing of speech signals, and it has a very wide range of applications in today's increasingly advanced communication technology. Multi-microphone speech enhancement algorithms utilize spatial information to suppress not only stationary noise but also non-stationary noise from non-target locations. The target and non-target locations can be adaptively determined by the algorithm or defined manually.
[0003] Multi-microphone speech enhancement algorithms are often used to enhance the sound from the direction of the target location. These algorithms can be broadly classified into two categories: summation algorithms and difference algorithms. Summation algorithms, also known as additive algorithms, include algorithms such as delay&sum, MVDR, and GSC. They have good versatility and low distortion, but their low-frequency directivity is poor. On the other hand, difference algorithms can completely suppress the sound from the direction of non-target locations by setting a null point, but the low-frequency signal is easily amplified after compensation, and there are certain requirements for the spacing between the microphones. Summary of the Invention
[0004] The purpose of this invention is to provide a sound source localization and speech enhancement method and apparatus to solve the problems of summation and difference algorithms in low frequencies.
[0005] To solve the above-mentioned technical problems, the present invention provides a sound source localization method, comprising the following steps:
[0006] Multiple microphones are paired up in pairs, and the frequency domain phase compensation slope tensor between at least a portion of the two microphones in the microphone pairs is obtained based on the position of the microphone pairs and the required positioning accuracy.
[0007] The frequency domain cross-correlation coefficients of at least a portion of the microphone pairs are calculated based on the frequency domain phase compensation slope tensor.
[0008] The spatial range to be picked is scanned using the quantile method, and the position with the largest sum of the frequency domain cross-correlation coefficients is recorded as the target position.
[0009] Preferably, the step of calculating the frequency domain cross-correlation coefficient of at least a portion of the microphone pairs based on the frequency domain phase compensation slope tensor includes:
[0010] Select at least a portion of the microphone pairs and convert the microphone signals in the microphone pairs to the frequency domain;
[0011] For the selected microphone pair, phase compensation is performed on the spectrum of one microphone in each microphone pair to obtain the compensated spectrum, and cross-correlation is performed between the compensated spectrum of one microphone and the spectrum of the other microphone to obtain at least a portion of the frequency domain cross-correlation coefficient of the microphone pair.
[0012] The present invention also provides a speech enhancement method, which, using the above-mentioned sound source localization method, further includes the following steps:
[0013] Pair multiple microphones together and select at least some of the microphone pairs, then use a delay summation algorithm to obtain the delayed summation result of the microphone pairs at the target location;
[0014] The cross-correlation value of the microphone pair after phase compensation at the target location is used as the gain factor;
[0015] The mean of the gain factor is applied to the result of the delay summation.
[0016] Preferably, the gain factor is obtained based on the following formula:
[0017]
[0018] Where k is the frequency index, k1 and k2 represent the two microphones in the nth microphone pair, and D' k1 (k) is the compensated spectrum of microphone k1 after phase compensation, D k2 (k) is the spectral signal of microphone k2, and H is the complex conjugate flag.
[0019] The present invention also provides another speech enhancement method, which, using the above-mentioned sound source localization method, further includes the following steps:
[0020] Obtain at least one blocking direction of the sound source relative to the target position;
[0021] Pair multiple microphones together and select at least a portion of the microphone pairs. Calculate the differential result of the microphone pair in the blocking direction using a differential array method, and apply a compensation factor to the differential result.
[0022] The blocking spectrum with the minimum value in each blocking direction in the difference results is selected as the output.
[0023] Preferably, the compensation factor is obtained based on the following formula:
[0024]
[0025] Where Δω(n,q,k) is the spectral amplitude compensation gain of the nth microphone pair, k is the frequency index, q indicates that there are Q blocking directions, and τ represents the time required for the sound wave to travel between the two microphones of the nth microphone pair.
[0026] Preferably, Δω(n,q,k) is obtained based on the following formula:
[0027] Δω(n,q,k)=angle blo (n,q,k)-angle aim (n,k)
[0028] angle aim (n,k)=slopeMatrix(ai,aj,n)*k
[0029] angle blo (n,q,k)=slopeMatrix(bi(q),bj(q),n)*k
[0030] Where k is the frequency index, the target location coordinates are set to (ai, aj), the blocking direction coordinates are set to (bi(q), bj(q)), q indicates that there are Q blocking directions, and angle aim (n,k) and angle blo (n,q,k) represent the compensation phase of the nth microphone pair at the target position and the blocking direction, respectively.
[0031] Preferably, the difference result is obtained by differential removal of the sound in the blocked direction based on the following formula:
[0032] D' k1 (n,q,k)=D k1 (k)*exp(j*angle blo (n,q,k))
[0033] block(n,q,k)=D k2 -D' k1 (n,q,k)
[0034] Among them, D' k1 (n,q,k) represents the compensated spectrum of microphone k1 in the nth microphone pair after phase compensation in the blocking direction, D k2 (k) represents the spectrum of microphone k2, where k is the frequency index.
[0035] Preferably, the compensation factor is applied to the difference result based on the following formula:
[0036]
[0037] Where block(n,q,k) represents the differential result of the nth pair of microphones, k is the frequency index, and q indicates that there are Q blocking directions.
[0038] The present invention also provides a speech enhancement device, comprising:
[0039] A frequency domain phase compensation slope tensor calculation unit is used to pair multiple microphones in pairs and obtain the frequency domain phase compensation slope tensor between at least a portion of the two microphones in the microphone pair based on the position of the microphone pair and the required positioning accuracy.
[0040] The microphone correlation calculation unit calculates the frequency domain cross-correlation coefficient of at least a portion of the microphone pairs based on the frequency domain phase compensation slope tensor.
[0041] The sound source localization unit uses the quantile method to scan the spatial range to be picked up, and records the position with the largest sum of the frequency domain cross-correlation coefficients as the target position;
[0042] The first speech enhancement unit is used to obtain the delayed summation result of the microphone pair at the target position using a delayed summation algorithm, use the cross-correlation value of the microphone pair after phase compensation at the target position as a gain factor, and apply the mean of the gain factor to the delayed summation result.
[0043] The second speech enhancement unit is used to acquire at least one blocking direction relative to the target position, pair up microphones in pairs and select at least a portion of the microphone pairs, calculate the difference result of the microphone pair in the blocking direction using a differential array method, apply a compensation factor to the difference result, and select the blocking spectrum with the minimum value in each blocking direction in the difference result as the output.
[0044] In the sound source localization and speech enhancement method and apparatus provided by the present invention, the spatial region can first be searched using the quantile method to locate the target position direction of the sound source or a custom target position direction. Then, based on the required target position direction, the sound source in the target position direction is aligned and summed for enhancement, or the sound source in the blocking direction is differentially blocked. In addition, a compensation factor is set on the obtained summation result to solve the problem of poor low-frequency directivity of the summation method, and a corresponding gain factor is set on the differential result to solve the problem that the differential array method is not suitable for multiple microphones and large microphone spacing. Multiple blocking directions can also be selected as needed to improve the ability to suppress environmental noise. Attached Figure Description
[0045] Figure 1 This is a schematic diagram of the orientation estimation using dual microphones in existing technology;
[0046] Figures 2a-2bThis is a schematic diagram illustrating the enhancement of the existing delay&sum method;
[0047] Figure 3 This is a schematic diagram of the localization of a sound source model in the existing technology;
[0048] Figure 4 This is a flowchart illustrating the sound source localization method provided in Embodiment 1 of the present invention;
[0049] Figure 5 This is a schematic flowchart of the speech enhancement method provided in Embodiment 2 of the present invention;
[0050] Figure 6 This is a flowchart illustrating the speech enhancement method provided in Embodiment 3 of the present invention;
[0051] Figure 7 This is a detailed flowchart illustrating the microphone pair-based speech enhancement method in an embodiment of the present invention.
[0052] Figure 8 This is a schematic diagram of the speech enhancement device provided in Embodiment 4 of the present invention;
[0053] Figure 9 This is a schematic diagram of the structure of the electronic device provided in Embodiment 5 of the present invention.
[0054] In the picture,
[0055] 100. Frequency domain phase compensation slope tensor calculation unit; 200. Microphone pair correlation calculation unit; 300. Sound source localization unit; 400. First speech enhancement unit; 500. Second speech enhancement unit; 600. Processor; 700. Input device; 800. Memory; 900. Output device. Detailed Implementation
[0056] The sound source localization and speech enhancement method and apparatus proposed in this invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The advantages and features of this invention will become clearer from the following description. It should be noted that the accompanying drawings are all in a very simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the embodiments of this invention.
[0057] The inventors discovered that for speech enhancement algorithms for multi-microphone arrays, the summation algorithm and the difference algorithm are essentially spatial filtering based on the phase relationship of the array signals. Both have problems in the low frequency range. The summation algorithm has poor low-frequency directivity, and the low-frequency noise of the difference algorithm is easily amplified after compensation.
[0058] Multi-microphone arrays can utilize beamforming algorithms to amplify sound from the direction of a target location while suppressing sound from directions other than the target location. This offers a natural advantage for noise reduction tasks in complex acoustic environments. Beamforming algorithms leverage the different phases of sound arriving at different microphones from the same sound source to amplify sound from a specific direction. For example... Figure 1 As shown, taking two microphones as an example, the arrival time difference τ can be determined based on the target position direction θ and the distance L between the two microphones A and B.
[0059] τ=sinθ*L / c(1)
[0060] Where c is the speed of sound. Once the time difference τ is confirmed, a commonly used speech enhancement method is delay and sum, which involves aligning the microphone signals and then adding them together, as shown in Figure 2.
[0061] Based on this, the core idea of this invention is to set corresponding gain factors and compensation factors on the summation and difference results for the summation and difference algorithms, thereby solving the problem of the summation and difference algorithms at low frequencies.
[0062] This invention, based on a multi-microphone array, involves two main steps for speech enhancement: locating the sound source and enhancing a sound source in a fixed direction. The step of locating the sound source can be omitted and replaced by a manually defined target location and direction. The sound source localization method and the speech enhancement method are described in detail below.
[0063] Example 1
[0064] For details, please refer to Figure 4 This is a schematic diagram of Embodiment 1 of the present invention. For example... Figure 4 As shown, a sound source localization method includes the following steps:
[0065] Multiple microphones are paired up in pairs, and the frequency domain phase compensation slope tensor between at least a portion of the two microphones in the microphone pairs is obtained based on the position of the microphone pairs and the required positioning accuracy.
[0066] The frequency domain cross-correlation coefficients of at least a portion of the microphone pairs are calculated based on the frequency domain phase compensation slope tensor.
[0067] The spatial range to be picked is scanned using the quantile method, and the position with the largest sum of the frequency domain cross-correlation coefficients is recorded as the target position.
[0068] Specifically, the frequency domain phase compensation slope tensor is obtained based on the two microphones in the microphone pair. As shown in equation (1), there is a one-to-one correspondence between the incident angle θ and the time delay τ: θ = arcsin(cτ / L), where c is the speed of sound and L is the distance between the two microphones. For an array of multiple microphones, taking the microphones as being in the same plane of the array as an example, there is still a one-to-one correspondence between the incident angle and the time delay between each microphone. If the range of incident angles is replaced by an infinitely large plane, then the range of incident angles in both the horizontal and vertical directions is [-π / 2, π / 2].
[0069] like Figure 3 As shown, a microphone array (array in the diagram) is located within a plane (I in the diagram). A sound wave is incident on the array at a certain angle to the plane's normal. When the incident direction of the sound wave emitted by the sound source (source in the diagram) is constant (incident angle θ), the phase relationship of the microphone array is also constant; that is, there is a one-to-one correspondence between the incident direction and the phase difference between the microphones. This principle can be used to locate the sound source. The angle range [-π / 2, π / 2] is divided into 2*dpi+1 equal parts, each angle corresponding to a point on the plane. The center of the microphone array is placed at the origin in the Cartesian coordinate system. The distance from the incident plane to the array is d, and the array's normal is taken as the x-axis. The spatial coordinates of the incident plane are then (d, y, z), where d is the distance from the incident plane to the array, and y and z represent the coordinates on the plane corresponding to the sound source's incident angle. The Euclidean distance from each incident point (d, y, z) to each microphone in the microphone array can be calculated to obtain the tensor distMatrix. The dimension of distMatrix is (2*dpi+1)*(2*dpi+1)*M, where M represents the number of microphones. Each incident point corresponds to the distance of M microphones, and... Considering the computational complexity, the distance difference between N microphone pairs is selected:
[0070] dMatrix(i,j,n)=distMatrix(i,j,k2)-distMatrix(i,j,k1)
[0071] i,j∈[1,2*dpi+1],n∈[1,N],k1,k2∈[1,M]) (2)
[0072] dMatrix(i,j,n) represents the distance difference between the i-th and j-th incident points and the k2-th microphone, and the distance between the k1-th microphone and the incident point. As the distance d approaches infinity, this difference is equivalent to the distance difference at the incident point of a plane wave. Once the distance difference is obtained, the corresponding frequency domain phase difference slope tensor can be calculated.
[0073] slopeMatrix(i,j,n)=dMatrix(i,j,n)*fs*2π / (c*len) (3)
[0074] Where fs represents the signal sampling rate, c represents the speed of sound, and len is the FFT (Fast Fourier Transform) length. slopeMatrix(i,j,n) represents the frequency domain phase compensation slope tensor required for the sound source at position (i,j) to achieve phase alignment between its arrival at the k1-th and k2-th microphones. Multiplying slopeMatrix(i,j,n) by the frequency index k represents the phase difference at a specific frequency. The slopeMatrix tensor only needs to be calculated once during algorithm initialization.
[0075] Find the maximum slope slopeMax[N] for each microphone pair in slopeMatrix, and divide the maximum slope into L equal parts according to the required positioning accuracy to obtain the slope difference slopeDiff[N] = slopeMax[N] / L, where N represents the number of microphone pairs.
[0076] Specifically, the step of calculating the frequency domain cross-correlation coefficient of at least a portion of the microphone pairs based on the frequency domain phase compensation slope tensor includes:
[0077] Select at least a portion of the microphone pairs and convert the microphone signals in the microphone pairs to the frequency domain;
[0078] For the selected microphone pair, phase compensation is performed on the spectrum of one microphone in each microphone pair to obtain the compensated spectrum, and cross-correlation is performed between the compensated spectrum of one microphone and the spectrum of the other microphone to obtain at least a portion of the frequency domain cross-correlation coefficient of the microphone pair.
[0079] Each microphone signal is framed and windowed, and the spectral signal D of each microphone is obtained through Fourier transform. m Where the subscript m represents the microphone index, m∈[1,M], and M represents the number of microphones. For the nth microphone pair, the phase difference is compensated to the spectral signal of microphone k1, and the correlation is calculated with the frequency domain signal of microphone k2:
[0080] D' k1 (l,k)=D k1 (k)*exp(j*slopeDiff(n)*l*k) (4)
[0081]
[0082] D' k1(l,k) is the compensated spectrum of microphone k1, k is the frequency index, l is the slope compensation index, and l∈[-L,L]. Equation (5) represents the calculation of the cross power spectrum of the compensated spectrum of microphone k1 and the spectrum of microphone k2, and the summation of the real part of the cross power spectrum over the frequency points. It can be understood as calculating the cross-correlation coefficient of the two spectra. When the phase difference between the corresponding frequency points is within π / 2, the obtained value is positive; when the phase difference is π / 2, the obtained value is zero; when the phase difference is between π / 2 and π, the obtained value is negative. The superscript H is the complex conjugate symbol, len represents the FFT length, and n represents the nth microphone pair.
[0083] From equation (5), it can be concluded that when the signals from the two microphones are perfectly aligned, corr n (l) has a maximum value; if the two microphone signals are uncorrelated or misaligned, corr n (l) smaller or even negative values. corr n The length of (l) is 2L+1, which represents the cross-correlation coefficient of the nth microphone pair.
[0084] In one implementation, to reduce the amount of computation, it is not necessary to calculate for each frequency point in equation (5), but to select the frequency point with high energy in a certain frequency range for calculation.
[0085] Understandably, by using summation to obtain the cross-correlation coefficient, equation (5) can be replaced with:
[0086]
[0087] The summation method can also characterize the correlation between two spectra, and it requires less computation than the product method.
[0088] Then, using the quantile method, we search the spatial location of the tensor slopeMatrix(i,j,n) to find the value of l corresponding to the slope, and substitute it into corr. n (l) maximizes the sum of the cross-correlation values of each microphone pair, and the position (i,j) corresponding to the maximum value is the sound source position.
[0089]
[0090] Using the sound source localization method in Example 1 for localization can greatly reduce the amount of computation. Since it directly uses the form of microphone pairs for calculation, some parameters obtained (such as the spectrum signal of the microphone) and the pairing information of the microphone can be directly applied to subsequent speech enhancement methods (such as Example 2 and Example 3). In conjunction with formula (5) in Example 1, the cross-correlation coefficient can be obtained by using the summation method and selecting the frequency point with high energy in a certain frequency range. This can further reduce the amount of computation.
[0091] Example 2
[0092] For details, please refer to Figure 5 This is a schematic diagram of Embodiment 2 of the present invention. A speech enhancement method includes the following steps:
[0093] The sound source localization method of Example 1 is used to obtain the target location of the sound source;
[0094] Pair multiple microphones together and select at least some of the microphone pairs, then use a delay summation algorithm to obtain the delayed summation result of the microphone pairs at the target location;
[0095] The cross-correlation value of the microphone pair after phase compensation at the target location is used as the gain factor;
[0096] The mean of the gain factor is applied to the result of the delay summation.
[0097] Using the average correlation of microphone pairs as a gain factor to gain or suppress the delay summation result is suitable for situations with multiple microphones and a large microphone spacing. When the microphone spacing is large, or when the microphone spacing is close to the wavelength of the time domain signal, the speech enhancement method of this embodiment can achieve a better enhancement effect in the low frequency range.
[0098] In one implementation, when using the method in Embodiment 1, the paired microphone pair in Embodiment 1 can be used directly to reduce the amount of computation, or a new microphone pair can be selected, which helps to flexibly select the combination of microphone pairs.
[0099] In one implementation, the target location and direction to be reinforced are manually defined.
[0100] For the desired target location and direction, select the microphone pair and use the delay & sum algorithm, as follows:
[0101] D' k1 (k)=D k1 (k)*exp(j*slopeMatrix(i,j,n)*k) (8)
[0102] beamf = D k2 +D' k1 (9)
[0103] Where slopeMatrix(i,j,n) is the frequency domain phase difference slope tensor from the position of the i,j incident point of the sound source to the k2 and k1 microphones. The frequency domain phase difference slope tensor can be obtained by referring to equation (3), D' k1 (k) is the compensated spectrum of microphone k1, Dk2 This represents the spectrum of microphone k2, and beamf represents the delay&sum result, i.e., the delay summation result. Further processing can be performed on this delay summation result:
[0104] Specifically, the gain factor is obtained based on the following formula:
[0105]
[0106] Where k is the frequency index, k1 and k2 represent the two microphones in the nth microphone pair, and D' k1 (k) is the spectral signal of microphone k1 after phase compensation, D k2 (k) is the spectral signal of microphone k2, and H is the complex conjugate flag. For equation (10), when D k2 (k) and D' k1 (k) When the phases are the same, the gain1 result is 1. When the phase difference is π, the gain1 result is -1. When the phase difference is any other value, the gain1 value is located in (-1, 1).
[0107] Then, the mean of the gain factor is calculated and applied to the delay summation result:
[0108]
[0109] beamf(k)=beamf(k)*gain1(k) (12)
[0110] When the spectral phases of all microphone pairs match, the value of equation (11) is close to 1; otherwise, it is less than 1. The average correlation of the microphone pairs is used as a suppression factor to suppress the delay&sum result. When the microphone spacing is large enough, the above operation can achieve good results at low frequencies, avoiding the problem of poor directivity of the delay-sum method at low frequencies. If the microphone spacing is small, the phases of sound sources in the direction of non-target locations are almost the same at low frequencies, and it is difficult to suppress sound sources in the direction of non-target locations using the operation of the above embodiment two. Therefore, the following embodiment three is proposed to solve this problem. When the microphone spacing is much smaller than the wavelength, the speech enhancement method of embodiment three is selected.
[0111] Example 3
[0112] For details, please refer to Figure 6 This is a schematic diagram of Embodiment 3 of the present invention. For example... Figure 6 As shown, a speech enhancement method includes the following steps:
[0113] The sound source localization method in Embodiment 1 is used to obtain the target location of the sound source and at least one blocking direction relative to the target location;
[0114] Pair multiple microphones together and select at least a portion of the microphone pairs. Calculate the differential result of the microphone pair in the blocking direction using a differential array method, and apply a compensation factor to the differential result.
[0115] The blocking spectrum with the minimum value in each blocking direction in the difference results is selected as the output.
[0116] Conventional differential microphone arrays can solve the directional problem caused by small microphone spacing, but they are not suitable for multi-microphone situations. Low-frequency signals in the target position direction are easily distorted, and when the microphone spacing is large, the null point range is small, resulting in a small suppression region. This method uses microphone pairs with the endfire algorithm, then merges the results of the microphone pairs. By setting multiple blocking directions, it addresses the problem of a small suppression region in large-spacing microphone arrays, and provides corresponding compensation factors to the differential results to compensate for the loss of low frequencies in the target position direction. Finally, the spectrum corresponding to the minimum energy of the suppression results in each direction is selected as the output.
[0117] In one implementation, when using the method in Embodiment 1, the paired microphone pair in Embodiment 1 can be used directly to reduce the amount of computation, or a new microphone pair can be selected, which helps to flexibly select the combination of microphone pairs.
[0118] In one implementation, the desired target location is manually defined.
[0119] First, set the coordinates of the target position and the blocking direction. The blocking direction is the non-target position direction that does not require reinforcement. Assume the target position coordinates are set to (ai, aj), and the blocking direction coordinates are set to (bi(q), bj(q)), where q represents the number of blocking points. The compensation phase for the nth microphone pair in the target position direction and the blocking direction is:
[0120] angle aim (n,k)=slopeMatrix(ai,aj,n)*k (13)
[0121] angle blo (n,q,k)=slopeMatrix(bi(q),bj(q),n)*k (14)
[0122] Where k is the frequency index, angle aim (n,k) and angle blo (n,q,k) represent the compensation phases of the nth microphone pair at the target position and the blocking direction, respectively.
[0123] Wherein, Δω(n,q,k) is the spectral amplitude compensation gain of the nth microphone pair:
[0124] Δω(n,q,k)=angle blo (n,q,k)-angle aim (n,k) (15)
[0125] The compensation factor is obtained based on the following formula:
[0126]
[0127] Δω represents the phase difference between the target position direction and the blocking direction, and τ represents the time required for the sound wave to travel between the two microphones in the nth microphone pair, τ = L / c. gain2(n,q,k) represents the compensation required for the kth frequency point in the qth suppression direction of the nth microphone pair. Applying gain2 to the difference result can compensate for the low-frequency energy loss in the target position direction.
[0128] Furthermore, the difference result removes the sound in the obstruction direction using the following formula:
[0129] D' k1 (n,q,k)=D k1 (k)*exp(j*angle blo (n,q,k)) (17)
[0130] block(n,q,k)=D k2 -D' k1 (n,q,k) (18)
[0131] D' k1 (n,q,k) represents the compensated spectrum of microphone k1 after phase compensation in the blocking direction, D k2 (k) represents the spectrum of microphone k2. The compensated spectrum of microphone k1 is obtained by performing phase compensation on the blocking direction using equation (17). k1 With D k2 The sound from the blocking direction is aligned; further, the sound from the blocking direction is removed by differential using equation (18). At this time, the sound from the target location direction is also suppressed, especially the low frequency. Then, the compensation factor is applied to the differential result based on the following formula:
[0132]
[0133] The energy loss of sound from the target location direction is compensated by the above formula (19), and the average value is taken for the microphone pair to alleviate the distortion of sound from the target location direction. Based on the following formula, the spectrum corresponding to the minimum energy value of the suppression results in each direction is taken as the output:
[0134] block(k) = min l (|block(l,k)|) (20)
[0135] Example 4
[0136] This embodiment can be applied to electronic devices. Figure 7 This is a flowchart of the multi-microphone speech enhancement scheme provided by the present invention, which can be broken down into the following steps: Calculate the frequency domain phase compensation slope tensor based on the microphone position and the selected microphone pair; perform frame division and time-frequency transformation on the time-domain signal of each microphone, and calculate the frequency domain cross-correlation coefficient for each microphone pair; use the quantile method to sum the frequency domain phase compensation slope tensor into the cross-correlation sequence, and take the position with the largest localization value as the sound source position; if using summative speech enhancement, calculate the sum of phase compensation for the microphone pair in the target position direction, and calculate the cross-correlation value of each microphone pair after phase compensation as the gain, applying the gain to the summation result as the output; if using differential speech enhancement, calculate the blocking spectrum of each set blocking direction and simultaneously apply energy compensation, finally selecting the spectrum of the direction with the least energy as the output.
[0137] For details, please refer to Figure 8 This is a schematic diagram of Embodiment 4 of the present invention, combined with... Figures 4-8 A detailed description is provided. A speech enhancement device includes:
[0138] The frequency domain phase compensation slope tensor calculation unit 100 is used to pair multiple microphones in pairs and obtain the frequency domain phase compensation slope tensor between at least a portion of the two microphones in the microphone pair according to the position of the microphone pair and the required positioning accuracy.
[0139] Based on the specific locations of each microphone, the required angular resolution, and the selected microphone pairs, the area to be located is projected onto a plane, which is then divided into nodes according to the angular resolution. The distance from each node to each microphone, `distMatrix`, is calculated, with dimensions (2*dpi+1)*(2*dpi+1)*M, where M represents the number of microphones. The distance difference between the selected microphone pairs is calculated, resulting in a tensor `dMatrix(i,j,n)`, with dimensions (2*dpi+1)*(2*dpi+1)*N, where N represents the number of microphone pairs. Since each incident point corresponds to the distances of M microphones, we have... The distance difference between N microphone pairs is selected, taking into account the computational complexity. The frequency domain phase compensation slope tensor slopeMatrix is obtained using equation (3), with dimensions (2*dpi+1)*(2*dpi+1)*N, which represents the frequency domain slope required for phase compensation of the selected microphone pairs for each spatial location sound source.
[0140] In one implementation, the maximum slope of the selected microphone pair is calculated and then subdivided into averages to obtain the subdivided slope difference value slopeDiff[N]. It is understood that this step in the frequency domain phase compensation slope tensor calculation unit 100 only needs to be performed once during algorithm initialization, and its computational cost is negligible.
[0141] The microphone correlation calculation unit 200 calculates the frequency domain cross-correlation coefficient of at least a portion of the microphone pairs based on the frequency domain phase compensation slope tensor.
[0142] The microphone's time-domain signal is framed, windowed, and subjected to DFT to obtain the microphone's frequency-domain signal D. m The spectrum D of microphones k1 and k2 in the nth microphone pair. k1 D k2 Phase compensation is performed on the spectrum of microphone k1, and then cross-correlation is calculated with the spectrum of microphone k2. Frequency points with high energy within a certain frequency range are selected, and the cross-correlation value for each subdivision slope is calculated to obtain the frequency domain cross-correlation sequence corr. n The sequence dimension is 2*L+1, corr n The larger the value, the higher the alignment of the two microphone signals, and the more likely the location corresponding to the phase compensation slope value is to be the sound source location.
[0143] The sound source localization unit 300 uses the quantile method to scan the spatial range to be picked up, and records the position with the largest sum of the cross-correlation coefficients in the frequency domain as the target position. The spatial range to be picked up is searched using the quantile method, where each spatial node corresponds to the phase compensation slope of each microphone pair, and each phase compensation slope corresponds to the cross-correlation sequence corr. n The specific cross-correlation coefficients are used. The position that maximizes the sum of the n cross-correlation coefficients is taken as the sound source position (ai, aj).
[0144] The first speech enhancement unit 400 is used to obtain the delayed summation result of the microphone pairs at the target location using a delay summation algorithm. The cross-correlation value of the microphone pairs at the target location after phase compensation is used as a gain factor, and the mean of the gain factor is applied to the delayed summation result. The sound source location (ai, aj) can be obtained based on the sound source localization unit 300 or can be manually set. The microphone pairs at positions (ai, aj) are aligned and summed to obtain beamf, and then the cross-correlation coefficient after alignment is calculated. If they are perfectly aligned, the cross-correlation coefficient equals 1; otherwise, the value is less than 1 or even less than 0. The cross-correlation coefficient is averaged over the number of microphone pairs, and the average cross-correlation coefficient is used as the final gain applied to beamf to further suppress sidelobe sounds.
[0145] The method of the first speech enhancement unit 400 works well when the microphone distance is large, and it can solve the low-frequency directivity problem. However, for small microphone spacing (the spacing is much smaller than the wavelength), it is difficult to separate the low-frequency phase of the sound sources in each direction, and the effect is not good. Therefore, in the case of small microphone spacing, the second speech enhancement unit 500 is selected to process the microphone.
[0146] The second speech enhancement unit 500 is used to acquire at least one blocking direction relative to the target position, pair up microphones in pairs and select at least a portion of the microphone pairs, calculate the difference results of the microphone pairs in the blocking direction using a differential array method, apply a compensation factor to the difference results, and select the blocking spectrum with the minimum value in each blocking direction in the difference results as the output.
[0147] It is understandable that aligning and adding the sound signals in the target location direction can enhance the signal-to-noise ratio of the sound in that direction; aligning and subtracting the sound in the blocking direction can theoretically completely eliminate the sound in that direction. Since the phase of the target location direction and the blocking direction is difficult to separate at low frequencies, the amplitude of the frequency point in the target location direction will also be lost during subtraction. The compensation gain obtained by equations (13)-(16) can alleviate the attenuation of low frequencies in the target location direction, and multiple non-target location directions are set to solve the problem of a small suppression area due to the large microphone distance.
[0148] In one embodiment, a judgment unit (not shown) is further included to determine the relationship between the microphone spacing and the wavelength of the signal currently received by the microphone, and then select a first voice unit and a second voice unit to process the signal. When the microphone spacing is much smaller than the wavelength, the second voice unit is selected, and when the microphone spacing and the wavelength are close, the first voice unit is selected.
[0149] Understandably, the spacing between microphones is often fixed, while the wavelength of the sound signal received by the microphone array may change depending on the sound source. Two voice enhancement units can be used selectively according to the actual scenario.
[0150] Example 5
[0151] Figure 9 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. The electronic device may be a voice enhancement device or a standalone device independent of it, which may communicate with the voice enhancement device to receive the collected input signals from it. Figure 9 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Figure 9 As shown, the electronic device includes one or more processors 700 and memory 800.
[0152] The processor 700 may be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0153] The memory 800 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 600 may execute the program instructions to implement the sound source localization method and / or other desired functions of the software program of the various embodiments of this disclosure described above. In one example, the electronic device may further include an input device 700 and an output device 900, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0154] In addition, the input device 700 may also include, for example, a keyboard, a mouse, etc.
[0155] The output device 900 can output various types of information to the outside. The output device 900 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0156] Of course, for the sake of simplicity, Figure 9 Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.
[0157] In addition to the methods and devices described above, embodiments of this disclosure may also be computer program products, including computer program instructions that, when executed by a processor, cause the processor to perform the steps in the sound source localization method and speech enhancement method according to various embodiments of this disclosure as described in the "Embodiments" section of this specification.
[0158] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0159] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the sound source localization methods according to various embodiments of this disclosure as described in the "Exemplary Methods" section above.
[0160] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0161] In summary, the sound source localization and speech enhancement method and apparatus provided in the embodiments of the present invention first perform sound source localization, and then enhance the sound in the direction of the target location. Since a microphone pair is used, speech enhancement can be performed in the form of cross-correlation and difference for multi-microphone (>2) scenarios. The summation result and difference result are further processed by setting gain factor and compensation factor to solve the problems of poor low-frequency directivity and environmental noise respectively. Moreover, the combination of microphone pairs can be flexibly selected to improve the localization effect and speech enhancement effect.
[0162] The above description is merely a description of preferred embodiments of the present invention and is not intended to limit the scope of the present invention in any way. Any changes or modifications made by those skilled in the art based on the above disclosure shall fall within the protection scope of the claims.
Claims
1. A speech enhancement method, characterized in that, Includes the following steps: Multiple microphones are paired up in pairs, and the frequency domain phase compensation slope tensor between at least a portion of the two microphones in the microphone pairs is obtained based on the position of the microphone pairs and the required positioning accuracy. The frequency domain cross-correlation coefficients of at least a portion of the microphone pairs are calculated based on the frequency domain phase compensation slope tensor. The spatial range to be picked is scanned using the quantile method, and the position with the largest sum of the frequency domain cross-correlation coefficients is recorded as the target position. The step of calculating the frequency domain cross-correlation coefficient of at least a portion of the microphone pairs based on the frequency domain phase compensation slope tensor includes: Select at least a portion of the microphone pairs and convert the microphone signals in the microphone pairs to the frequency domain; For the selected microphone pair, phase compensation is performed on the spectrum of one microphone in each microphone pair to obtain the compensated spectrum, and cross-correlation is performed between the compensated spectrum of one microphone and the spectrum of the other microphone to obtain at least a portion of the frequency domain cross-correlation coefficient of the microphone pair. It also includes the following steps: Obtain at least one blocking direction of the sound source relative to the target position; Pair multiple microphones together and select at least a portion of the microphone pairs. Calculate the differential result of the microphone pair in the blocking direction using a differential array method, and apply a compensation factor to the differential result. The blocking spectrum with the minimum value in each blocking direction in the difference results is selected as the output.
2. The speech enhancement method as described in claim 1, characterized in that, The compensation factor is obtained based on the following formula: in, This is the spectral amplitude compensation gain for the nth microphone pair, where k is the frequency index and q indicates that there are Q blocking directions. This represents the time required for a sound wave to travel between the two microphones in the nth microphone pair.
3. The speech enhancement method as described in claim 2, characterized in that, Obtained based on the following formula: Where k is the frequency index, the target location coordinates are set to (ai, aj), and the blocking direction coordinates are set to (bi(q), bj(q)), where q indicates that there are Q blocking directions. and These represent the compensation phases of the nth microphone pair at the target location and in the blocking direction, respectively.
4. The speech enhancement method as described in claim 1, characterized in that, The difference result is obtained by differential removal of the sound in the blocked direction based on the following formula: in, This represents the compensated spectrum of microphone k1 in the nth microphone pair after phase compensation in the blocking direction. This represents the frequency spectrum of microphone k2, where k is the frequency index.
5. The speech enhancement method as described in claim 4, characterized in that, The compensation factor is applied to the difference result based on the following formula: in, Let k represent the differential result of the nth pair of microphones, k be the frequency index, and q indicate that there are Q blocking directions.
6. A voice enhancement device, characterized in that, Speech enhancement is performed using the speech enhancement method according to any one of claims 1-5, comprising: A frequency domain phase compensation slope tensor calculation unit is used to pair multiple microphones in pairs and obtain the frequency domain phase compensation slope tensor between at least a portion of the two microphones in the microphone pair based on the position of the microphone pair and the required positioning accuracy. The microphone correlation calculation unit calculates the frequency domain cross-correlation coefficient of at least a portion of the microphone pairs based on the frequency domain phase compensation slope tensor. The sound source localization unit uses the quantile method to scan the spatial range to be picked up, and records the position with the largest sum of the frequency domain cross-correlation coefficients as the target position; The first speech enhancement unit is used to obtain the delayed summation result of the microphone pair at the target position using a delayed summation algorithm, use the cross-correlation value of the microphone pair after phase compensation at the target position as a gain factor, and apply the mean of the gain factor to the delayed summation result. The second speech enhancement unit is used to acquire at least one blocking direction relative to the target position, pair up microphones in pairs and select at least a portion of the microphone pairs, calculate the difference result of the microphone pair in the blocking direction using a differential array method, apply a compensation factor to the difference result, and select the blocking spectrum with the minimum value in each blocking direction in the difference result as the output.
Citation Information
Patent Citations
Sound source positioning method and device and electronic equipment
CN115696108A
