A sound source positioning method and device, electronic equipment and medium
Patent Information
- Application Number
- CN202311458288.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-11-03
AI Technical Summary
而当反射的声波的能量值大于正常声源发出的声波的能量值,即反射峰出现时,现有技术通常会认为反射峰的方向为声源方向,导致声源定位不准确
[0018]本申请实施例的技术方案,根据预设时段内接收的声音信号进行声源定位,确定稳定声源角度以及对应的稳定声音信号;逐帧遍历预设时段内的声音信号,确定在目标帧接收的声音信号中所述稳定声源角度对应的参考声音信号,以及能量最大的最大声音信号;根据所述稳定声音信号、所述参考声音信号以及所述最大声音信号,确定目标帧对应的实际声源角度。上述方案能够通过稳定声音角度对应的稳定声音信号、最大声音信号以及参考声音信号的特征,准确地判断能量最大的最大声音信号是否为反射峰,在最大声音信号为反射峰的情况下,不再依据最大声音信号进行声源定位,消除了反射峰对声源定位的影响,避免反射峰的信号强度最大时将反射峰的角度误判为声源角度,从而提高了声源定位的准确性。
Smart Images

Figure CN117538825B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a sound source localization method, apparatus, electronic device, and medium. Background Technology
[0002] In audio processing algorithms, sound source localization algorithms play a significant role in many applications, and the accuracy of sound source localization is the most crucial issue. Sound source localization involves quantifying the energy value of the sound, and the direction of the highest energy value is typically considered the direction of the sound source.
[0003] During the sound emission process, sound waves emitted by a sound source are reflected (commonly known as echoes) due to the influence of surrounding objects or the specific location of the sound source. The energy value of the reflected sound waves is usually less than that of normal speech, and reflections of ordinary sound waves can currently be eliminated. However, when the energy value of the reflected sound waves is greater than that of the sound waves emitted by the normal sound source, i.e., a reflection peak appears, existing technology usually assumes the direction of the reflection peak to be the direction of the sound source, leading to inaccurate sound source localization. Summary of the Invention
[0004] This application provides a sound source localization method, apparatus, electronic device, and medium to eliminate the influence of reflection peaks on sound source localization and improve the accuracy of sound source localization.
[0005] According to one aspect of this application, a sound source localization method is provided, the method comprising:
[0006] Based on the sound signals received within a preset time period, the sound source is located, and the stable sound source angle and the corresponding stable sound signal are determined.
[0007] The sound signals within a preset time period are traversed frame by frame to determine the reference sound signal corresponding to the stable sound source angle in the sound signals received in the target frame, as well as the maximum sound signal with the highest energy.
[0008] The actual sound source angle corresponding to the target frame is determined based on the stable sound signal, the reference sound signal, and the maximum sound signal.
[0009] According to one aspect of this application, a sound source localization device is provided, the device comprising:
[0010] The stable sound source angle determination module is used to locate the sound source based on the sound signal received within a preset time period, and to determine the stable sound source angle and the corresponding stable sound signal.
[0011] The traversal module is used to traverse the sound signals within a preset time period frame by frame, and determine the reference sound signal corresponding to the stable sound source angle in the sound signals received in the target frame, as well as the maximum sound signal with the largest energy.
[0012] The actual sound source angle determination module is used to determine the actual sound source angle corresponding to the target frame based on the stable sound signal, the reference sound signal, and the maximum sound signal.
[0013] According to another aspect of this application, an electronic device is provided, the electronic device comprising:
[0014] At least one processor; and
[0015] A memory that is communicatively connected to at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the sound source localization method of any embodiment of this application.
[0017] According to another aspect of this application, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the sound source localization method of any embodiment of this application.
[0018] The technical solution of this application embodiment performs sound source localization based on the sound signals received within a preset time period, determining the stable sound source angle and the corresponding stable sound signal; iterates through the sound signals within the preset time period frame by frame, determining the reference sound signal corresponding to the stable sound source angle in the sound signals received in the target frame, as well as the maximum sound signal with the highest energy; based on the stable sound signal, the reference sound signal, and the maximum sound signal, it determines the actual sound source angle corresponding to the target frame. This solution can accurately determine whether the maximum sound signal with the highest energy is a reflection peak by using the characteristics of the stable sound signal, the maximum sound signal, and the reference sound signal corresponding to the stable sound angle. If the maximum sound signal is a reflection peak, sound source localization is no longer performed based on the maximum sound signal, eliminating the influence of the reflection peak on sound source localization and avoiding misjudging the angle of the reflection peak as the sound source angle when the signal intensity of the reflection peak is at its maximum, thereby improving the accuracy of sound source localization.
[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0021] Figure 1 This is a flowchart of a sound source localization method according to Embodiment 1 of this application;
[0022] Figure 2 This is a flowchart of a sound source localization method according to Embodiment 2 of this application;
[0023] Figure 3 This is a flowchart of a sound source localization method according to Embodiment 3 of this application;
[0024] Figure 4 This is a schematic diagram of a sound source localization device according to Embodiment 4 of this application;
[0025] Figure 5 This is a schematic diagram of the structure of an electronic device according to Embodiment 5 of this application. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first," "second," "third," "fourth," "actual," "preset," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] Example 1
[0029] Figure 1 This is a flowchart illustrating a sound source localization method provided in Embodiment 1 of this application. This embodiment is applicable to situations requiring sound source localization. The method can be executed by a sound source localization device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0030] S110. Based on the sound signals received within a preset time period, locate the sound source and determine the stable sound source angle and the corresponding stable sound signal.
[0031] The preset time period can be determined based on actual conditions. For example, when locating a sound source based on a single frame of sound signal, the duration during which a continuous and stable sound source angle appears can be used as the preset time period. The preset time period includes multiple sound acquisition moments, during which sound signals can be received by a sound receiving device. The sound receiving device can be a microphone array. The multiple sound acquisition moments within the preset time period can be grouped, with each group corresponding to one frame. Each frame can include at least two sound acquisition moments.
[0032] For example, sound source localization can be performed frame by frame based on the received sound signals within a preset time period, that is, sound source angle is obtained by localizing the sound signal in each frame. The sound source angles corresponding to each frame are statistically analyzed to determine stable sound source angles and the corresponding stable sound signals. A stable sound source angle can be a sound source angle that tends to stabilize without abrupt changes within the preset time period. A stable sound signal can be the sound signal corresponding to the stable sound source angle at different sound acquisition times. For example, if sound source localization is performed in frames 2, 3, 4, 5, 6, 7, and 8 of the preset time period, and the obtained sound source angle is 60 degrees deflected from due north to west, then this angle is a stable sound source angle, and the stable sound signal is the sound signal in frames 2, 3, 4, 5, 6, 7, and 8.
[0033] In this embodiment of the application, sound source localization is performed based on the sound signals received within a preset time period to determine the stable sound source angle and the corresponding stable sound signal, including:
[0034] For the sound signals of each frame within a preset time period, the angle of the localized sound source corresponding to each frame is determined based on a preset sound source localization algorithm.
[0035] The location sound source angle that appears most frequently and lasts the longest is taken as the stable sound source angle, and the sound signal corresponding to the stable sound source angle that appears continuously a preset number of times is taken as the stable sound signal.
[0036] The preset sound source localization algorithm can be selected according to the actual situation, such as the SRP-PATH algorithm or the GCC-PHAT algorithm. For example, during the reception of sound signals, for each received frame of sound signal, the preset sound source localization algorithm is used to locate the sound source in that frame and determine the corresponding localization angle. This process continues until the number of received sound signal frames reaches the preset number, indicating that the duration of the received sound signal has reached the preset time period. At this point, the localization angles are statistically analyzed, and the localization angle that appears most frequently and lasts the longest is determined as the stable sound source angle. For example, if the localization angle corresponding to frames 2, 3, 4, 5, 6, 7, 8, and 9 is a 60-degree deflection from due north to west, then this localization angle appears 8 times. If the duration of each frame is 60 milliseconds, then the duration of this localization angle is 480 milliseconds. The location sound source angle corresponding to frames 10, 11, 12, and 13 is 30 degrees deflected from due north to the west. This location sound source angle appears 4 times and lasts for 240 milliseconds. Based on the above two location sound source angles, the stable sound source angle is 60 degrees deflected from due north to the west.
[0037] For example, regarding stable sound source angles, the sound signal corresponding to the occurrence of a preset number of stable sound source angles consecutively is taken as the stable sound signal. The preset number can be determined according to the actual situation, such as the number of sound acquisition moments corresponding to one frame, so as to facilitate comparison with the sound signal in the subsequent frames. For example, if the preset number is 10, and the number of sound acquisition moments corresponding to one frame is 10, the sound signal of any frame from the 2nd, 3rd, 4th, 5th, 6th, 7th, 8th, and 9th frames can be taken as the stable sound signal.
[0038] S120. Traverse the sound signals within the preset time period frame by frame to determine the reference sound signal corresponding to the stable sound source angle in the sound signals received in the target frame, as well as the maximum sound signal with the largest energy.
[0039] For example, for sound signals within a preset time period, a frame-by-frame traversal is performed starting from the first frame. During the traversal, the currently traversed frame is taken as the target frame, and all sound signals received in the target frame are determined. A reference sound signal corresponding to the stable sound source angle is determined from all sound signals received in the target frame. For example, if the stable sound source angle is 60 degrees west of due north, then the sound signal received at an angle of 60 degrees west of due north is determined from all sound signals received in the target frame and used as the reference sound signal. Under normal circumstances, for continuous sound signals, the location sound source angle should be consistent and there should be no abrupt changes. That is, the location sound source angle of the target frame should be consistent with the stable sound source angle. The stable sound source angle corresponding to the stable sound source angle in the sound signals received in the target frame is determined to check whether the stable sound source angle has continuity, thereby determining the actual sound source angle of the target frame.
[0040] For example, generally, the angle corresponding to the highest energy sound signal should be the location of the sound source angle. However, if a reflection peak exists, the sound signal at the reflection peak may be greater than the sound signal at the actual sound source angle, affecting sound source localization. In this embodiment, the highest energy sound signal among the sound signals received by the target frame is determined as a factor in determining the actual sound source angle of the target frame, rather than directly using the angle corresponding to the highest energy sound signal as the actual sound source angle of the target frame.
[0041] S130. Determine the actual sound source angle corresponding to the target frame based on the stable sound signal, the reference sound signal, and the maximum sound signal.
[0042] For example, sounds from the same sound source are continuous. If there is no reflection peak, the angle corresponding to the maximum sound signal is the actual sound source angle corresponding to the target frame, and the stable sound signal should be more similar to the maximum sound signal. If the maximum sound signal is a reflection peak signal, the stable sound signal should be more similar to the reference sound signal. Therefore, the characteristics and similarities between the stable sound signal, the reference sound signal, and the maximum sound signal can be analyzed to determine whether the maximum sound signal is a reflection peak signal. If so, the maximum sound signal is filtered out, and the actual sound source angle corresponding to the target frame is determined based on other sound signals. This eliminates the influence of reflection peaks on sound source localization, avoids directly using the angle corresponding to the maximum sound signal formed by the reflection peak as the actual sound source angle corresponding to the target frame, which would lead to inaccurate sound source localization, and thus improves the accuracy of sound source localization.
[0043] The technical solution of this application embodiment performs sound source localization based on the sound signals received within a preset time period, determining the stable sound source angle and the corresponding stable sound signal; iterates through the sound signals within the preset time period frame by frame, determining the reference sound signal corresponding to the stable sound source angle in the sound signals received in the target frame, as well as the maximum sound signal with the highest energy; based on the stable sound signal, the reference sound signal, and the maximum sound signal, it determines the actual sound source angle corresponding to the target frame. This solution can accurately determine whether the maximum sound signal with the highest energy is a reflection peak by using the characteristics of the stable sound signal, the maximum sound signal, and the reference sound signal corresponding to the stable sound angle. If the maximum sound signal is a reflection peak, sound source localization is no longer performed based on the maximum sound signal, eliminating the influence of the reflection peak on sound source localization and avoiding the problem of misjudging the angle of the reflection peak as the sound source angle when the signal intensity of the reflection peak is at its maximum, thus improving the accuracy of sound source localization.
[0044] Example 2
[0045] Figure 2This is a flowchart illustrating a sound source localization method according to Embodiment 2 of this application. This embodiment is an optimization based on the above embodiments; schemes not described in detail in this embodiment are found in the above embodiments. Figure 2 As shown, the method in this embodiment of the application specifically includes the following steps:
[0046] S210. Based on the sound signals received within a preset time period, locate the sound source and determine the stable sound source angle and the corresponding stable sound signal.
[0047] S220. Traverse the sound signals within the preset time period frame by frame, and compare the positioning sound source angle corresponding to the target frame with the stable sound source angle.
[0048] For example, starting from the first frame, the sound signal within a preset time period is traversed frame by frame. The currently traversed frame is taken as the target frame. The sound source is located based on the sound signal received in the target frame, and the angle of the located sound source is determined. The method of locating the sound source from the sound signal received in the target frame is consistent with the method in S110 and S210 of the above embodiments, both of which are based on a preset sound source location algorithm. The located sound source angle is compared with the stable sound source angle to determine the angle difference between the located sound source angle and the stable sound source angle.
[0049] S230. If the difference between the positioning sound source angle corresponding to the target frame and the stable sound source angle is greater than a preset threshold, or if the difference between the positioning sound source angle corresponding to the target frame and the stable sound source angle is greater than a preset threshold and the duration reaches a preset duration, then the reference sound signal corresponding to the stable sound source angle and the maximum sound signal with the largest energy are determined in the sound signals received in the target frame.
[0050] The preset threshold can be determined according to the actual situation, for example, it can be 3 degrees. In a feasible solution, if the difference between the localized sound source angle and the stable sound source angle corresponding to the target frame is greater than the preset threshold, it indicates that the difference between the localized sound source angle and the stable sound source angle of the target frame is large, which may indicate the presence of a reflection peak, or the presence of sound source movement, noise, or other sound sources. Therefore, it is necessary to determine the reference sound signal corresponding to the stable sound source angle and the maximum sound signal with the highest energy in the sound signal received in the target frame, so as to further locate the sound source more accurately based on the stable sound signal, the reference sound signal, and the maximum sound signal, and eliminate the influence of the reflection peak.
[0051] In another feasible approach, if the difference between the location sound source angle and the stable sound source angle corresponding to the target frame is greater than a preset threshold, it indicates a large difference, possibly indicating the presence of a reflection peak, sound source movement, noise, or other sound sources. Generally, noise and other sound sources are considered non-steady-state sources, appearing for short periods, and their corresponding location sound source angles have short durations. When the difference between the location sound source angle and the stable sound source angle corresponding to the target frame exceeds the preset threshold, the duration of this situation can be determined. If the duration reaches the preset duration, it indicates that the sound source at the location sound source angle corresponding to the target frame is a steady-state source, not a non-steady-state source such as noise or other sound sources. Further analysis can then be conducted to determine the reference sound signal corresponding to the stable sound source angle and the maximum energy sound signal in the received sound signal of the target frame, distinguishing whether the location sound source angle of the target frame is caused by sound source movement or by a reflection peak, thus further eliminating the influence of reflection peaks on sound source localization.
[0052] In this embodiment of the application, the method further includes: if the difference between the positioning sound source angle corresponding to the target frame and the stable sound source angle is less than or equal to a preset threshold, then the stable sound source angle is taken as the actual sound source angle corresponding to the target frame.
[0053] For example, if the difference between the location sound source angle and the stable sound source angle corresponding to the target frame is less than or equal to a preset threshold, it means that the location sound source angle of the target frame is consistent with the stable sound source angle. The sound source of the target frame has not changed compared to the sound source corresponding to the stable sound source angle. Therefore, the stable sound source angle can be directly used as the actual sound source angle corresponding to the target frame.
[0054] S240. Determine the actual sound source angle corresponding to the target frame based on the stable sound signal, the reference sound signal, and the maximum sound signal.
[0055] This application provides a sound source localization method that iterates through the sound signals within a preset time period frame by frame, comparing the localized sound source angle corresponding to the target frame with the stable sound source angle. If the difference between the localized sound source angle corresponding to the target frame and the stable sound source angle is greater than a preset threshold, or if the difference between the localized sound source angle corresponding to the target frame and the stable sound source angle is greater than the preset threshold and the duration reaches a preset duration, then the reference sound signal corresponding to the stable sound source angle and the maximum sound signal with the highest energy are determined in the sound signals received in the target frame. This method can promptly and accurately determine the sound source of the target frame with the angular deviation, thereby further determining whether the sound source is generated by a reflection peak or by sound source movement, thus eliminating the influence of reflection peaks on sound source localization and improving the accuracy of sound source localization.
[0056] Example 3
[0057] Figure 3 This is a flowchart illustrating a sound source localization method provided in Embodiment 3 of this application. This embodiment is an optimization based on the above embodiments; schemes not described in detail in this embodiment are found in the above embodiments. Figure 3 As shown, the method in this embodiment of the application specifically includes the following steps:
[0058] S310. Based on the sound signals received within a preset time period, locate the sound source and determine the stable sound source angle and the corresponding stable sound signal.
[0059] S320. Traverse the sound signals within the preset time period frame by frame to determine the reference sound signal corresponding to the stable sound source angle in the sound signals received in the target frame, as well as the maximum sound signal with the largest energy.
[0060] S330. Determine the first correlation coefficient between the stable sound signal and the reference sound signal, and determine the second correlation coefficient between the stable sound signal and the maximum sound signal.
[0061] For example, since sounds from the same source are continuous, if there is no reflection peak, the angle corresponding to the maximum sound signal is the actual sound source angle corresponding to the target frame. Therefore, the stable sound signal should be more similar to the maximum sound signal. If the maximum sound signal is a reflection peak signal, then the stable sound signal should be more similar to the reference sound signal. Therefore, a first correlation coefficient can be determined between the stable sound signal and the reference sound signal, and a second correlation coefficient can be determined between the stable sound signal and the maximum sound signal. Based on the first and second correlation coefficients, two more similar signals can be identified.
[0062] In this embodiment of the application, the target frame includes a preset number of sound acquisition times; the process of determining the first correlation coefficient includes:
[0063] Determine a preset number of reference sound signals received from the angle of the stable sound source at the sound acquisition time in the target frame;
[0064] The first correlation coefficient is calculated based on a preset number of reference sound signals and a preset number of stable sound signals;
[0065] The process of determining the second correlation coefficient includes:
[0066] Determine the preset number of maximum sound signals with the highest energy received at the sound acquisition time in the target frame;
[0067] The second correlation coefficient is calculated based on a preset number of maximum sound signals and a preset number of stable sound signals.
[0068] For example, the sound acquisition moments within a preset time period can be grouped into a preset number of groups, each group constituting one frame. The target frame contains the preset number of sound acquisition moments, and each sound acquisition moment contains a reference sound signal corresponding to a stable sound source angle. The target frame contains the preset number of reference sound signals. Corresponding to the number of reference sound signals, a preset number of stable sound signals are selected from the sound signals corresponding to the stable sound source angle. For example, a frame or a preset number of sound signals can be selected from the duration of the stable sound source angle. A first correlation coefficient is determined based on the preset number of reference sound signals and the preset number of stable sound signals. Similarly, the target frame contains the preset number of sound acquisition moments, and each sound acquisition moment contains a maximum sound signal with the highest energy. The target frame contains the preset number of maximum sound signals. A second correlation coefficient is determined based on the preset number of maximum sound signals and the preset number of stable sound signals.
[0069] In this embodiment, the algorithm used to calculate the first and second correlation coefficients can be determined according to the actual situation, such as the Pearson correlation coefficient algorithm, cosine similarity algorithm, Manhattan distance algorithm, etc. Taking the Pearson correlation coefficient as an example, the calculation formula for the Pearson correlation coefficient is as follows: If R is the first correlation coefficient, then n is the preset number, x i Let be the i-th stable sound signal, x be the average value of the stable sound signal, and y be the average value of the stable sound signal. i For the i-th reference sound signal, This is the average value of the reference sound signal. If R is the second correlation coefficient, then n is the preset quantity, and x... i For the i-th stable sound signal, To stabilize the average value of the sound signal, y i For the i-th largest sound signal, This represents the average value of the maximum sound signal.
[0070] S340. Determine the actual sound source angle corresponding to the target frame based on the first correlation coefficient and the second correlation coefficient.
[0071] For example, a first correlation coefficient can be used to reflect the similarity between a stable sound signal and a reference sound signal, while a second correlation coefficient can reflect the similarity between the stable sound signal and the maximum sound signal. Based on the similarity reflected by the first and second correlation coefficients, the actual sound source angle corresponding to the target frame is determined, and it is then determined whether the actual sound source angle is the stable sound source angle or the sound source angle corresponding to the maximum sound signal. When the maximum sound signal is determined to be a reflection peak based on the first and second correlation coefficients, it is not used as a reference for sound localization, thus eliminating the influence of the reflection peak and improving the accuracy of sound source localization.
[0072] In this embodiment of the application, determining the actual sound source angle corresponding to the target frame based on the first correlation coefficient and the second correlation coefficient includes:
[0073] If the first correlation coefficient is greater than the second correlation coefficient, then the stable sound source angle is taken as the actual sound source angle corresponding to the target frame;
[0074] If the first correlation coefficient is less than the second correlation coefficient, then the sound source angle corresponding to the maximum sound signal is taken as the actual sound source angle corresponding to the target frame.
[0075] For example, if the first correlation coefficient is greater than the second correlation coefficient, it indicates that the stable sound signal and the reference sound signal are more similar. It can be determined that the maximum sound signal is generated by a reflection peak, not the actual sound source. Therefore, the maximum sound signal is not used as a reference for sound source localization, and the stable sound source angle is taken as the actual sound source angle corresponding to the target frame. If the first correlation coefficient is less than the second correlation coefficient, it indicates that the stable sound signal and the maximum sound signal are more similar. It can be determined that the maximum sound signal is generated by the actual sound source, not the reflection peak. Therefore, the sound source angle corresponding to the maximum sound signal can be taken as the actual sound source angle corresponding to the target frame. This indicates that the change in sound source angle is caused by sound source movement.
[0076] This application provides a sound source localization method, which determines a first correlation coefficient between a stable sound signal and a reference sound signal, and a second correlation coefficient between the stable sound signal and the maximum sound signal; based on the first and second correlation coefficients, the actual sound source angle corresponding to the target frame is determined. The first correlation coefficient reflects the similarity between the stable sound signal and the reference sound signal, and the second correlation coefficient reflects the similarity between the stable sound signal and the maximum sound signal. Since sound signals generated by the same sound source are more similar, the comparison of the first and second correlation coefficients can determine whether the maximum sound signal is generated by a reflection peak. Therefore, when a reflection peak is detected, the maximum sound signal is not used as a factor in sound source localization, eliminating the influence of the reflection peak on sound source localization and improving the accuracy of sound source localization.
[0077] Example 4
[0078] Figure 4 This is a schematic diagram of a sound source localization device provided in Embodiment 4 of this application. This device can execute the sound source localization method provided in any embodiment of this application, and possesses the corresponding functional modules and beneficial effects for executing the method. For example... Figure 4 As shown, the device includes:
[0079] The stable sound source angle determination module 410 is used to locate the sound source based on the sound signal received within a preset time period, and determine the stable sound source angle and the corresponding stable sound signal.
[0080] The traversal module 420 is used to traverse the sound signals within a preset time period frame by frame, and determine the reference sound signal corresponding to the stable sound source angle in the sound signals received in the target frame, as well as the maximum sound signal with the largest energy.
[0081] The actual sound source angle determination module 430 is used to determine the actual sound source angle corresponding to the target frame based on the stable sound signal, the reference sound signal, and the maximum sound signal.
[0082] In this embodiment of the application, the stable sound source angle determination module 410 includes:
[0083] The sound source angle determination unit is used to determine the sound source angle corresponding to each frame based on a preset sound source localization algorithm for the sound signal of each frame within a preset time period.
[0084] The statistical unit is used to take the location sound source angle that appears most frequently and lasts the longest as the stable sound source angle, and to take the sound signal corresponding to the stable sound source angle that appears continuously a preset number of times as the stable sound signal.
[0085] In this embodiment of the application, the traversal module 420 includes:
[0086] The comparison unit is used to traverse the sound signals within a preset time period frame by frame and compare the positioning sound source angle corresponding to the target frame with the stable sound source angle.
[0087] The determining unit is configured to determine, in the sound signals received in the target frame, the reference sound signal corresponding to the stable sound source angle and the maximum sound signal with the largest energy, if the difference between the positioning sound source angle corresponding to the target frame and the stable sound source angle is greater than a preset threshold, or if the difference between the positioning sound source angle corresponding to the target frame and the stable sound source angle is greater than a preset threshold and the duration reaches a preset duration.
[0088] In this embodiment of the application, the device further includes:
[0089] The sound source angle determination module is used to determine the actual sound source angle corresponding to the target frame if the difference between the positioning sound source angle corresponding to the target frame and the stable sound source angle is less than or equal to a preset threshold.
[0090] In this embodiment of the application, the actual sound source angle determination module 430 includes:
[0091] The correlation coefficient determination unit is used to determine a first correlation coefficient between the stable sound signal and the reference sound signal, and to determine a second correlation coefficient between the stable sound signal and the maximum sound signal;
[0092] The correlation coefficient comparison unit is used to determine the actual sound source angle corresponding to the target frame based on the first correlation coefficient and the second correlation coefficient.
[0093] In this embodiment of the application, the correlation coefficient comparison unit includes:
[0094] The first comparison subunit is used to take the stable sound source angle as the actual sound source angle corresponding to the target frame if the first correlation coefficient is greater than the second correlation coefficient.
[0095] The second comparison subunit is used to take the sound source angle corresponding to the maximum sound signal as the actual sound source angle corresponding to the target frame if the first correlation coefficient is less than the second correlation coefficient.
[0096] In this embodiment of the application, the target frame includes a preset number of sound acquisition times; the device further includes:
[0097] The first signal determination module is used to determine a preset number of reference sound signals received from the angle of the stable sound source at the sound acquisition time in the target frame;
[0098] The first calculation module is used to calculate the first correlation coefficient based on a preset number of reference sound signals and a preset number of stable sound signals;
[0099] The device further includes:
[0100] The second signal determination module is used to determine the preset number of maximum sound signals with the largest energy received at the sound acquisition time in the target frame;
[0101] The second calculation module is used to calculate the second correlation coefficient based on a preset number of maximum sound signals and a preset number of stable sound signals.
[0102] The sound source localization device provided in this application embodiment can execute a sound source localization method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of executing the method.
[0103] Example 5
[0104] Figure 5 A schematic diagram of an electronic device 10, which can be used to implement embodiments of this 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 processors, cellular phones, smartphones, 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 illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0105] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0106] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0107] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as sound source localization methods.
[0108] 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 storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the sound source localization method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the sound source localization method by any other suitable means (e.g., by means of firmware).
[0109] Various embodiments of the systems and techniques described above 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), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0110] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable sound source localization device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0111] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is 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 machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0112] To provide interaction with a user, the systems and techniques described herein 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 pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; 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 sound input, voice input, or tactile input).
[0113] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0114] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0115] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired information of the technical solution of this application can be achieved, and this is not limited herein.
[0116] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for locating a sound source, characterized in that, The method includes: The sound source is located based on the sound signals received within a preset time period, and the stable sound source angle and the corresponding stable sound signal are determined. The stable sound source angle is the sound source angle that tends to be stable without sudden changes within the preset time period. The stable sound signal is the sound signal corresponding to different sound acquisition times at the stable sound source angle. The sound signals within a preset time period are traversed frame by frame to determine the reference sound signal corresponding to the stable sound source angle in the sound signals received in the target frame, as well as the maximum sound signal with the highest energy. The actual sound source angle corresponding to the target frame is determined based on the stable sound signal, the reference sound signal, and the maximum sound signal. Based on the stable sound signal, the reference sound signal, and the maximum sound signal, the actual sound source angle corresponding to the target frame is determined, including: Determine a first correlation coefficient between the stable sound signal and the reference sound signal, and determine a second correlation coefficient between the stable sound signal and the maximum sound signal; The actual sound source angle corresponding to the target frame is determined based on the first correlation coefficient and the second correlation coefficient.
2. The method according to claim 1, characterized in that, Based on the sound signals received within a preset time period, the sound source is located, and the stable sound source angle and corresponding stable sound signal are determined, including: For the sound signals of each frame within a preset time period, the angle of the localized sound source corresponding to each frame is determined based on a preset sound source localization algorithm. The location sound source angle that appears most frequently and lasts the longest is taken as the stable sound source angle, and the sound signal corresponding to the stable sound source angle that appears continuously a preset number of times is taken as the stable sound signal.
3. The method according to claim 1, characterized in that, The sound signals within a preset time period are traversed frame by frame to determine the reference sound signal corresponding to the stable sound source angle in the sound signals received in the target frame, as well as the maximum sound signal with the highest energy, including: The sound signals within a preset time period are traversed frame by frame, and the angle of the location sound source corresponding to the target frame is compared with the angle of the stable sound source. If the difference between the location sound source angle corresponding to the target frame and the stable sound source angle is greater than a preset threshold, or if the difference between the location sound source angle corresponding to the target frame and the stable sound source angle is greater than a preset threshold and the duration reaches a preset duration, then the reference sound signal corresponding to the stable sound source angle and the maximum sound signal with the largest energy are determined in the sound signal received in the target frame.
4. The method according to claim 3, characterized in that, The method further includes: If the difference between the location sound source angle corresponding to the target frame and the stable sound source angle is less than or equal to a preset threshold, then the stable sound source angle is taken as the actual sound source angle corresponding to the target frame.
5. The method according to claim 1, characterized in that, Based on the first correlation coefficient and the second correlation coefficient, the actual sound source angle corresponding to the target frame is determined, including: If the first correlation coefficient is greater than the second correlation coefficient, then the stable sound source angle is taken as the actual sound source angle corresponding to the target frame; If the first correlation coefficient is less than the second correlation coefficient, then the sound source angle corresponding to the maximum sound signal is taken as the actual sound source angle corresponding to the target frame.
6. The method according to any one of claims 1-5, characterized in that, The target frame includes a preset number of sound acquisition moments; The process of determining the first correlation coefficient includes: Determine a preset number of reference sound signals received from the angle of the stable sound source at the sound acquisition time in the target frame; The first correlation coefficient is calculated based on a preset number of reference sound signals and a preset number of stable sound signals; The process of determining the second correlation coefficient includes: Determine the preset number of maximum sound signals with the highest energy received at the sound acquisition time in the target frame; The second correlation coefficient is calculated based on a preset number of maximum sound signals and a preset number of stable sound signals.
7. A sound source localization device, characterized in that, The device includes: The stable sound source angle determination module is used to locate the sound source based on the sound signals received within a preset time period, and determine the stable sound source angle and the corresponding stable sound signal. The stable sound source angle is the sound source angle that tends to be stable without sudden changes within the preset time period. The stable sound signal is the sound signal corresponding to different sound acquisition times at the stable sound source angle. The traversal module is used to traverse the sound signals within a preset time period frame by frame, and determine the reference sound signal corresponding to the stable sound source angle in the sound signals received in the target frame, as well as the maximum sound signal with the largest energy. The actual sound source angle determination module is used to determine the actual sound source angle corresponding to the target frame based on the stable sound signal, the reference sound signal, and the maximum sound signal. The actual sound source angle determination module includes: The correlation coefficient determination unit is used to determine a first correlation coefficient between the stable sound signal and the reference sound signal, and to determine a second correlation coefficient between the stable sound signal and the maximum sound signal; The correlation coefficient comparison unit is used to determine the actual sound source angle corresponding to the target frame based on the first correlation coefficient and the second correlation coefficient.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the sound source localization method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the sound source localization method according to any one of claims 1-6.
Citation Information
Patent Citations
Over-limit noise sound source determination method, air conditioner, vehicle, noise control method and device
CN113506557A
Noise reduction method, electronic equipment and storage medium
CN115331692A