A method, device, terminal equipment and storage medium for judging the distance of a sound source

By calculating the delay difference of the microphone array element line pair, it is determined whether the sound source is in the near field or the far field, which solves the problem of low sound source positioning accuracy in the existing technology and improves the accuracy of the sound source positioning.

CN112540347BActive Publication Date: 2024-10-18TP-LINK INT SHENZHEN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011284929.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-17
Publication Date
2024-10-18
Estimated Expiration
2040-11-17

Smart Images

  • Figure CN112540347B_ABST
    Figure CN112540347B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, terminal equipment and storage medium for judging the distance of a sound source. The method comprises: obtaining a microphone array for receiving a sound source, wherein the microphone array comprises an even number of microphone array elements; obtaining an array element line according to any two microphone array elements, and forming an array element line pair with the array element lines that are parallel to each other and have equal lengths; calculating the time delay of two array element lines in the array element line pair receiving the sound source to obtain a first time delay and a second time delay; judging whether the sound source is in the near field or the far field according to the difference between the first time delay and the second time delay. The present invention judges whether the sound source is in the near field or the far field by calculating the time delay difference of the microphone array element line pair, which effectively reduces the complexity of judging the distance of the sound source and improves the accuracy of judging the distance of the sound source, thereby further improving the accuracy of sound source positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sound source positioning, and in particular to a method, device, terminal equipment and storage medium for determining the distance of a sound source. Background Art

[0002] In microphone array signal processing, the sound field model can be divided into a near-field model and a far-field model according to the distance between the sound source and the microphone array. Among them, the near-field model regards the sound wave as a spherical wave, which takes into account the amplitude difference between the signals received by each microphone array element. In the near-field case, the direction and amplitude of the signal reaching each microphone array element are different. Therefore, the near-field model must comprehensively consider the two factors of amplitude attenuation and phase difference. For the near-field model, the triangulation positioning method is usually used to locate the sound source. The far-field model regards the sound wave as a plane wave, which ignores the amplitude difference between the signals received by each microphone array element, and approximately assumes that the signals received by each microphone array element are only a simple time delay relationship.

[0003] In the prior art, an empirical formula is usually used to determine whether the sound source is in the near field or the far field. If R is the distance between the sound source and the center of the microphone array, L is the total length of the uniform linear array or the diameter of the uniform circular array, and lambda represents the minimum wavelength in the broadband signal, if R>2×L×L / lambda, it means that the sound source is in the far field, otherwise the sound source is in the near field. The sound source in the far field is located using the far field model, and the sound source in the near field is located using the near field model. However, due to the complexity of the problem, the current sound source localization usually chooses to ignore the judgment of the far field and the near field, and either uniformly uses the near field model or the far field model. This approach will greatly reduce the accuracy of sound source localization, that is, if it is impossible to accurately judge whether the sound source is in the far field or the near field, it is impossible to accurately locate the sound source, which will also affect the effect of subsequent beamforming. Summary of the invention

[0004] The technical problem to be solved by the embodiments of the present invention is to provide a method, device, terminal device and storage medium for judging the distance of a sound source, which can reduce the complexity of judging the distance of a sound source and improve the accuracy of judging the distance of a sound source, thereby improving the accuracy of sound source positioning.

[0005] In order to achieve the above object, an embodiment of the present invention provides a method for determining the distance of a sound source, comprising:

[0006] Acquire a microphone array for receiving a sound source, wherein the microphone array includes an even number of microphone array elements;

[0007] An array element line is obtained according to any two microphone array elements, and array element lines that are parallel to each other and have equal lengths are formed into an array element line pair;

[0008] Calculating the time delay of two array element lines in the array element line pair receiving the sound source to obtain a first time delay and a second time delay;

[0009] Whether the sound source is in the near field or the far field is determined according to the difference between the first time delay and the second time delay.

[0010] Further, calculating the time delay of two array element lines in the array element line pair receiving the sound source to obtain the first time delay and the second time delay specifically includes:

[0011] Calculating a time difference between two microphone array elements on one of the array element line pairs receiving the sound source to obtain a first delay;

[0012] The time difference between two microphone array elements on another array element line in the array element line pair receiving the sound source is calculated to obtain a second time delay.

[0013] Further, judging whether the sound source is in the near field or the far field according to the difference between the first time delay and the second time delay specifically includes:

[0014] Calculate the absolute value of the difference between the first delay and the second delay of each array line pair;

[0015] Calculate the average of the absolute values ​​of all array element line pairs;

[0016] When the average value is greater than a preset threshold, it is determined that the sound source is in the near field;

[0017] When the average value is less than or equal to a preset threshold, it is determined that the sound source is in the far field.

[0018] Furthermore, the microphone array includes at least four microphone array elements, and the at least four microphone array elements are evenly arranged.

[0019] The embodiment of the present invention further provides a device for determining the distance of a sound source, comprising:

[0020] An acquisition module, used to acquire a microphone array for receiving a sound source, wherein the microphone array includes an even number of microphone array elements;

[0021] A composition module, used for obtaining array element lines according to any two microphone array elements, and forming array element line pairs by combining the array element lines that are parallel to each other and have equal lengths;

[0022] A calculation module, used for calculating the time delay of two array element lines in the array element line pair receiving the sound source to obtain a first time delay and a second time delay;

[0023] A judgment module is used to judge whether the sound source is in the near field or the far field according to the difference between the first time delay and the second time delay.

[0024] Furthermore, the calculation module specifically includes:

[0025] A first calculation unit, configured to calculate a time difference between two microphone array elements on one of the array element line pairs receiving the sound source, to obtain a first delay;

[0026] The second calculation unit is used to calculate the time difference between two microphone array elements on another array element line in the array element line pair receiving the sound source to obtain a second delay.

[0027] Furthermore, the judgment module specifically includes:

[0028] An absolute value calculation unit, used for calculating the absolute value of the difference between the first delay and the second delay of each array line pair;

[0029] An average value calculation unit, used to calculate the average value of the absolute values ​​of all array element line pairs;

[0030] A first determination unit, configured to determine that the sound source is in a near field when the average value is greater than a preset threshold;

[0031] The second determination unit is configured to determine that the sound source is in the far field when the average value is less than or equal to a preset threshold.

[0032] Furthermore, the microphone array includes at least four microphone array elements, and the at least four microphone array elements are evenly arranged.

[0033] An embodiment of the present invention further provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any of the above-mentioned methods for determining the distance of a sound source when executing the computer program.

[0034] An embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned methods for determining the distance of a sound source.

[0035] Compared with the prior art, the beneficial effects of a method, device, terminal device and storage medium for judging the distance of a sound source provided by an embodiment of the present invention are as follows: by obtaining a microphone array for receiving a sound source, the microphone array includes an even number of microphone array elements; obtaining an array element line according to any two microphone array elements, and forming an array element line pair with the array element lines that are parallel to each other and equal in length; calculating the time delay of two array element lines in the array element line pair receiving the sound source to obtain a first time delay and a second time delay; judging whether the sound source is in the near field or the far field according to the difference between the first time delay and the second time delay. The embodiment of the present invention effectively reduces the complexity of judging the distance of the sound source by calculating the time delay difference of the microphone array element line pair, improves the accuracy of judging the distance of the sound source, and thus further improves the accuracy of sound source positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a flow chart of a preferred embodiment of a method for determining the distance of a sound source provided by the present invention;

[0037] Figure 2 It is a schematic diagram of a near-field model and a far-field model in a preferred embodiment of a method for determining the distance of a sound source provided by the present invention;

[0038] Figure 3 It is a structural schematic diagram of a preferred embodiment of a device for determining the distance of a sound source provided by the present invention;

[0039] Figure 4 It is a structural schematic diagram of a preferred embodiment of a terminal device provided by the present invention. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] See also Figure 1 , Figure 1 The figure is a flow chart of a preferred embodiment of a method for determining the distance of a sound source provided by the present invention. The method for determining the distance of a sound source comprises:

[0042] S1, obtaining a microphone array for receiving a sound source, wherein the microphone array includes an even number of microphone array elements;

[0043] S2, obtaining array element lines according to any two microphone array elements, and forming array element line pairs by combining the array element lines that are parallel to each other and have equal lengths;

[0044] S3, calculating the time delay of two array element lines in the array element line pair receiving the sound source to obtain a first time delay and a second time delay;

[0045] S4: Determine whether the sound source is in the near field or the far field according to the difference between the first time delay and the second time delay.

[0046] Specifically, first obtain a microphone array for receiving a sound source, wherein the microphone array includes an even number of microphone array elements, and most smart speaker products are regular square or circular arrays of 4mic or 6mic, and all microphone array elements are in the same plane; secondly, connect any two microphone array elements to obtain array element lines, and form array element line pairs with mutually parallel array element lines of equal length; then, respectively calculate the time delay of two array element lines in the array element line pair receiving the sound source to obtain a first time delay and a second time delay; finally, determine whether the sound source is in the near field or the far field according to the difference between the first time delay and the second time delay.

[0047] It should be noted that a microphone array is an array formed by a group of omnidirectional microphones located at different positions in space and arranged in a certain shape. It is a device for spatial sampling of spatially propagating sound signals, and the collected signals contain their spatial position information. According to the distance between the sound source and the microphone array, the array can be divided into a near-field model and a far-field model. According to the topological structure of the microphone array, it can be divided into a linear array, a planar array, a body array, etc. The microphone array in the embodiment of the present invention is a planar microphone array, and the centers of its array elements are distributed on a plane.

[0048] This embodiment determines whether the sound source is in the near field or the far field by calculating the delay difference of the microphone array element line pair, which effectively reduces the complexity of judging the distance of the sound source and improves the accuracy of judging the distance of the sound source, thereby further improving the accuracy of sound source positioning.

[0049] In another preferred embodiment, calculating the time delay of two array element lines in the array element line pair receiving the sound source to obtain the first time delay and the second time delay specifically includes:

[0050] S301, calculating a time difference between two microphone array elements on one of the array element line pairs receiving the sound source, to obtain a first delay;

[0051] S302 calculates the time difference between two microphone array elements on another array element line in the array element line pair receiving the sound source to obtain a second delay.

[0052] Specifically, when calculating the time delay of two array element lines in the array element line pair receiving the sound source, the time difference of two microphone array elements on one of the array element lines in the array element line pair receiving the sound source is first calculated to obtain a first time delay, and then the time difference of two microphone array elements on the other array element line in the array element line pair receiving the sound source is calculated to obtain a second time delay.

[0053] It should be noted that the method for calculating the time difference between two microphone array elements on the array element line receiving the sound source includes but is not limited to a weighted correlation function method and a time delay estimation algorithm.

[0054] In another preferred embodiment, judging whether the sound source is in the near field or the far field according to the difference between the first time delay and the second time delay specifically includes:

[0055] S401, calculating the absolute value of the difference between the first delay and the second delay of each array line pair;

[0056] S402, calculating the average of the absolute values ​​of all array element line pairs;

[0057] S403, when the average value is greater than a preset threshold, it is determined that the sound source is in the near field;

[0058] S404: When the average value is less than or equal to a preset threshold, it is determined that the sound source is in the far field.

[0059] Specifically, after calculating the time delay of two array element lines in the array element line pair receiving the sound source to obtain the first time delay and the second time delay, first calculate the absolute value of the difference between the first time delay and the second time delay of each array element line pair, then calculate the average value of the absolute values ​​of all array element line pairs, and then judge whether the sound source is in the near field or the far field according to the size of the average value. When the average value is greater than a preset threshold, it is determined that the sound source is in the near field. When the average value is less than or equal to the preset threshold, it is determined that the sound source is in the far field.

[0060] As a preferred solution, the microphone array includes at least four microphone array elements, and the at least four microphone array elements are evenly arranged.

[0061] For example, see Figure 2 , Figure 2 It is a schematic diagram of a near-field model and a far-field model in a preferred embodiment of a method for determining the distance of a sound source provided by the present invention. The microphone array includes four microphone array elements, and the four microphone array elements form a uniform square array, which are respectively located at coordinates X0 (0, 0), X1 (1, 0), X2 (1, 1), and X3 (0, 1). For the near-field model, the sound source is located at coordinates S (0, 2), and the sound wave is regarded as a spherical wave. For the far-field model, the sound source S is located on the straight line y = 2, and the sound wave is regarded as a plane wave.

[0062] First, an array element line is obtained based on any two microphone array elements, and the array element lines that are parallel to each other and equal in length are formed into array element line pairs (X0, X3) and (X1, X2), (X0, X1) and (X3, X2). Secondly, the time difference between the two microphone array elements X0 and X3 on an array element line in the first array element line pair (X0, X3) and (X1, X2) receiving the sound source is calculated to obtain a first delay T 03 , calculate the time difference between the two microphone array elements X1 and X2 on the other array element line of the first array element line pair (X0, X3) and (X1, X2) receiving the sound source, and obtain the second delay T 12 ; Calculate the time difference between the two microphone array elements X0 and X1 on the second array element line pair (X0, X1) and (X3, X2) receiving the sound source, and obtain the first delay T 01 , calculate the time difference between the two microphone array elements X3 and X2 on the other array element line of the second array element line pair (X0, X1) and (X3, X2) receiving the sound source, and obtain the second delay T 32 Then calculate the first delay T of the first array line pair 03 With the second delay T 12 The absolute value of the difference is denoted as d(1)=abs(T 03 -T 12 ) ; Calculate the first delay T of the second array element line pair 01 With the second delay T 32 The absolute value of the difference is denoted as d(2)=abs(T 01 -T 32 ). Then calculate the average value of d(1) and d(2), and judge whether the sound source is in the near field or the far field according to the average value of d(1) and d(2). Figure 2 In the embodiment shown, when the average value of d(1) and d(2) is greater than 0, it is determined that the sound source is in the near field; when the average value of d(1) and d(2) is equal to 0, it is determined that the sound source is in the far field.

[0063] Correspondingly, the present invention also provides a device for determining the distance of a sound source, which can implement all the processes of the method for determining the distance of a sound source in the above embodiment.

[0064] See also Figure 3 , Figure 3 The structure diagram of a preferred embodiment of a device for determining the distance of a sound source provided by the present invention is as follows. The device for determining the distance of a sound source comprises:

[0065] An acquisition module 301 is used to acquire a microphone array for receiving a sound source, wherein the microphone array includes an even number of microphone array elements;

[0066] A forming module 302 is used to obtain array element lines according to any two microphone array elements, and form array element line pairs by forming the array element lines that are parallel to each other and have equal lengths;

[0067] A calculation module 303 is used to calculate the time delay of two array element lines in the array element line pair receiving the sound source to obtain a first time delay and a second time delay;

[0068] The judgment module 304 is used to judge whether the sound source is in the near field or the far field according to the difference between the first time delay and the second time delay.

[0069] Preferably, the calculation module 303 specifically includes:

[0070] A first calculation unit, configured to calculate a time difference between two microphone array elements on one of the array element line pairs receiving the sound source, to obtain a first delay;

[0071] The second calculation unit is used to calculate the time difference between two microphone array elements on another array element line in the array element line pair receiving the sound source to obtain a second delay.

[0072] Preferably, the judging module 304 specifically includes:

[0073] An absolute value calculation unit, used for calculating the absolute value of the difference between the first delay and the second delay of each array line pair;

[0074] An average value calculation unit, used to calculate the average value of the absolute values ​​of all array element line pairs;

[0075] A first determination unit, configured to determine that the sound source is in a near field when the average value is greater than a preset threshold;

[0076] The second determination unit is configured to determine that the sound source is in the far field when the average value is less than or equal to a preset threshold.

[0077] Preferably, the microphone array comprises at least four microphone array elements, and the at least four microphone array elements are evenly arranged.

[0078] In specific implementation, the working principle, control process and technical effect achieved by the device for determining the distance of a sound source provided in the embodiment of the present invention are the same as those of the method for determining the distance of a sound source in the above embodiment, and will not be repeated here.

[0079] See also Figure 4 , Figure 44 is a schematic diagram of a preferred embodiment of a terminal device provided by the present invention. The terminal device includes a processor 401, a memory 402, and a computer program stored in the memory 402 and configured to be executed by the processor 401. When the processor 401 executes the computer program, the method for determining the distance of a sound source described in any of the above embodiments is implemented.

[0080] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, ...), and the one or more modules / units are stored in the memory 402 and executed by the processor 401 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.

[0081] The processor 401 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor, or the processor 401 can be any conventional processor. The processor 401 is the control center of the terminal device, and various parts of the terminal device are connected using various interfaces and lines.

[0082] The memory 402 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory 402 can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory 402 can also be other volatile solid-state storage devices.

[0083] It should be noted that the above terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 4The structural diagram is only an example of the above-mentioned terminal device and does not constitute a limitation of the above-mentioned terminal device. It may include more or less components than shown in the figure, or combine certain components, or different components.

[0084] An embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the method for determining the distance of a sound source described in any of the above embodiments.

[0085] The embodiment of the present invention provides a method, apparatus, terminal device and storage medium for judging the distance of a sound source, by obtaining a microphone array for receiving a sound source, wherein the microphone array includes an even number of microphone array elements; obtaining an array element line according to any two microphone array elements, and forming an array element line pair with the array element lines that are parallel to each other and have equal length; calculating the time delay of two array element lines in the array element line pair receiving the sound source to obtain a first time delay and a second time delay; judging whether the sound source is in the near field or the far field according to the difference between the first time delay and the second time delay. The embodiment of the present invention effectively reduces the complexity of judging the distance of the sound source and improves the accuracy of judging the distance of the sound source by calculating the time delay difference of the microphone array element line pair, thereby further improving the accuracy of sound source positioning.

[0086] It should be noted that the system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the system embodiment provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0087] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for determining the distance of a sound source. It is characterized in that include: Acquire a microphone array for receiving a sound source, wherein the microphone array includes an even number of microphone array elements; An array element line is obtained according to any two microphone array elements, and array element lines that are parallel to each other and have equal lengths are formed into an array element line pair; Calculating the time delay of two array element lines in the array element line pair receiving the sound source to obtain a first time delay and a second time delay; Determining whether the sound source is in the near field or the far field according to the difference between the first time delay and the second time delay; The calculating of the time delay of two array element lines in the array element line pair receiving the sound source to obtain the first time delay and the second time delay specifically includes: Calculating a time difference between two microphone array elements on one of the array element line pairs receiving the sound source to obtain a first delay; Calculate the time difference between two microphone array elements on another array element line in the array element line pair receiving the sound source to obtain a second time delay; The step of judging whether the sound source is in the near field or the far field according to the difference between the first time delay and the second time delay specifically includes: Calculate the absolute value of the difference between the first delay and the second delay of each array line pair; Calculate the average of the absolute values ​​of all array element line pairs; When the average value is greater than a preset threshold, it is determined that the sound source is in the near field; When the average value is less than or equal to a preset threshold, it is determined that the sound source is in the far field.

2. A method for determining the distance of a sound source according to claim 1, It is characterized in that The microphone array includes at least four microphone array elements, and the at least four microphone array elements are evenly arranged.

3. A device for determining the distance of a sound source, It is characterized in that include: An acquisition module, used to acquire a microphone array for receiving a sound source, wherein the microphone array includes an even number of microphone array elements; A composition module, used for obtaining array element lines according to any two microphone array elements, and forming array element line pairs by combining the array element lines that are parallel to each other and have equal lengths; A calculation module, used for calculating the time delay of two array element lines in the array element line pair receiving the sound source to obtain a first time delay and a second time delay; A judging module, configured to judge whether the sound source is in a near field or a far field according to a difference between the first time delay and the second time delay; Wherein, the calculation module specifically includes: A first calculation unit, configured to calculate a time difference between two microphone array elements on one of the array element line pairs receiving the sound source, to obtain a first delay; A second calculation unit, used for calculating a time difference between two microphone array elements on another array element line of the array element line pair receiving the sound source, to obtain a second delay; Wherein, the judgment module specifically includes: An absolute value calculation unit, used for calculating the absolute value of the difference between the first delay and the second delay of each array line pair; An average value calculation unit, used to calculate the average value of the absolute values ​​of all array element line pairs; A first determination unit, configured to determine that the sound source is in a near field when the average value is greater than a preset threshold; The second determination unit is configured to determine that the sound source is in the far field when the average value is less than or equal to a preset threshold.

4. A device for determining the distance of a sound source according to claim 3, It is characterized in that The microphone array includes at least four microphone array elements, and the at least four microphone array elements are evenly arranged.

5. A terminal device, It is characterized in that The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for determining the distance of a sound source as claimed in any one of claims 1 to 2 is implemented.

6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for determining the distance of a sound source as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Mobile terminal and sound recording method and device thereof

    CN104219390A

  • Method and apparatus for localizing target sound source

    CN105467364A