A sound source positioning method, device and electronic equipment
By linearly compensating the microphone phase difference slope in the frequency domain, the problems of accuracy and computational complexity when the microphone spacing is small are solved, and efficient and accurate sound source localization is achieved.
Patent Information
- Application Number
- CN202211185766.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2042-09-27
AI Technical Summary
Existing sound source localization technologies are not accurate enough when the microphone spacing is small, have high computational complexity, and waste a lot of computational resources, especially at high sampling rates where it is difficult to improve accuracy.
By performing linear compensation on the microphone phase in the frequency domain, the maximum phase difference slope of the microphone signal is calculated, and the most suitable slope is selected through differential or correlation calculations. This allows for the deduction of signal delay, reducing computational load and improving accuracy.
It enables sound source localization with arbitrary adjustable precision in the frequency domain, reduces computational complexity, avoids multiplication and division operations, and improves localization accuracy when the microphone spacing is small.
Smart Images

Figure CN115696108B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of audio signal processing technology, and in particular to a sound source localization method, apparatus, and electronic device. Background Technology
[0002] In daily life, people can determine the direction of a sound source based on the sound they hear. This is thanks to the special structure of the human ear and the phase difference that occurs when sound reaches the ear, as well as the analysis of the signal by the human brain. In today's highly intelligent society, sound source localization technology is also applied in various fields, such as military, marine search and rescue, multimedia communication, and intelligent robots. Depending on the type of transmitted and received signals, sound source localization can be divided into active sound source localization and passive sound source localization. Active sound source localization involves a signal generating device actively emitting a signal and determining the location of an object by the reflected signal, such as radar and sonar. Passive sound source localization only passively receives sound source signals and determines the direction of the sound source, such as sound source localization in a conference system. This invention mainly discusses passive sound source localization.
[0003] Passive sound source localization relies on the phase difference of the microphone array signal. The delay of the microphone array signal is calculated from the phase difference, and then the location of the sound source is calculated using trigonometric relationships, such as... Figure 1 As shown, A and B are the positions of two microphones, which are separated by a distance L. The sound source is transmitted from the far end to the two microphones in the form of a plane wave. Finding the position of the sound source can be regarded as finding the magnitude of θ. τ is the time difference between the arrival of the signal at the two microphones A and B. Once τ is found, the magnitude of θ can be found using the trigonometric relationship.
[0004] The general algorithm calculates τ based on the correlation between the two microphones, assuming the signals arriving at the two microphones are:
[0005] r1(t)=s(t)+n1(t) (1)
[0006] r2(t)=s(tD)+n2(t) (2)
[0007] Where r1(t) and r2(t) represent the total signals received by the two microphones, including the signals s(t) and s(tD) emitted by the sound source, and the random noise n1(t) and n2(t) received by the two microphones. The cross-correlation and delay of the two microphone signals are calculated as follows:
[0008] R(τ)=E{r1(t)r2(t+τ)} (3)
[0009]
[0010] Equation (3) is the cross-correlation expression for the microphone signal. Once the microphone signal is determined, the magnitude of this value is related to the delay τ. When the delay τ is equal to the actual delay, equation (3) has its maximum value. After the delay τ is calculated, the angle θ can be obtained using θ = arcsin(cτ / L).
[0011] The following problems can be found from the above derivation:
[0012] A) Because the time-domain signal is a series of discrete values, the precision of τ is the reciprocal of the sampling rate, which affects the precision of θ. When the microphone spacing L is constant, a higher sampling rate results in higher precision of θ. When L is 5cm and the sampling rate is 16000, assuming a sound speed of 343m / s, the precision of θ is 25.4°. This is not good precision, and it worsens as the microphone distance L decreases. Improving precision would require upsampling, wasting computational resources.
[0013] B) This method uses time-domain cross-correlation, with a complexity of O(n^2). 2 When the sequence is very long, it has a large computational cost. Summary of the Invention
[0014] To overcome the shortcomings of the existing technology, the present invention provides a sound source localization method, device and electronic device. By performing linear compensation on the microphone phase in the frequency domain, the most suitable slope is found and the delay is deduced. The accuracy can be adjusted arbitrarily, and no multiplication or division operations are involved, so the amount of calculation is very small.
[0015] To achieve the above objectives, the present invention provides a sound source localization method, comprising the following steps:
[0016] Step S1: For any two microphone signals, convert them to the frequency domain and obtain the polar coordinate representation of the spectrum;
[0017] Step S2: Calculate the maximum phase difference slope of the microphone signal based on the microphone spacing, divide the phase difference slope according to the accuracy requirements, and compensate the second microphone in sequence. The compensated spectrum of the second microphone is then restored from the compensated phase.
[0018] Step S3: Perform differential or correlation calculations on the first microphone spectrum signal and the second microphone compensation signal, and select the slope that minimizes the energy of the differential result or maximizes the correlation.
[0019] Step S4: Based on the obtained slope, deduce the delay of the signal reaching the microphone, and then obtain the signal location based on the delay.
[0020] Optionally, step S1 further includes:
[0021] Step S101: Perform frame division and discrete Fourier transform on the time-domain signals of the two microphones to obtain the frequency-domain signals;
[0022] Step S102: Obtain the polar coordinate representation of the spectrum of each microphone signal based on the obtained frequency domain signal.
[0023] Optionally, step S2 includes:
[0024] Step S200: Calculate the maximum phase difference slope b of the microphone signal based on the microphone spacing;
[0025] Step S201: Divide the range of -b to b into a series of discrete values, and use the phase difference represented by the series of discrete values to compensate the second microphone in sequence, and restore the compensated spectrum of the second microphone from the compensated phase.
[0026] Optionally, in step S201, the slope value is divided into several equal values from -b to b.
[0027] Optionally, in step S201, the slope value from -b to b is divided into 2M+1 equal values, and the equally divided slope is represented as a vector {b0, b1, ..., b}. 2M}
[0028] Optionally, in step S3, the spectrum of the first microphone is subtracted from the phase compensation spectrum of the second microphone, and the slope value that minimizes the absolute value of the difference is obtained.
[0029] Optionally, in step S4, the results of each frame are stored in an array, and the average value of the results in the array is calculated; or the τ value that appears most frequently in the array is found as the result output.
[0030] Optionally, the method further includes:
[0031] Step S5: When there are multiple microphones, obtain multiple azimuth angles based on every two microphones, and determine the common azimuth as the final output.
[0032] To achieve the above objectives, the present invention also provides a sound source localization device, comprising:
[0033] The time-frequency conversion and polar coordinate processing unit is used to convert any two microphone signals to the frequency domain and obtain the polar coordinate representation of the spectrum.
[0034] The phase compensation unit is used to calculate the maximum phase difference slope of the microphone signal based on the microphone spacing, and divide the phase difference slope according to the accuracy requirements, and compensate the second microphone in sequence, and restore the compensated spectrum of the second microphone from the compensated phase.
[0035] The slope selection unit is used to perform differential or correlation calculations between the first microphone spectral signal and the second microphone compensation signal, and select the slope b that minimizes the energy of the differential result or maximizes the correlation. m ;
[0036] The delay calculation unit is used to deduce the delay of the signal arriving at the microphone based on the obtained slope.
[0037] Azimuth estimation unit is used to obtain the signal azimuth based on the obtained delay.
[0038] Compared with existing technologies, the present invention provides a sound source localization method, device, and electronic device. By performing linear compensation on the microphone phase in the frequency domain, the most suitable slope is found and the delay is derived. The present invention further subdivides the slope, theoretically allowing for arbitrary adjustment of the resolution. Compared with time-domain delay estimation, it does not have a resolution problem. Moreover, the best-matching phase difference slope can be selected using a differential method, and the computational load is almost negligible compared to methods that rely on cross-correlation.
[0039] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0040] The above and other objects, features, and advantages of the present invention will become more apparent from the more detailed description of the embodiments of the invention in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same parts or steps.
[0041] Figure 1 This is a schematic diagram of the phase difference of a sound source in existing technology;
[0042] Figure 2 This is a schematic flowchart of a sound source localization method provided in an exemplary embodiment of the present invention;
[0043] Figure 3 This is a system structure diagram of a sound source localization device provided in an exemplary embodiment of the present invention;
[0044] Figure 4 This is a flowchart of the sound source localization method provided in the embodiments of the present invention.
[0045] Figure 5 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. Detailed Implementation
[0046] The following describes the embodiments of the present invention through specific examples and in conjunction with the accompanying drawings. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific examples, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the spirit of the present invention.
[0047] Exemplary methods
[0048] Figure 2 This is a schematic flowchart of a sound source localization method provided in an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as... Figure 2 As shown, it includes the following steps:
[0049] Step S1: For any two microphone signals, convert them to the frequency domain and obtain the polar coordinate representation of the spectrum.
[0050] The core of sound source localization is estimating the delay of the microphone signal. In this embodiment, the delay estimation principle is explained using a dual-microphone setup as an example.
[0051] Specifically, step S1 further includes:
[0052] Step S101: For any two microphone signals, convert them to frequency domain signals.
[0053] Specifically, the time-domain signals d1 and d2 from the two microphones are framed and subjected to Discrete Fourier Transform (DFT) to obtain the frequency-domain signals D1 and D2.
[0054] Step S102: Obtain the polar coordinate representation of the spectrum of each microphone signal.
[0055] In this embodiment, each frequency point of the frequency domain signals D1 and D2 (corresponding to the first microphone 1 and the second microphone 2, respectively) is divided into real and imaginary parts, which can be converted into polar coordinates:
[0056] absD1=abs(D1) (5)
[0057] absD2=abs(D2) (6)
[0058] anhleD1=angle(D1) (7)
[0059] angleD2=angle(D2) (8)
[0060] Where absD1 and absD2 represent the frequency domain amplitudes of the two microphones, and angleD1 and angleD represent the frequency domain angles of the two microphones.
[0061] Step S2: Calculate the maximum phase difference slope of the microphone signal based on the microphone spacing, and divide the phase difference slope equally according to the accuracy requirements, and compensate the second microphone 2 in sequence, and restore the compensated spectrum of the second microphone 2 from the compensated phase.
[0062] Specifically, step S2 further includes:
[0063] Step S200: Calculate the maximum phase difference slope of the microphone signal based on the microphone spacing.
[0064] If the two microphones are highly consistent, and random noise from the microphones is eliminated, then the following relationship should hold:
[0065] absD1(k)=absD2(k) (9)
[0066] angleD1(k)-angleD2(k)=b*k (10)
[0067] Where k represents the frequency index and b is a constant. Equation (9) indicates that, under the condition of good microphone consistency, the amplitude of each frequency point of the two microphones is the same. Equation (10) indicates that the phase difference of each frequency point of the two microphones is linear. If b is 0, it means that the phases of the two microphone signals are completely consistent, that is, the sound source arrives at the two microphones at the same time. The larger the absolute value of b, the larger the phase difference between the two microphones, that is, the greater the delay of the sound source arriving at the two microphones. And the value of b corresponds one-to-one with the delay. Therefore, finding τ can be equivalent to finding the slope b of the phase difference between the two microphone signals.
[0068] The range of values for b varies depending on the microphone spacing. In this embodiment, the range of values for b can be determined first, then divided into a series of discrete values within that range. These discrete values are then substituted into the calculation to select the most suitable slope, and finally, the delay is calculated based on the slope.
[0069] The specific steps are as follows:
[0070] First, determine the range of the phase difference between the two microphones. Given that the microphone distance is L, for sound waves with wavelength λ equal to L, the maximum phase difference is 2π. For sound waves of other wavelengths, the maximum phase difference satisfies...
[0071]
[0072] There is also a phase difference.
[0073]
[0074] in fs is the sampling rate, N is the FFT length, and c is the speed of sound. Substituting these values into equation (11), and combining equations (11) and (12), we can obtain...
[0075] b=(fs*L*2π) / (N*c) (13)
[0076] (13) In the formula, b is the absolute value of the slope of the linear phase difference generated by the sound source in the direction of the two microphones when the microphone distance is fixed. The actual absolute value of the slope should be less than or equal to this value.
[0077] Step S201: Divide the slope values from -b to b into 2M+1 equal parts: M positive values and M negative values, plus a value of 0. Represent the equally divided slope as a vector {b0, b1, ..., b}. 2M The phase differences represented by each slope are sequentially compensated for by microphone 2, and the compensated spectrum of microphone 2 is reconstructed from the compensated phase:
[0078]
[0079]
[0080] in This represents the phase-compensated spectrum of microphone 2, including the real and imaginary parts. The value of is related to m, representing the phase compensation of each equal division.
[0081] Step S3: Combine the spectrum signal D1 from the first microphone 1 with the compensation signal from the second microphone 2. Perform difference or correlation calculations, and select a slope b that minimizes the energy of the difference result or maximizes the correlation. m
[0082] Specifically, the spectrum of the first microphone 1 is subtracted from the phase compensation spectrum of the second microphone 2, and the value of b that minimizes the sum of the absolute values of the differences is calculated. m value
[0083]
[0084] b m =min m (mean(abs(ΔD m (k))))(m=0,1,..,2M) (17)
[0085] Optionally, find b m The value can also be found using frequency domain correlation, to find b that maximizes the correlation. m value:
[0086] b m=max m (mean(corr m (k)))(m=0,1,..,2M) (19)
[0087] (19) In the formula, conj represents taking the complex conjugate, and corr m This indicates the correlation between the signal from the first microphone 1 and the phase-compensated signal from the second microphone 2.
[0088] Step S4: Based on the obtained slope, deduce the delay of the signal reaching the microphone, and then use the triangular relationship between the two microphones to determine the signal location based on the delay of the signal reaching the microphone.
[0089] b m It is the slope that best matches the phase of the two microphone signals after phase compensation, which can be determined according to b. m The value is used to deduce the microphone delay.
[0090] τ=b m N / (fs*2π) (20)
[0091] After calculating the time delay τ, since the results may differ for each frame, smoothing operations can be performed on the τ value to ensure stability. Specifically, this can be done by storing the results τ for each frame in an array and averaging the array results; or by finding the most frequent τ value in the array and outputting it as the result.
[0092] Once the delay τ is determined, the angle θ of the signal's orientation can be calculated using θ = arcsin(cτ / L), where c represents the speed of sound, typically 343 m / s.
[0093] Step S5: When there are multiple microphones, multiple azimuth angles are obtained, and the common azimuth is determined as the final output.
[0094] In other words, in scenarios with multiple microphones, the azimuth angle can be calculated for each pair of microphones, and then the common azimuth angle can be selected as the final output. That is, when multiple microphones exist, each pair of microphones can produce an azimuth angle θi. Since each microphone's spatial position is different, each azimuth angle θi will also be different. However, by combining spatial information, a common direction can ultimately be determined.
[0095] For example, when the phase difference between two microphones is constant, the resulting sound source location is a hyperboloid; if there are three microphones, two hyperboloids can be obtained, and the intersection of these two hyperboloids is taken as the common orientation; if there are four microphones, the intersection of the three hyperboloids may be a point, and this point is the sound source location.
[0096] Exemplary device
[0097] Figure 3 This is a system structure diagram of a sound source localization device provided in an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as... Figure 3 As shown, it includes:
[0098] The time-frequency conversion and polar coordinate processing unit 301 is used to convert any two microphone signals to the frequency domain and obtain the polar coordinate representation of the spectrum.
[0099] The core of sound source localization is estimating the delay of the microphone signal. In this embodiment, the delay estimation principle is explained using a dual-microphone setup as an example.
[0100] Specifically, the time-frequency conversion and polar coordinate processing unit 301 further includes:
[0101] The time-frequency conversion module is used to convert any two microphone signals into frequency domain signals.
[0102] The polar coordinate determination module is used to obtain the polar coordinate representation of the spectrum of each microphone signal.
[0103] The phase compensation unit 302 is used to calculate the maximum phase difference slope of the microphone signal based on the microphone spacing, and divide the phase difference slope equally according to the accuracy requirements, and compensate the second microphone 2 in sequence, and restore the compensated spectrum of the second microphone 2 from the compensated phase.
[0104] Specifically, the phase compensation unit 302 further includes:
[0105] The phase difference slope calculation module is used to calculate the maximum phase difference slope b of the microphone signal based on the microphone spacing.
[0106] The phase compensation module divides the slope values from -b to b into 2M+1 equal parts: M positive values and M negative values, plus a zero value. The divided slope is then represented as a vector {b0, b1, ..., b}. 2M The phase differences represented by each slope are sequentially compensated for by the second microphone 2, and the compensated spectrum of the second microphone 2 is reconstructed from the compensated phase.
[0107] The slope selection unit 303 is used to select the spectrum signal D1 of the first microphone 1 and the compensation signal of the second microphone 2. Perform difference or correlation calculations, and select a slope b that minimizes the energy of the difference result or maximizes the correlation. m .
[0108] The delay calculation unit 304 is used to deduce the delay of the signal arriving at the microphone based on the obtained slope.
[0109] b mIt is the slope that best matches the phase of the two microphone signals after phase compensation, which can be determined according to b. m The value is used to deduce the microphone delay.
[0110] τ=b m N / (fs*2π)
[0111] After calculating the time delay τ, since the results may differ for each frame, smoothing operations can be performed on the τ value to ensure stability. Specifically, this can be done by storing the results of each frame in an array and averaging the array results; or by finding the most frequent τ value in the array and outputting it as the result.
[0112] The orientation estimation unit 305 is used to determine the signal orientation by utilizing the triangulation relationship between the two microphones based on the delay of the signal arriving at the microphone.
[0113] Example
[0114] In this embodiment, as Figure 4 As shown, a sound source localization method has the following specific steps:
[0115] Step A: Perform frame segmentation and time-frequency transformation on the microphone 1 signal to obtain the frequency domain signal D1 of microphone 1. Convert the frequency domain signal D1 into polar coordinate representation, where absD1 represents the spectral amplitude and angleD1 represents the spectral phase.
[0116] Step B, similar to step A, involves framing and time-frequency transformation of the microphone 2 signal to obtain the frequency domain signal D2 of microphone 2. The frequency domain signal D2 is then converted into polar coordinates, where absD2 represents the spectral amplitude and angleD2 represents the spectral phase.
[0117] Step C: Calculate the maximum phase difference slope b between microphones 1 and 2 based on the microphone spacing. All other phase difference slopes lie between [-b, b]. Divide the phase difference slopes within the [-b, b] interval according to the required precision. Each slope b... m This indicates the possible phase difference slope.
[0118] Step D, b m The phase difference b is represented m *k is added to the phase angleD2 of microphone 2, and then combined with the amplitude of microphone 2's spectrum to reconstruct the phase-compensated signal.
[0119] Step E: Combine the spectral signal D1 from microphone 1 with the compensation signal from microphone 2. Perform a difference operation and select the value of b that minimizes the energy of the difference result. m .
[0120] Similarly, step F involves calculating the spectral signal D1 from microphone 1 and the compensation signal from microphone 2. The correlation between the two factors is determined, and b is selected to maximize the correlation. m .
[0121] Step G, by b m Calculate the delay τ of the signal reaching the microphone.
[0122] Step H: Calculate the azimuth angle θ of the signal from τ.
[0123] Step I extends the two-microphone scenario to multiple microphones, selecting the superimposed direction as the final sound source direction.
[0124] Exemplary electronic devices
[0125] Figure 5 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. The electronic device may be either or both of a first device and a second device, or a standalone device independent of them, which may communicate with the first device and the second device to receive acquired input signals from them. Figure 5 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Figure 5 As shown, the electronic device includes one or more processors 61 and memory 62.
[0126] The processor 61 may be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0127] The memory 62 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 61 may execute the program instructions to implement the sound source localization method and / or other desired functions of the software program of the various embodiments of this disclosure described above. In one example, the electronic device may further include an input device 63 and an output device 64, these components being interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0128] In addition, the input device 63 may also include, for example, a keyboard, a mouse, etc.
[0129] The output device 64 can output various information to the outside. The output device 64 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0130] Of course, for the sake of simplicity, Figure 5 Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.
[0131] Exemplary computer program products and computer-readable storage media
[0132] In addition to the methods and apparatus described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the sound source localization methods according to various embodiments of this disclosure as described in the "Exemplary Methods" section of this specification.
[0133] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0134] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the sound source localization methods according to various embodiments of this disclosure as described in the "Exemplary Methods" section above.
[0135] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0136] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0137] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0138] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0139] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.
[0140] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps are decomposable and / or recombinable. Such decomposition and / or recombination should be considered equivalent to the present disclosure. The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0141] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A sound source localization method, comprising the following steps: Step S1: For any two microphone signals, convert them to the frequency domain and obtain the polar coordinate representation of the spectrum; Step S2: Calculate the maximum phase difference slope of the microphone signal based on the microphone spacing, divide the phase difference slope according to the accuracy requirements, and compensate the second microphone in sequence. The compensated spectrum of the second microphone is then restored from the compensated phase. Step S3: Perform differential or correlation calculations on the first microphone spectrum signal and the second microphone compensation signal, and select the slope that minimizes the energy of the differential result or maximizes the correlation. Step S4: Based on the obtained slope, deduce the delay of the signal reaching the microphone, and then obtain the signal location based on the delay.
2. The sound source localization method as described in claim 1, characterized in that, Step S1 further includes: Step S101: Perform frame division and discrete Fourier transform on the time-domain signals of the two microphones to obtain the frequency-domain signals; Step S102: Obtain the polar coordinate representation of the spectrum of each microphone signal based on the obtained frequency domain signal.
3. The sound source localization method as described in claim 2, characterized in that, Step S2 includes: Step S200: Calculate the maximum phase difference slope b of the microphone signal based on the microphone spacing; Step S201: Divide the range of -b to b into a series of discrete values, and use the phase difference represented by the series of discrete values to compensate the second microphone in sequence, and restore the compensated spectrum of the second microphone from the compensated phase.
4. The sound source localization method as described in claim 3, characterized in that, In step S201, the slope value is divided into several equal values from -b to b.
5. The sound source localization method as described in claim 4, characterized in that, In step S201, the slope value from -b to b is divided into 2M+1 equal values, and the equally divided slope is represented as a vector {b0, b1, ..., b}. 2M } 6. The sound source localization method as described in claim 3, characterized in that, In step S3, the spectrum of the first microphone is subtracted from the phase compensation spectrum of the second microphone, and the slope value that minimizes the absolute value of the difference is obtained.
7. The sound source localization method as described in claim 6, characterized in that, In step S4, the results of each frame are stored in an array, and the average value of the results in the array is calculated; or the τ value that appears most frequently in the array is found as the result output.
8. The sound source localization method as described in claim 1, characterized in that, The method further includes: Step S5: When there are multiple microphones, obtain multiple azimuth angles based on every two microphones, and determine the common azimuth as the final output.
9. A sound source localization device, comprising: The time-frequency conversion and polar coordinate processing unit is used to convert any two microphone signals to the frequency domain and obtain the polar coordinate representation of the spectrum. The phase compensation unit is used to calculate the maximum phase difference slope of the microphone signal based on the microphone spacing, and divide the phase difference slope according to the accuracy requirements, and compensate the second microphone in sequence, and restore the compensated spectrum of the second microphone from the compensated phase. The slope selection unit is used to perform differential or correlation calculations between the first microphone spectral signal and the second microphone compensation signal, and select the slope b that minimizes the energy of the differential result or maximizes the correlation. m ; The delay calculation unit is used to deduce the delay of the signal arriving at the microphone based on the obtained slope; Azimuth estimation unit is used to obtain the signal azimuth based on the obtained delay.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the sound source localization method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Method for reducing influence of frequency difference on time delay estimation
CN109541531A
Time delay estimation apparatus and time delay estimation method therefor
US20170192080A1