Sound signal processing method and device and earphone

By using binaural symmetrical microphone array and filter processing technology in headphones, the problem of reducing external sound perception ability when wearing headphones is solved, and the effect of improving user perception ability and security is achieved.

CN119893366APending Publication Date: 2025-04-25GEER INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411976390.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When wearing headphones, the user's ability to perceive external sounds is reduced, resulting in the inability to respond to external sounds in time, affecting safety and communication efficiency.

Method used

By setting up a symmetrical microphone array of binaurals in the headset, obtaining external sound signals, determining the target microphone array, positioning the sound source orientation, and processing the sound signals through the corresponding filters, simulating the natural auditory experience when the headset is not worn.

Benefits of technology

Improve users' perception of external sounds when wearing headphones, ensure that users can respond to external sounds in a timely and accurate manner, and improve user experience and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893366A_ABST
    Figure CN119893366A_ABST
Patent Text Reader

Abstract

The invention discloses a sound signal processing method and device and an earphone, the method is applied to the earphone, the earphone comprises a first microphone array arranged on a left earphone and a second microphone array arranged on a right earphone, and the method comprises the following steps: acquiring a first sound signal obtained by acquiring an external sound signal by two symmetrical microphones of two ears; determining a target microphone array according to the first sound signal; acquiring a second sound signal obtained by acquiring the external sound signal by the target microphone array; according to the second sound signal, determining a target sound source orientation of a sound source of the external sound signal relative to the target microphone array; determining a target filter corresponding to the target sound source orientation according to the target sound source orientation; and filtering the external sound signal collected by the target microphone array through the filter parameter configured by the target filter to obtain a target sound signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of earphone technology, and more specifically, to a sound signal processing method, device and earphone. Background Art

[0002] At present, headphones have become an indispensable entertainment and communication tool in people's daily lives. When users wear headphones, the external environmental sounds are partially or completely isolated due to the direct contact between the headphones and the ears. This isolation makes users insensitive to external sounds. In many scenarios, users may not be able to respond to external sounds in a timely manner, thus affecting their safety and communication efficiency. For example, in public places, users may not be able to hear emergency notifications or important calls from others because they are wearing headphones.

[0003] In the prior art, although there have been some attempts to solve this problem by adding ambient sound modes or transparent modes, these solutions often have limited effects and cannot fully simulate the natural auditory experience when not wearing headphones. Summary of the invention

[0004] One purpose of an embodiment of the present application is to provide a new sound signal processing method that can improve the user's perception of external sounds when wearing headphones, ensure that the user can respond to external sounds in a timely and accurate manner, thereby improving user experience and safety.

[0005] According to a first aspect of the present invention, a sound signal processing method is provided, the sound signal processing method is applied to an earphone, the earphone comprises a first microphone array provided in a left earphone and a second microphone array provided in a right earphone, the method comprising:

[0006] Acquire a first sound signal obtained by collecting external sound signals with two symmetrical microphones at both ears;

[0007] Determine a target microphone array according to the first sound signal; wherein the target microphone array is one of the first microphone array and the second microphone array;

[0008] Acquire a second sound signal obtained by the target microphone array collecting the external sound signal;

[0009] Determining, according to the second sound signal, a target sound source position of the sound source of the external sound signal relative to the target microphone array;

[0010] According to the target sound source orientation, determining a target filter corresponding to the target sound source orientation;

[0011] The external sound signal collected by the target microphone array is filtered using the filter parameters configured by the target filter to obtain a target sound signal.

[0012] Optionally, the target microphone array includes a first microphone and a second microphone, the second sound signal includes a first sub-signal collected by the first microphone and a second sub-signal collected by the second microphone, and determining the direction of the sound source of the external sound signal relative to the target sound source of the target microphone array according to the second sound signal includes:

[0013] Determine a first time difference according to the first sub-signal and the second sub-signal; wherein the first time difference is a time difference between when the external sound signal reaches the first microphone and when the second microphone reaches the first microphone;

[0014] The target sound source orientation is determined according to the first time difference and the target microphone distance, wherein the target microphone distance is the distance between the first microphone and the second microphone.

[0015] Optionally, determining a first time difference according to the first split signal and the second split signal includes:

[0016] Performing cross-correlation analysis on the first sub-signal and the second sub-signal to determine an initial time difference; wherein the initial time difference is a time difference between the first sub-signal and the second sub-signal at a sampling point;

[0017] The first time difference is determined according to the initial time difference and a sampling rate of the second sound signal.

[0018] Optionally, performing cross-correlation analysis on the first sub-signal and the second sub-signal to determine the initial time difference includes:

[0019] Performing a first bandpass filter on the first divided signal and the second divided signal within a first set frequency range to obtain a filtered first divided signal and a filtered second divided signal;

[0020] A cross-correlation analysis is performed on the filtered first sub-signal and the filtered second sub-signal to determine an initial time difference.

[0021] Optionally, the first sound signal includes a left signal collected by a microphone provided in the left earphone and a right signal collected by a microphone provided in the right earphone, and determining the target microphone array according to the first sound signal includes:

[0022] A target microphone array is determined according to the signal amplitude of the left signal and the signal amplitude of the right signal.

[0023] Optionally, determining the target microphone array according to the signal amplitude of the left signal and the signal amplitude of the right signal includes:

[0024] When the root mean square value of the signal amplitude of the left signal is greater than the root mean square value of the signal amplitude of the right signal, determining that the target microphone array is the first microphone array;

[0025] When the root mean square value of the signal amplitude of the left signal is smaller than the root mean square value of the signal amplitude of the right signal, determining that the target microphone array is the second microphone array;

[0026] When the root mean square value of the signal amplitude of the left signal is equal to the root mean square value of the signal amplitude of the right signal, it is determined that the target microphone array is the first microphone array or the second microphone array.

[0027] Optionally, determining the target microphone array according to the signal amplitude of the left signal and the signal amplitude of the right signal includes:

[0028] Performing a second bandpass filter on the left signal and the right signal within a second set frequency range to obtain a filtered left signal and a filtered right signal;

[0029] The target microphone array is determined according to the signal amplitude of the filtered left signal and the signal amplitude of the filtered right signal; wherein the lower limit value of the second set frequency range is greater than the upper limit value of the first set frequency range.

[0030] Optionally, determining a target filter corresponding to the target sound source orientation according to the target sound source orientation includes:

[0031] According to the target sound source orientation and the first corresponding relationship, determine the target filter corresponding to the target sound source orientation; wherein the first corresponding relationship is the corresponding relationship between the preset sound source orientation and the filter on the target ear side, and the target ear side is the ear side corresponding to the target microphone array.

[0032] Optionally, the step of determining the first corresponding relationship includes:

[0033] Acquire a head transfer function corresponding to each preset sound source orientation at the target ear side;

[0034] For any preset sound source orientation on the target ear side, determine the corresponding filter parameters according to the head transfer function corresponding to the preset sound source orientation and the preset relationship, and obtain the filter parameters corresponding to each preset sound source orientation on the target ear side; wherein the preset relationship reflects the relationship between the head transfer function and the filter parameters;

[0035] The filter to be configured in the filter array is configured according to the filter parameters corresponding to each preset sound source orientation on the target ear side, and a correspondence between each preset sound source orientation on the target ear side and the configured filters in the filter array is established to obtain the first correspondence.

[0036] Optionally, determining a target filter corresponding to the target sound source orientation according to the target sound source orientation includes:

[0037] Determine the target filter parameters corresponding to the target sound source orientation according to the target sound source orientation and the second corresponding relationship; wherein the second corresponding relationship is the corresponding relationship between the preset sound source orientation and the filter parameters on the target ear side, and the target ear side is the ear side corresponding to the target microphone array;

[0038] The filter to be configured is configured according to the target filter parameters to obtain the target filter corresponding to the target sound source orientation.

[0039] Optionally, the step of determining the second corresponding relationship includes:

[0040] Acquire a head transfer function corresponding to each preset sound source orientation at the target ear side;

[0041] For any preset sound source orientation on the target ear side, determine the corresponding filter parameters according to the head transfer function corresponding to the preset sound source orientation and the preset relationship, and obtain the filter parameters corresponding to each preset sound source orientation on the target ear side; wherein the preset relationship reflects the relationship between the head transfer function and the filter parameters;

[0042] The second corresponding relationship is established according to the filter parameters corresponding to each preset sound source orientation on the target ear side.

[0043] According to a second aspect of the present invention, there is further provided a sound signal processing device, comprising a memory and a processor, wherein the memory is used to store executable instructions; the processor is used to operate according to the control of the instructions to execute the method as described in the first aspect.

[0044] According to a third aspect of the present invention, there is further provided an earphone, comprising a left earphone and a right earphone, and the sound signal processing device as described in the second aspect;

[0045] The left earphone is provided with a first microphone array, and the right earphone is provided with a second microphone array.

[0046] One beneficial effect of the present invention is that by acquiring a first sound signal obtained by collecting external sound signals with a microphone symmetrically located in both ears, and determining a target microphone array based on the first sound signal, it is possible to determine a target microphone array that is closer to the sound source based on the sound signals collected by the microphones of the left earphone and the microphones of the right earphone. Then, a second sound signal is obtained by collecting external sound signals with the target microphone array, and the orientation of the target sound source of the external sound signal relative to the target microphone array is determined. The external sound signal collected by the target microphone array is then processed by a target filter corresponding to the orientation of the target sound source to obtain a target sound signal. The target sound signal that has been filtered can make the external sound signal heard by the human ear when wearing headphones have the same effect as the sound heard by the human ear when not wearing headphones, which can improve the user's perception of external sounds when wearing headphones, and ensure that the user can respond to external sounds in a timely and accurate manner, thereby improving user experience and safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

[0048] Figure 1 is a schematic diagram of the hardware structure of the headset according to an embodiment of the present application;

[0049] Figure 2 is a flow chart of a sound signal processing method according to an embodiment of the present invention;

[0050] Figure 3 is a schematic diagram of a sound propagation path of an external sound signal transmitted to a human ear according to an embodiment of the present invention;

[0051] Figure 4 is a schematic diagram of the angular relationship between the target sound source orientation and the target microphone array according to an example of the present invention;

[0052] Figure 5 is a schematic structural diagram of a sound signal processing device according to an embodiment of the present invention;

[0053] Figure 6 2 is a schematic diagram of the structure of an earphone according to an embodiment of the present invention. DETAILED DESCRIPTION

[0054] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.

[0055] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0056] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0057] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0058] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0059] <Hardware Configuration>

[0060] Figure 1 is a block diagram of the hardware configuration of the headset 100 according to an embodiment of the present application.

[0061] like Figure 1 As shown, the earphone 100 includes a left earphone 1000 , a right earphone 2000 and a sound signal processing device 3000 .

[0062] The left earphone 1000 and the right earphone 2000 are respectively connected to the sound signal processing device 3000 for communication. The left earphone 1000 is provided with a first microphone array, and the right earphone 2000 is provided with a second microphone array.

[0063] Wherein, the first microphone array and the second microphone array include at least two earphones.

[0064] In this embodiment, refer to Figure 1 As shown, the left earphone 1000 may include a processor 1100, a memory 1200, a first microphone array 1300, a communication device 1400, and the like.

[0065] The processor 1100 may be a mobile version processor. The memory 1200 includes, for example, ROM (read-only memory), RAM (random access memory), non-volatile memory such as a hard disk, etc. The first microphone array 1300 includes at least two microphones, both of which can collect external sound signals. The communication device 1400 is capable of, for example, wired or wireless communication. The communication device 1400 may include a short-range communication device, such as any device for short-range wireless communication based on short-range wireless communication protocols such as Hilink protocol, WiFi (IEEE 802.11 protocol), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, LiFi, etc. The communication device 1400 may also include a remote communication device, such as any device for WLAN, GPRS, 2G / 3G / 4G / 5G remote communication.

[0066] In this embodiment, the memory 1200 of the left earphone 1000 is used to store instructions, and the instructions are used to control the processor 1100 to operate to at least perform the method performed by the left earphone according to any embodiment of the present invention. A technician can design instructions according to the scheme disclosed in the present invention. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0067] In this embodiment, refer to Figure 1 As shown, the right earphone 2000 may include a processor 2100, a memory 2200, a second microphone array 2300, a communication device 2400, and the like.

[0068] The processor 2100 may be a mobile version processor. The memory 2200 includes, for example, ROM (read-only memory), RAM (random access memory), non-volatile memory such as a hard disk, etc. The second microphone array 2300 includes at least two microphones, both of which can collect external sound signals. The communication device 2400 is capable of, for example, wired or wireless communication, and the communication device 1400 may include a short-range communication device, such as any device for short-range wireless communication based on short-range wireless communication protocols such as Hilink protocol, WiFi (IEEE 802.11 protocol), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, LiFi, etc. The communication device 2400 may also include a remote communication device, such as any device for WLAN, GPRS, 2G / 3G / 4G / 5G remote communication.

[0069] In this embodiment, the memory 2200 of the right earphone 2000 is used to store instructions, and the instructions are used to control the processor 2100 to operate to at least perform the method performed by the right earphone according to any embodiment of the present invention. A technician can design instructions according to the scheme disclosed in the present invention. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0070] The sound signal processing device 3000 is used to determine the target microphone array that is closer to the sound source based on the external sound signals collected by one microphone each in the first microphone array 1300 and the second microphone array 1400 that are symmetrical to both ears, and then determine the specific position of the sound source relative to the target microphone array through the external sound signals collected after beamforming by the target microphone array, so as to select a suitable filter to process the external sound signal for the sound source in the specific position to obtain the target sound signal.

[0071] In this embodiment, refer to Figure 1 As shown, the sound signal processing device 3000 may include a processor 3100, a memory 3200, a communication device 3300, a filter 3400, and the like.

[0072] Processor 3100 may be a mobile version processor. Memory 3200 may include, for example, ROM (read-only memory), RAM (random access memory), non-volatile memory such as a hard disk, etc. Communication device 3300 may, for example, be capable of wired or wireless communication. Communication device 3300 may include a short-range communication device, such as any device for short-range wireless communication based on short-range wireless communication protocols such as Hilink protocol, WiFi (IEEE 802.11 protocol), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, LiFi, etc. Communication device 3300 may also include a remote communication device, such as any device for WLAN, GPRS, 2G / 3G / 4G / 5G remote communication. Filter 3400 is used to filter the external sound signal collected by the target microphone array to obtain the target sound signal.

[0073] In this embodiment, the memory 3200 of the sound signal processing device 3000 is used to store instructions, and the instructions are used to control the processor 3100 to operate to at least perform the method performed by the sound signal processing device according to any embodiment of the present invention. A technician can design instructions according to the scheme disclosed in the present invention. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0074] Despite Figure 1, multiple devices of the sound signal processing device 3000 are shown, but the present invention may only involve some of the devices, for example, the sound signal processing device 3000 only involves the memory 3200 and the processor 3100.

[0075] <Method Example>

[0076] Figure 2 is a flow chart of a sound signal processing method according to an embodiment of the present application, the method is applied to a sound signal processing device of a headset, that is, Figure 1 The sound signal processing device 3000 in the embodiment of the present invention. The earphone 100 includes a first microphone array 1300 provided in the left earphone and a second microphone array 2300 provided in the right earphone. The first microphone array 1300 and the second microphone array 2300 include at least two microphones, both for collecting external sound signals, so the microphones in the first microphone array and the second microphone array can also be called feedforward microphones.

[0077] according to Figure 2 As shown, the sound signal processing method of this embodiment may include the following steps S2100 to S2600:

[0078] Step S2100: Acquire a first sound signal obtained by collecting external sound signals using two symmetrical microphones at both ears.

[0079] In this embodiment, the two symmetrical microphones may be two microphones in the first microphone array and the second microphone array that are symmetrically arranged relative to the center of the wearer's head in terms of spatial layout. For ease of description, the two symmetrical microphones may be microphone A and microphone B, microphone A is included in the first microphone array, and microphone B is included in the second microphone array.

[0080] like Figure 3 As shown, it can represent the sound propagation path of the external sound signal transmitted to the position of the human ear when wearing headphones. The external sound signal is x(t), and the first sound signal obtained by microphone A and microphone B collecting the external sound signal can be expressed as x(t)*R(s), where R(s) represents the total transfer function of the external sound signal transmitted from the environment to the positions of microphone A and microphone B.

[0081] In some embodiments, the first sound signal includes a left signal collected by a microphone provided in a left earphone (ie, microphone A) and a right signal collected by a microphone provided in a right earphone (ie, microphone B).

[0082] In this embodiment, R(s) may be the sum of a first transfer function R1(s) for transmitting an external sound signal from the environment to the position of microphone A and a second transfer function R2(s) for transmitting an external sound signal from the environment to the position of microphone B. Then, the left signal may be expressed as x(t)*R1(s), and the right signal may be expressed as x(t)*R2(s).

[0083] Step S2200: determining a target microphone array according to the first sound signal.

[0084] In this embodiment, the target microphone array is a microphone array that is close to the sound source of the external sound signal. The target microphone array may be the first microphone array or the second microphone array.

[0085] In some embodiments, the first sound signal includes a left signal collected by a microphone provided in a left earphone and a right signal collected by a microphone provided in a right earphone, and step S2200 determines a target microphone array according to the first sound signal, including: step S2200.1.

[0086] Step S2200.1, determining a target microphone array according to the signal amplitude of the left signal and the signal amplitude of the right signal.

[0087] In this embodiment, when the sound wave passes from the ear close to the sound source to the other ear, the head blocks and absorbs the sound, so there is an energy difference between the ears, that is, the interaural level difference (ILD). The interaural level difference will cause the difference in signal size (that is, signal amplitude) between the left signal and the right signal, so the target microphone array closer to the sound source can be determined based on the signal amplitude of the left signal and the signal amplitude of the right signal.

[0088] In an example, the microphone array corresponding to the signal with the larger signal amplitude between the signal amplitude of the left signal and the signal amplitude of the right signal may be used as the target microphone array.

[0089] In another example, the signal energy can also be directly represented by the root mean square value of the signal amplitude, and energy comparison can be performed to determine the target microphone array, that is, the root mean square value of the signal amplitude of the left signal is compared with the root mean square value of the signal amplitude of the right signal, and the microphone array corresponding to the signal with the larger root mean square value of the signal amplitude is determined as the target microphone array.

[0090] In another example, the signal amplitude of the left signal can be compared with the amplitude response of the head transfer function of the left ear at different sound source orientations obtained in advance to determine the approximate orientation of the sound source relative to the left ear, thereby determining the target microphone array. Alternatively, the signal amplitude of the right signal can be compared with the amplitude response of the head transfer function of the right ear obtained in advance to determine the approximate orientation of the sound source relative to the right ear, thereby determining the target microphone array.

[0091] It should be noted that the method of determining the target microphone array according to the signal amplitude of the left signal and the signal amplitude of the right signal is not specifically limited here.

[0092] In some embodiments, determining the target microphone array according to the signal amplitude of the left signal and the signal amplitude of the right signal in step S2200.1 includes: steps SA1 to SA3.

[0093] Step SA1: when the root mean square value of the signal amplitude of the left signal is greater than the root mean square value of the signal amplitude of the right signal, determining that the target microphone array is the first microphone array.

[0094] Step SA2: when the root mean square value of the signal amplitude of the left signal is smaller than the root mean square value of the signal amplitude of the right signal, determining that the target microphone array is the second microphone array.

[0095] Step SA3: when the root mean square value of the signal amplitude of the left signal is equal to the root mean square value of the signal amplitude of the right signal, determine that the target microphone array is the first microphone array or the second microphone array.

[0096] In this embodiment, the root mean square value of the signal amplitude of the sound signal collected by the microphone represents the energy of the external sound signal transmitted to the microphone position. Then, by calculating the root mean square value of the signal amplitude of the left signal and the root mean square value of the signal amplitude of the right signal, it is determined whether the sound source is closer to the left ear or the right ear, and then the target microphone array is determined.

[0097] When the RMS value of the signal amplitude of the left signal is greater than the RMS value of the signal amplitude of the right signal, the sound source is closer to the first microphone array at the left earphone position, and the first microphone array is used as the target microphone array.

[0098] When the RMS value of the signal amplitude of the left signal is smaller than the RMS value of the signal amplitude of the right signal, the sound source is closer to the second microphone array at the right earphone position, and the second microphone array is used as the target microphone array.

[0099] When the root mean square value of the signal amplitude of the left signal is equal to the root mean square value of the signal amplitude of the right signal, the first distance between the sound source and the first microphone array is close to the second distance between the sound source and the second microphone array, and the first microphone array or the second microphone array is used as the target microphone array.

[0100] It should be noted that the root mean square value of the signal amplitude of the left signal is equal to the root mean square value of the signal amplitude of the right signal and may be approximately equal.

[0101] According to an embodiment of the present application, by calculating the root mean square value of the signal amplitude of the left signal and the root mean square value of the signal amplitude of the right signal, the microphone array corresponding to the larger root mean square value is used as the target microphone array. Compared with the method of directly determining the target microphone array by the signal amplitude size, the target microphone array closer to the sound source can be determined more accurately, thereby improving the accuracy of sound source positioning.

[0102] Since the inter-aural level difference is frequency-dependent, that is, since low-frequency sound has a longer wavelength and is more likely to bypass the head, the inter-aural level difference is smaller and more difficult to compare, while high-frequency sound has a shorter wavelength and is more likely to be blocked by the head, resulting in a larger inter-aural level difference and easier to compare. Therefore, in order to improve the accuracy of determining the target microphone array based on the inter-aural level difference, when determining the target microphone array according to the signal amplitude of the left signal and the signal amplitude of the right signal in step S2200.1, the low-frequency sound in the left signal and the right signal can be first filtered out, and the high-frequency sound is retained.

[0103] Based on this, in some embodiments, determining the target microphone array according to the signal amplitude of the left signal and the signal amplitude of the right signal in step S2200.1 includes: step S2200.11 and step S2200.12.

[0104] Step S2200.11, performing a second bandpass filtering on the left signal and the right signal within a second set frequency range to obtain a filtered left signal and a filtered right signal.

[0105] In this embodiment, the second set frequency range may be, for example, 3000-6000 Hz, or may be other high frequency ranges with a frequency greater than 2000 Hz, which is not limited here.

[0106] In one embodiment, the second set frequency range is 3000-6000 Hz.

[0107] In this embodiment, the inventors found that when a 3000Hz sound signal is transmitted between the two ears, the level difference between the ears is more obvious, and the higher the frequency, the greater the level difference between the ears. However, since the wavelength of a sound signal greater than 6000Hz is small, it is easily interfered by other factors to produce interference cancellation. Therefore, for robustness, sound signals with frequencies greater than 6000Hz and sound signals with frequencies less than 3000Hz are not considered.

[0108] Step S2200.12, determining a target microphone array according to the signal amplitude of the filtered left signal and the signal amplitude of the filtered right signal.

[0109] In this embodiment, this step is the same as the step S2200.1 described above of determining the target microphone array according to the signal amplitude of the left signal and the signal amplitude of the right signal, and will not be repeated here.

[0110] Step S2300: Acquire a second sound signal obtained by the target microphone array collecting the external sound signal.

[0111] In this embodiment, the second sound signal obtained by the target microphone collecting the external sound signal can be directly obtained, or after the approximate sound source direction of the external sound signal (i.e., the first sound source direction) is determined by beamforming through the target microphone array, the second sound signal obtained by the target microphone array collecting the external sound signal after performing beamforming in the first sound source direction can be obtained. This is not limited here.

[0112] In some implementations, in order to improve the signal-to-noise ratio of the second sound signal collected by the target microphone array, that is, to make the sound components in the second sound signal come more from the sound source of the external sound signal, the second sound signal obtained by collecting the external sound signal by the target microphone array in step S2300 includes:

[0113] A second sound signal is obtained by collecting the external sound signal after the target microphone array performs beamforming in the first sound source orientation.

[0114] In this embodiment, when the sound source direction of the external sound signal is unknown, beamforming is performed through the target microphone array to determine the first sound source direction (i.e., the approximate sound source direction) of the sound source of the external sound signal relative to the target microphone array. That is, the first sound source direction is the sound source direction of the external sound signal determined by beamforming relative to the target microphone array.

[0115] The specific method of beamforming here may be initial scanning, fan-shaped or cone scanning, adaptive beamforming, multi-beam parallel processing, etc., which is not limited here.

[0116] The initial scan may be to perform beamforming in multiple directions in sequence to detect and identify the direction in which the sound source may exist, which is the first sound source orientation. The sector or cone scan may be to gradually narrow the search range until the orientation of the sound source signal is detected, that is, the first sound source orientation.

[0117] Those skilled in the art should understand that the specific method of beamforming involved above is well known in the art and will not be elaborated here.

[0118] After the first sound source orientation is determined, beamforming of the first sound source orientation is performed through the target microphone array, and a second sound signal of the external sound signal collected by the target microphone is obtained.

[0119] After the target microphone array performs beamforming in the first sound source direction, the sound signal corresponding to the first sound source direction in the second sound signal collected by the target microphone array will be enhanced, while the sound signals in other directions will be suppressed. Therefore, the specific sound source direction of the sound source of the external sound signal relative to the target microphone array, that is, the target sound source direction, can be determined based on the second sound signal.

[0120] Step S2400: determining the direction of the sound source of the external sound signal relative to the target sound source of the target microphone array according to the second sound signal.

[0121] In some embodiments, the target microphone array includes a first microphone and a second microphone, and the second sound signal includes a first sub-signal collected by the first microphone and a second sub-signal collected by the second microphone. In step S2400, the direction of the sound source of the external sound signal relative to the target sound source of the target microphone array is determined based on the second sound signal, including: steps S2400.1 to S2400.2.

[0122] Step S2400.1: determine a first time difference according to the first divided signal and the second divided signal.

[0123] In this embodiment, the location of the sound source can be performed by taking the first sub-signal collected by the first microphone and the second sub-signal collected by the second microphone in the target microphone array as an example to illustrate step S2400 of the present application.

[0124] First, the time difference between when the external sound signal reaches the first microphone and when the external sound signal reaches the second microphone, ie, the first time difference, is determined according to the first split signal and the second split signal.

[0125] In some embodiments, determining the first time difference according to the first sub-signal and the second sub-signal in step S2400.1 includes: steps SC1 and SC2.

[0126] Step SC1, performing cross-correlation analysis on the first sub-signal and the second sub-signal to determine an initial time difference.

[0127] In this embodiment, cross-correlation can be used to measure the similarity between the first sub-signal and the second sub-signal to determine the time delay between the two, that is, the initial time difference, where the initial time difference is the time difference between the first sub-signal and the second sub-signal at the sampling point.

[0128] x(n) is the first sub-signal collected by the first microphone, n is the sampling point index of the first sub-signal, n = 1, 2...N, N is the total number of sampling points of x(n). y(m) is the second sub-signal collected by the second microphone, m is the sampling point index of the second sub-signal, m = 1, 2...M, M is the total number of sampling points of y(m). The cross-correlation function of the first sub-signal and the second sub-signal can be shown as formula (1):

[0129]

[0130] Wherein, c(iN) represents the value of the cross-correlation function, that is, the result of the cross-correlation analysis, iN is the time offset, and i is the index variable when summing, which is used to traverse the sampling points of the first sub-signal and the second sub-signal when calculating the cross-correlation function.

[0131] When the first sub-signal and the second sub-signal are completely aligned in time, the cross-correlation function c(iN) reaches a maximum value. The maximum value of the cross-correlation function indicates that the correlation between the two signals is the strongest, and the time difference between the two signals when the cross-correlation function reaches the maximum value is taken as the initial time difference. The initial time difference is caused by the distance difference of the different paths of the sound source to reach the first microphone and the second microphone.

[0132] According to an embodiment of the present application, by using the time difference between the first sub-signal and the second sub-signal corresponding to the maximum value in the result of the cross-correlation analysis as the initial time difference, the accuracy of determining the time difference can be improved, thereby improving the accuracy of positioning.

[0133] Step SC2: determining the first time difference according to the initial time difference and the sampling rate of the second sound signal.

[0134] In this embodiment, the "data point difference" obtained by the cross-correlation analysis actually refers to the time difference between the two signals at the sampling points in the cross-correlation function, rather than the actual time difference.

[0135] By dividing the initial time difference by the sampling rate of the second sound signal to obtain the first time difference, the time difference between the first sub-signal and the second sub-signal at the sampling point can be converted into an actual time difference, i.e., the first time difference. The sampling rate refers to the number of times the first microphone and the second microphone sample per unit time, which determines the actual time interval between the sampling points.

[0136] In order to avoid affecting the accuracy of determining the first time difference due to the fact that the wavelength of the sound waves in the first sub-signal and the second sub-signal is smaller than the distance between the first microphone and the second microphone, in some embodiments, in step SC1, a cross-correlation analysis is performed on the first sub-signal and the second sub-signal to determine the initial time difference, including: step SC11 and step SC12.

[0137] Step SC11: performing a first bandpass filter on the first sub-signal and the second sub-signal within a first set frequency range to obtain a filtered first sub-signal and a filtered second sub-signal.

[0138] In this embodiment, the first set frequency range may be, for example, 100 Hz to 1500 Hz, or may be other frequency ranges less than 1500 Hz, which is not limited here.

[0139] In one embodiment, the first set frequency range is 100 Hz to 1500 Hz.

[0140] In this embodiment, the inventors have found that the wavelength of sound waves with a frequency above 1.5 kHz is smaller than the distance between the first microphone and the second microphone, which seriously affects the determination of the first time difference. Therefore, the first set frequency range can be set to 100 Hz to 1500 Hz.

[0141] In another embodiment, the lower limit value of the second set frequency range is greater than the upper limit value of the first set frequency range.

[0142] In this embodiment, the second set frequency range may be 3000-6000 Hz, and the first set frequency range may be 100 Hz to 1500 Hz.

[0143] Step SC12: performing cross-correlation analysis on the filtered first sub-signal and the filtered second sub-signal to determine an initial time difference.

[0144] In this embodiment, the filtered first sub-signal x(n) and the filtered second sub-signal y(m) are substituted into the above formula (1) to calculate the cross-correlation function, and the time difference between the two signals when the cross-correlation function reaches the maximum value is used as the initial time difference. In this way, the accuracy of determining the time difference between the two signals can be improved.

[0145] Step S2400.2: Determine the target sound source direction according to the first time difference and the target microphone distance.

[0146] In this embodiment, when the sound source is far away, it can be considered that the sound wave propagates in the form of a plane wave, and the direction of the plane wave is perpendicular to the direction of the wavefront. Figure 4 As shown, let the angle between the incoming wave direction of the plane wave and the line connecting the two array elements (i.e., the line connecting the first microphone and the second microphone) be θ, that is, the target sound source direction is θ, and the distance between the first microphone and the second microphone is d, that is, the target microphone spacing is d. The time difference between the wavefront being transmitted to the first microphone and the second microphone is the first time difference τ, and the wave speed is c. Then, the target sound source direction θ can be calculated by the following formula (2):

[0147] cos(θ)=cτ / d (2)

[0148] According to the embodiment of the present application, beamforming is performed by the target microphone array to determine the first sound source orientation (i.e., the approximate sound source orientation), and then the first time difference is determined by the first sub-signal and the second sub-signal collected after beamforming of the first sound source orientation by the target microphone array, and the target sound source orientation is further determined based on the first time difference and the target microphone spacing. By determining the sound source orientation twice, the accuracy of positioning the sound source orientation can be improved.

[0149] Step S2500: determining a target filter corresponding to the target sound source orientation according to the target sound source orientation.

[0150] In one example, a filter corresponding to each preset sound source orientation may be preconfigured, each filter corresponding to different filter parameters, and then after determining the target sound source orientation, the target filter corresponding to the target sound source orientation may be determined according to the target sound source orientation.

[0151] In another example, the filter parameters may not be configured for the filter first. After the target sound source orientation is determined, the filter parameters corresponding to the target sound source orientation may be determined based on the target sound source orientation, and then the filter to be configured may be configured based on the filter parameters to obtain the target filter corresponding to the target sound source orientation.

[0152] In some embodiments, determining a target filter corresponding to the target sound source orientation according to the target sound source orientation in step S2500 includes:

[0153] According to the target sound source orientation and the first corresponding relationship, a target filter corresponding to the target sound source orientation is determined.

[0154] In this embodiment, the first corresponding relationship is the corresponding relationship between the preset sound source orientation of the target ear side and the filter. That is to say, for different preset sound source orientations of the target ear side, it corresponds to different filters, and each filter is configured with filter parameters of the preset sound source orientation of the corresponding ear side. Among them, the target ear side is the ear side corresponding to the target microphone array, that is, when the target microphone array is the first microphone array, the target ear side is the left ear side, and when the target microphone array is the second microphone array, the target ear side is the right ear side.

[0155] It should be noted that the preset sound source orientation is the sound source orientation set for the target ear side, that is, when the target ear side is the left ear side, the preset sound source orientation is the sound source orientation relative to the left ear side, and when the target ear side is the right ear side, the preset sound source orientation is the sound source orientation relative to the right ear.

[0156] In some embodiments, the step of determining the first corresponding relationship includes: step S3100 to step S3300.

[0157] Step S3100: Obtain a head transfer function corresponding to each preset sound source orientation on the target ear side.

[0158] In this embodiment, when obtaining the head transfer function, a plurality of different sound source orientations may be preset for the target ear side, and then a human ear simulation test may be performed on the plurality of preset sound source orientations on the target ear side to obtain the head transfer function for the target ear side. The head transfer function on the target ear side is the first head transfer function on the left ear side or the second head transfer function measured on the right ear side.

[0159] The head transfer function at the target ear side includes an amplitude response and a phase response corresponding to each preset sound source orientation at the target ear side.

[0160] In some embodiments, when a plurality of different sound source orientations are set for a target ear side, the main lobe width during beamforming of the target microphone array may be used as a reference for the angular interval of the preset sound source orientations for the target ear side.

[0161] In this embodiment, the angular interval of the preset sound source orientation can be designed with reference to the main lobe width. The main lobe width refers to the angular range in which the gain is higher than a certain threshold (usually -3dB, i.e., half the power) in the beamforming pattern. The narrower the main lobe width, the higher the directional resolution, which can distinguish closer angular changes, thereby more accurately locating the sound source. At this time, the angular interval of the preset sound source orientation can be set to a smaller angular interval that matches the main lobe width. The wider the main lobe width, the lower the directional resolution. At this time, the angular interval of the preset sound source orientation can be set to a larger angular interval that matches the main lobe width.

[0162] By referring to the main lobe width of the target microphone array during beamforming and setting the angular interval of the preset sound source orientation corresponding to the target ear side of the target microphone array, the problem of inaccurate positioning caused by the incompatibility of the angular intervals of multiple preset sound source orientations with the main lobe width can be avoided.

[0163] In some embodiments, the main lobe width can be adjusted by increasing the number of array elements of the target microphone array or increasing the spacing between array elements, thereby adjusting the angular spacing of multiple preset sound source orientations.

[0164] For example, the calculation formula of the main lobe width of beamforming is: Wherein, N is the number of array elements of the target microphone array, and f is the frequency of the sound signal collected by the target microphone array. For an example in which the target microphone array includes a first microphone and a second microphone, N is 2, and d is the distance between the first microphone and the second microphone.

[0165] By increasing N or d, the main lobe width is reduced, thereby reducing the angular interval of the preset sound source orientations.

[0166] Step S3200: For any preset sound source orientation on the target ear side, determine the corresponding filter parameters according to the head transfer function corresponding to the preset sound source orientation and the preset relationship, and obtain the filter parameters corresponding to each preset sound source orientation.

[0167] In this embodiment, the preset relationship reflects the relationship between the head transfer function and the filter parameters.

[0168] The preset relationship can be obtained through the following derivation process: For the convenience of description, the target microphone array is the first microphone array, and the target ear side is the left ear side. Figure 3 As shown, it can represent the sound propagation path of the external sound signal transmitted to the left ear side of a person when wearing the headset 100. The sound signal at the eardrum of the left ear of a person includes the sound signal that remains after the external sound signal is passively soundproofed and the sound signal that is collected by the microphone and filtered by the filter and then transmitted to the left ear of the person through the speaker. The sound signal that remains after passive soundproofing is x(t)*P(s), and the sound signal that is collected by the microphone and filtered by the filter and then transmitted to the left ear of the person through the speaker is x(t)*R(s)*T(s)*G v (s). Based on this, the sound signal at the left eardrum of a person can be expressed as: v (t)=x(t)*P(s)+x(t)*R(s)*T(s)*G v(s). Where x(t) is the external sound signal, P(s) is the transfer function of the external sound signal transmitted to the left ear of the person after passive sound insulation, and R(s) is the transfer function of the external sound signal transmitted from the environment to the first microphone array position. T(s) is the filter parameter of the filter, G v (s) is the transfer function of sound from the loudspeaker to the left ear of a person.

[0169] It should be noted that P(s), R(s) and G v (s) can be obtained through actual measurement in a test environment. The test environment selects a pressure field environment, and there is no special restriction on the artificial human head used in the test.

[0170] In order to make the sound signal heard by the left ear after a person wears headphones the same as the external sound signal heard by the left ear when not wearing headphones, formula (3) needs to be satisfied:

[0171] X(s)P(s)+X(s)R(s)T(s)G v (s) = E v (s) = X(s)P HRTF (s) (3)

[0172] The external sound signal heard by the left ear when not wearing the earphone can be obtained by multiplying the external sound signal by the head transfer function P corresponding to the left ear. HRTF (s) is obtained. This process actually simulates the process of sound propagating from the sound source to the left ear.

[0173] According to the above formula (3), the relationship between the filter parameters and the head transfer function can be calculated, that is, the following formula (4), which is the preset relationship.

[0174]

[0175] By substituting the head transfer function of any preset sound source orientation on the left ear side into formula (4), the filter parameters corresponding to the preset sound source orientation on the left ear side can be obtained.

[0176] Step S3300, configure the filter to be configured in the filter array according to the filter parameters corresponding to each preset sound source orientation on the target ear side, and establish a correspondence between each preset sound source orientation on the target ear side and the configured filters in the filter array to obtain the first correspondence.

[0177] Continuing with the above example, a corresponding number of filters are set for each preset sound source orientation on the left ear side to form a filter array. If there are five preset sound source orientations on the left ear side, five filters are set, and at this time, the five filters are in a state to be configured, that is, the filter array includes five filters to be configured. Then, for any preset sound source orientation on the left ear side, any filter to be configured in the filter array is configured according to the filter parameters calculated by the above formula (4). After the configuration is completed, the filter to be configured becomes a configured filter, and finally a corresponding relationship between the preset sound source orientation measured by the left ear and the configured filter is established.

[0178] In some other embodiments, determining the target filter corresponding to the target sound source orientation according to the target sound source orientation in step S2500 includes: step S2500.1 and step S2500.2.

[0179] Step S2500.1, determining a target filter parameter corresponding to the target sound source orientation according to the target sound source orientation and a second corresponding relationship.

[0180] In this embodiment, the second corresponding relationship is the corresponding relationship between the preset sound source orientation of the target ear side and the filter parameters, that is, for different preset sound source orientations of the target ear side, it corresponds to different filter parameters. Wherein, the target ear side is the ear side corresponding to the target microphone array, that is, when the target microphone array is the first microphone array, the target ear side is the left ear side, and when the target microphone array is the second microphone array, the target ear side is the right ear side.

[0181] It should be noted that the preset sound source orientation is the sound source orientation set for the target ear side, that is, when the target ear side is the left ear side, the preset sound source orientation is the sound source orientation relative to the left ear side, and when the target ear side is the right ear side, the preset sound source orientation is the sound source orientation relative to the right ear.

[0182] Step S2500.2, configuring the filter to be configured according to the target filter parameters to obtain the target filter corresponding to the target sound source orientation.

[0183] In some embodiments, the step of determining the second corresponding relationship includes: step S4100 to step S4300.

[0184] Step S4100: Obtain a head transfer function corresponding to each preset sound source orientation at the target ear side.

[0185] This step is the same as the above step S3100 and will not be elaborated here.

[0186] Step S4200: For any preset sound source orientation on the target ear side, determine the corresponding filter parameters according to the head transfer function and the preset relationship corresponding to the preset sound source orientation, and obtain the filter parameters corresponding to each preset sound source orientation on the target ear side.

[0187] In this embodiment, the preset relationship reflects the relationship between the head transfer function and the filter parameters.

[0188] This step S4200 is the same as the above step S3200 and will not be elaborated here.

[0189] Step S4300: establishing the second corresponding relationship according to the filter parameters corresponding to each preset sound source orientation at the target ear side.

[0190] Step S2600: filtering the external sound signal collected by the target microphone array using the filter parameters configured by the target filter to obtain a target sound signal.

[0191] In this embodiment, since the filter parameters of the filter corresponding to any preset sound source orientation are calculated under the condition that the sound signal heard by a person after wearing headphones is the same as the external sound signal heard when not wearing headphones, the external sound signal collected by the target microphone array is filtered and processed by the filter parameters configured by the target filter to obtain the target sound signal, and then the target sound signal is played through the speaker, so that the external sound signal heard by the human ear when wearing headphones is the same as the sound heard by the human ear when not wearing headphones.

[0192] According to an embodiment of the present application, by acquiring a first sound signal obtained by collecting external sound signals with a microphone symmetrically located in both ears, and determining a target microphone array based on the first sound signal, it is possible to determine a target microphone array that is closer to the sound source based on the sound signals collected by the microphones of the left earphone and the right earphone. Then, a second sound signal is obtained by collecting external sound signals after beamforming by the target microphone array, and the target sound source position of the sound source of the external sound signal relative to the target microphone array is determined. The external sound signal collected by the target microphone array is then processed by a target filter corresponding to the target sound source position to obtain a target sound signal. The target sound signal that has been filtered can make the external sound signal heard by the human ear when wearing headphones have the same effect as the sound heard by the human ear when not wearing headphones, which can improve the user's perception of external sounds when wearing headphones, and ensure that the user can respond to external sounds in a timely and accurate manner, thereby improving user experience and safety.

[0193] In addition, by first determining the target microphone array based on the first sound signal, and then obtaining the second sound signal collected by the target microphone array after beamforming the first sound source direction, the target sound source direction can be determined. This can improve the accuracy of positioning the sound source direction and further improve the user's perception of external sounds when wearing headphones.

[0194] <Device Example>

[0195] Figure 5 It is a structural diagram of a sound signal processing device according to an embodiment of the present application.

[0196] like Figure 5 As shown, the sound signal processing device 500 includes a memory 510 and a processor 520, wherein the memory 510 is used to store executable instructions; and the processor 520 is used to operate according to the control of the instructions to execute the method described in any of the above method embodiments.

[0197] How instructions control the operation of a processor is well known in the art and will not be described in detail here.

[0198] Figure 6 It is a schematic diagram of the structure of an earphone according to an embodiment of the present application.

[0199] like Figure 6 As shown, the earphone 600 includes a left earphone 610, a right earphone 620, and a sound signal processing device 630;

[0200] The left earphone 610 is provided with a first microphone array, and the right earphone 620 is provided with a second microphone array.

[0201] In some embodiments, the earphones are headphones.

[0202] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.

[0203] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0204] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0205] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.

[0206] Various aspects of the present invention are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0207] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0208] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0209] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0210] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.

Claims

1. A sound signal processing method, characterized in that: The sound signal processing method is applied to an earphone, wherein the earphone comprises a first microphone array provided in a left earphone and a second microphone array provided in a right earphone, and the method comprises: Acquire a first sound signal obtained by collecting external sound signals with two symmetrical microphones at both ears; Determine a target microphone array according to the first sound signal; wherein the target microphone array is one of the first microphone array and the second microphone array; Acquire a second sound signal obtained by the target microphone array collecting the external sound signal; Determining, according to the second sound signal, a target sound source position of the sound source of the external sound signal relative to the target microphone array; According to the target sound source orientation, determining a target filter corresponding to the target sound source orientation; The external sound signal collected by the target microphone array is filtered using the filter parameters configured by the target filter to obtain a target sound signal.

2. The method according to claim 1, characterized in that The target microphone array includes a first microphone and a second microphone, the second sound signal includes a first sub-signal collected by the first microphone and a second sub-signal collected by the second microphone, and determining the direction of the sound source of the external sound signal relative to the target sound source of the target microphone array according to the second sound signal includes: Determine a first time difference according to the first sub-signal and the second sub-signal; wherein the first time difference is a time difference between when the external sound signal reaches the first microphone and when the second microphone reaches the first microphone; The target sound source orientation is determined according to the first time difference and the target microphone distance, wherein the target microphone distance is the distance between the first microphone and the second microphone.

3. The method according to claim 2, characterized in that The determining a first time difference according to the first divided signal and the second divided signal includes: Performing cross-correlation analysis on the first sub-signal and the second sub-signal to determine an initial time difference; wherein the initial time difference is a time difference between the first sub-signal and the second sub-signal at a sampling point; The first time difference is determined according to the initial time difference and a sampling rate of the second sound signal.

4. The method according to claim 3, characterized in that The performing cross-correlation analysis on the first sub-signal and the second sub-signal to determine the initial time difference includes: Performing a first bandpass filter on the first divided signal and the second divided signal within a first set frequency range to obtain a filtered first divided signal and a filtered second divided signal; A cross-correlation analysis is performed on the filtered first sub-signal and the filtered second sub-signal to determine an initial time difference.

5. The method according to claim 1, characterized in that: The first sound signal includes a left signal collected by a microphone provided in the left earphone and a right signal collected by a microphone provided in the right earphone, and determining a target microphone array according to the first sound signal includes: A target microphone array is determined according to the signal amplitude of the left signal and the signal amplitude of the right signal.

6. The method according to claim 5, characterized in that The step of determining a target microphone array according to the signal amplitude of the left signal and the signal amplitude of the right signal comprises: When the root mean square value of the signal amplitude of the left signal is greater than the root mean square value of the signal amplitude of the right signal, determining that the target microphone array is the first microphone array; When the root mean square value of the signal amplitude of the left signal is smaller than the root mean square value of the signal amplitude of the right signal, determining that the target microphone array is the second microphone array; When the root mean square value of the signal amplitude of the left signal is equal to the root mean square value of the signal amplitude of the right signal, it is determined that the target microphone array is the first microphone array or the second microphone array.

7. The method according to claim 5, characterized in that The step of determining a target microphone array according to the signal amplitude of the left signal and the signal amplitude of the right signal comprises: Performing a second bandpass filter on the left signal and the right signal within a second set frequency range to obtain a filtered left signal and a filtered right signal; The target microphone array is determined according to the signal amplitude of the filtered left signal and the signal amplitude of the filtered right signal; wherein the lower limit value of the second set frequency range is greater than the upper limit value of the first set frequency range.

8. The method according to claim 1, characterized in that The step of determining a target filter corresponding to the target sound source orientation according to the target sound source orientation includes: According to the target sound source orientation and the first corresponding relationship, determine the target filter corresponding to the target sound source orientation; wherein the first corresponding relationship is the corresponding relationship between the preset sound source orientation and the filter on the target ear side, and the target ear side is the ear side corresponding to the target microphone array.

9. The method according to claim 8, characterized in that The step of determining the first corresponding relationship includes: Acquire a head transfer function corresponding to each preset sound source orientation at the target ear side; For any preset sound source orientation on the target ear side, determine the corresponding filter parameters according to the head transfer function corresponding to the preset sound source orientation and the preset relationship, and obtain the filter parameters corresponding to each preset sound source orientation on the target ear side; wherein the preset relationship reflects the relationship between the head transfer function and the filter parameters; The filter to be configured in the filter array is configured according to the filter parameters corresponding to each preset sound source orientation on the target ear side, and a correspondence between each preset sound source orientation on the target ear side and the configured filters in the filter array is established to obtain the first correspondence.

10. The method according to claim 1, characterized in that The step of determining a target filter corresponding to the target sound source orientation according to the target sound source orientation includes: Determine the target filter parameters corresponding to the target sound source orientation according to the target sound source orientation and the second corresponding relationship; wherein the second corresponding relationship is the corresponding relationship between the preset sound source orientation and the filter parameters on the target ear side, and the target ear side is the ear side corresponding to the target microphone array; The filter to be configured is configured according to the target filter parameters to obtain the target filter corresponding to the target sound source orientation.

11. The method according to claim 10, characterized in that The step of determining the second corresponding relationship includes: Acquire a head transfer function corresponding to each preset sound source orientation at the target ear side; For any preset sound source orientation on the target ear side, determine the corresponding filter parameters according to the head transfer function corresponding to the preset sound source orientation and the preset relationship, and obtain the filter parameters corresponding to each preset sound source orientation on the target ear side; wherein the preset relationship reflects the relationship between the head transfer function and the filter parameters; The second corresponding relationship is established according to the filter parameters corresponding to each preset sound source orientation on the target ear side.

12. A sound signal processing device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store executable instructions; and the processor is used to operate according to the control of the instructions to execute the method according to any one of claims 1 to 11.

13. A headset, characterized in that: comprising a left earphone and a right earphone, and the sound signal processing device as claimed in claim 12; The left earphone is provided with a first microphone array, and the right earphone is provided with a second microphone array.