Sound source position calculation method and apparatus, storage medium, and electronic device
By performing cluster analysis on the sound source angles of the microphone array group, forming clusters, and selecting the sound source angles in the final target cluster, the problem of inaccurate calculation of microphone array groups in complex environments is solved, and more accurate sound source location calculation is achieved.
Patent Information
- Application Number
- CN202210353239.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-02
- Publication Date
- 2026-05-29
- Estimated Expiration
- 2042-04-02
AI Technical Summary
In array microphone applications, the angle values calculated by the microphone array group in complex environments with noise and reverberation are inaccurate, resulting in inaccurate sound source location calculations.
By performing cluster analysis on the sound source angles calculated from each microphone array group, clusters are formed. The sound source angles in the final target cluster are selected to determine the sound source location, and the influence of unreliable sound source angles is eliminated.
It improves the accuracy of sound source location calculation, ensuring that most accurate sound source angles are not affected by individual errors, and obtains a more accurate final sound source location.
Smart Images

Figure CN116932999B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of microphone data processing technology, and in particular to a method, apparatus, storage medium, and electronic device for calculating the location of a sound source. Background Technology
[0002] With the development of science and technology, more and more electronic devices are appearing in people's daily lives. Electronic devices are usually equipped with microphones to collect external sound signals and perform operations such as sound source localization based on the sound signals.
[0003] In related technologies, in the application scenario of array microphones, the actual microphone array group may work in complex environments with noise, reverberation, etc., which may cause the angle value calculated by some microphone array groups to be inaccurate, and thus the calculation result of the sound source position to be inaccurate. Summary of the Invention
[0004] This application provides a method, apparatus, storage medium, and electronic device for calculating the location of a sound source, which can solve the technical problem in the related art where the angle values calculated by certain microphone array groups are inaccurate, thus leading to inaccurate results in the calculation of the sound source location.
[0005] In a first aspect, embodiments of this application provide a method for calculating the location of a sound source, applied to an electronic device, wherein the electronic device is provided with multiple microphone array groups, and the method includes:
[0006] In response to the sound source location calculation command, control each microphone array group to collect sound information in the current environment and calculate the angle of each sound source with respect to the sound source location;
[0007] Cluster analysis is used to cluster the sound sources from different angles to obtain a predetermined number of clusters.
[0008] Determine the final target cluster corresponding to the sound source location in each cluster, and determine the final sound source angle of the sound source location based on the sound source angle in the final target cluster.
[0009] Optionally, determining the final target cluster corresponding to the sound source location in each cluster includes: counting the number of sound source angles in each cluster, and if there is a first target cluster with the most and only one sound source angle, then the first target cluster is taken as the final target cluster corresponding to the sound source location.
[0010] Optionally, determining the final target cluster corresponding to the sound source location in each cluster further includes: if there is no first target cluster with the most and only one sound source angle, then the cluster with the most sound source angle is determined as the second target cluster, and the concentration of sound source angles in each second target cluster is calculated respectively; if there is a second target cluster with the smallest and only one concentration, then the second target cluster with the smallest and only one concentration is taken as the final target cluster corresponding to the sound source location.
[0011] Optionally, each microphone array group has a preset acquisition angle. Determining the final target cluster corresponding to the sound source position in each cluster further includes: if there is no first target cluster with the most and only one sound source angle, then the cluster with the most sound source angles is determined as the second target cluster, and the center sound source angle corresponding to each second target cluster is calculated; the number of target sound source angles in each second target cluster is calculated based on each center sound source angle, wherein the preset acquisition angle of the microphone array group corresponding to the target sound source angle covers the center sound source angle of the second target cluster corresponding to the target sound source angle; if there is a second target cluster with the most and only one target sound source angle, then the second target cluster with the most and only one target sound source angle is taken as the final target cluster corresponding to the sound source position.
[0012] Optionally, determining the final target cluster corresponding to the sound source location in each cluster further includes: if there is no second target cluster with the most and only one target sound source angle, then calculate the concentration of sound source angles in each second target cluster; if there is a second target cluster with the smallest and only one concentration, then take the second target cluster with the smallest and only one concentration as the final target cluster corresponding to the sound source location.
[0013] Optionally, determining the final target cluster corresponding to the sound source location in each cluster further includes: if there is no second target cluster with the smallest concentration and is unique, and the first angle difference between the center sound source angles corresponding to each second target cluster is within a preset angle difference range, then the average value of the center sound source angles corresponding to each second target cluster is taken as the final sound source angle of the sound source location; or if there is no second target cluster with the smallest concentration and is unique, then the final sound source angle of the sound source location is determined based on the historical final sound source angle of the sound source location and the center sound source angles corresponding to each second target cluster.
[0014] Optionally, the step of calculating the concentration of sound source angles in each second target cluster includes: calculating the center sound source angle of each second target cluster, calculating the sound source angle difference between the center sound source angle of each second target cluster and the sound source angle in each second target cluster; and taking the average of the sound source angle differences in each second target cluster as the concentration of sound source angles in each second target cluster.
[0015] Optionally, determining the final sound source angle of the sound source location based on the sound source angles in the final target cluster includes: calculating the target center sound source angle of each sound source angle in the final target cluster, and using the target center sound source angle as the final sound source angle of the sound source location.
[0016] Optionally, the microphone array group includes a first microphone and a second microphone, and the sound source angle calculated by the microphone array group includes a first sound source angle and a second sound source angle in a direction symmetrical about the axis of arrangement of the first microphone and the second microphone.
[0017] Optionally, the method further includes: calculating the final sound source coordinates of the sound source location based on the final sound source angle of the sound source location.
[0018] Secondly, embodiments of this application provide a sound source location calculation device, applied to an electronic device, wherein the electronic device is provided with multiple microphone array groups, and the device includes:
[0019] Angle calculation module is used to respond to sound source position calculation commands, control each microphone array group to collect sound information in the current environment, and calculate the angle of each sound source with respect to the sound source position.
[0020] The clustering module is used to cluster the angles of each sound source based on cluster analysis methods to obtain a preset number of clusters;
[0021] An angle determination module is used to determine the final target cluster corresponding to the sound source position in each cluster, and to determine the final sound source angle of the sound source position based on the sound source angles in the final target cluster.
[0022] Thirdly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the steps of the method described above.
[0023] Fourthly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being adapted to be loaded by the processor and to execute the steps of the device configuration method described above.
[0024] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following:
[0025] This application provides a method for calculating the location of a sound source. First, each microphone array group collects sound information from the current environment and calculates the angles of each sound source relative to its location. Then, based on clustering analysis, these angles are clustered to obtain a preset number of clusters. Finally, the final target cluster corresponding to the sound source location within each cluster is determined, and the final sound source angle of the sound source location is determined based on the angles of each sound source within the final target cluster. Clustering the sound source angles reflects the concentration of these angles. Therefore, after determining the final target cluster corresponding to the sound source location within each cluster, the sound source angles within the final target cluster represent the concentration of sound source angles near the actual sound source location. Since the sound source angles obtained by most microphone array groups are accurate, even if some microphone array groups obtain incorrect angles, it will not affect the selection of the final target cluster. Therefore, determining the final sound source angle of the sound source location based on the angles of each sound source within the final target cluster is relatively accurate. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 An exemplary system architecture diagram of a sound source location calculation method provided in this application embodiment;
[0028] Figure 2 A flowchart illustrating a sound source location calculation method provided in an embodiment of this application;
[0029] Figure 3 A flowchart illustrating a sound source location calculation method provided in another embodiment of this application;
[0030] Figure 4 This is a schematic diagram of the structure of a microphone array group provided in another embodiment of this application;
[0031] Figure 5 This application provides a schematic diagram of the distribution of a microphone array group according to another embodiment of the present application;
[0032] Figure 6 This application provides a schematic diagram of the distribution of a microphone array group according to another embodiment of the present application;
[0033] Figure 7 A schematic diagram of a sound source location calculation device provided in another embodiment of this application;
[0034] Figure 8This application provides a schematic diagram of the structure of an electronic device. Detailed Implementation
[0035] To make the features and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0036] In related technologies, electronic devices are usually equipped with microphones to collect external sound signals and perform operations such as sound source localization based on the sound signals. A microphone array group refers to the process of grouping the microphones in an electronic device into groups, with each group having at least two microphones. Then, the microphone groups are arranged in the electronic device according to a preset array. Each microphone group is called a microphone array group.
[0037] In microphone array applications, especially when there are multiple arrays with irregular (non-linear) distributions, each array can obtain multiple sets of sound source angles based on sound source location estimation algorithms. Ideally, these sound source angles should all be equal or very similar. However, in reality, microphone arrays operate in complex environments with noise and reverberation. This can lead to unreliable sound source angles calculated by one or more microphone arrays. Therefore, directly calculating the sound source location based on the sound source angles calculated by all microphone arrays introduces interference into the sound source location calculation process, resulting in an inaccurate final sound source location.
[0038] To address the aforementioned technical issues, in this embodiment, the sound source angles calculated by each microphone array group are clustered. The resulting clusters reflect the concentration of sound source angles. After determining the final target cluster corresponding to the sound source location in each cluster, the sound source angles in the final target cluster represent the concentration of sound source angles near the actual sound source location. Since the sound source angles obtained by most microphone array groups are accurate, even if the sound source angles obtained by a few microphone array groups are incorrect, it will not affect the selection of the final target cluster. Therefore, determining the final sound source angle of the sound source location based on the sound source angles of the final target cluster will be more accurate.
[0039] Please see Figure 1 , Figure 1 An exemplary system architecture diagram of a sound source location calculation method provided in an embodiment of this application.
[0040] like Figure 1As shown, the system architecture may include electronic device 101, network 102, and server 103. Network 102 serves as the medium for providing a communication link between electronic device 101 and server 103. Network 102 may include various types of wired or wireless communication links, such as wired communication links including fiber optic cables, twisted-pair cables, or coaxial cables, and wireless communication links including Bluetooth communication links, Wireless-Fidelity (Wi-Fi) communication links, or microwave communication links, etc.
[0041] Electronic device 101 can interact with server 103 via network 102 to receive messages from server 103 or send messages to server 103. Electronic device 101 can be hardware or software. When electronic device 101 is hardware, it can be various electronic devices, including but not limited to smartwatches, smartphones, tablets, laptops, and desktop computers. When electronic device 101 is software, it can be installed in the electronic devices listed above, and it can be implemented as multiple software programs or software modules (e.g., to provide distributed services) or as a single software program or software module; no specific limitation is made here.
[0042] Optionally, the electronic device 101 is provided with multiple microphone array groups, which have the ability to collect sound information.
[0043] Server 103 can be a business server providing various services. It should be noted that server 103 can be either hardware or software. When server 103 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 103 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module; no specific limitations are made here.
[0044] It should be understood that Figure 1 The number of electronic devices, networks, and servers shown is only illustrative; the number of electronic devices, networks, and servers can be any number depending on the implementation requirements.
[0045] Please see Figure 2 , Figure 2 This is a flowchart illustrating a sound source location calculation method provided in an embodiment of this application. It can be understood that in this embodiment, the executing entity can be an electronic device or a processor in an electronic device, or it can be a related service in an electronic device that executes the sound source location calculation method. For ease of description, the following uses a processor in an electronic device as the executing entity to introduce a specific implementation process of a sound source location calculation method.
[0046] like Figure 2As shown, the method for calculating the location of a sound source includes:
[0047] S201, responding to the sound source location calculation command, controls each microphone array group to collect sound information in the current environment and calculates the angles of each sound source with respect to the sound source location.
[0048] It is understood that in the embodiments of this application, the electronic device is provided with multiple microphone array groups, wherein the number of microphone array groups and the distribution position of the microphone array groups in the electronic device are not limited, and the number of microphones in each microphone array group is also not limited.
[0049] When it is necessary to calculate the direction of the sound source near an electronic device, the user, the external control device of the electronic device, or the internal control device of the electronic device can issue a sound source location calculation command. At this time, the processor of the electronic device can receive and respond to the sound source location calculation command, and send control commands to each microphone array group in the electronic device, so that each microphone array group receives and responds to the control commands to collect sound information in the current environment of the electronic device. Since the microphone array groups are located in different positions in the electronic device, the sound information collected by each microphone array group is different. Therefore, each microphone array group can also use a preset sound source location calculation method based on its own collected sound information to calculate the sound source angle of each microphone array group with respect to the sound source location at its own location. That is, each microphone array group corresponds to a sound source angle with respect to the sound source location. Then the processor can obtain the sound source angles with respect to the sound source location calculated by each microphone array group.
[0050] Optionally, after each microphone array group collects the sound information in the current environment of the electronic device, it can also send the collected sound information to the processor, so that the processor can calculate the sound source angle of each microphone array group at its respective location with respect to the sound source position based on the collected sound information and using a preset sound source position calculation method.
[0051] In this embodiment of the application, the method for calculating the preset sound source position is not specifically limited, as long as the sound source angle can be calculated based on the sound information.
[0052] S202. Based on the cluster analysis method, the angles of each sound source are clustered to obtain a preset number of clusters.
[0053] Understandably, after obtaining the sound source angles of each microphone array group at its respective location with respect to the sound source position, the actual sound source angle corresponding to the sound source position can be determined based on each sound source angle. However, in reality, microphone array groups may operate in complex environments with noise, reverberation, etc. This may result in the sound source angles calculated by one or more microphone array groups being unreliable. Therefore, before calculating the actual sound source angles from each sound source angle, it is necessary to eliminate unreliable sound source angles as much as possible to reduce the impact of unreliable sound source angles on the calculation of the actual sound source angles.
[0054] In practice, when multiple microphone arrays calculate sound source angles, most of these angles are accurate and tend to cluster around the actual sound source angles. Therefore, a feasible approach is to use cluster analysis to group these angles. The basic idea of cluster analysis is that the samples (data) or indicators (variables) under study exhibit varying degrees of similarity (closeness / closeness measured by distance between samples). Based on multiple observed indicators of a batch of samples, specific statistical measures are identified to quantify the similarity between samples or indicators. These statistical measures are then used as the basis for classification. Samples (or indicators) with high similarity are grouped into one category, and other samples (or indicators) with high similarity are grouped into another category, until all samples (or indicators) have been grouped. This is the clustering process in cluster analysis.
[0055] Therefore, in this embodiment, a clustering analysis method is used to cluster the sound source angles. This means that the sound source angles are divided into different clusters (i.e., different classes) based on their similarity. Specifically, in this application, the sound source angles obtained by most microphone array groups are concentrated near the actual sound source angles, meaning the angle differences between the sound source angles obtained by most microphone array groups are very small. Therefore, the angle differences between the sound source angles can be used as the basis for judging the similarity between them, thus dividing the sound source angles into different clusters. After clustering the sound source angles using the clustering analysis method to obtain a preset number of clusters, most reliable sound source angles will be concentrated in or near the cluster corresponding to the actual sound source location. The number of clusters can be freely set according to accuracy requirements, or it can be set based on the cluster number setting method provided by the clustering analysis method.
[0056] S203. Determine the final target cluster corresponding to the sound source position in each cluster, and determine the final sound source angle of the sound source position based on the sound source angle in the final target cluster.
[0057] After clustering the sound source angles using clustering analysis to obtain a preset number of clusters, each cluster represents the concentration of all sound source angles. When the sound source angles calculated by one or more microphone array groups are unreliable, these unreliable sound source angles are generally more dispersed and will not be concentrated near the final sound source angle of the real sound source location. However, most reliable sound source angles will be concentrated near the final sound source angle of the real sound source location.
[0058] Therefore, based on the specific attribute information of the sound source angles included in each cluster, one of the clusters can be selected as the final target cluster corresponding to the real sound source location. After obtaining the final target cluster, it can be considered that the sound source angles included in the final target cluster are close to the final sound source angle of the real sound source location, or that the sound source angles included in the final target cluster are near the final sound source angle of the real sound source location. Therefore, the final sound source angle of the sound source location is determined based on the sound source angles in the final target cluster. That is, in the process of determining the final sound source angle of the sound source location, unreliable sound source angles are not used or the use of unreliable sound source angles is minimized. This achieves the goal of eliminating unreliable sound source angles as much as possible, thereby reducing the impact of unreliable sound source angles on the calculation of the real sound source angle.
[0059] In this embodiment, the specific attribute information of the sound source angle may include the number of sound source angles, the concentration of sound source angles, and the acquisition angle of the microphone array group corresponding to the sound source angle. Furthermore, the final sound source angle of the sound source location is determined based on the sound source angles in the final target cluster, that is, the target center sound source angle of each sound source angle in the final target cluster is calculated. The target center sound source angle can be obtained by calculating the average value of each sound source angle, and this target center sound source angle is used as the final sound source angle of the sound source location.
[0060] In this embodiment, each microphone array group first collects sound information from the current environment and calculates the sound source angles for each sound source location. Then, based on a clustering analysis method, the sound source angles are clustered to obtain a preset number of clusters. Finally, the final target cluster corresponding to the sound source location in each cluster is determined, and the final sound source angle of the sound source location is determined based on the sound source angles in the final target cluster. Clustering the sound source angles reflects the concentration of each sound source angle. After determining the final target cluster corresponding to the sound source location in each cluster, the sound source angles in the final target cluster represent the concentration of sound source angles near the actual sound source location. Since the sound source angles obtained by most microphone array groups are accurate, even if the sound source angles obtained by a few microphone array groups are incorrect, it will not affect the selection of the final target cluster. Therefore, determining the final sound source angle of the sound source location based on the sound source angles of the final target cluster is relatively accurate.
[0061] Please seeFigure 3 , Figure 3 This is a flowchart illustrating a sound source location calculation method provided in another embodiment of this application.
[0062] like Figure 3 As shown, the method includes:
[0063] S301, responding to the sound source location calculation command, controls each microphone array group to collect sound information in the current environment and calculates the angles of each sound source with respect to the sound source location.
[0064] For details on the specific implementation process of responding to the sound source location calculation command and controlling each microphone array group to collect sound information in the current environment, please refer to the description in step S201. The following uses the example of a microphone array group including the first microphone and the second microphone to explain the process of calculating the angles of each sound source based on the sound information.
[0065] Please see Figure 4 , Figure 4 This is a schematic diagram of a microphone array group provided for another embodiment of this application. Figure 4 As shown, the microphone array group 400 includes a first microphone 410 and a second microphone 420. The sound source angle of the microphone array group 400 with respect to the sound source location can be calculated based on the direction-of-arrival (DOA) estimation method. Specifically, the first microphone 410 and the second microphone 420 can respectively collect sound information from the current environment. Since the distances between the first microphone 410 and the second microphone 420 and the sound source are different, the time it takes for the sound information emitted by the sound source to reach the first microphone 410 and the second microphone 420 is also different. Therefore, the time difference between the first microphone 410 and the second microphone 420 receiving the same sound information can be calculated, and the sound source angle θ of the microphone array group 400 with respect to the sound source location can be obtained based on the time difference. However, since this method only has a measurement range of 0-180 degrees and cannot distinguish the symmetrical direction about the microphone arrangement axis, it can be considered that the sound source angle θ of the microphone array group 400 with respect to the sound source location includes two angle results: one is the true angle corresponding to the first sound source location, and the other is the mirror image corresponding to the second sound source location. That is, it includes the first sound source angle θ1 and the second sound source angle θ2 in the symmetrical direction about the arrangement axis of the first microphone and the second microphone 420.
[0066] Optionally, after obtaining the sound source angle corresponding to each microphone array group, since the distribution positions of different microphone array groups are different, it is necessary to transform the sound source angles corresponding to different microphone array groups to the same coordinate system or the same reference system so that the different sound source angles can be calculated or compared in the future. Therefore, the sound source angles used in the subsequent steps are all sound source angles transformed to the same coordinate system or the same reference system.
[0067] S302. Based on the cluster analysis method, the angles of each sound source are clustered to obtain a preset number of clusters.
[0068] In this embodiment, the clustering analysis method can specifically be the K-Means clustering algorithm. The K-Means clustering algorithm, also known as the k-means clustering algorithm, is an iterative clustering analysis algorithm. Its steps are as follows: first, the data is pre-divided into K groups; then, K objects are randomly selected as initial cluster centers; next, the distance between each object and each seed cluster center is calculated; and each object is assigned to the nearest cluster center. The cluster centers and the objects assigned to them represent a cluster. Each time a sample is assigned, the cluster centers are recalculated based on the existing objects in the cluster. This process is repeated until a termination condition is met. The termination condition can be that no (or a minimum number) objects are reassigned to different clusters, no (or a minimum number) cluster centers change, and the sum of squared errors reaches a local minimum.
[0069] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating the distribution of a microphone array group according to another embodiment of this application. Figure 5 As shown, if the microphone array group setting method mentioned in the above steps is used, when there are 8 microphones in the electronic device, then the 8 microphones are arranged in a circle around a certain position of the electronic device, with each pair of microphones forming a microphone array group. Therefore, there are four microphone array groups in the electronic device, and each microphone array group corresponds to two sound source angles, that is, to two sound source directions. Figure 5 In this context, the arrows corresponding to the direction of the sound source represent the angle of the sound source. For electronic devices, there are a total of 8 sound source angles. These 8 sound source angles include reliable sound source angles and unreliable sound source angles. Unreliable sound source angles may be mirrored sound source angles obtained from the true sound source angle based on the direction of arrival estimation method, or they may be incorrect sound source angles obtained due to external interference (noise, reverberation, etc.).
[0070] When K is set to 3 in the K-Means clustering algorithm, then the K-Means clustering algorithm can obtain 3 clusters corresponding to 8 sound source angles.
[0071] S303. Count the number of sound source angles in each cluster. If there is a first target cluster with the most and only one sound source angle, take the first target cluster as the final target cluster corresponding to the sound source position.
[0072] Optionally, after clustering the sound source angles using clustering analysis to obtain a preset number of clusters, each cluster represents the concentration of all sound source angles. When the sound source angles calculated by one or more microphone array groups are unreliable, these unreliable sound source angles are generally more dispersed and will not be concentrated near the final sound source angle of the real sound source location. However, most reliable sound source angles will be concentrated near the final sound source angle of the real sound source location. In other words, the number of sound source angles in each cluster reflects the concentration of sound source angles. It is easy to understand that the final sound source angle near the real sound source location will have the most concentrated sound source angles. Therefore, in determining the final target cluster corresponding to the sound source location in each cluster, a feasible approach is to count the number of sound source angles in each cluster and compare the number of sound source angles in each cluster to determine whether there is a first target cluster with the most and only one sound source angle. If there is a first target cluster with the most and only one sound source angle, the first target cluster is taken as the final target cluster corresponding to the sound source location.
[0073] For example, in Figure 5 In this context, when 8 sound source angles correspond to 3 clusters, the first cluster includes 4 sound source angles, the second cluster includes 2 sound source angles, and the third cluster includes 2 sound source angles. Therefore, the first cluster can be considered as the first target cluster with the most and only sound source angles among the 3 clusters. Thus, the first target cluster can be regarded as the final target cluster corresponding to the sound source position.
[0074] S304. Count the number of sound source angles in each cluster. If there is no first target cluster with the most and only one sound source angle, then the cluster with the most sound source angles is determined as the second target cluster. Calculate the concentration of sound source angles in each second target cluster.
[0075] If the sound source angles calculated by the microphone array group contain many unreliable factors, then there is likely no single, unique first target cluster with the largest number of sound source angles. Please refer to... Figure 6 , Figure 6 This is a schematic diagram illustrating the distribution of a microphone array group according to another embodiment of this application. Figure 6 As shown, for example, when 8 sound source angles correspond to 3 clusters, the first cluster includes 3 sound source angles, the second cluster includes 3 sound source angles, and the third cluster includes 2 sound source angles. Then, there is no first target cluster with the most and only the number of sound source angles among these 3 clusters.
[0076] At this point, the cluster with the most sound source angles can be identified as the second target cluster, such as... Figure 6As shown, for example, when 8 sound source angles correspond to 3 clusters, the first cluster includes 3 sound source angles, the second cluster includes 3 sound source angles, and the third cluster includes 2 sound source angles. Then, the first and second clusters are the clusters with the most sound source angles, and the first and second clusters can be identified as the second target clusters.
[0077] When there are multiple second target clusters, it means that each second target cluster includes the same number of sound source angles. The sound source angles near the final sound source angle of the actual sound source location will be more concentrated. Therefore, the concentration of sound source angles in each second target cluster can be calculated separately. The concentration of sound source angles reflects the concentration of sound source angles in the cluster. The concentration of each second target cluster can be determined by the relationship between the central sound source angle of each second target cluster and the sound source angles in each second target cluster.
[0078] Specifically, the central sound source angle of each second target cluster can be calculated separately. The central sound source angle can be considered as the average of the sound source angles of each second target cluster. Then, the difference between the central sound source angle of each second target cluster and the sound source angles in each second target cluster can be calculated separately. Finally, the average of the sound source angle differences in each second target cluster can be used as the concentration of the sound source angles in each second target cluster.
[0079] S305. If there exists a second target cluster with the smallest concentration and that is unique, then the second target cluster with the smallest concentration and that is unique shall be taken as the final target cluster corresponding to the sound source location.
[0080] After obtaining the concentration of sound source angles in each second target cluster, it can be determined whether there is a second target cluster with the smallest concentration that is unique. If there is a second target cluster with the smallest concentration that is unique, then the second target cluster with the smallest concentration that is unique is taken as the final target cluster corresponding to the sound source location.
[0081] For example, in Figure 6 In the process, after determining the first cluster and the second cluster as the second target cluster, where the concentration of the first cluster is 10 and the concentration of the second cluster is 20, it can be determined that the first cluster is the second target cluster with the smallest concentration and is unique. Therefore, the first cluster is determined as the final target cluster.
[0082] S306. Count the number of sound source angles in each cluster. If there is no first target cluster with the most and only one sound source angle, then determine the cluster with the most sound source angles as the second target cluster, and calculate the center sound source angle corresponding to each second target cluster.
[0083] Understandably, when a microphone is placed in an electronic device, although the microphone itself can collect sound information 360 degrees, the obstruction caused by the electronic device will result in each microphone array having a preset collection angle. The sound information collected by the microphone array from the preset collection angle will not be obstructed. For example, when a microphone is placed on top of an electronic device, the side of the microphone facing the electronic device will be obstructed. If the sound source comes from the direction the microphone is obstructed, although the sound information can still be collected, the sound information from this direction is the sound after being transmitted through the obstruction. The sound source angle calculated based on the sound information from this direction will be unreliable. That is, only the sound source angle calculated based on the sound information from the direction corresponding to the preset collection angle is considered reliable.
[0084] Therefore, when each microphone array group in an electronic device has a preset acquisition angle, if there is no first target cluster with the most and only one sound source angle, the cluster with the most sound source angles can be determined as the second target cluster, and the center sound source angle corresponding to each second target cluster can be calculated. The center sound source angle is also the average value of the sound source angles in the second target cluster.
[0085] S307. Calculate the number of target sound source angles in each second target cluster based on the angle of each central sound source, wherein the preset acquisition angle of the microphone array group corresponding to the target sound source angle covers the central sound source angle of the second target cluster corresponding to the target sound source angle.
[0086] Since only the sound source angle calculated based on the sound information from the direction corresponding to the preset acquisition angle is considered reliable, the number of target sound source angles in each second target cluster can be calculated based on the center sound source angle. The preset acquisition angle of the microphone array group corresponding to the target sound source angle covers the center sound source angle of the second target cluster corresponding to the target sound source angle. That is, the target sound source angle is the sound source angle calculated based on the sound information from the direction corresponding to the preset acquisition angle.
[0087] S308. If there exists a second target cluster with the most and only one target sound source angle, then the second target cluster with the most and only one target sound source angle shall be taken as the final target cluster corresponding to the sound source location.
[0088] Since the target sound source angle is considered a reliable sound source angle, the target sound source angle is also likely to be concentrated near the sound source angle of the real sound source location. Therefore, there is a second target cluster with the largest number of target sound source angles and it is unique. So, the second target cluster with the largest number of target sound source angles and it is unique is taken as the final target cluster corresponding to the sound source location.
[0089] When there is no first target cluster with the most and only one sound source angle, the above process of determining the final target cluster corresponding to the sound source position in each cluster provides two methods: that is, the final target cluster can be determined by the concentration of the second target cluster, or by the number of target sound source angles in the second target cluster. However, the two methods can also be combined. For example, if there is no second target cluster with the most and only one sound source angle, the concentration of sound source angles in each second target cluster is calculated. If there is a second target cluster with the smallest and only one concentration, then the second target cluster with the smallest and only one concentration is taken as the final target cluster corresponding to the sound source position.
[0090] Optionally, if there is no second target cluster with the smallest concentration and that is unique, a compromise to determine the final target cluster is to calculate the first angle difference between the center sound source angles corresponding to each second target cluster. If the first angle difference between the center sound source angles corresponding to each second target cluster is within a preset angle difference range, then the sound source angle representing the true sound source location is near the center sound source angle corresponding to each second target cluster. In this case, the average of the center sound source angles corresponding to each second target cluster can be used as the final sound source angle of the sound source location.
[0091] If there is no second target cluster with the smallest concentration and is unique, and the first angle difference between the center sound source angles corresponding to each second target cluster is not within the preset angle difference range, it means that the currently obtained sound source angles are not feasible. In this case, the currently collected sound source angles can be directly used to collect sound information and calculate the sound source angles again.
[0092] Alternatively, if there is no second target cluster with the smallest concentration and is unique, and the historical final sound source angle may be near the sound source angle of the current sound source location, then the final sound source angle of the sound source location can be determined based on the historical final sound source angle of the sound source location and the central sound source angle corresponding to each second target cluster. For example, the average of the historical final sound source angle of the sound source location and the central sound source angle corresponding to each second target cluster can be used as the final sound source angle of the current sound source location.
[0093] S309. Calculate the target center sound source angle of each sound source angle in the final target cluster, and take the target center sound source angle as the final sound source angle of the sound source position.
[0094] After confirming the final target cluster, the target center sound source angle of each sound source angle in the final target cluster can be calculated. The target center sound source angle is obtained by the average of the sound source angles in the final target cluster. Therefore, the target center sound source angle can be used as the final sound source angle of the sound source location.
[0095] S310. Calculate the final sound source coordinates based on the final sound source angle of the sound source location.
[0096] Since the location of a sound source can include both angle and coordinates, after obtaining the final sound source angle, the final sound source coordinates can also be determined based on the final sound source angle.
[0097] Specifically, when collecting Figure 4 When a microphone array is set up, the sound source location and two microphones in the microphone array form a triangle. Then, the two interior angles of the triangle can be determined based on the final sound source angle. Given the length between the two microphones in the microphone array, the final sound source coordinates can be calculated.
[0098] In this embodiment, the sound source location calculation method is highly adaptable and can be used for microphone arrays of various shapes. Furthermore, the method is simple, reliable, computationally inefficient, and possesses a certain degree of anti-interference capability. Clustering is used to calculate reliable angle results, and methods for selecting cluster center points under various conditions are proposed to eliminate results with poor reliability. Even in the presence of interference, accurate values can still be obtained, outperforming methods such as mean filtering. Additionally, this method can eliminate interference terms, thus having no impact on the system's response speed. The reliability calculation of center points after clustering incorporates the array's geometric positional relationships, cleverly further identifying the reliability of each center point and improving system reliability.
[0099] In this embodiment, the sound source angles are clustered. The resulting clusters reflect the concentration of each sound source angle. After determining the final target cluster corresponding to the sound source location in each cluster, the sound source angles in the final target cluster represent the concentration of sound source angles near the actual sound source location. Since the sound source angles obtained by most microphone array groups are accurate, even if the sound source angles obtained by a few microphone array groups are incorrect, it will not affect the selection of the final target cluster. Therefore, determining the final sound source angle of the sound source location based on the sound source angles of the final target cluster will be more accurate.
[0100] Please see Figure 7 , Figure 7 This is a schematic diagram of a sound source location calculation device provided in another embodiment of this application.
[0101] As shown in Figure 7, the sound source location calculation device 700 includes:
[0102] Angle calculation module 710 is used to respond to sound source position calculation commands, control each microphone array group to collect sound information in the current environment, and calculate the angle of each sound source with respect to the sound source position.
[0103] Clustering module 720 is used to cluster each sound source angle based on clustering analysis methods to obtain a preset number of clusters.
[0104] Angle determination module 730 is used to determine the final target cluster corresponding to the sound source position in each cluster, and to determine the final sound source angle of the sound source position based on the sound source angles in the final target cluster.
[0105] Determine the final target cluster corresponding to the location of the sound source in each cluster, including:
[0106] Count the number of sound source angles in each cluster. If there is a first target cluster with the most and only one sound source angle, then the first target cluster is taken as the final target cluster corresponding to the sound source location.
[0107] Optionally, the angle determination module 730 is further configured to, if there is no first target cluster with the most and only one sound source angle, determine the cluster with the most sound source angle as the second target cluster, and calculate the concentration of sound source angles in each second target cluster; if there is a second target cluster with the smallest and only one concentration, then take the second target cluster with the smallest and only one concentration as the final target cluster corresponding to the sound source location.
[0108] Each microphone array group has a preset acquisition angle. Optionally, the angle determination module 730 is further configured to determine the group with the most sound source angles as the second target group if there is no first target group with the most unique sound source angles, and calculate the center sound source angle corresponding to each second target group; calculate the number of target sound source angles in each second target group based on each center sound source angle, wherein the preset acquisition angle of the microphone array group corresponding to the target sound source angle covers the center sound source angle of the second target group corresponding to the target sound source angle; if there is a second target group with the most unique target sound source angles, then the second target group with the most unique target sound source angles is taken as the final target group corresponding to the sound source position.
[0109] Optionally, the angle determination module 730 is further configured to calculate the concentration of sound source angles in each second target cluster if there is no second target cluster with the largest number of unique target sound source angles; and if there is a second target cluster with the smallest concentration and uniqueness, then the second target cluster with the smallest concentration and uniqueness is taken as the final target cluster corresponding to the sound source location.
[0110] Optionally, the angle determination module 730 is further configured to, if there is no second target cluster with the smallest concentration and is unique, and the first angle difference between the center sound source angles corresponding to each second target cluster is within a preset angle difference range, then take the average of the center sound source angles corresponding to each second target cluster as the final sound source angle of the sound source location; or if there is no second target cluster with the smallest concentration and is unique, then determine the final sound source angle of the sound source location based on the historical final sound source angle of the sound source location and the center sound source angles corresponding to each second target cluster.
[0111] Optionally, the angle determination module 730 is also used to calculate the center sound source angle of each second target cluster, calculate the sound source angle difference between the center sound source angle of each second target cluster and the sound source angle in each second target cluster, and take the average of the sound source angle differences in each second target cluster as the concentration of the sound source angles in each second target cluster.
[0112] Optionally, the angle determination module 730 is also used to calculate the target center sound source angle of each sound source angle in the final target cluster, and use the target center sound source angle as the final sound source angle of the sound source position.
[0113] Optionally, the microphone array group includes a first microphone and a second microphone, and the sound source angle calculated by the microphone array group includes the first sound source angle and the second sound source angle in the direction symmetrical about the axis of arrangement of the first microphone and the second microphone.
[0114] Optionally, the sound source location calculation device 700 further includes a coordinate calculation module for calculating the final sound source coordinates of the sound source location based on the final sound source angle of the sound source location.
[0115] In this embodiment, a sound source location calculation device includes: an angle calculation module, used to respond to a sound source location calculation command, control each microphone array group to collect sound information in the current environment, and calculate the sound source angles related to the sound source location; a clustering module, used to cluster the sound source angles based on a clustering analysis method to obtain a preset number of clusters; and an angle determination module, used to determine the final target cluster corresponding to the sound source location in each cluster, and to determine the final sound source angle of the sound source location based on the sound source angles in the final target cluster. Clustering the sound source angles results in clusters that reflect the concentration of sound source angles. Therefore, after determining the final target cluster corresponding to the sound source location in each cluster, the sound source angles in the final target cluster represent the concentration of sound source angles near the actual sound source location. Since most microphone array groups obtain accurate sound source angles, even if some microphone array groups obtain incorrect sound source angles, it will not affect the selection of the final target cluster. Therefore, determining the final sound source angle of the sound source location based on the sound source angles of the final target cluster is relatively accurate.
[0116] This application also provides a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the steps of any of the methods described in the above embodiments.
[0117] Further, please see Figure 8 , Figure 8 This application provides a schematic diagram of the structure of an electronic device. For example... Figure 8 As shown, the electronic device 800 may include: at least one central processing unit 801, at least one network interface 804, user interface 803, memory 805, and at least one communication bus 802.
[0118] The communication bus 802 is used to enable communication between these components.
[0119] The user interface 803 may include a display screen and a camera. Optionally, the user interface 803 may also include a standard wired interface and a wireless interface.
[0120] The network interface 804 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0121] The central processing unit 801 may include one or more processing cores. The central processing unit 801 connects to various parts within the electronic device 800 using various interfaces and lines. It executes various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 805, and by calling data stored in the memory 805. Optionally, the central processing unit 801 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The central processing unit 801 may integrate one or more of the following: a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the central processing unit 801.
[0122] The memory 805 may include random access memory (RAM) or read-only memory. Optionally, the memory 805 may include a non-transitory computer-readable storage medium. The memory 805 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 805 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 805 may also be at least one storage device located remotely from the aforementioned central processing unit 801. Figure 8 As shown, the memory 805, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a sound source location calculation program.
[0123] exist Figure 8 In the illustrated electronic device 800, the user interface 803 is mainly used to provide an input interface for the user and to acquire user input data; while the central processing unit 801 can be used to call the sound source location calculation program stored in the memory 805 and specifically perform the following operations:
[0124] In response to the sound source location calculation command, control each microphone array group to collect sound information in the current environment and calculate the angle of each sound source with respect to the sound source location;
[0125] Cluster analysis is used to cluster the sound sources from different angles to obtain a predetermined number of clusters.
[0126] Determine the final target cluster corresponding to the location of the sound source in each cluster, and determine the final sound source angle based on the sound source angles in the final target cluster.
[0127] Optionally, determining the final target cluster corresponding to the sound source location in each cluster includes: counting the number of sound source angles in each cluster; if there is a first target cluster with the most and only one sound source angle, the first target cluster is taken as the final target cluster corresponding to the sound source location.
[0128] Optionally, determining the final target cluster corresponding to the sound source location in each cluster further includes: if there is no first target cluster with the most and only sound source angles, then the cluster with the most sound source angles is determined as the second target cluster, and the concentration of sound source angles in each second target cluster is calculated respectively; if there is a second target cluster with the smallest and only concentration, then the second target cluster with the smallest and only concentration is taken as the final target cluster corresponding to the sound source location.
[0129] Optionally, each microphone array group has a preset acquisition angle. Determining the final target cluster corresponding to the sound source position in each cluster further includes: if there is no first target cluster with the most and only sound source angles, then the cluster with the most sound source angles is determined as the second target cluster, and the center sound source angle corresponding to each second target cluster is calculated; the number of target sound source angles in each second target cluster is calculated based on each center sound source angle, wherein the preset acquisition angle of the microphone array group corresponding to the target sound source angle covers the center sound source angle of the second target cluster corresponding to the target sound source angle; if there is a second target cluster with the most and only sound source angles, then the second target cluster with the most and only sound source angles is taken as the final target cluster corresponding to the sound source position.
[0130] Optionally, determining the final target cluster corresponding to the sound source location in each cluster further includes: if there is no second target cluster with the most and only one target sound source angle, then calculate the concentration of sound source angles in each second target cluster; if there is a second target cluster with the smallest and only one concentration, then take the second target cluster with the smallest and only one concentration as the final target cluster corresponding to the sound source location.
[0131] Optionally, determining the final target cluster corresponding to the sound source location in each cluster further includes: if there is no second target cluster with the smallest concentration and is unique, and the first angle difference between the center sound source angles corresponding to each second target cluster is within a preset angle difference range, then the average value of the center sound source angles corresponding to each second target cluster is taken as the final sound source angle of the sound source location; or if there is no second target cluster with the smallest concentration and is unique, then the final sound source angle of the sound source location is determined based on the historical final sound source angle of the sound source location and the center sound source angle corresponding to each second target cluster.
[0132] Optionally, the concentration of sound source angles in each second target cluster is calculated, including: calculating the center sound source angle of each second target cluster, calculating the sound source angle difference between the center sound source angle of each second target cluster and the sound source angle in each second target cluster; and taking the average of the sound source angle differences in each second target cluster as the concentration of sound source angles in each second target cluster.
[0133] Optionally, determining the final sound source angle of the sound source location based on the sound source angles of each sound source in the final target cluster includes: calculating the target center sound source angle of each sound source angle in the final target cluster, and using the target center sound source angle as the final sound source angle of the sound source location.
[0134] Optionally, the microphone array group includes a first microphone and a second microphone, and the sound source angle calculated by the microphone array group includes the first sound source angle and the second sound source angle in the direction symmetrical about the axis of arrangement of the first microphone and the second microphone.
[0135] Optionally, the method further includes: calculating the final sound source coordinates of the sound source location based on the final sound source angle of the sound source location.
[0136] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0137] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0138] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0139] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0140] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0141] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0142] The above is a description of a sound source location calculation method, apparatus, storage medium, and electronic device provided in this application. For those skilled in the art, based on the ideas of the embodiments of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for calculating the location of a sound source, characterized in that, Applied to an electronic device, wherein the electronic device is provided with multiple microphone array groups, the method includes: In response to the sound source location calculation command, control each microphone array group to collect sound information in the current environment and calculate the angle of each sound source with respect to the sound source location; Cluster analysis is used to cluster the sound sources from different angles to obtain a predetermined number of clusters. Determine the final target cluster corresponding to the sound source location in each cluster, and determine the final sound source angle of the sound source location based on the sound source angle in the final target cluster; Determining the final target cluster corresponding to the sound source location in each cluster includes: The number of sound source angles in each cluster is counted. If there is a first target cluster with the most and only one sound source angle, the first target cluster is taken as the final target cluster corresponding to the sound source location. If there is no first target cluster with the most and only one sound source angle, the cluster with the most sound source angle is determined as the second target cluster. The concentration of sound source angles in each second target cluster is calculated. If there is a second target cluster with the smallest concentration and only one, the second target cluster with the smallest concentration and only one is taken as the final target cluster corresponding to the sound source location. If there is no first target cluster with the most and only one sound source angle, then the cluster with the most sound source angles is determined as the second target cluster, and the center sound source angle corresponding to each second target cluster is calculated; the number of target sound source angles in each second target cluster is calculated based on each center sound source angle, wherein the preset acquisition angle of the microphone array group corresponding to the target sound source angle covers the center sound source angle of the second target cluster corresponding to the target sound source angle. If there exists a second target cluster with the most and only one target sound source angle, then the second target cluster with the most and only one target sound source angle is taken as the final target cluster corresponding to the sound source location; If there is no second target cluster with the smallest concentration and is unique, and the first angle difference between the center sound source angles corresponding to each second target cluster is within a preset angle difference range, then the average value of the center sound source angles corresponding to each second target cluster is taken as the final sound source angle of the sound source location; or if there is no second target cluster with the smallest concentration and is unique, then the final sound source angle of the sound source location is determined based on the historical final sound source angle of the sound source location and the center sound source angles corresponding to each second target cluster.
2. The method according to claim 1, characterized in that, The calculation of the concentration of sound source angles in each second target cluster includes: Calculate the center sound source angle of each second target cluster, and calculate the sound source angle difference between the center sound source angle of each second target cluster and the sound source angle in each second target cluster. The average value of the sound source angle difference in each second target cluster is taken as the concentration of the sound source angle in each second target cluster.
3. The method according to claim 1, characterized in that, The step of determining the final sound source angle of the sound source location based on the angles of each sound source in the final target cluster includes: Calculate the target center sound source angle of each sound source angle in the final target cluster, and use the target center sound source angle as the final sound source angle of the sound source location.
4. The method according to claim 1, characterized in that, The microphone array group includes a first microphone and a second microphone, and the sound source angle calculated by the microphone array group includes a first sound source angle and a second sound source angle in a direction symmetrical about the axis of arrangement of the first microphone and the second microphone.
5. The method according to claim 1, characterized in that, The method further includes: The final sound source coordinates of the sound source location are calculated based on the final sound source angle of the sound source location.
6. A sound source location calculation device, characterized in that, Applied to an electronic device, the electronic device having multiple microphone array groups, the device includes: Angle calculation module is used to respond to sound source position calculation commands, control each microphone array group to collect sound information in the current environment, and calculate the angle of each sound source with respect to the sound source position. The clustering module is used to cluster the angles of each sound source based on cluster analysis methods to obtain a preset number of clusters; An angle determination module is used to determine the final target cluster corresponding to the sound source position in each cluster, and to determine the final sound source angle of the sound source position based on the sound source angle in the final target cluster. The angle determination module is also used to count the number of sound source angles in each cluster. If there is no first target cluster with the most and only one sound source angle, the cluster with the most sound source angles is determined as the second target cluster, and the concentration of sound source angles in each second target cluster is calculated. If there is a second target cluster with the smallest and only one concentration, the second target cluster with the smallest and only one concentration is taken as the final target cluster corresponding to the sound source location. If there is a first target cluster with the most and only one sound source angle, the first target cluster is taken as the final target cluster corresponding to the sound source location. Each microphone array group has a preset acquisition angle. The angle determination module is further used to: if there is no first target cluster with the most and only one sound source angle, then determine the cluster with the most sound source angles as the second target cluster, and calculate the center sound source angle corresponding to each second target cluster; calculate the number of target sound source angles in each second target cluster based on each center sound source angle, wherein the preset acquisition angle of the microphone array group corresponding to the target sound source angle covers the center sound source angle of the second target cluster corresponding to the target sound source angle; The angle determination module is further configured to: if there exists a second target cluster with the largest number of unique target sound source angles, then take the second target cluster with the largest number of unique target sound source angles as the final target cluster corresponding to the sound source location; if there is no second target cluster with the smallest concentration and uniqueness, and the first angle difference between the center sound source angles corresponding to each second target cluster is within a preset angle difference range, then take the average of the center sound source angles corresponding to each second target cluster as the final sound source angle of the sound source location; or if there is no second target cluster with the smallest concentration and uniqueness, then determine the final sound source angle of the sound source location based on the historical final sound source angle of the sound source location and the center sound source angles corresponding to each second target cluster.
7. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are loaded and executed by a processor to cause the processor to perform the steps of the method as described in any one of claims 1 to 5.
8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
K mean value clustering iteration based UAV sound source positioning method
CN108363041A
