Sound source localization method, device, equipment and storage medium based on distributed microphone array
By using multiple microphone arrays to classify sound source signals and process positional relationship parameters in speech recognition, the problem of microphone arrays being difficult to distinguish the distance of sound sources is solved, three-dimensional positioning of sound sources is achieved, and the accuracy of speech recognition is improved.
Patent Information
- Application Number
- CN202110451183.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-25
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-04-25
AI Technical Summary
It is difficult for the existing microphone array to distinguish the distance of the sound source in speech recognition and cannot perform three-dimensional positioning, resulting in poor speech recognition effect.
By arranging multiple microphone arrays in space, the output signals of the sound sources are collected and classified, and the three-dimensional coordinates of the sound sources are determined using the positional relationship parameters between the microphone arrays. Specific steps include obtaining the output signals of multiple microphone arrays, classifying them, calculating similarities, eliminating outliers, error correction, and finally constructing and solving a cost function to determine the location of the sound source.
It effectively solves the problems of poor speech recognition effect and three-dimensional positioning of sound sources, realizes the determination of three-dimensional coordinates of multiple sound sources, and improves the accuracy of speech recognition.
Smart Images

Figure CN113311390B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sound source localization, and in particular to a sound source localization method, device, equipment and storage medium based on a distributed microphone array. Background Art
[0002] In the field of speech recognition technology, multi-channel speech separation technology based on microphone arrays is commonly used to separate speech, that is, using a microphone array and multiple beamformers to monitor multiple sound sources in space, and the algorithms involved are sound source localization algorithm and beamforming algorithm. This technology uses spatial information. Assuming that the microphone array locates a sound source at a 90° position, it only needs to adjust the parameters of the beamformer so that the gain of the beamformer for the 90° incident sound source is 1, and the gain of the incident sound source in other directions is 0. In this way, the 90° incident signal is received while suppressing the sound sources in other directions, thereby achieving the effect of speech separation. When multiple beamformers are configured for the microphone array, and each beamformer points in a different direction, multiple sound sources can be monitored at the same time.
[0003] However, the resolution capability of a single microphone array is limited. It can only distinguish the direction of the sound source but not the distance of the sound source. This means that if two sound sources and the origin of the microphone array are approximately in a straight line, the microphone array cannot separate the two sound sources, resulting in poor speech recognition effect. In addition, this technology cannot give the three-dimensional coordinates of the sound source. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to propose a sound source localization method, device, equipment and storage medium based on a distributed microphone array. By arranging multiple microphone arrays in space to collect the output signals of the sound sources, and classifying the output signals, the spatial coordinates of each sound source are determined, thereby effectively solving the problems of poor speech recognition effect and inability to perform three-dimensional positioning of the sound source in the prior art.
[0005] To achieve the above object, an embodiment of the present invention provides a sound source localization method based on a distributed microphone array, comprising:
[0006] Obtain output signals of multiple microphone arrays;
[0007] Classifying the output signal to obtain a classification result;
[0008] Obtain current position relationship parameters between microphone arrays;
[0009] The position information of the sound source is determined according to the classification result and the current position relationship parameter.
[0010] Preferably, the classifying the output signal to obtain a classification result specifically includes:
[0011] Obtaining an initial classification result according to an output signal of any microphone array;
[0012] Calculating the similarity between any output signal of other microphone arrays and all categories in the initial classification result, and obtaining the maximum similarity;
[0013] When the maximum similarity is greater than a preset threshold, classifying any output signal into the category of the initial classification result corresponding to the maximum similarity;
[0014] When the maximum similarity is less than a preset threshold, the initial classification result is updated according to any one of the output signals.
[0015] Preferably, the current position relationship parameter is obtained by constructing a first cost function in advance according to the classification result and solving the first cost function.
[0016] Preferably, the current position relationship parameter is calculated in advance based on a first spatial transformation matrix between any microphone array and the corresponding camera and a second spatial transformation matrix between each camera.
[0017] Preferably, before determining the location information of the sound source according to the classification result and the location relationship parameter, the method further includes:
[0018] Performing outlier elimination on each category in the classification result to obtain an elimination result;
[0019] The error correction of the current position relationship parameter is performed according to the elimination result.
[0020] Preferably, the step of removing outliers from each category in the classification result to obtain a removal result specifically includes:
[0021] According to any two output signals in each category, multiple initial sound source positions are obtained;
[0022] Calculate the distances of other output signals in this category relative to the corresponding initial sound source positions;
[0023] If the distance is less than the preset distance threshold, the corresponding current output signal is recorded as an inlier, and the number of inliers corresponding to each initial sound source position is counted;
[0024] According to the initial sound source position with the largest number of inliers, outliers are removed from the output signal of this category.
[0025] Preferably, performing error correction on the current position relationship parameter according to the elimination result specifically includes:
[0026] According to the elimination results, counting the number of external points corresponding to different microphone arrays;
[0027] Recalibrate the current position relationship parameters corresponding to the microphone array whose external points exceed the preset number of points.
[0028] Preferably, determining the location information of the sound source according to the classification result and the location relationship parameter specifically includes:
[0029] According to the output signal corresponding to each category and the spatial transformation matrix of each microphone array relative to the world coordinate system, a second cost function is constructed; wherein the second cost function is in, For output signal The straight line pointed to, is the mth output signal in the corresponding category, is the pitch angle, θ m is the azimuth, 1≤m≤M, M is the total number of all output signals in this category; P m =H m P, P=(x,y,z),H m is the spatial transformation matrix of the microphone array corresponding to the mth output signal relative to the world coordinate system, where the world coordinate system is the coordinate system corresponding to any preset microphone array, (x, y, z) is the coordinate of the sound source P in the world coordinate system, and P m is the coordinate of the sound source P in the array coordinate system of the microphone array corresponding to the mth output signal; d m For output signal The distance from the sound source P; n is the preset norm;
[0030] The second cost function is solved to obtain the spatial coordinates of the corresponding sound source.
[0031] Another embodiment of the present invention provides a sound source localization device based on a microphone array, comprising:
[0032] A signal acquisition module, used to acquire output signals of multiple microphone arrays;
[0033] A classification module, used to classify the output signal to obtain a classification result;
[0034] A position parameter acquisition module is used to obtain the current position relationship parameters between the microphone arrays;
[0035] The positioning module is used to determine the position information of the sound source according to the classification result and the current position relationship parameter.
[0036] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the sound source localization method based on the microphone array as described in any one of the above items is implemented.
[0037] Another embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned sound source localization methods based on microphone arrays.
[0038] Compared with the prior art, the microphone array-based sound source localization method, device, equipment and storage medium provided in the embodiments of the present invention calculate the similarity of all output signals of multiple microphone arrays, classify the output signals according to the similarity, and thereby determine the three-dimensional coordinates of multiple sound sources in space according to the classification results and the position relationship parameters between the microphone arrays obtained in advance. The present invention effectively solves the problems of poor speech recognition effect and inability to perform three-dimensional sound source localization in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flowchart of a method for sound source localization based on a microphone array provided by an embodiment of the present invention;
[0040] Figure 2 is a schematic diagram of a single microphone array for sound source localization provided by an embodiment of the present invention;
[0041] Figure 3 It is a schematic diagram of the principle of sound source localization using a multi-microphone array provided by an embodiment of the present invention;
[0042] Figure 4 is a schematic diagram of the conversion relationship between the world coordinate system and the camera coordinate system provided by an embodiment of the present invention;
[0043] Figure 5 is a structural schematic diagram of a sound source localization device based on a microphone array provided by an embodiment of the present invention;
[0044] Figure 6 It is a schematic diagram of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] See also Figure 1 , is a flow chart of a method for sound source localization based on a microphone array provided in this embodiment of the present invention, the method comprising steps S1 to S4:
[0047] S1, obtaining output signals of multiple microphone arrays;
[0048] S2. classify the output signal to obtain a classification result;
[0049] S3, obtaining current position relationship parameters between microphone arrays;
[0050] S4. Determine the position information of the sound source according to the classification result and the current position relationship parameter.
[0051] It should be noted that a single microphone array can use a sound source localization algorithm and a beamforming algorithm to monitor multiple sound sources in a space. When a sound source is located at a 90° position, it is only necessary to adjust the parameters of the beamformer so that the gain of the beamformer for the 90° incident sound source is 1, and the gain of the sound source incident in other directions is 0. In this way, the 90° incident signal is received while suppressing the sound sources in other directions, thereby achieving the effect of speech separation. However, the resolution capability of a single microphone array is limited. It can only distinguish the direction of the sound source but not the distance of the sound source. This means that if two sound sources and the origin of the microphone array are approximately in a straight line, the microphone array cannot separate the two sound sources. For ease of understanding, this embodiment of the present invention provides a schematic diagram of sound source localization using a single microphone array. For details, see Figure 2 .Depend on Figure 2 It can be seen that the first microphone array locates sound source 1 and sound source 2, but cannot distinguish the distance between the two sound sources and cannot provide their spatial position information. The present invention aims to solve this technical problem.
[0052] Specifically, in a space with multiple sound sources, multiple microphone arrays are controlled to monitor the multiple sound sources, and then the output signals of the multiple microphone arrays are obtained. Generally, each microphone array will output N output signals, each output signal corresponds to a sound source, and each output signal includes a pitch angle, an azimuth angle, and an audio signal. If the number of sound sources in the space is W, then N≤W, because some sound sources may be far away from a certain microphone array, and therefore cannot be monitored, and the corresponding signal cannot be output.
[0053] Because the output signals of the same microphone array correspond to different sound sources, in order to facilitate parameter calibration, the output signals corresponding to the same sound source need to be classified. Therefore, all the output signals are first classified to obtain the classification results, and each category corresponds to a sound source.
[0054] Generally, the current position relationship parameter between microphone arrays refers to the spatial transformation matrix of each microphone array relative to the world coordinate system. This parameter is pre-calibrated. The specific calibration process is described in the following embodiments and will not be described here.
[0055] The location information of the sound source is determined based on the classification results and the current position relationship parameters. Each type of result corresponds to a sound source. Based on the pitch angle and azimuth angle in the output signal of each type of result, combined with the spatial transformation matrix of each microphone array relative to the world coordinate system, the position of the corresponding sound source can be determined. This position refers to the three-dimensional spatial coordinate.
[0056] This embodiment of the present invention provides a sound source localization method based on a microphone array, arranges multiple microphone arrays in space to collect output signals of sound sources, and classifies the output signals to determine the spatial coordinates of each sound source, thereby effectively solving the problems of poor speech recognition effect and inability to perform three-dimensional sound source localization in the prior art.
[0057] As an improvement of the above solution, the output signal is classified to obtain a classification result, which specifically includes:
[0058] Obtaining an initial classification result according to an output signal of any microphone array;
[0059] Calculating the similarity between any output signal of other microphone arrays and all categories in the initial classification result, and obtaining the maximum similarity;
[0060] When the maximum similarity is greater than a preset threshold, classifying any output signal into the category of the initial classification result corresponding to the maximum similarity;
[0061] When the maximum similarity is less than a preset threshold, the initial classification result is updated according to any one of the output signals.
[0062] Specifically, the initial classification result is obtained according to the output signal of any microphone array. For example, if the first microphone array has K output signals, each output signal is regarded as a category, and the initial classification result has K categories.
[0063] Calculate the similarity between any output signal of other microphone arrays and all categories in the initial classification results, and obtain the maximum similarity. It is worth noting that when calculating the similarity between the output signal of other microphone arrays and all categories of the initial classification results, the similarity between the output signal of other microphone arrays and each output signal in each category is also calculated. When calculating the similarity, the audio signal in the output signal is generally used for calculation, because the audio of the same sound source will be similar.
[0064] When the maximum similarity is greater than a preset threshold, any output signal is classified into the category of the initial classification result corresponding to the maximum similarity. This indicates that the calculated output signal is of the same type as the corresponding category and corresponds to the same sound source, so it needs to be classified into the same category.
[0065] When the maximum similarity is less than the preset threshold, it means that the calculated output signal is not of the same type as the existing initial classification result. The initial classification result needs to be updated based on any output signal, and the corresponding calculated output signal is treated as a new category and added to the initial classification result. In the subsequent similarity calculation of other output signals, the similarity with the new category must also be calculated.
[0066] In order to deepen the understanding of this embodiment of the present invention, an example is used for illustration. For example, the first microphone array has three output signals, and three corresponding sets are first established, namely C1 = {O(1,1)}, C2 = {O(1,2)}, and C3 = {O(1,3)}. For the first output signal O(2,1) of the second microphone array, the similarity between O(2,1) and each element in each existing set is calculated. If the similarity between O(2,1) and each element in C1, C2, and C3 is less than the threshold T, a new set C4 = {O(2,1)} is created for O(2,1). For the second output signal O(2,2) of the second microphone array, it is calculated that the similarity between O(2,2) and O(1,1) is greater than the threshold T, so O(2,2) is also added to the set C1 corresponding to O(1,1). So far, we can get 4 sets, C1 = {O(1,1), O(2,2)}, C2 = {O(1,2)}, C3 = {O(1,3)}, C4 = {O(2,1)}. Similarly, the output signals of other microphone arrays are calculated in a similar way, which will not be repeated here.
[0067] In addition, this embodiment of the present invention also provides two similarity calculation methods. Of course, there are other methods, and these two methods do not constitute a limitation to the present invention.
[0068] First, the similarity is calculated according to the cross-correlation function, that is, the cross-correlation value between any output signal and each output signal in each category is calculated using the cross-correlation function, and the maximum cross-correlation value is used as the similarity between the corresponding two output signals.
[0069] Second, the two output signals whose similarity needs to be calculated are first converted to the frequency domain through fast Fourier transform to obtain the corresponding frequency domain signals, and then according to the formula Calculate the similarity r of the two output signals, where S i represents the i-th frequency domain signal of the output signal corresponding to any category in the initial classification result, 1≤i≤I / 2, I is the audio length of the output signal corresponding to any category in the initial classification result, that is, the length is I points, represents the average value of all frequency domain signals of the output signal corresponding to any category in the initial classification result, T j represents the jth frequency domain signal of any output signal of other microphone arrays, 1≤j≤J / 2, J is the audio length of any output signal of other microphone arrays, that is, the length is J points, Represents the average value of all frequency domain signals of any output signal of other microphone arrays, 0≤r≤1, the larger the r, the more similar the two output signals are.
[0070] As an improvement of the above solution, the current position relationship parameter is obtained by constructing a first cost function in advance according to the classification result, and solving the first cost function.
[0071] Specifically, the current position relationship parameter refers to the spatial transformation matrix of each microphone array relative to the world coordinate system, and the parameter is obtained by constructing a first cost function in advance according to the classification result and solving the first cost function.
[0072] Specifically, output signals of multiple microphone arrays are first obtained, and the obtained output signals are classified to obtain classification results; a first cost function is constructed according to the classification results; the first cost function is solved to obtain a spatial transformation matrix of each microphone array relative to a world coordinate system.
[0073] The first cost function is in, For output signal The straight line pointed to, is the output signal corresponding to the m-th microphone array in the n-th category, is the pitch angle, θ m,n is the azimuth, a m,nis an indicative function, indicating whether the m-th microphone array monitors the n-th category (n-th sound source). Each category corresponds to a sound source. If it is monitored, that is Real existence, then a m,n =1, otherwise a m,n = 0. When the nth sound source is far away from the mth microphone array, it may not be detected. m,n =0. 1≤m≤M, M is the total number of microphone arrays, 1≤n≤N, N is the total number of categories in the classification result; H m is the spatial transformation matrix of the m-th microphone array relative to the world coordinate system, H m H1~H M The mth one in P n is the coordinate of the sound source P corresponding to the nth category in the world coordinate system, that is, P n =(x n ,y n , z n ), P n P1~P N The nth one in d m,n For output signal The distance from the sound source P. m,n =H m P n , P m,n It means that the point P in the world coordinate system n Using H m The point coordinates are projected into the array coordinate system of the m-th microphone array.
[0074] It is worth noting that the world coordinate system is the array coordinate system of any preset microphone array. For example, if the array coordinate system of the first microphone array is preset as the world coordinate system, then H1 = [R = E | t = 0], where E represents the unit matrix whose elements on the main diagonal are all 1. At this time, what needs to be solved is the spatial transformation matrix H2…H of other microphone arrays. M , and at the same time, the coordinates of each sound source P1…P N In addition, it should be noted that P1…P N The coordinate system is the world coordinate system. The coordinate system is the array coordinate system of the mth microphone array.
[0075] The solution methods include grid search, gradient descent, Newton method or LM algorithm. For the first cost function When the grid search method is used for solving, the parameter space H1~H M , P1~P NAll variables in the grid search are searched to find a certain combination of variables that minimizes the total cost function. This set of variables is the corresponding solution. When the LM (Levenberg-Marquarelt) algorithm is used, the LM algorithm between the first order and the second order is preferred.
[0076] As an improvement of the above solution, the current position relationship parameters are calculated in advance based on a first spatial transformation matrix between any microphone array and the corresponding camera and a second spatial transformation matrix between each camera.
[0077] Specifically, the current position relationship parameter is calculated in advance based on the first spatial transformation matrix between any microphone array and the corresponding camera and the second spatial transformation matrix between each camera. The following is an example of two microphone arrays in space:
[0078] The two microphone arrays in the space are respectively recorded as the first microphone array and the second microphone array. First, the first spatial transformation matrix H1 between the first camera in the first microphone array camera pair and the first microphone array, and the first spatial transformation matrix H2 between the second camera in the second microphone array camera pair and the second microphone array are calculated respectively; the first camera is set close to the first microphone array, and the second camera is set close to the second microphone array. Then the second spatial transformation matrix H between the first camera and the second camera is calculated. 12 ; Then according to the first spatial transformation matrix H1 between the first camera and the first microphone array, the first spatial transformation matrix H2 between the second camera and the second microphone array, and the second spatial transformation matrix H between the first camera and the second camera 12 A spatial transformation matrix between the first microphone array and the second microphone array is calculated.
[0079] Among them, calculating the first spatial transformation matrix between the first camera and the first microphone array in the first microphone array camera pair is specifically: establishing a world coordinate system based on the first microphone array; establishing a first camera coordinate system with the optical center of the first camera as the origin; calculating the spatial transformation matrix from the first camera coordinate system to the world coordinate system, and obtaining the first spatial transformation matrix H1.
[0080] It should be noted that see Figure 4 Each camera position has a camera coordinate system, so it is necessary to define a reference coordinate system to describe the scene and the position of the objects in the scene, that is, to define a reference coordinate system as the world coordinate system (O w ,X w ,Y w ,Z w), it can be understood that the world coordinate system can be specified arbitrarily. Therefore, in this embodiment, the array coordinate system of one of the microphone arrays is specified as the world coordinate system. From the rigid body motion, it can be seen that the conversion relationship between the camera coordinate system and the world coordinate system can be described by the space transformation matrix. The space transformation matrix can be divided into a rotation matrix R and a translation vector t. R is a 3×3 matrix, and t is a 3×1 vector. If H=[R,t] represents the space transformation matrix of the camera coordinate system and the world coordinate system, then the coordinate values of any point P in the space in the world coordinate system and the camera coordinate system have the following relationship:
[0081]
[0082] Among them, (X c ,Y c ,Z c ,1) is expressed as the homogeneous coordinates of point P in the camera coordinate system, (X w ,Y w ,Z w ,1) is expressed as the homogeneous coordinates of point P in the world coordinate system, Represented as a spatial transformation matrix.
[0083] Exemplarily, the array coordinate system of the first microphone array is used as the world coordinate system, and the camera position can be placed so that the optical axis Zc of the first camera is perpendicular to the Zm axis (i.e., Zw axis) of the first microphone array, so that each component of the rotation matrix from the camera coordinate system corresponding to the first camera to the microphone array coordinate system (i.e., the world coordinate system) corresponding to the first microphone array is 0. The translation vector t1 from the center Om of the first microphone array to the optical center Oc of the first camera can be measured by an instrument, and the first space transformation matrix H1=[0,t1] can be estimated.
[0084] The calculation method of the first spatial transformation matrix H2 between the second camera and the second microphone array is similar to the calculation method of H1, which will not be repeated here.
[0085] Among them, the second spatial transformation matrix H between the first camera and the second camera is calculated 12 Specifically: the camera calibration method is used to calculate the spatial transformation matrix from the first camera to the second camera to obtain the second spatial transformation matrix H 12 . Optionally, the checkerboard calibration method of Zhang Zhengyou is used: when the spatial placement of the two cameras is fixed, the two cameras are fixed and the camera coordinate system of one of them is designated as the world coordinate system. By placing the checkerboard at different positions and angles, and using two cameras to simultaneously capture images of the checkerboard. After collecting several sets of image pairs, the second spatial transformation matrix H from the first camera to the second camera can be obtained by the Zhang Zhengyou calibration method. 12 .
[0086] Specifically, according to the formula T 12 =H1 -1 *H 12 *H2 calculates the spatial transformation matrix T of the first microphone array and the second microphone array 12 , among which, H1 -1 represents the inverse of the first spatial transformation matrix H1 between the first camera and the first microphone array, H 12 represents the second spatial transformation matrix, and H2 represents the first spatial transformation matrix between the second camera and the second microphone array.
[0087] Furthermore, when there are multiple microphone arrays, the first microphone array camera pair can be used as a reference. For example, when there are three microphone arrays, the first camera, the second camera, and the third camera are set accordingly. It is only necessary to calculate the spatial transformation matrix between the first camera and the second camera, and the spatial transformation matrix between the second camera and the third camera to obtain the spatial transformation matrix between the first camera and the third camera, and further obtain the spatial transformation matrix between the third microphone array and the first microphone array.
[0088] As an improvement of the above solution, before determining the location information of the sound source according to the classification result and the location relationship parameter, the method further includes:
[0089] Performing outlier elimination on each category in the classification result to obtain an elimination result;
[0090] The error correction of the current position relationship parameter is performed according to the elimination result.
[0091] Specifically, outliers are removed from each category in the classification result to obtain a removal result. Each category includes multiple output signals, and according to the distribution of these output signals, individual current output signals that deviate from the whole are removed.
[0092] The error correction of the current position relationship parameters is performed based on the elimination results. According to the eliminated output signal, the corresponding microphone array can be found. When the number of signals that need to be eliminated by the corresponding microphone array exceeds the preset threshold, it means that the current spatial transformation matrix of the microphone array is not accurate enough and error correction is required.
[0093] As an improvement of the above solution, the outliers are removed from each category in the classification result to obtain the removal result, which specifically includes:
[0094] According to any two output signals in each category, multiple initial sound source positions are obtained;
[0095] Calculate the distances of other output signals in this category relative to the corresponding initial sound source positions;
[0096] If the distance is less than the preset distance threshold, the corresponding output signal is recorded as an inlier, and the number of inliers corresponding to each initial sound source position is counted;
[0097] According to the initial sound source position with the largest number of inliers, outliers are removed from the output signal of this category.
[0098] Specifically, this embodiment of the present invention uses the RANSAC method to remove external points, and obtains multiple initial sound source positions based on any two output signals in each category, that is, randomly selects two output signals in a category, and calculates the intersection point P of the two output signal lines based on triangulation positioning. It is worth noting that the lines may not completely intersect, and the intersection point is the point closest to the two lines. The calculation process is as follows:
[0099] Based on any two output signals, construct a cost function By solving the cost function, we can get the spatial coordinates of the corresponding sound source. For output signal The straight line pointed to, is the mth output signal among any two output signals, is the pitch angle, θ m is the azimuth, 1≤m≤2; P m =H m P, P=(x,y,z),H m is the spatial transformation matrix of the microphone array corresponding to the mth output signal relative to the world coordinate system, (x, y, z) is the coordinate of the sound source point P in the world coordinate system, P m is the coordinate of the sound source point P in the array coordinate system of the microphone array corresponding to the mth output signal; d m For output signal The distance from the sound source point P; n is a preset norm. Optionally, n=2, the corresponding solution method is the least squares method; n=1, the corresponding solution method is the gradient descent method.
[0100] Calculate the distance between other output signals in this category and the corresponding initial sound source position, that is, find the distance between two points.
[0101] If the distance is less than the preset distance threshold, the corresponding output signal is recorded as an inlier, and the number of inliers corresponding to each initial sound source position is counted. If the distance is greater than the preset distance threshold, the corresponding output signal is recorded as an outlier, and the outliers can be counted while counting the inliers, and the initial sound source position with the least number of outliers is selected accordingly.
[0102] According to the initial sound source position with the most inliers, the outliers of the output signal of this category are eliminated. Because for each category of output signal, multiple initial sound source positions can be obtained in the fitting of the previous step, what we need is to pick out an initial sound source position that is as close as possible to most of the output signals. After it is determined, the output signals that are far away can be eliminated.
[0103] In order to deepen the understanding of this embodiment of the present invention, an example is given below for illustration.
[0104] Step 1: For example, there are 6 output signals in the first category C1, that is, 6 straight lines. The first two straight lines are randomly selected to locate a point P, and then the distances from the 3rd, 4th, 5th, and 6th straight lines to point P are calculated in turn. The distances from the 3rd, 4th, and 5th straight lines to point P are less than the threshold. For point P formed by the 1st and 2nd straight lines, the number of inner points is 3 and the number of outer points is 1.
[0105] Step 2: Repeat step 1 several times, each time randomly selecting two points and calculating the number of internal and external points. In the end, we actually get a list. Assuming it is repeated 4 times, the measurements of the microphone arrays 1-5 are accurate, but 6 is inaccurate:
[0106] O1, O2->Calculate P->Inner point 3 (O3, O4, O5 respectively), outer point 1 (O6)
[0107] O1, O3-> calculate P-> inner point 3 (O2, O4, O5 respectively), outer point 1 (O6)
[0108] O2, O4->Calculate P->Inner point 3 (O1, O3, O5 respectively), outer point 1 (O6)
[0109] O1, O6-> calculate P-> inner point 0, outer point 4 (O2, O3, O4, O5)
[0110] Step 3: Among all the list items in step 2, select the one with the most inner points and the least outer points. In the above example, any of the first three will do. We have determined that (O1-O5) is an inner point and O6 is an outer point. We can also infer that the microphone array measurement error corresponding to O6 is larger.
[0111] In addition, it is worth noting that after all output signals are classified and the classification results are obtained, the categories in which the number of output signals in the classification results is less than the preset number need to be deleted. Optionally, the preset number is at least 3, that is, when the number of output signals in a certain category is 1 or 2, it cannot be eliminated by the above-mentioned external point elimination method, because one signal cannot determine the location of the sound source, and two signals can determine the sound source, but it is impossible to determine whether there is an error.
[0112] As an improvement of the above solution, the error correction of the current position relationship parameter according to the elimination result specifically includes:
[0113] According to the elimination results, counting the number of external points corresponding to different microphone arrays;
[0114] Recalibrate the current position relationship parameters corresponding to the microphone array whose external points exceed the preset number of points.
[0115] Specifically, if it is determined whether the current position parameter of a microphone array needs to be corrected based on only one category of elimination results, there may be accidental errors. Therefore, it is determined based on the elimination results of all categories to increase robustness.
[0116] According to the elimination results, the number of external points corresponding to different microphone arrays is counted, and the current position relationship parameters corresponding to the microphone arrays whose number of external points exceeds the preset number of points are recalibrated.
[0117] In order to deepen the understanding of this embodiment of the present invention, the above example is continued for explanation. Through the above steps 1-step 3, we have determined that the output of the 6th microphone array is an outlier, so the outlier count of the 6th microphone array is +1. For other types of outliers, the steps 1-3 are also performed to calculate the outliers and update the outlier count of each microphone array. For example, in the initial state, the outlier counts of all microphone arrays are 0. After calculating C1, the count of microphone array 6 becomes 1, and the others are still 0; after calculating C2, the count of microphone array 6 becomes 2, and the others are still 0.
[0118] In the process of recalibrating the current position relationship parameters, it is only necessary to solve the spatial transformation matrix of the microphone array that needs to be recalibrated, and the spatial transformation matrices of other microphone arrays are known and do not need to be solved.
[0119] Specifically, the cost function is constructed when recalibrating in,
[0120] For output signal The straight line pointed to, is the output signal corresponding to the m-th microphone array in the n-th category, is the pitch angle, θ m,n is the azimuth, a m,n is an indicative function, indicating whether the m-th microphone array monitors the n-th category (n-th sound source). Each category corresponds to a sound source. If it is monitored, that is Real existence, then a m,n =1, otherwise a m,n= 0. When the nth sound source is far away from the mth microphone array, it may not be detected. m,n =0. 1≤m≤M, M is the total number of microphone arrays, 1≤n≤N, N is the total number of categories in the classification result; H m is the spatial transformation matrix of the m-th microphone array relative to the world coordinate system, H m H1~H M The mth one in H x is the spatial transformation matrix of the microphone array with more external points than the preset number of points relative to the world coordinate system, x is the serial number of the microphone array with more external points than the preset number of points in all microphone arrays, 1≤x≤M; P n is the coordinate of the sound source P corresponding to the nth category in the world coordinate system, that is, P n =(x n ,y n , z n ), P n P1~P N The nth one in d m,n The current output signal The distance from the sound source P. m,n =H m P n , P m,n It means that the point P in the world coordinate system n Using H m The point coordinates are projected into the array coordinate system of the m-th microphone array.
[0121] It is worth noting that the world coordinate system is the array coordinate system of any preset microphone array. For example, if the array coordinate system of the first microphone array is preset as the world coordinate system, then H1 = [R = E | t = 0], where E represents the unit matrix whose elements on the main diagonal are all 1. At this time, what needs to be solved is H x , and at the same time, the coordinates of each sound source P1…P N In addition, it should be noted that P1…P N The coordinate system is the world coordinate system. The coordinate system is the array coordinate system of the mth microphone array.
[0122] Preferably, the cost function is solved by using a grid search method, a gradient descent method, a Newton method or a LM algorithm. When the grid search method is used for solving, the parameter space H x , P1~P NAll variables in the grid search are searched to find a certain combination of variables that minimizes the total cost function. This set of variables is the corresponding solution. When the LM (Levenberg-Marquarelt) algorithm is used, the LM algorithm between the first order and the second order is preferred.
[0123] As an improvement of the above solution, determining the location information of the sound source according to the classification result and the location relationship parameter specifically includes:
[0124] According to the output signal corresponding to each category and the spatial transformation matrix of each microphone array relative to the world coordinate system, a second cost function is constructed; wherein the second cost function is in, For output signal The straight line pointed to, is the mth output signal in the corresponding category, is the pitch angle, θ m is the azimuth, 1≤m≤M, M is the total number of all output signals in this category; P m =H m P, P=(x,y,z),H m is the spatial transformation matrix of the microphone array corresponding to the mth output signal relative to the world coordinate system, where the world coordinate system is the coordinate system corresponding to any preset microphone array, (x, y, z) is the coordinate of the sound source P in the world coordinate system, and P m is the coordinate of the sound source P in the array coordinate system of the microphone array corresponding to the mth output signal; d m For output signal The distance from the sound source P; n is the preset norm;
[0125] The second cost function is solved to obtain the spatial coordinates of the corresponding sound source.
[0126] Specifically, a second cost function is constructed according to the output signal corresponding to each category and the spatial transformation matrix of each microphone array relative to the world coordinate system; wherein the second cost function is in, For output signal The straight line pointed to, is the mth output signal in the corresponding category, is the pitch angle, θ m is the azimuth, 1≤m≤M, M is the total number of all output signals in this category; P m =H m P, P=(x,y,z),H mis the spatial transformation matrix of the microphone array corresponding to the mth output signal relative to the world coordinate system. The world coordinate system is the coordinate system corresponding to any preset microphone array. (x, y, z) is the coordinate of the sound source P in the world coordinate system. P m is the coordinate of the sound source P in the array coordinate system of the microphone array corresponding to the mth output signal; d m For output signal The distance from the sound source P; n is the preset norm;
[0127] The second cost function is solved to obtain the spatial coordinates of the corresponding sound source. Optionally, when n=2, the corresponding solution method is the least square method; when n=1, the corresponding solution method is the gradient descent method.
[0128] For easier understanding, see Figure 3 , is a schematic diagram of the principle of a multi-microphone array for sound source localization provided by this embodiment of the present invention. Since the measurement of each microphone array inevitably has errors, assuming that the real coordinates of the sound source are located at (x, y, z), due to the error, the ray corresponding to the sound source localization result of each microphone array cannot be guaranteed to pass through the real coordinates. Assuming that the distance from the sound source point to the mth ray is dm, what we have to do is to find a coordinate (x, y, z) such that the sum of the distances from (x, y, z) to all rays is minimized. The construction idea of the above cost function is to find the minimum sum of the distances from a coordinate (x, y, z) to all output signals of the corresponding category, that is, the minimum sum of the distances from the point to all rays.
[0129] See also Figure 5 , is a schematic structural diagram of a sound source localization device based on a microphone array provided in this embodiment of the present invention, the device comprising:
[0130] A signal acquisition module 11 is used to acquire output signals of multiple microphone arrays;
[0131] A classification module 12, used to classify the output signal to obtain a classification result;
[0132] A position parameter acquisition module 13 is used to acquire current position relationship parameters between microphone arrays;
[0133] The positioning module 14 is used to determine the position information of the sound source according to the classification result and the current position relationship parameter.
[0134] Preferably, the classification module 12 specifically includes:
[0135] An initial classification unit, used to obtain an initial classification result according to an output signal of any microphone array;
[0136] A calculation unit, used to calculate the similarity between any output signal of other microphone arrays and all categories in the initial classification result, and obtain the maximum similarity;
[0137] a classification unit, configured to classify any output signal into a category of an initial classification result corresponding to the maximum similarity when the maximum similarity is greater than a preset threshold;
[0138] An updating unit is used to update the initial classification result according to any output signal when the maximum similarity is less than a preset threshold.
[0139] Preferably, the current position relationship parameter is obtained by constructing a first cost function in advance according to the classification result and solving the first cost function.
[0140] Preferably, the current position relationship parameter is calculated in advance based on a first spatial transformation matrix between any microphone array and the corresponding camera and a second spatial transformation matrix between each camera.
[0141] Preferably, the device further comprises:
[0142] An outlier elimination module is used to eliminate outliers for each category in the classification result to obtain an elimination result;
[0143] An error correction module is used to perform error correction on the current position relationship parameters according to the elimination result.
[0144] Preferably, the outlier removal module specifically includes:
[0145] An initial sound source position determination unit, used to obtain a plurality of initial sound source positions according to any two output signals in each category;
[0146] A distance calculation unit, used to calculate the distances of other output signals in the category relative to the corresponding initial sound source positions;
[0147] An inlier counting unit, for recording the corresponding output signal as an inlier if the distance is less than a preset distance threshold, and counting the number of inliers corresponding to each initial sound source position;
[0148] The outlier removal unit is used to remove outliers from the output signal of the category according to the initial sound source position with the largest number of inliers.
[0149] Preferably, the error correction module specifically includes:
[0150] An outlier counting unit, used for counting the number of outliers corresponding to different microphone arrays according to the elimination result;
[0151] The recalibration unit is used to recalibrate the current position relationship parameters corresponding to the microphone array whose external points exceed the preset points.
[0152] Preferably, the positioning module 14 specifically includes:
[0153] A function construction unit is used to construct a second cost function according to the output signal corresponding to each category and the spatial transformation matrix of each microphone array relative to the world coordinate system; wherein the second cost function is in, For output signal The straight line pointed to, is the mth output signal in the corresponding category, is the pitch angle, θ m is the azimuth, 1≤m≤M, M is the total number of all output signals in this category; P m =H m P, P=(x,y,z),H m is the spatial transformation matrix of the microphone array corresponding to the mth output signal relative to the world coordinate system, where the world coordinate system is the coordinate system corresponding to any preset microphone array, (x, y, z) is the coordinate of the sound source P in the world coordinate system, and P m is the coordinate of the sound source P in the array coordinate system of the microphone array corresponding to the mth output signal; d m For output signal The distance from the sound source P; n is the preset norm;
[0154] The function solving unit is used to solve the second cost function to obtain the spatial coordinates of the corresponding sound source.
[0155] A sound source localization device based on a microphone array provided in an embodiment of the present invention can implement all the processes of the sound source localization method based on a microphone array described in any of the above embodiments. The functions of each module and unit in the device and the technical effects achieved are respectively the same as the functions and technical effects achieved by the sound source localization method based on a microphone array described in the above embodiments, and will not be repeated here.
[0156] See also Figure 6 , is a schematic diagram of a terminal device provided in this embodiment of the present invention, wherein the terminal device includes a processor 10, a memory 20, and a computer program stored in the memory 20 and configured to be executed by the processor 10, and when the processor 10 executes the computer program, the sound source localization method based on the microphone array described in any of the above embodiments is implemented.
[0157] Exemplarily, the computer program can be divided into one or more modules / units, one or more modules / units are stored in the memory 20 and executed by the processor 10 to complete the present invention. One or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in a sound source localization based on a microphone array. For example, the computer program can be divided into a signal acquisition module, a classification module, a position parameter acquisition module and a positioning module, and the specific functions of each module are as follows:
[0158] A signal acquisition module 11 is used to acquire output signals of multiple microphone arrays;
[0159] A classification module 12, used to classify the output signal to obtain a classification result;
[0160] A position parameter acquisition module 13 is used to acquire current position relationship parameters between microphone arrays;
[0161] The positioning module 14 is used to determine the position information of the sound source according to the classification result and the current position relationship parameter.
[0162] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Figure 6 It is only an example of a terminal device and does not constitute a limitation of the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0163] The processor 10 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor 10 may also be any conventional processor, etc. The processor 10 is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.
[0164] The memory 20 can be used to store the computer programs and / or modules. The processor 10 implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory 20 and calling the data stored in the memory 20. The memory 20 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0165] Wherein, if the module integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the above-mentioned computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0166] An embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the sound source localization method based on microphone array described in any of the above embodiments.
[0167] In summary, the embodiments of the present invention provide a method, device, equipment and storage medium for sound source localization based on a microphone array, which calculates the similarity of all output signals of multiple microphone arrays, classifies the output signals according to the similarity, and thereby determines the three-dimensional coordinates of multiple sound sources in space according to the classification results and the position parameters of the pre-calibrated microphone arrays. Before determining the coordinates of the sound source, the classification results are also subjected to external point elimination to detect whether the calibrated microphone array has been moved. If so, the calibration is performed again to ensure the accuracy of the spatial transformation matrix of the microphone array, thereby effectively reducing the error of sound source localization. The present invention effectively solves the problems of poor speech recognition effect and inability to perform three-dimensional sound source localization in the prior art.
[0168] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A sound source localization method based on a distributed microphone array, characterized in that: include: Obtain output signals of multiple microphone arrays; Classifying the output signal to obtain a classification result; Obtain current position relationship parameters between microphone arrays; Determining the location information of the sound source according to the classification result and the current location relationship parameter; The classifying the output signal to obtain a classification result specifically includes: Obtaining an initial classification result according to an output signal of any microphone array; Calculating the similarity between any output signal of other microphone arrays and all categories in the initial classification result, and obtaining the maximum similarity; When the maximum similarity is greater than a preset threshold, classifying any output signal into the category of the initial classification result corresponding to the maximum similarity; When the maximum similarity is less than a preset threshold, updating the initial classification result according to any output signal; Determining the location information of the sound source according to the classification result and the location relationship parameter specifically includes: According to the output signal corresponding to each category and the spatial transformation matrix of each microphone array relative to the world coordinate system, a second cost function is constructed; wherein the second cost function is in, Output signal The straight line pointed to, is the mth output signal in the corresponding category, is the pitch angle, θ m is the azimuth, 1≤m≤M, M is the total number of all output signals in this category; P m =H m P, P=(x,y,z),H m is the spatial transformation matrix of the microphone array corresponding to the mth output signal relative to the world coordinate system, where the world coordinate system is the coordinate system corresponding to any preset microphone array, (x, y, z) is the coordinate of the sound source P in the world coordinate system, and P m is the coordinate of the sound source P in the array coordinate system of the microphone array corresponding to the mth output signal; d m Output signal The distance from the sound source P; n is the preset norm; The second cost function is solved to obtain the spatial coordinates of the corresponding sound source.
2. The sound source localization method based on distributed microphone array according to claim 1, characterized in that: The current position relationship parameter is obtained by constructing a first cost function in advance according to the classification result and solving the first cost function.
3. The sound source localization method based on distributed microphone array according to claim 1, characterized in that: The current position relationship parameters are calculated in advance based on a first spatial transformation matrix between any microphone array and the corresponding camera and a second spatial transformation matrix between each camera.
4. The sound source localization method based on distributed microphone array according to claim 1, characterized in that: Before determining the location information of the sound source according to the classification result and the location relationship parameter, the method further includes: Eliminating outliers for each category in the classification result to obtain an elimination result; The error correction of the current position relationship parameter is performed according to the elimination result.
5. The sound source localization method based on distributed microphone array according to claim 4, characterized in that: The step of removing outliers from each category in the classification result to obtain a removal result specifically includes: According to any two output signals in each category, multiple initial sound source positions are obtained; Calculate the distances of other output signals in this category relative to the corresponding initial sound source positions; If the distance is less than the preset distance threshold, the corresponding current output signal is recorded as an inlier, and the number of inliers corresponding to each initial sound source position is counted; According to the initial sound source position with the largest number of inliers, outliers are removed from the output signal of this category.
6. The sound source localization method based on distributed microphone array according to claim 4, characterized in that: The error correction of the current position relationship parameter according to the elimination result specifically includes: According to the elimination results, counting the number of external points corresponding to different microphone arrays; Recalibrate the current position relationship parameters corresponding to the microphone array whose external points exceed the preset number of points.
7. A sound source localization device based on a distributed microphone array, characterized in that: include: A signal acquisition module, used to acquire output signals of multiple microphone arrays; A classification module, used to classify the output signal to obtain a classification result; A position parameter acquisition module is used to obtain the current position relationship parameters between the microphone arrays; A positioning module, used to determine the location information of the sound source according to the classification result and the current position relationship parameter; The classification module specifically includes: An initial classification unit, used to obtain an initial classification result according to an output signal of any microphone array; A calculation unit, used to calculate the similarity between any output signal of other microphone arrays and all categories in the initial classification result, and obtain the maximum similarity; a classification unit, configured to classify any output signal into a category of an initial classification result corresponding to the maximum similarity when the maximum similarity is greater than a preset threshold; An updating unit, configured to update the initial classification result according to any one of the output signals when the maximum similarity is less than a preset threshold; The positioning module specifically includes: A function construction unit is used to construct a second cost function according to the output signal corresponding to each category and the spatial transformation matrix of each microphone array relative to the world coordinate system; wherein the second cost function is in, Output signal The straight line pointed to, is the mth output signal in the corresponding category, is the pitch angle, θ m is the azimuth, 1≤m≤M, M is the total number of all output signals in this category; P m =H m P, P=(x,y,z),H m is the spatial transformation matrix of the microphone array corresponding to the mth output signal relative to the world coordinate system, where the world coordinate system is the coordinate system corresponding to any preset microphone array, (x, y, z) is the coordinate of the sound source P in the world coordinate system, and P m is the coordinate of the sound source P in the array coordinate system of the microphone array corresponding to the mth output signal; d m Output signal The distance from the sound source P; n is the preset norm; The function solving unit is used to solve the second cost function to obtain the spatial coordinates of the corresponding sound source.
8. A terminal device, characterized in that: The invention comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the sound source localization method based on the distributed microphone array as claimed in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the sound source localization method based on a distributed microphone array according to any one of claims 1 to 6.
Citation Information
Patent Citations
Sound source localization method and device based on microphone array and storage medium
CN109254266A
A distributed microphone array pickup system and method
CN109788382A
