Sound signal processing method and device and earphone
By using binaural symmetric microphone and filter technology in headphones, the problem of reducing external sound perception ability when wearing headphones is solved, achieving better external sound perception and user safety.
Patent Information
- Application Number
- CN202411984708.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-30
AI Technical Summary
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 the user's safety and communication efficiency.
By setting up a symmetrical microphone in the headset, obtaining external sound signals, determining the sound source orientation, and configuring filter parameters according to the sound source orientation to process the sound signals, simulating the natural auditory experience when the headset is not worn.
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.
Smart Images

Figure CN119893368A_ABST
Abstract
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] With the rapid development of modern technology, headphones have become an indispensable entertainment and communication tool in people's daily lives. Whether commuting, working or relaxing, headphones provide users with a convenient audio experience, making the enjoyment of various audio content such as music, calls, games, etc. more personalized and private.
[0003] However, despite the many conveniences that headphones bring, they also bring some challenges. 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 the user insensitive to the sounds coming from the outside world. In many scenarios, it may cause the user to be unable to respond to external sounds in time, thus affecting the user's 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.
[0004] 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
[0005] 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.
[0006] 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 left earphone and a right earphone, the left earphone and the right earphone are respectively provided with at least one microphone, and the method comprises:
[0007] Acquire a first sound signal obtained by collecting external sound signals with two symmetrical microphones at both ears;
[0008] Determining, according to the first sound signal, the position of the sound source of the external sound signal relative to the first sound source of the earphone;
[0009] According to the first sound source orientation, a first filter corresponding to the first sound source orientation is determined; and the first sound signal is filtered using filter parameters configured by the first filter to obtain a target sound signal.
[0010] Optionally, the first sound signal includes a left sound signal collected by a microphone disposed at the position of the left earphone and a right sound signal collected by a microphone disposed at the position of the right earphone, and determining, based on the first sound signal, the orientation of the sound source of the external sound signal relative to the first sound source of the earphone, comprises:
[0011] Performing cross-correlation analysis on the left sound signal and the right sound signal to determine a first time difference between the left sound signal and the right sound signal;
[0012] Determine, according to the first time difference, candidate coordinate values of the sound source of the external sound signal relative to a headphone coordinate system; wherein the headphone coordinate system is a coordinate system constructed based on the left headphone and the right headphone;
[0013] According to the root mean square value of the amplitude of the left sound signal and / or the root mean square value of the amplitude of the right sound signal, a target coordinate value is selected from the candidate coordinate values as the first sound source orientation.
[0014] Optionally, performing cross-correlation analysis on the left sound signal and the right sound signal to determine a first time difference between the left sound signal and the right sound signal includes:
[0015] Performing a first bandpass filter on the left sound signal and the right sound signal within a first set frequency range to obtain a first left filtered sound signal and a first right filtered sound signal;
[0016] Performing cross-correlation analysis on the first left-side filtered sound signal and the first right-side filtered sound signal to determine a first time difference between the first left-side filtered sound signal and the first right-side filtered sound signal;
[0017] The step of selecting a target coordinate value from the candidate coordinate values as the first sound source orientation according to the root mean square value of the left sound signal amplitude and / or the root mean square value of the right sound signal amplitude includes:
[0018] Performing a second bandpass filtering on the left sound signal and the right sound signal within a second set frequency range to obtain a second left filtered sound signal and a second right filtered sound signal;
[0019] According to the root mean square value of the amplitude of the sound signal after the second left side filtering and / or the root mean square value of the amplitude of the sound signal after the second right side filtering, the target coordinate value is selected from the candidate coordinate values as the first sound source orientation; wherein the lower limit value of the second set frequency range is greater than the upper limit value of the first set frequency range.
[0020] Optionally, performing cross-correlation analysis on the left sound signal and the right sound signal to determine a first time difference between the left sound signal and the right sound signal includes:
[0021] A cross-correlation analysis is performed on the left sound signal and the right sound signal, and a time difference between the left sound signal and the right sound signal corresponding to a maximum value in a result of the cross-correlation analysis is used as the first time difference.
[0022] Optionally, determining, according to the first time difference, candidate coordinate values of the sound source of the external sound signal relative to a headphone coordinate system includes:
[0023] Determining a second time difference according to the first time difference and a sampling rate of the first sound signal;
[0024] The candidate coordinate value is determined according to the second time difference.
[0025] Optionally, selecting the target coordinate value from the candidate coordinate values according to the root mean square value of the left sound signal amplitude and / or the root mean square value of the right sound signal amplitude includes:
[0026] Obtaining the head transfer function corresponding to each preset sound source orientation;
[0027] Determining a candidate head transfer function corresponding to the candidate coordinate value according to the head transfer function corresponding to each preset sound source orientation;
[0028] Determining reference signal energy corresponding to the candidate coordinate value according to the candidate head transfer function;
[0029] A target coordinate value is selected from the candidate coordinate values according to the root mean square value of the left sound signal amplitude and / or the root mean square value of the right sound signal amplitude and the reference signal energy of the candidate coordinate values.
[0030] Optionally, determining a first filter corresponding to the first sound source orientation according to the first sound source orientation includes:
[0031] According to the first sound source orientation and the first corresponding relationship, a first filter corresponding to the first sound source orientation is determined; wherein the first corresponding relationship is a corresponding relationship between a preset sound source orientation and a filter.
[0032] Optionally, the step of determining the first corresponding relationship includes:
[0033] Obtaining the head transfer function corresponding to each preset sound source orientation;
[0034] For any preset sound source orientation, determine the filter parameters corresponding to the preset sound source orientation according to the head transfer function corresponding to the preset sound source orientation, and obtain the filter parameters corresponding to each preset sound source orientation;
[0035] The filters to be configured in the filter array are configured according to the filter parameters corresponding to each preset sound source orientation, and a corresponding relationship between each preset sound source orientation and the configured filters in the filter array is established to obtain the first corresponding relationship.
[0036] Optionally, determining a first filter corresponding to the first sound source orientation according to the first sound source orientation includes:
[0037] Determine a first filter parameter corresponding to the first sound source orientation according to the first sound source orientation and the second corresponding relationship; wherein the second corresponding relationship is a corresponding relationship between a preset sound source orientation and a filter parameter;
[0038] The filter to be configured is configured according to the first filter parameter to obtain a first filter corresponding to the first sound source orientation.
[0039] Optionally, the step of determining the second corresponding relationship includes:
[0040] Obtaining the head transfer function corresponding to each preset sound source orientation;
[0041] For any preset sound source orientation, determine the filter parameters corresponding to the preset sound source orientation according to the head transfer function corresponding to the preset sound source orientation, and obtain the filter parameters corresponding to each preset sound source orientation;
[0042] The second corresponding relationship is established according to the filter parameters corresponding to each preset sound source orientation.
[0043] Optionally, determining the filter parameters corresponding to the preset sound source orientation according to the head transfer function corresponding to the preset sound source orientation includes:
[0044] According to the head transfer function corresponding to the preset sound source orientation and the preset relationship, the corresponding filter parameters are determined; wherein the preset relationship reflects the relationship between the head transfer function and the filter parameters.
[0045] 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.
[0046] 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;
[0047] The left earphone and the right earphone are respectively provided with at least one microphone, and external sound signals are collected through one microphone in each of the left earphone and the right earphone to obtain a first sound signal, and the first sound signal is sent to the sound signal processing device.
[0048] One beneficial effect of the present invention is that a first sound signal is obtained by acquiring a first sound source position of the sound source of the external sound signal relative to the headset by using a microphone symmetrically placed on each ear, and a first filter corresponding to the first sound source position is determined according to the first sound source position, and the first sound signal is filtered by using the filter parameters configured by the first filter to obtain a target sound signal. This can make the external sound signal heard by the human ear when wearing the headset have the same effect as the sound heard by the human ear when not wearing the headset, and can improve the user's perception of external sound when wearing the headset, ensuring that the user can respond to external sound in a timely and accurate manner, thereby improving user experience and safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] 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.
[0050] Figure 1 is a schematic diagram of the hardware structure of the headset according to an embodiment of the present application;
[0051] Figure 2 is a flow chart of a sound signal processing method according to an embodiment of the present invention;
[0052] 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;
[0053] Figure 4 is a schematic diagram of transmission of external sound signals corresponding to different sound sources according to an example of the present invention;
[0054] Figure 5 is a schematic diagram of the arrangement of each preset sound source orientation according to an example of the present invention;
[0055] Figure 6 is a schematic diagram of a head transfer function corresponding to each preset sound source orientation according to an embodiment of the present invention;
[0056] Figure 7 is a schematic structural diagram of a sound signal processing device according to an embodiment of the present invention;
[0057] Figure 82 is a schematic diagram of the structure of an earphone according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] 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.
[0059] 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.
[0060] 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 part of the specification.
[0061] 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.
[0062] 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.
[0063] <Hardware Configuration>
[0064] Figure 1 is a block diagram of the hardware configuration of the headset 100 according to an embodiment of the present application.
[0065] like Figure 1 As shown, the earphone 100 includes a left earphone 1000 , a right earphone 2000 and a sound signal processing device 3000 .
[0066] Headphones can be in-ear headphones or headphones.
[0067] 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 and the right earphone 2000 are respectively provided with at least one microphone to collect external sound signals through the at least one microphone provided by the left earphone 1000 and the right earphone 2000 to obtain a first sound signal.
[0068] In this embodiment, refer to Figure 1 As shown, the left earphone 1000 may include a processor 1100, a memory 1200, a microphone 1300, a communication device 1400, and the like.
[0069] The processor 1100 may be a mobile version processor. The memory 1200 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, etc. The microphone 1300 may collect external sound signals. The communication device 1400 may, for example, be capable of 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.
[0070] 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.
[0071] In this embodiment, refer to Figure 1 As shown, the right earphone 2000 may include a processor 2100, a memory 2200, a microphone 2300, a communication device 2400, and the like.
[0072] The processor 2100 may be a mobile version processor. The memory 2200 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, etc. The microphone 2300 may collect external sound signals. The communication device 2400 may, for example, be capable of 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.
[0073] 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.
[0074] The sound signal processing device 3000 is used to process the left sound signal obtained by collecting the external sound signal by the microphone 1300 set in the left earphone and the right sound signal obtained by collecting the external sound signal by the microphone 2300 set in the right earphone to obtain the target sound signal.
[0075] 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.
[0076] 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 first sound signal obtained by microphone 1300 and microphone 2300 collecting external sound signals to obtain a target sound signal.
[0077] 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.
[0078] 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.
[0079] <Method Example>
[0080] 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 1The earphone 100 includes a left earphone 1000 and a right earphone 2000, wherein the left earphone is provided with at least one microphone 1300 and the right earphone is provided with at least one microphone 2300.
[0081] according to Figure 2 As shown, the sound signal processing method of this embodiment may include the following steps S2100 to S2400:
[0082] Step S2100: Acquire a first sound signal obtained by collecting external sound signals using two symmetrical microphones at both ears.
[0083] In this embodiment, the two symmetrical microphones refer to two microphones in the left earphone and the right earphone that are symmetrically placed relative to the center of the wearer's head in terms of spatial layout. Both microphones can be called feedforward microphones.
[0084] 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). The first sound signal obtained by collecting the external sound signal with two symmetrical microphones on each ear can be expressed as x(t)*R(s), where R(s) represents the total transfer function of the external sound signal from the environment to the position of two symmetrical microphones on each ear.
[0085] In some embodiments, the first sound signal includes a left sound signal collected by a microphone disposed at the left earphone position and a right sound signal collected by a microphone disposed at the right earphone position.
[0086] 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 microphone position set at the left earphone position and a second transfer function R2(s) for transmitting an external sound signal from the environment to the microphone position set at the right earphone position. Then, the left sound signal may be expressed as x(t)*R1(s), and the right sound signal may be expressed as x(t)*R2(s).
[0087] Step S2200: Determine the orientation of a sound source of the external sound signal relative to a first sound source of the earphone according to the first sound signal.
[0088] In the prior art, the phase difference can be determined based on the interaural time difference (ITD) between the left sound signal and the right sound signal, and then the direction of the sound source of the external sound signal relative to the first sound source of the earphone can be determined based on the phase difference. The interaural time difference refers to the time difference between the external sound signal reaching each microphone symmetrically located in both ears. The interaural time difference will cause a wavelength-related phase difference.
[0089] However, in some cases, the accuracy of the first sound source position determined by the interaural time difference is not high. Figure 4 As shown in the figure, the time for the sound source of the external sound signal to be transmitted from the front of the wearer to each of the two symmetrical microphones is T1 and T2, and the time for the sound source of the external sound signal to be transmitted from the back of the wearer to each of the two symmetrical microphones is T1' and T2', and T1 and T1' are equal, and T2 and T2' are equal. Therefore, the time difference of the sound source of the external sound signal being transmitted to each of the two symmetrical microphones is not enough to distinguish whether the sound source of the external sound signal is in front of or behind the person, and its accuracy is low.
[0090] Therefore, the inventors propose a new method for locating the sound source of external sound signals to solve the problem of low positioning accuracy of existing positioning methods. The details are as follows:
[0091] In some embodiments, determining the orientation of the sound source of the external sound signal relative to the first sound source of the earphone according to the first sound signal in step S2200 includes: steps S2200.1 to S2200.3.
[0092] Step S2200.1, performing cross-correlation analysis on the left sound signal and the right sound signal to determine a first time difference between the left sound signal and the right sound signal.
[0093] In this embodiment, cross-correlation may be used to measure the similarity between the left sound signal and the right sound signal to determine the time delay between the two, that is, the first time difference.
[0094] In some embodiments, step S2200.1 performs cross-correlation analysis on the left sound signal and the right sound signal to determine a first time difference between the left sound signal and the right sound signal, including:
[0095] A cross-correlation analysis is performed on the left sound signal and the right sound signal, and a time difference between the left sound signal and the right sound signal corresponding to a maximum value in a result of the cross-correlation analysis is used as the first time difference.
[0096] In this embodiment, x(n) is the left sound signal collected by the microphone of the left earphone, n is the sampling point index of the left sound signal, n=1, 2...N, N is the total number of sampling points of x(n). y(m) is the right sound signal collected by the microphone of the right earphone, m is the sampling point index of the right sound signal, m=1, 2...M, M is the total number of sampling points of y(m). The cross-correlation function can be shown as formula (1):
[0097]
[0098] 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 left sound signal and the right sound signal when calculating the cross-correlation function.
[0099] When the left sound signal and the right sound 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 left sound signal and the right sound signal when the cross-correlation function is the maximum value of the two signals is taken as the first time difference. The first time difference is caused by the distance difference of the different paths of the sound source to the microphone set in the left earphone and the microphone set in the right earphone.
[0100] According to an embodiment of the present application, by using the time difference between the left sound signal and the right sound signal corresponding to the maximum value in the result of the cross-correlation analysis as the first time difference, the accuracy of determining the time difference can be improved, thereby improving the accuracy of positioning.
[0101] 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 left sound signal and the right sound signal is smaller than the distance between each microphone that is symmetrical between the two ears, in some embodiments, step S2200.1 performs a cross-correlation analysis on the left sound signal and the right sound signal to determine the first time difference between the left sound signal and the right sound signal, including: step S2200.11 and step S2200.12.
[0102] Step S2200.11, performing a first bandpass filter on the left sound signal and the right sound signal within a first set frequency range to obtain a first left filtered sound signal and a first right filtered sound signal.
[0103] In this embodiment, the inventors have found that since the wavelength of sound waves with a frequency above 1.5 kHz is smaller than the distance between the two symmetrical microphones of the two ears, the determination of the first time difference is affected. Therefore, the first set frequency range can be, for example, 100 Hz to 1500 Hz, or other frequency ranges less than 1500 Hz, which is not limited here.
[0104] By performing a first bandpass filtering within a first set frequency range on the left sound signal and the right sound signal, only the low-frequency components in the left sound signal and the right sound signal can be retained, and the high-frequency components can be filtered out to obtain a first left filtered sound signal and a first right filtered sound signal.
[0105] Step S2200.12: performing cross-correlation analysis on the first left-side filtered sound signal and the first right-side filtered sound signal to determine a first time difference between the first left-side filtered sound signal and the first right-side filtered sound signal.
[0106] In this embodiment, the first left-side filtered sound signal and the first right-side filtered sound signal are substituted into the above formula (1) to calculate the cross-correlation function, that is, x(n)n=1,2…N is the first left-side filtered sound signal, and y(m)m=1,2…M is the first right-side filtered sound signal. The time difference between the first left-side filtered sound signal and the first right-side filtered sound signal when the two signals reach the maximum cross-correlation value is then taken as the first time difference.
[0107] In this way, by performing the first bandpass filtering within the first set frequency range on the left sound signal and the right sound signal, only the low-frequency components in the left sound signal and the right sound signal can be retained for cross-correlation analysis, thereby improving the accuracy of determining the first time difference between the two signals.
[0108] Step S2200.2: Determine candidate coordinate values of the sound source of the external sound signal relative to the headphone coordinate system according to the first time difference.
[0109] In this embodiment, the first time difference may be converted into a corresponding phase difference, and then the candidate coordinate value may be determined according to the phase difference, or the candidate coordinate value may be directly determined according to the first time difference, which is not limited here.
[0110] The headset coordinate system is a coordinate system constructed based on the left headset and the right headset. The headset coordinate system can be a coordinate system constructed with the midpoint of the line between the left headset and the right headset as the center of the circle and the line between the left headset and the right headset as the reference line (that is, the directions of the line between the left headset and the right headset are 0° and 180° respectively), or it can be a coordinate system constructed with the midpoint of the line between the left headset and the right headset as the center of the circle and the line perpendicular to the left headset and the right headset as the reference line (that is, the directions perpendicular to the line between the left headset and the right headset are 0° and 180°), which is not limited here.
[0111] For example, Figure 5 As shown, the midpoint of the line between the left earphone and the right earphone can be used as the center of the earphone coordinate system, and the center of the circle can be used as the starting point. The directions perpendicular to the line between the left earphone and the right earphone are defined as 0° and 180° respectively, thereby constructing the earphone coordinate system.
[0112] The candidate coordinate value may be the angle value of the sound source of the external sound signal in the headphone coordinate system. In other words, the candidate coordinate value may be the angle value between the line connecting the sound source of the external sound signal and the center of the circle and the reference line of the headphone coordinate system.
[0113] In one example, the process of determining the candidate coordinate value according to the first time difference may be: the preset sound source position may include: Figure 5 The five preset sound source orientations of 0°, 45°, 90°, 135°, and 180° are tested on the simulated human head in advance to obtain the head transfer function corresponding to each preset sound source orientation. The head transfer function includes the amplitude and phase response corresponding to each preset sound source orientation. Figure 6 As shown. Figure 6 The data shown show that the time difference is the largest in the 90° direction (estimated to be about 0.7ms based on the diameter of the human head), followed by 45° / 135° (about 0.35), and the time difference of 0° / 180° is close to 0. If the first time difference is 0.35ms, then the candidate coordinate values are 45° and 135°. If the first time difference is 0, then the candidate coordinate values are 0° and 180°.
[0114] In some embodiments, step S2200.2 determines the candidate coordinate value of the sound source of the external sound signal relative to the headphone coordinate system based on the first time difference, including: steps SB1 to SB2.
[0115] Step SB1, determining a second time difference according to the first time difference and the sampling rate of the first sound signal.
[0116] 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.
[0117] By dividing the first time difference by the sampling rate of the first sound signal to obtain the second time difference, the time difference between the two signals at the sampling point can be converted into an actual time difference, i.e., the second time difference. The sampling rate refers to the number of times the microphone samples per unit time, which determines the actual time interval between the sampling points.
[0118] Step SB2: determining the candidate coordinate value according to the second time difference.
[0119] Since the second time difference is more accurate than the first time difference, determining the candidate coordinate value according to the second time difference can improve the positioning accuracy.
[0120] Step S2200.3, selecting a target coordinate value from the candidate coordinate values as the first sound source orientation according to the RMS value of the left sound signal amplitude and / or the RMS value of the right sound signal amplitude.
[0121] In this embodiment, since the auricle can enhance the reflection of sound waves, the sound signal energy transmitted to the ear by the sound source located in front of the wearer is greater than the sound signal energy transmitted to the ear by the sound source located behind the wearer, and the sound signal energy can be represented by the root mean square value of the amplitude of the sound signal. Based on this, the target coordinate value can be selected from the candidate coordinate values according to the root mean square value of the amplitude of the left sound signal or the root mean square value of the amplitude of the right sound signal.
[0122] In some embodiments, in step S2200.3, the target coordinate value is selected from the candidate coordinate values according to the root mean square value of the left sound signal amplitude and / or the root mean square value of the right sound signal amplitude, including: steps SC1 to SC3.
[0123] Step SC1, obtaining a head transfer function corresponding to each preset sound source orientation.
[0124] In this embodiment, a test is performed on a simulated human head in advance to obtain a head transfer function corresponding to each preset sound source orientation. The preset sound source orientation may be as follows: Figure 5 The sound source orientation shown may also be set to other sound source orientations according to accuracy requirements, which is not limited here.
[0125] The head transfer function includes the amplitude and phase response corresponding to each preset sound source orientation. Moreover, for any preset sound source orientation, the head transfer function of the preset sound source orientation includes a first head transfer function corresponding to the left earphone and a second head transfer function corresponding to the right earphone.
[0126] Step SC2: determining a candidate head transfer function corresponding to the candidate coordinate value according to the head transfer function corresponding to each preset sound source orientation.
[0127] In this embodiment, from among multiple head transfer functions corresponding to multiple preset sound source orientations, a head transfer function whose preset sound source orientation is consistent with the candidate coordinate value is determined as a candidate head transfer function corresponding to the candidate coordinate value. The candidate head transfer function includes a first head transfer function corresponding to the left earphone and a second head transfer function corresponding to the right earphone.
[0128] Step SC3: determining the reference signal energy corresponding to the candidate coordinate value according to the candidate head transfer function.
[0129] In this embodiment, the reference signal energy is the root mean square value of the amplitude response of the candidate head transfer function.
[0130] If the candidate coordinate values are 45° and 135°, the reference signal energy corresponding to the candidate coordinate values 45° and 135° can be determined according to the RMS value of the amplitude response of the head transfer function when the preset sound source orientation is 45° and 135°. Among them, since the auricle will enhance the reflection of sound waves, the signal energy of the sound source located in front of the wearer is greater than the signal energy located behind the wearer, so the calculated reference signal energy corresponding to the candidate coordinate value 45° is greater than the reference signal energy corresponding to the candidate coordinate value 135°.
[0131] The reference signal energy includes a first reference signal energy corresponding to the left earphone and a second reference signal energy corresponding to the right earphone. For example, the reference signal energy corresponding to the candidate coordinate value 45° includes a first reference signal energy corresponding to 45° and a second reference signal energy corresponding to 45°.
[0132] Step SC4, selecting a target coordinate value from the candidate coordinate values according to the RMS value of the left sound signal amplitude and / or the RMS value of the right sound signal amplitude and the reference signal energy of the candidate coordinate values.
[0133] In one example, if the candidate coordinate values are 45° and 135°, it is impossible to determine whether the sound source is in front of or behind the wearer. Through the above steps SC1 to SC3, the reference signal energy corresponding to 45° and the reference signal energy corresponding to 135° are determined. Then the root mean square value of the left sound signal amplitude is compared with the first reference signal energy corresponding to 45° and the first reference signal energy corresponding to 135°. If the root mean square value of the left sound signal amplitude is greater than the first reference signal energy corresponding to 135° and less than the first reference signal energy corresponding to 45°, the target coordinate value is determined to be 45°. If the root mean square value of the left sound signal amplitude is greater than the first reference signal energy corresponding to 45°, the target coordinate value is determined to be 45°. If the root mean square value of the left sound signal amplitude is less than the first reference signal energy corresponding to 135°, the target coordinate value is determined to be 135°.
[0134] In another example, after determining the reference signal energy corresponding to 45° and the reference signal energy corresponding to 135°, the RMS value of the left sound signal amplitude and the RMS value of the right sound signal amplitude can be compared with the reference signal energy. If the RMS value of the left sound signal amplitude is greater than the first reference signal energy corresponding to 45°, and the RMS value of the right sound signal amplitude is greater than the second reference signal energy corresponding to 45°, then the target coordinate value is determined to be 45°. If the RMS value of the left sound signal amplitude is less than the first reference signal energy corresponding to 135°, and the RMS value of the right sound signal amplitude is less than the second reference signal energy corresponding to 135°, then the target coordinate value is determined to be 135°.
[0135] By comparing at least one of the actually collected root mean square value of the left sound signal amplitude and the root mean square value of the right sound signal amplitude with the reference signal energy corresponding to the candidate coordinate value, the specific sound source orientation can be selected from the candidate coordinate values, thereby improving the positioning accuracy of the sound source orientation.
[0136] The inventors have found that the reflection of sound waves by the auricle mainly acts on high-frequency sounds. In order to improve the accuracy of determining the target coordinate value from the candidate coordinate values based on the energy difference of the sound signal generated by the reflection of the sound waves by the auricle, the low-frequency sound can be first filtered out and the high-frequency sound can be retained when calculating the root mean square value of the amplitude of the left sound signal and / or the root mean square value of the amplitude of the right sound signal. Then, the target coordinate value can be determined from the candidate coordinate values by calculating the root mean square value of the amplitude of the high-frequency sound signal.
[0137] Based on this, in step S2200.3, the target coordinate value is selected from the candidate coordinate values as the first sound source orientation according to the root mean square value of the left sound signal amplitude and / or the root mean square value of the right sound signal amplitude, including: step S2200.31 and step S2200.32.
[0138] Step S2200.31, performing a second bandpass filtering on the left sound signal and the right sound signal within a second set frequency range to obtain a second left filtered sound signal and a second right filtered sound signal.
[0139] In this embodiment, the second set frequency range may be, for example, 3000-6000 Hz, or may be other frequency ranges greater than 2000 Hz, which is not limited here.
[0140] In one embodiment, the lower limit value of the second set frequency range is greater than the upper limit value of the first set frequency range.
[0141] Step S2200.32, select the target coordinate value from the candidate coordinate values as the first sound source direction according to the root mean square value of the amplitude of the second left-side filtered sound signal and / or the root mean square value of the amplitude of the second right-side filtered sound signal.
[0142] By performing the second bandpass filtering on the left sound signal and the right sound signal, only the high frequency components in the left sound signal and the right sound signal can be retained for signal energy calculation, thereby improving the accuracy of determining the target coordinate value from the candidate coordinate values.
[0143] After executing step S2200 to determine the first sound source orientation, execute step S2300 to determine a first filter corresponding to the first sound source orientation according to the first sound source orientation.
[0144] In one example, a filter corresponding to each preset sound source orientation may be pre-configured, each filter corresponding to different filter parameters, and then after determining the first sound source orientation, the first filter corresponding to the first sound source orientation may be determined according to the first sound source orientation.
[0145] In another example, the filter parameters may not be configured for the filter first. After the first sound source orientation is determined, the filter parameters corresponding to the first sound source orientation may be determined based on the first sound source orientation, and then the filter to be configured may be configured based on the filter parameters to obtain the first filter corresponding to the first sound source orientation.
[0146] In some embodiments, determining a first filter corresponding to the first sound source orientation according to the first sound source orientation in step S2300 includes:
[0147] A first filter corresponding to the first sound source orientation is determined according to the first sound source orientation and the first corresponding relationship.
[0148] In this embodiment, the first corresponding relationship is the corresponding relationship between the preset sound source orientation and the filter, that is, each preset sound source orientation corresponds to a filter, and each filter is configured with filter parameters corresponding to the preset sound source orientation.
[0149] In some embodiments, the step of determining the first corresponding relationship includes: step S3100 to step S3300.
[0150] Step S3100: obtaining a head transfer function corresponding to each preset sound source orientation.
[0151] In this embodiment, the transfer function from the sound source at different preset sound source directions to the simulated ear is collected by the simulated ear on the simulated head to obtain the head transfer function.
[0152] Specifically, the head transfer function can be obtained through the same steps as the above step SC1, which will not be described again here.
[0153] Step S3200: for any preset sound source orientation, determine the filter parameters corresponding to the preset sound source orientation according to the head transfer function corresponding to the preset sound source orientation, and obtain the filter parameters corresponding to each preset sound source orientation.
[0154] In some embodiments, determining the filter parameters corresponding to the preset sound source orientation according to the head transfer function corresponding to the preset sound source orientation in step S3200 includes: determining the corresponding filter parameters according to the head transfer function corresponding to the preset sound source orientation and a preset relationship.
[0155] In this embodiment, the preset relationship reflects the relationship between the head transfer function and the filter parameters.
[0156] The preset relationship can be obtained through the following derivation process, such as 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 sound signal at the eardrum of the human ear 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 human ear 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 human ear through the speaker is x(t)*R(s)*T(s)*G v (s). Based on this, the sound signal at the eardrum of the human ear 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 to the human ear after passive sound insulation, and R(s) represents the total transfer function of the external sound signal from the environment to the positions of two microphones symmetrically placed on both ears. T(s) is the filter parameter of the filter, G v (s) is the transfer function of sound from the loudspeaker to the human ear.
[0157] 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.
[0158] In order for the sound signal heard by a person wearing headphones to be the same as the external sound signal heard when not wearing headphones, formula (2) needs to be satisfied:
[0159] X(s)P(s)+X(s)R(s)T(s)G v (s) = E v (s) = X(s)P HRTF (s) (2)
[0160] The external sound signal heard when not wearing headphones can be obtained by multiplying the external sound signal by the head transfer function P HRTF (s) is obtained, which actually simulates the process of sound propagating from the sound source to each ear.
[0161] According to the above formula (2), the relationship between the filter parameters and the head transfer function can be calculated, that is, the following formula (3), which is the preset relationship.
[0162]
[0163] By substituting the head transfer function of any preset sound source orientation into formula (3), the filter parameters corresponding to the preset sound source orientation can be obtained.
[0164] Step S3300: configure the filter to be configured in the filter array according to the filter parameters corresponding to each preset sound source orientation, and establish a correspondence between each preset sound source orientation and the configured filters in the filter array to obtain the first correspondence.
[0165] In this embodiment, a corresponding number of filters are set for each preset sound source orientation to form a filter array. If there are five preset sound source orientations, 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, according to the filter parameters calculated by the above formula (3), any filter to be configured in the filter array is configured. 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 and the configured filter is established to obtain a first corresponding relationship.
[0166] In some other embodiments, determining the first filter corresponding to the first sound source orientation according to the first sound source orientation in step S2300 includes: step S4100 and step S4200.
[0167] Step S4100: determining a first filter parameter corresponding to the first sound source orientation according to the first sound source orientation and a second corresponding relationship.
[0168] In this embodiment, the second corresponding relationship is a corresponding relationship between a preset sound source orientation and a filter parameter.
[0169] In some embodiments, the step of determining the second corresponding relationship includes: step S5100 to step S5300.
[0170] Step S5100: obtaining a head transfer function corresponding to each preset sound source orientation.
[0171] This step is the same as the above step S3100 and will not be repeated here.
[0172] Step S5200: for any preset sound source orientation, determine the filter parameters corresponding to the preset sound source orientation according to the head transfer function corresponding to the preset sound source orientation, and obtain the filter parameters corresponding to each preset sound source orientation.
[0173] This step is the same as the above step S3200 and will not be repeated here.
[0174] Step S5300: establishing the second corresponding relationship according to the filter parameters corresponding to each preset sound source orientation.
[0175] In this embodiment, each preset sound source orientation corresponds to a filter parameter.
[0176] Step S4200: configuring the filter to be configured according to the first filter parameters to obtain a first filter corresponding to the first sound source orientation.
[0177] In this embodiment, the filter to be configured is configured according to the first filter parameters corresponding to the first sound source orientation to obtain the first filter corresponding to the first sound source orientation.
[0178] Step S2400: filtering the first sound signal using the filter parameters configured by the first filter to obtain a target sound signal.
[0179] 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 wearing headphones is the same as the external sound signal heard when not wearing headphones, the first sound signal is filtered by the filter parameters configured by the first 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.
[0180] According to the embodiment of the present application, a first sound signal is obtained by acquiring a first sound source position of the sound source of the external sound signal relative to the headset by a microphone symmetrically placed on each ear, and a first filter corresponding to the first sound source position is determined according to the first sound source position, and the first sound signal is filtered by the filter parameters configured by the first filter to obtain a target sound signal. This 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, and can improve the user's perception of external sounds when wearing headphones, ensuring that the user can respond to external sounds in a timely and accurate manner, thereby improving user experience and safety.
[0181] In addition, by determining candidate coordinate values based on the first time difference between the left sound signal and the right sound signal, and then selecting the target coordinate value from the candidate coordinate values based on the root mean square value of the left sound signal amplitude and / or the root mean square value of the right sound signal amplitude, the method of locating the sound source can improve the accuracy of sound source positioning and further improve the user's perception of external sounds when wearing headphones.
[0182] <Device Example>
[0183] FIG. 1 is a schematic diagram of the structure of a sound signal processing device according to an embodiment of the present application.
[0184] like Figure 7 As shown, the sound signal processing device 700 includes a memory 710 and a processor 720, wherein the memory 710 is used to store executable instructions; the processor 720 is used to operate according to the control of the instructions to execute the method described in any of the above method embodiments.
[0185] How instructions control the operation of a processor is well known in the art and will not be described in detail here.
[0186] Figure 8 It is a schematic diagram of the structure of an earphone according to an embodiment of the present application.
[0187] like Figure 8 As shown, the earphone 800 includes a left earphone 810, a right earphone 820 and a sound signal processing device 830;
[0188] The left earphone 810 and the right earphone 820 are respectively provided with at least one microphone, and external sound signals are collected by one microphone each in the left earphone 810 and the right earphone 820 to obtain a first sound signal, and the first sound signal is sent to the sound signal processing device 830.
[0189] The sound signal processing device 830 may be Figure 7 The device shown, or Figure 1 The device shown.
[0190] In some embodiments, the earphone 800 is an in-ear earphone.
[0191] In other embodiments, the earphone 800 is a headphone.
[0192] 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.
[0193] 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.
[0194] 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.
[0195] 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.
[0196] 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.
[0197] 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.
[0198] 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.
[0199] The flowcharts 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 flowchart or block diagram can represent a module, a program segment or a part of an instruction, and the module, a program segment or a part of 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 the flowchart, and the combination of the boxes in the block diagram and / or the flowchart 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.
[0200] 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, the earphone comprises a left earphone and a right earphone, the left earphone and the right earphone are respectively provided with at least one microphone, and the method comprises: Acquire a first sound signal obtained by collecting external sound signals with two symmetrical microphones at both ears; Determining, according to the first sound signal, the position of the sound source of the external sound signal relative to the first sound source of the earphone; According to the first sound source orientation, a first filter corresponding to the first sound source orientation is determined; and the first sound signal is filtered using filter parameters configured by the first filter to obtain a target sound signal.
2. The method according to claim 1, characterized in that The first sound signal includes a left sound signal collected by a microphone disposed at the position of the left earphone and a right sound signal collected by a microphone disposed at the position of the right earphone, and determining the orientation of the sound source of the external sound signal relative to the first sound source of the earphone according to the first sound signal includes: Performing cross-correlation analysis on the left sound signal and the right sound signal to determine a first time difference between the left sound signal and the right sound signal; Determine, according to the first time difference, candidate coordinate values of the sound source of the external sound signal relative to a headphone coordinate system; wherein the headphone coordinate system is a coordinate system constructed based on the left headphone and the right headphone; According to the root mean square value of the amplitude of the left sound signal and / or the root mean square value of the amplitude of the right sound signal, a target coordinate value is selected from the candidate coordinate values as the first sound source orientation.
3. The method according to claim 2, characterized in that The performing cross-correlation analysis on the left sound signal and the right sound signal to determine a first time difference between the left sound signal and the right sound signal comprises: Performing a first bandpass filter on the left sound signal and the right sound signal within a first set frequency range to obtain a first left filtered sound signal and a first right filtered sound signal; Performing cross-correlation analysis on the first left-side filtered sound signal and the first right-side filtered sound signal to determine a first time difference between the first left-side filtered sound signal and the first right-side filtered sound signal; The step of selecting a target coordinate value from the candidate coordinate values as the first sound source orientation according to the root mean square value of the left sound signal amplitude and / or the root mean square value of the right sound signal amplitude includes: Performing a second bandpass filtering on the left sound signal and the right sound signal within a second set frequency range to obtain a second left filtered sound signal and a second right filtered sound signal; According to the root mean square value of the amplitude of the sound signal after the second left side filtering and / or the root mean square value of the amplitude of the sound signal after the second right side filtering, the target coordinate value is selected from the candidate coordinate values as the first sound source direction; wherein the lower limit value of the second set frequency range is greater than the upper limit value of the first set frequency range.
4. The method according to claim 2, characterized in that: The performing cross-correlation analysis on the left sound signal and the right sound signal to determine a first time difference between the left sound signal and the right sound signal comprises: A cross-correlation analysis is performed on the left sound signal and the right sound signal, and a time difference between the left sound signal and the right sound signal corresponding to a maximum value in a result of the cross-correlation analysis is used as the first time difference.
5. The method according to claim 2, characterized in that: The determining, according to the first time difference, candidate coordinate values of the sound source of the external sound signal relative to the earphone coordinate system includes: Determining a second time difference according to the first time difference and a sampling rate of the first sound signal; The candidate coordinate value is determined according to the second time difference.
6. The method according to claim 2, characterized in that The step of selecting a target coordinate value from the candidate coordinate values according to the root mean square value of the amplitude of the left sound signal and / or the root mean square value of the amplitude of the right sound signal comprises: Obtaining the head transfer function corresponding to each preset sound source orientation; Determining a candidate head transfer function corresponding to the candidate coordinate value according to the head transfer function corresponding to each preset sound source orientation; Determining reference signal energy corresponding to the candidate coordinate value according to the candidate head transfer function; A target coordinate value is selected from the candidate coordinate values according to the root mean square value of the left sound signal amplitude and / or the root mean square value of the right sound signal amplitude and the reference signal energy of the candidate coordinate values.
7. The method according to claim 1, characterized in that The step of determining a first filter corresponding to the first sound source orientation according to the first sound source orientation includes: According to the first sound source orientation and the first corresponding relationship, a first filter corresponding to the first sound source orientation is determined; wherein the first corresponding relationship is a corresponding relationship between a preset sound source orientation and a filter.
8. The method according to claim 7, characterized in that The step of determining the first corresponding relationship includes: Obtaining the head transfer function corresponding to each preset sound source orientation; For any preset sound source orientation, determine the filter parameters corresponding to the preset sound source orientation according to the head transfer function corresponding to the preset sound source orientation, and obtain the filter parameters corresponding to each preset sound source orientation; The filters to be configured in the filter array are configured according to the filter parameters corresponding to each preset sound source orientation, and a corresponding relationship between each preset sound source orientation and the configured filters in the filter array is established to obtain the first corresponding relationship.
9. The method according to claim 1, characterized in that: The step of determining a first filter corresponding to the first sound source orientation according to the first sound source orientation includes: Determine a first filter parameter corresponding to the first sound source orientation according to the first sound source orientation and the second corresponding relationship; wherein the second corresponding relationship is a corresponding relationship between a preset sound source orientation and a filter parameter; The filter to be configured is configured according to the first filter parameter to obtain a first filter corresponding to the first sound source orientation.
10. The method according to claim 9, characterized in that The step of determining the second corresponding relationship includes: Obtaining the head transfer function corresponding to each preset sound source orientation; For any preset sound source orientation, determine the filter parameters corresponding to the preset sound source orientation according to the head transfer function corresponding to the preset sound source orientation, and obtain the filter parameters corresponding to each preset sound source orientation; The second corresponding relationship is established according to the filter parameters corresponding to each preset sound source orientation.
11. The method according to claim 8 or 10, characterized in that: The step of determining the filter parameters corresponding to the preset sound source orientation according to the head transfer function corresponding to the preset sound source orientation comprises: According to the head transfer function corresponding to the preset sound source orientation and the preset relationship, the corresponding filter parameters are determined; wherein the preset relationship reflects the relationship between the head transfer function and the filter parameters.
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 and the right earphone are respectively provided with at least one microphone, and external sound signals are collected through one microphone in each of the left earphone and the right earphone to obtain a first sound signal, and the first sound signal is sent to the sound signal processing device.
Citation Information
Patent Citations
Equipment positioning method, equipment positioning device, earphone device, and electronic equipment
CN109413556A
Filtering method and device in transparent mode, earphone and readable storage medium
CN114363770A
Mobile robot space sound source positioning method based on single microphone pressure amplitude ratio
CN114706042A
Audio processing method and electronic equipment
CN114727212A
Sound signal processing method and device, earphone equipment and storage medium
CN114760560A