A sound source positioning method and device, electronic equipment and storage medium
By deploying microphones in different directions around the sound source area and adjusting the sound source localization function in combination with the sound pressure level attenuation coefficient of the sound source environment, the problems of environmental adaptability and high hardware requirements in the existing technology are solved, and fast, low-cost and high-precision sound source localization is achieved.
Patent Information
- Application Number
- CN202411016668.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2044-07-26
AI Technical Summary
Existing sound source localization technology has deficiencies in environmental adaptability, algorithm complexity and hardware requirements, making it difficult to achieve high-precision sound source localization in different environments.
At least three microphones in different directions are deployed around the sound source area, the spatial rectangular coordinate data and sound pressure level data of the microphones are determined, and the sound source localization function is adjusted according to the sound pressure level attenuation coefficient of the sound source area environment, and positioning is performed using the sound pressure level data and spatial rectangular coordinate data.
It achieves fast, low-cost, and high-precision sound source localization in different environments, simplifies the algorithm and improves environmental adaptability.
Smart Images

Figure CN118938133B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of sound source localization, and in particular to a sound source localization method, device, electronic device, and storage medium. Background Art
[0002] Sound source localization technology is a technique for determining the direction and location of a sound source and is widely used in military, security, autonomous driving, smart home, and other fields. Currently, there are many algorithms and technologies for sound source localization on the market, but their flaws and shortcomings are quite obvious, mainly reflected in the following aspects: 1. Environmental adaptability. Different environments (such as indoors, outdoors, cities, and rural areas) pose different challenges to sound source localization systems, and current technologies cannot fully adapt to all environments; 2. Algorithmic complexity. High-precision sound source localization often requires complex algorithms, which increases the computational burden and is sometimes difficult to implement on devices with limited resources; 3. High hardware requirements. Existing technologies generally use sound intensity microphones for sound source localization. The layout, quantity, and quality of the array will affect the accuracy of sound source localization. Summary of the Invention
[0003] The present application provides a sound source localization method, device, electronic device and storage medium, which can quickly locate the target sound source, with simple algorithm, low hardware cost and strong environmental adaptability.
[0004] According to one aspect of the present application, a sound source localization method is provided, the method comprising:
[0005] Deploy at least three microphones around the sound source area; wherein different microphones are distributed in different directions;
[0006] Determining spatial rectangular coordinate data of the microphone and sound pressure level data measured by the microphone;
[0007] Adjusting a predetermined sound source localization function according to a sound pressure level attenuation coefficient of an environment in which the sound source area is located to obtain a target sound source localization function;
[0008] The target sound source in the sound source area is located according to the sound pressure level data, the spatial rectangular coordinate data and the target sound source localization function.
[0009] According to another aspect of the present application, a sound source localization device is provided, the device comprising:
[0010] A microphone deployment module is used to deploy at least three microphones around the sound source area; wherein the distribution directions of different microphones are different;
[0011] a data acquisition module, configured to determine spatial rectangular coordinate data of the microphone and sound pressure level data measured by the microphone;
[0012] a function determination module, configured to adjust a predetermined sound source localization function according to a sound pressure level attenuation coefficient of an environment in which the sound source area is located, to obtain a target sound source localization function;
[0013] A sound source localization module is used to locate the target sound source in the sound source area according to the sound pressure level data, the spatial rectangular coordinate data and the target sound source localization function.
[0014] According to another aspect of the present application, an electronic device is provided, comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the sound source localization method according to any embodiment of the present invention.
[0018] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the sound source localization method according to any embodiment of the present invention when executed.
[0019] The technical solution of the embodiment of the present application is to deploy at least three microphones around the sound source area; wherein different microphones have different distribution orientations; determine the spatial rectangular coordinate data of the microphones, and the sound pressure level data measured by the microphones; adjust the predetermined sound source localization function according to the sound pressure level attenuation coefficient of the environment in which the sound source area is located to obtain a target sound source localization function; locate the target sound source in the sound source area according to the sound pressure level data, the spatial rectangular coordinate data and the target sound source localization function. The technical solution of the embodiment of the present application is to quickly locate the target sound source according to the sound pressure level data and spatial rectangular coordinate data of the microphones deployed in the sound source area, through the target sound source localization function obtained by adjusting the sound pressure level attenuation coefficient of the sound source environment. The algorithm is simple, the hardware cost is low, and the environmental adaptability is strong.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 This is a flow chart of a sound source localization method provided according to the first embodiment of the present application;
[0023] Figure 2 Schematic diagram of a spatial rectangular coordinate system with the centroid of the sound source area as the coordinate origin provided according to the first embodiment of the present application;
[0024] Figure 3 This is a flow chart of a sound source localization method provided according to the second embodiment of the present application;
[0025] Figure 4 This is a schematic diagram of the target sound source position provided according to the second embodiment of the present application;
[0026] Figure 5 1 is a structural diagram of a sound source localization device provided according to the third embodiment of the present application;
[0027] Figure 6 Schematic diagram of the structure of an electronic device for implementing the sound source localization method of an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described 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 making creative efforts should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Example 1
[0031] Figure 1 A flow chart of a sound source localization method is provided for the first embodiment of the present application. This embodiment is applicable to the case of quickly localizing a sound source in a sound source area under various environments. The method can be performed by a sound source localization device, which can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0032] S110: deploy a preset number of microphones around the sound source area; wherein different microphones are distributed in different directions.
[0033] The sound source region is an ideal geometric body equivalent to the object / device to be localized, facilitating subsequent calculations. Microphones are used to collect sound signals from the sound source region at different locations around it to obtain sound pressure level data at that location.
[0034] In the embodiment of the present application, at least three microphones can be deployed around the sound source area, and the specific location depends on the on-site environment of the sound source area and the required positioning accuracy. It should be noted that when deploying at least three microphones, the distribution directions of different microphones are different.
[0035] Optionally, the method can be used to detect noise in motors. It is understood that when using this method for noise detection, the accuracy and efficiency of noise localization depend on the number of microphones. More microphones increase the accuracy of noise localization, while correspondingly decreasing the efficiency. In specific application scenarios, the number of microphones can be set based on actual needs.
[0036] Preferably, at least three microphones are deployed around the sound source area, including: at least five microphones are deployed around the sound source area of the motor; wherein the microphones are located on a hemispherical surface covering the sound source area, and different microphones are distributed in different directions.
[0037] In an embodiment of the present application, when locating the sound source in the motor, the motor can be equivalent to an ideal cuboid according to the size of the motor, and the ideal cuboid is the sound source area of the motor. Afterwards, at least five microphones can be deployed on a hemispherical surface covering the sound source area to ensure the positioning accuracy of the sound source in the motor. The size of the hemispherical surface depends on the on-site environment of the sound source area of the motor and the required positioning accuracy. It should be noted that when deploying the microphones, at least five microphones need to be deployed at different positions in the sound source area. For example, the microphones can be deployed at measuring points in the top, front, back, left, right and other directions of the sound source area, and the positions of the measuring points can change with changes in different on-site environments.
[0038] S120: Determine spatial rectangular coordinate data of the microphone and sound pressure level data measured by the microphone.
[0039] Among them, the spatial rectangular coordinate data of the microphone is used to accurately describe the spatial position of the measurement point where the microphone is located, and the sound pressure level data measured by the microphone is used to objectively describe the sound pressure at the measurement point where the microphone is located. By determining the difference in sound pressure level data between microphones at different positions, the direction of sound wave propagation can be estimated.
[0040] In an embodiment of the present application, a suitable location can be selected to establish a spatial rectangular coordinate system, which includes the sound source area and at least three microphones, and the spatial position of the measuring point where the microphone is located can be determined through the spatial rectangular coordinate data of the microphone. Furthermore, the relative position relationship between the measuring point where the microphone is located and the sound source area, as well as the relative position relationship between the measuring points where different microphones are located, can be determined.
[0041] Optionally, determining the spatial rectangular coordinate data of the microphone includes: establishing a spatial rectangular coordinate system with the center of mass of the sound source area as the coordinate origin; determining the position of the microphone in the spatial rectangular coordinate system to obtain the coordinate data of the microphone.
[0042] The centroid of the sound source area is the geometric center point of the ideal geometric body representing the sound source area. In an embodiment of the present application, the centroid of the sound source area can be used as the coordinate origin to establish a spatial rectangular coordinate system, determine the position of the microphone in the spatial rectangular coordinate system, and obtain the coordinate data of the microphone. A spatial rectangular coordinate system is established with the centroid of the sound source area as the coordinate origin. After determining the coordinates of the microphone in the spatial rectangular coordinate system, the relative position relationship between the measurement point where the microphone is located and the sound source area can be more intuitively judged by the quadrant in which the coordinates are located.
[0043] For example, Figure 2 A schematic diagram of a spatial rectangular coordinate system with the center of mass of the sound source area as the coordinate origin is shown in FIG. Figure 2 As shown in the figure, the rectangular parallelepiped is the sound source area equivalent to the permanent magnet motor, with dimensions of 300mm, 150mm, and 150mm. The five five-pointed stars in the figure are microphones deployed at measurement points in the top, front, back, left, and right directions of the sound source area. The measurement points are 50mm away from the surface of the rectangular parallelepiped. The spatial rectangular coordinates of each microphone are: top (125, 0, 0), left (0, -125, 0), right (0, 125, 0), front (0, 0, 200), and back (0, 0, -200).
[0044] S130 : Adjust the predetermined sound source localization function according to the sound pressure level attenuation coefficient of the environment in which the sound source area is located to obtain a target sound source localization function.
[0045] The sound pressure attenuation coefficient is a physical quantity that describes the attenuation of sound pressure levels with distance during sound wave propagation. It is affected by various factors, such as ambient temperature, humidity, and noise. Therefore, the sound pressure attenuation coefficient must be calibrated in the field for different environments. The sound source localization function uses the propagation characteristics of sound waves and the relative position of microphones to determine the specific location of the sound source. The target sound source localization function is obtained by adjusting the sound source localization function. It is applicable to the environment in which the sound source is located and can significantly reduce the impact of environmental factors on sound source localization.
[0046] Optionally, adjusting a predetermined sound source localization function according to the sound pressure level attenuation coefficient of the environment in which the sound source area is located to obtain a target sound source localization function includes: determining an adjustment parameter in the sound source localization function set for the sound pressure level attenuation coefficient of different environments; and using the sound pressure level attenuation coefficient of the environment in which the sound source area is located as the value of the adjustment parameter to obtain the target sound source localization function.
[0047] In the embodiment of the present application, when predetermining the sound source localization function, it is necessary to consider the attenuation from the sound source to the measurement point. Optionally, the predetermined sound source localization function is as follows:
[0048] E(x,y,z)=(ΔSPL-k*d(x,y,z)) 2 ;
[0049] Where E(x, y, z) is the sound source localization function, (x, y, z) is the spatial rectangular coordinates of the sound source, and ΔSPL is the difference in sound pressure levels between the microphones at two different measurement points. k is an adjustment parameter set for the sound pressure level attenuation coefficient in different environments. By changing the value of the adjustment parameter, the sound source localization function can be adapted to various environments. d(x, y, z) is the absolute value of the difference in distance from the microphones to the sound source at two different measurement points. d(x, y, z) can be calculated using the following formula:
[0050] d(x, y, z) = |d1-d2|;
[0051]
[0052] Among them, d1 and d2 are the distances from the first microphone to the sound source and the distance from the second microphone to the sound source at two different measurement points, respectively. (x i ,y i , z i ) is the spatial rectangular coordinate of the i-th microphone among the microphones at two different measuring points.
[0053] In this embodiment, after calibrating the sound pressure level attenuation coefficient of the sound source area's environment, this attenuation coefficient is used as an adjustment parameter and substituted into the sound source localization function to obtain a target sound source localization function suitable for the environment in which the sound source area resides. Using the target sound source localization function for sound source localization can significantly reduce the impact of environmental factors on sound source localization, thereby improving sound source localization accuracy.
[0054] S140: Position the target sound source within the sound source area according to the sound pressure level data, the spatial rectangular coordinate data, and the target sound source positioning function.
[0055] In an embodiment of the present application, the sound pressure level data measured by the microphone can be used to determine the propagation characteristics of the target sound source, and the spatial rectangular coordinate data of the microphone can be used to determine the relative positional relationship between different microphones. Therefore, after obtaining the target sound source localization function, the sound pressure level data measured by the microphone and the spatial rectangular coordinate data of the microphone can be processed, and the processed data can be substituted into the target sound source localization function to determine the specific position of the target sound source based on the propagation characteristics of the target sound source and the relative positional relationship between the microphones through the target sound source localization function.
[0056] In embodiments of the present application, the method proposed herein can also be combined with spectrum analysis to determine the target sound source location at different frequencies. By analyzing the spectrum in the sound source peak spectrum diagram, sound pressure level data at the corresponding frequency can be obtained. Combined with the method proposed herein to determine the sound source location at the corresponding frequency, the location of the component corresponding to the peak can be reflected, helping researchers to more accurately identify problematic components and assisting designers in making corresponding modifications to achieve the purpose of vibration and noise reduction.
[0057] The technical solution of the embodiment of the present application is to deploy at least three microphones around the sound source area; wherein different microphones are distributed in different directions; determine the spatial rectangular coordinate data of the microphones, and the sound pressure level data measured by the microphones; adjust the predetermined sound source localization function according to the sound pressure level attenuation coefficient of the environment in which the sound source area is located to obtain the target sound source localization function; locate the target sound source in the sound source area according to the sound pressure level data, the spatial rectangular coordinate data and the target sound source localization function. The technical solution of the embodiment of the present application is to quickly locate the target sound source according to the sound pressure level data and the spatial rectangular coordinate data of the microphones deployed in the sound source area, through the target sound source localization function obtained by adjusting the sound pressure level attenuation coefficient of the sound source environment. The algorithm is simple, the hardware cost is low, and the environmental adaptability is strong.
[0058] Example 2
[0059] Figure 3 This is a flow chart of a sound source localization method provided in the second embodiment of the present application. The present embodiment is optimized based on the above embodiment. For solutions not described in detail in the present embodiment, please refer to the above embodiment. Figure 3 As shown, the method includes:
[0060] S210: Deploy at least three microphones around the sound source area; wherein different microphones are distributed in different directions.
[0061] S220: Determine spatial rectangular coordinate data of the microphone and sound pressure level data measured by the microphone.
[0062] S230: In the environment where the sound source area is located, set a test sound source and at least two test microphones at different distances from the test sound source.
[0063] For different environments, the sound pressure level attenuation coefficient needs to be obtained through calibration in the on-site environment. Therefore, in an embodiment of the present application, a test sound source and at least two test microphones at different distances from the test sound source can be set in the environment where the sound source area is located, and the sound pressure level data obtained by measuring the test sound source by at least two test microphones can be determined to determine the sound pressure level attenuation coefficient of the environment described in the sound source area.
[0064] S240: Determine a sound pressure level attenuation coefficient of an environment in which the sound source area is located based on a difference in sound pressure level data measured by the test microphones and a distance between the test microphones.
[0065] In an embodiment of the present application, after obtaining sound pressure level data from a test sound source using at least two test microphones, the sound pressure level attenuation coefficient of the environment in which the sound source is located can be determined based on the difference in sound pressure level data from any two test microphones and the distance between the two test microphones. Optionally, the sound pressure level attenuation coefficient can be calculated using the following formula:
[0066]
[0067] Where m represents the sound pressure level attenuation coefficient of the environment in which the sound source area is located, ΔSPL1 represents the sound pressure level difference between the two test microphones, and Δr represents the distance between the two test microphones.
[0068] S250: Adjust the predetermined sound source localization function according to the sound pressure level attenuation coefficient of the environment in which the sound source area is located to obtain a target sound source localization function.
[0069] S260: Group the microphones according to a preset grouping method, and determine the sound pressure level data and spatial rectangular coordinate data of each group of microphones.
[0070] In the embodiment of the present application, the microphones are grouped according to a preset grouping method, that is, for each of the at least three microphones, it is grouped with any other microphone at a different position until the at least three microphones are grouped in pairs. Figure 2 The five microphones shown in the upper, front, rear, left, and right directions can be divided into 10 groups according to a preset grouping method: upper front, upper rear, upper left, upper right, right front, right rear, right left, left front, left rear, and front and back, and arranged in sequence from 1 to 10. The sound pressure level data and spatial rectangular coordinate data of the two microphones in each group can then be determined.
[0071] S270 , using a target sound source localization function, and according to the sound pressure level data and spatial rectangular coordinate data of each group of microphones, localize the target sound source within the sound source area.
[0072] In an embodiment of the present application, the sound pressure level data and spatial rectangular coordinate data of each group of microphones can be processed, and the processed data can be substituted into the target sound source localization function to locate the target sound source in the sound source area using the target sound source localization function.
[0073] Optionally, the target sound source in the sound source area is located according to the sound pressure level data and spatial rectangular coordinate data of each group of microphones through the target sound source localization function, including: determining the sound pressure level difference of the group of microphones according to the sound pressure level data of the group of microphones, substituting the sound pressure level difference and the spatial rectangular coordinate data into the target sound source localization function; derivatizing the target sound source localization function to determine the target spatial rectangular coordinates corresponding to when the target sound source localization function converges, and taking the position corresponding to the target spatial rectangular coordinates as the position of the target sound source.
[0074] In an embodiment of the present application, the sound pressure level difference ΔSPL of each microphone group can be determined based on the sound pressure level data of the microphone group, and then the sound pressure level difference ΔSPL of the microphone group and the spatial rectangular coordinates of the microphone group are substituted into the target sound source localization function. Here, assuming that the spatial rectangular coordinates of the microphone group are (R, S, T) and (U, V, W) respectively, the sound pressure level difference ΔSPL of the microphone group and the spatial rectangular coordinates of the microphone group are substituted into the target sound source localization function, and the following formula can be obtained:
[0075]
[0076] After that, the target sound source localization function is derived and the following results are obtained:
[0077]
[0078] Where E1(x, y, z) is the target sound source localization function, (x, y, z) is the spatial rectangular coordinate of the target sound source, and ΔSPL is the sound pressure level difference of the group of microphones. k is the adjustment parameter set for the sound pressure level attenuation coefficient of different environments. Here, it is taken as the sound pressure level attenuation coefficient m of the environment where the sound source area is located. (R, S, T) and (U, V, W) are the spatial rectangular coordinates of the first microphone and the second microphone in the group, respectively. d1 is the distance from the first microphone in the group to the target sound source, which can be expressed as d2 is the distance from the second microphone in the group to the target sound source, which can be expressed as
[0079] Afterwards, based on the target sound source localization function and the derivative of the target function localization function, the target space rectangular coordinates corresponding to the convergence of the target sound source localization function can be determined, and the position corresponding to the target space rectangular coordinates can be used as the position of the target sound source to complete the precise positioning of the target sound source in the sound source area.
[0080] Optionally, the target sound source localization function is differentiated to determine the target spatial rectangular coordinates corresponding to when the target sound source localization function converges, including: estimating the position of the target sound source and determining the initial spatial rectangular coordinates of the estimated position; judging whether the target sound source localization function converges at the initial spatial rectangular coordinates, and if so, using the initial spatial rectangular coordinates as the target spatial rectangular coordinates; if not, iteratively updating the initial spatial rectangular coordinates according to the derivative result of the target sound source localization function and a preset step size until the target sound source localization function converges at the initial spatial rectangular coordinates.
[0081] In an embodiment of the present application, before locating the target sound source using the target sound source localization function, the position of the target sound source can be estimated based on experience, and the initial spatial rectangular coordinates of the estimated position can be determined to reduce the amount of calculation and improve positioning efficiency. For example, when locating the sound source of a motor, the position of the stator can be used as the estimated position of the sound source based on engineering experience. Afterwards, the target spatial rectangular coordinates of the target sound source are determined by judging whether the target sound source localization function converges at the initial spatial rectangular coordinates. Specifically, if the target sound source localization function converges at the initial spatial rectangular coordinates, the initial spatial rectangular coordinates are used as the target spatial rectangular coordinates. Otherwise, the initial spatial rectangular coordinates are iteratively updated according to the derivative result of the target sound source localization function and the preset step size until the target sound source localization function converges at the initial spatial rectangular coordinates.
[0082] Optionally, according to the derivative result of the target sound source localization function and the preset step size, the specific formula for iteratively updating the initial spatial rectangular coordinates is as follows:
[0083]
[0084] Among them, (x n ,y n , z n ) is the initial space rectangular coordinate, n represents the number of iterations, Represents the derivative result of the target sound source localization function, and α represents the preset step size. The preset step size is used to control the length of the initial spatial rectangular coordinate update in each iteration process. Reasonable control of the step size can effectively control the calculation time and calculation accuracy. Optionally, an exponential step size attenuation strategy can be adopted to quickly determine the target spatial rectangular coordinates at the convergence point of the target sound source localization function, so as to achieve the effect of quickly locating the sound source. The principle is that the preset step size α exponentially decays with the increase of the number of iterations n, which can be expressed as the following formula:
[0085] α n+1 =α n *γ n ;
[0086] Among them, α n Indicates the current preset step size, α n+1 Represents the preset step size for the next iteration, and γ is a hyperparameter. Optionally, the preset step size and hyperparameter can be set to 0.1 and 0.99 according to general rules. Thus, the target sound source within the sound source area can be located based on the sound pressure level data and spatial rectangular coordinate data of each group of microphones. Exemplarily, based on the grouping results in step S260, the target sound source within the sound source area is located using the sound pressure level data and spatial rectangular coordinate data of each group of microphones, and the positioning results of the target sound source shown in Table 1 below can be obtained.
[0087] Table 1 Target sound source localization results
[0088]
[0089]
[0090] Afterwards, the position represented by the target space rectangular coordinates of the target sound source can be marked in the sound source area according to the target sound source localization result in Table 1. For example, Figure 4 Shows a schematic diagram of the target sound source position. Figure 4 The target sound source position in the figure, combined with the general assembly drawing, shows that the sound source position is concentrated in the stator winding and bearing, which is consistent with the motor noise characteristics.
[0091] The technical solution of the embodiment of the present application is to deploy at least three microphones around the sound source area; wherein different microphones have different distribution orientations; determine the spatial rectangular coordinate data of the microphones and the sound pressure level data measured by the microphones; set a test sound source and at least two test microphones at different distances from the test sound source in the environment where the sound source area is located; determine the sound pressure level attenuation coefficient of the environment where the sound source area is located based on the difference in sound pressure level data measured by the test microphones and the distance between the test microphones; adjust a predetermined sound source localization function based on the sound pressure level attenuation coefficient of the environment where the sound source area is located to obtain a target sound source localization function; group the microphones according to a preset grouping method, and determine the sound pressure level data and spatial rectangular coordinate data of each group of microphones; and locate the target sound source within the sound source area based on the sound pressure level data and spatial rectangular coordinate data of each group of microphones through the target sound source localization function. The technical solution of the embodiment of the present application uses a target sound source localization function obtained by adjusting the sound pressure level attenuation coefficient of the sound source environment to quickly locate the target sound source based on the sound pressure level data of the microphones deployed in the sound source area and the spatial rectangular coordinate data. The algorithm is simple, the hardware cost is low, and the environmental adaptability is strong.
[0092] Example 3
[0093] Figure 5This is a structural diagram of a sound source localization device provided in Example 3 of this application. Figure 5 As shown, the device includes:
[0094] A microphone deployment module 310 is configured to deploy at least three microphones around a sound source area, wherein different microphones are deployed in different directions;
[0095] A data acquisition module 320 is configured to determine spatial rectangular coordinate data of the microphone and sound pressure level data measured by the microphone;
[0096] A function determination module 330 is configured to adjust a predetermined sound source localization function according to a sound pressure level attenuation coefficient of an environment in which the sound source area is located, to obtain a target sound source localization function;
[0097] The sound source localization module 340 is configured to locate the target sound source within the sound source area according to the sound pressure level data, the spatial rectangular coordinate data, and the target sound source localization function.
[0098] Optionally, the data acquisition module 320 includes:
[0099] A coordinate system establishing unit, configured to establish a spatial rectangular coordinate system with the center of mass of the sound source area as the coordinate origin;
[0100] The coordinate determining unit is used to determine the position of the microphone in the spatial rectangular coordinate system to obtain coordinate data of the microphone.
[0101] Optionally, the device further includes:
[0102] The test microphone deployment module is used to set a test sound source and at least two test microphones at different distances from the test sound source in the environment where the sound source area is located.
[0103] The sound pressure level attenuation coefficient determination module is used to determine the sound pressure level attenuation coefficient of the environment in which the sound source area is located according to the difference in sound pressure level data measured by the test microphones and the distance between the test microphones.
[0104] Optionally, the predetermined sound source localization function is as follows:
[0105] E(x,y,z)=(ΔSPL-k*d(x,y,z)) 2 ;
[0106] Where E(x, y, z) is the sound source localization function, (x, y, z) is the spatial rectangular coordinate of the sound source, ΔSPL is the sound pressure level difference between two microphones at different distribution orientations, k is the adjustment parameter set for the sound pressure level attenuation coefficient for different environments, and d(x, y, z) is the absolute value of the difference in distance from the two microphones at different distribution orientations to the sound source;
[0107] Optionally, the function determination module 330 includes:
[0108] an adjustment parameter determination unit, configured to determine an adjustment parameter for setting the sound pressure level attenuation coefficient for different environments in the sound source localization function;
[0109] The function determination unit is configured to use the sound pressure level attenuation coefficient of the environment in which the sound source area is located as the value of the adjustment parameter to obtain a target sound source localization function.
[0110] Optionally, the sound source localization module 340 includes:
[0111] a microphone grouping unit, configured to group the microphones according to a preset grouping method and determine the sound pressure level data and spatial rectangular coordinate data of each group of microphones;
[0112] The sound source localization unit is configured to locate the target sound source in the sound source area according to the sound pressure level data and spatial rectangular coordinate data of each group of microphones using a target sound source localization function.
[0113] Optionally, the sound source localization unit includes:
[0114] a data substitution subunit, configured to determine a sound pressure level difference of each group of microphones based on the sound pressure level data of the group of microphones, and substitute the sound pressure level difference and the spatial rectangular coordinate data into the target sound source localization function;
[0115] The sound source localization subunit is configured to derive the target sound source localization function, determine the target space rectangular coordinates corresponding to when the target sound source localization function converges, and use the position corresponding to the target space rectangular coordinates as the position of the target sound source.
[0116] Optionally, the sound source localization subunit is specifically configured to:
[0117] estimating the position of the target sound source and determining the initial spatial rectangular coordinates of the estimated position;
[0118] Determine whether the target sound source localization function converges at the initial spatial rectangular coordinates. If so, use the initial spatial rectangular coordinates as the target spatial rectangular coordinates. If not, iteratively update the initial spatial rectangular coordinates according to a derivative result of the target sound source localization function and a preset step size until the target sound source localization function converges at the initial spatial rectangular coordinates.
[0119] Optionally, the method is used to detect noise of a motor.
[0120] Optionally, the microphone deployment module 310 is specifically configured to:
[0121] At least five microphones are deployed around the sound source area of the motor; wherein the microphones are located on a hemispherical surface covering the sound source area, and the distribution orientations of different microphones are different.
[0122] The sound source localization device provided in the embodiment of the present application can execute the sound source localization method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0123] Example 4
[0124] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0125] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0126] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0127] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the sound source localization method.
[0128] In some embodiments, the sound source localization method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the sound source localization method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the sound source localization method in any other appropriate manner (e.g., by means of firmware).
[0129] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0130] Computer programs used to practice the methods of the application can be written in any combination of one or more programming languages. These computer programs can be implemented on general-purpose computers, special purpose computers, or other programmable data processing apparatus to produce the functions / acts specified in the flow diagrams and / or block diagrams. Computer programs can be applied to a data changed on the functioning of the computer or processing apparatus by transforming the programming language into a machine language.
[0131] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0132] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0133] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0134] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0135] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0136] The above specific embodiments do not constitute a limitation on the scope of protection of this application. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of this application.
Claims
1. A sound source localization method, characterized in that: The method comprises: Deploy at least three microphones around the sound source area; wherein different microphones are distributed in different directions; Determining spatial rectangular coordinate data of the microphone and sound pressure level data measured by the microphone; Adjusting a predetermined sound source localization function according to a sound pressure level attenuation coefficient of an environment in which the sound source area is located to obtain a target sound source localization function; Positioning a target sound source within the sound source area according to the sound pressure level data, the spatial rectangular coordinate data, and the target sound source positioning function; The predetermined sound source localization function is as follows: ; in, is the sound source localization function, is the spatial rectangular coordinate of the sound source, is the difference in sound pressure levels between two microphones at different distribution positions, Adjustment parameters for sound pressure level attenuation coefficient settings for different environments, is the absolute value of the difference between the distances from the microphones at two different distribution positions to the sound source; Adjusting a predetermined sound source localization function according to a sound pressure level attenuation coefficient of an environment in which the sound source area is located to obtain a target sound source localization function includes: Determining adjustment parameters for sound pressure level attenuation coefficients in the sound source localization function for different environments; Taking the sound pressure level attenuation coefficient of the environment in which the sound source area is located as the value of the adjustment parameter to obtain a target sound source localization function; Positioning a target sound source within the sound source area according to the sound pressure level data, the spatial rectangular coordinate data, and the target sound source localization function includes: The microphones are grouped according to a preset grouping method, and sound pressure level data and spatial rectangular coordinate data of each group of microphones are determined; Positioning the target sound source within the sound source area according to the sound pressure level data and spatial rectangular coordinate data of each group of microphones using a target sound source localization function; The target sound source in the sound source area is located according to the sound pressure level data and spatial rectangular coordinate data of each group of microphones using a target sound source localization function, including: Determine the sound pressure level difference of each group of microphones according to the sound pressure level data of the group of microphones, and substitute the sound pressure level difference and the spatial rectangular coordinate data into the target sound source localization function; The target sound source localization function is differentiated to determine the target space rectangular coordinates corresponding to when the target sound source localization function converges, and the position corresponding to the target space rectangular coordinates is used as the position of the target sound source.
2. The method according to claim 1, characterized in that Determining spatial rectangular coordinate data of the microphone includes: Establishing a spatial rectangular coordinate system with the center of mass of the sound source area as the coordinate origin; The position of the microphone in the spatial rectangular coordinate system is determined to obtain coordinate data of the microphone.
3. The method according to claim 1, characterized in that Before adjusting the predetermined sound source localization function according to the sound pressure level attenuation coefficient of the environment in which the sound source area is located to obtain the target sound source localization function, the method further includes: In the environment where the sound source area is located, a test sound source and at least two test microphones at different distances from the test sound source are provided; The sound pressure level attenuation coefficient of the environment in which the sound source area is located is determined according to the difference in sound pressure level data measured by the test microphones and the distance between the test microphones.
4. The method according to claim 1, wherein Derivative the target sound source localization function to determine the target space rectangular coordinates corresponding to the convergence of the target sound source localization function, including: estimating the position of the target sound source and determining the initial spatial rectangular coordinates of the estimated position; Determine whether the target sound source localization function converges at the initial spatial rectangular coordinates. If so, use the initial spatial rectangular coordinates as the target spatial rectangular coordinates. If not, iteratively update the initial spatial rectangular coordinates according to a derivative result of the target sound source localization function and a preset step size until the target sound source localization function converges at the initial spatial rectangular coordinates.
5. The method according to claim 1, wherein The method is used to detect noise of a motor.
6. The method according to claim 5, characterized in that Place at least three microphones around the sound source area, including: At least five microphones are deployed around the sound source area of the motor; wherein the microphones are located on a hemispherical surface covering the sound source area, and the distribution orientations of different microphones are different.
7. A sound source localization device, characterized in that: The device comprises: A microphone deployment module is used to deploy at least three microphones around the sound source area; wherein the distribution directions of different microphones are different; a data acquisition module, configured to determine spatial rectangular coordinate data of the microphone and sound pressure level data measured by the microphone; a function determination module, configured to adjust a predetermined sound source localization function according to a sound pressure level attenuation coefficient of an environment in which the sound source area is located, to obtain a target sound source localization function; a sound source localization module, configured to locate a target sound source within the sound source area according to the sound pressure level data, the spatial rectangular coordinate data, and the target sound source localization function; The predetermined sound source localization function is as follows: ; in, is the sound source localization function, is the spatial rectangular coordinate of the sound source, is the difference in sound pressure levels between two microphones at different distribution positions, Adjustment parameters for sound pressure level attenuation coefficient settings for different environments, is the absolute value of the difference between the distances from the microphones at two different distribution positions to the sound source; The function determination module includes: an adjustment parameter determination unit, configured to determine an adjustment parameter for setting the sound pressure level attenuation coefficient for different environments in the sound source localization function; a function determination unit, configured to use the sound pressure level attenuation coefficient of the environment in which the sound source area is located as the value of the adjustment parameter to obtain a target sound source localization function; The sound source localization module includes: a microphone grouping unit, configured to group the microphones according to a preset grouping method and determine the sound pressure level data and spatial rectangular coordinate data of each group of microphones; a sound source localization unit, configured to locate a target sound source within the sound source area according to the sound pressure level data and spatial rectangular coordinate data of each group of microphones using a target sound source localization function; The sound source localization unit includes: a data substitution subunit, configured to determine a sound pressure level difference of each group of microphones based on the sound pressure level data of the group of microphones, and substitute the sound pressure level difference and the spatial rectangular coordinate data into the target sound source localization function; The sound source localization subunit is configured to derive the target sound source localization function, determine the target space rectangular coordinates corresponding to when the target sound source localization function converges, and use the position corresponding to the target space rectangular coordinates as the position of the target sound source.
Citation Information
Patent Citations
Audio information processing method and conference terminal thereof
CN106954126A
Broadband sound source localization method based on compressed sensing
CN110221249A