WO2024216532A1 - Filtering method, filter apparatus, chip, and earphone - Google Patents
Filtering method, filter apparatus, chip, and earphone Download PDFInfo
- Publication number
- WO2024216532A1 WO2024216532A1 PCT/CN2023/089150 CN2023089150W WO2024216532A1 WO 2024216532 A1 WO2024216532 A1 WO 2024216532A1 CN 2023089150 W CN2023089150 W CN 2023089150W WO 2024216532 A1 WO2024216532 A1 WO 2024216532A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- frequency band
- signal
- sound signal
- energy
- transparent filter
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 76
- 238000001914 filtration Methods 0.000 title claims abstract description 59
- 230000005236 sound signal Effects 0.000 claims abstract description 256
- 238000012545 processing Methods 0.000 claims abstract description 60
- 230000009467 reduction Effects 0.000 claims abstract description 60
- 210000000883 ear external Anatomy 0.000 claims description 47
- 230000008569 process Effects 0.000 claims description 17
- 230000006870 function Effects 0.000 claims description 13
- 238000012546 transfer Methods 0.000 claims description 12
- 230000000694 effects Effects 0.000 abstract description 9
- 230000003044 adaptive effect Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 9
- 238000002955 isolation Methods 0.000 description 7
- 230000001629 suppression Effects 0.000 description 7
- 230000004044 response Effects 0.000 description 6
- 230000008878 coupling Effects 0.000 description 5
- 238000010168 coupling process Methods 0.000 description 5
- 238000005859 coupling reaction Methods 0.000 description 5
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 3
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 3
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 3
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 3
- 230000002238 attenuated effect Effects 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000007613 environmental effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001953 sensory effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 206010052137 Ear discomfort Diseases 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 208000032370 Secondary transmission Diseases 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 210000003027 ear inner Anatomy 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 210000003454 tympanic membrane Anatomy 0.000 description 1
Definitions
- Embodiments of the present application relate to the field of audio processing, and more specifically, to a filtering method, a filtering device, a chip, and a headset.
- Headphones especially in-ear headphones, block most of the ambient sound when worn normally.
- headphone wearers want to hear the ambient sound clearly in certain scenarios, so the headphones need to have a transparent mode.
- the transparent mode of the headphones can use a transparent filter to lift the sound outside the headphones, thereby restoring the external sound inside the ear.
- the transparent effect of the headphones directly affects the user's auditory experience. Therefore, how to improve the transparent effect of the headphones has become a problem that needs to be solved.
- the embodiments of the present application provide a filtering method, a filtering device, a chip and headphones, which can improve the transparency effect of the headphones.
- a filtering method is provided, which is applied to headphones with a transparent mode, the headphones comprising an external ear microphone, the sound signal collected by the external ear microphone comprising a signal of a first frequency band and a signal of a second frequency band, at least part of the frequency band in the first frequency band is lower than at least part of the frequency band in the second frequency band, the method comprising: processing the sound signal based on a first transparent filter to obtain a first filtered signal of the sound signal, the first transparent filter being a hardware transparent filter, and the gain of the first transparent filter for the signal of the first frequency band in the sound signal being greater than the gain of the first transparent filter for the signal of the second frequency band in the sound signal; performing background noise reduction processing on the sound signal, and processing the sound signal after background noise reduction based on a second transparent filter to obtain a second filtered signal of the sound signal, the second transparent filter being a software transparent filter, and the gain of the second transparent filter for the signal of the second frequency band in the sound signal after background noise reduction being
- the software transparent filter includes, for example, an FIR filter or an IIR filter
- the hardware transparent filter includes, for example, an FIR filter or an IIR filter.
- the performing background noise reduction processing on the sound signal includes: acquiring a pre-estimated background noise signal; and determining the sound signal after background noise reduction according to the background noise signal and the sound signal.
- the headset also includes a speaker and an in-ear microphone
- the method also includes: determining a secondary transfer function based on an audio signal output by the speaker and an in-ear signal collected by the in-ear microphone; determining the first transparent filter based on an external ear signal collected by the external ear microphone when the headset is worn and a signal received in the ear when the headset is not worn.
- the method also includes: determining energy values of multiple frequency bands of the sound signal; and adjusting the energy values of the multiple frequency bands of the compensation signal according to the energy values of the multiple frequency bands of the sound signal, so that the energy values of the multiple frequency bands of the compensation signal are less than or equal to energy thresholds corresponding to each of the multiple frequency bands.
- the energy values of the multiple frequency bands of the compensation signal are adjusted separately according to the energy values of the multiple frequency bands of the sound signal, including: determining the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band; and adjusting the energy value of each frequency band of the compensation signal according to the adjustment amount corresponding to each frequency band.
- determining the adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band includes: determining the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band and the energy threshold corresponding to each frequency band.
- the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among N frequency bands of the sound signal, where N is a positive integer.
- the method also includes: determining energy values of multiple frequency bands of the sound signal; the first transparent filter is also used to adjust the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands of the first filtered signal are less than or equal to energy thresholds corresponding to each of the multiple frequency bands; the second transparent filter is also used to adjust the energy values of the multiple frequency bands of the sound signal after background noise reduction so that the energy values of the multiple frequency bands of the second filtered signal are less than or equal to energy thresholds corresponding to each of the multiple frequency bands.
- the first transparent filter is specifically configured to, according to the energy value of each frequency band of the plurality of frequency bands of the sound signal and the energy threshold corresponding to each frequency band, Determine the adjustment amount corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal according to the adjustment amount corresponding to each frequency band;
- the second transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal after background noise reduction according to the adjustment amount corresponding to each frequency band.
- the first transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band; the second transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band.
- the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among N frequency bands of the sound signal, where N is a positive integer.
- the first frequency band is less than or equal to a preset first frequency threshold
- the second frequency band is greater than or equal to a preset second frequency threshold
- the first frequency threshold and the second frequency threshold are between 2 kHz and 3 kHz.
- a filtering device which is applied to headphones with a transparent mode, the headphones comprising an external ear microphone, the sound signal collected by the external ear microphone comprising a signal of a first frequency band and a signal of a second frequency band, at least part of the frequency band in the first frequency band is lower than at least part of the frequency band in the second frequency band, the filtering device comprising: a first transparent filter, used to process the sound signal to obtain a first filtered signal of the sound signal, the first transparent filter is a hardware transparent filter, and the gain of the first transparent filter on the signal of the first frequency band in the sound signal is greater than the gain of the first transparent filter on the signal of the second frequency band in the sound signal; a processing module, used to perform background noise reduction processing on the sound signal; a second transparent filter, used to process the sound signal after background noise reduction to obtain a second filtered signal of the sound signal, the second transparent filter is a software transparent filter, and the gain of the second transparent filter on the signal of the second frequency band in
- the processing module is further configured to determine a compensation signal of the earphone according to the first filtered signal and the second filtered signal.
- the software transparent filter includes, for example, an FIR filter or an IIR filter.
- the transmission filter includes, for example, a FIR filter or an IIR filter.
- the processing module is specifically used to: obtain a pre-estimated background noise signal; and determine the sound signal after background noise reduction according to the background noise signal and the sound signal.
- the earphone also includes a speaker and an in-ear microphone
- the processing module is further used to: determine the secondary transfer function based on the audio signal output by the speaker and the in-ear signal collected by the in-ear microphone; determine the first transparent filter based on the external ear signal collected by the external ear microphone when the earphone is worn and the received signal in the ear when the earphone is not worn.
- the processing module is also used to: determine the energy values of multiple frequency bands of the sound signal; and adjust the energy values of the multiple frequency bands of the compensation signal according to the energy values of the multiple frequency bands of the sound signal, so that the energy values of the multiple frequency bands of the compensation signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
- the processing module is specifically used to: determine the adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band; and adjust the energy value of each frequency band of the compensation signal based on the adjustment amount corresponding to each frequency band.
- the processing module is specifically configured to determine the adjustment amount corresponding to each frequency band according to a difference between the energy value of each frequency band and an energy threshold corresponding to each frequency band.
- the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among N frequency bands of the sound signal, where N is a positive integer.
- the first transparent filter is further used to adjust the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands of the first filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands;
- the second transparent filter is further used to adjust the energy values of the multiple frequency bands of the sound signal after background noise reduction so that the energy values of the multiple frequency bands of the second filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
- the first transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal according to the adjustment amount corresponding to each frequency band;
- the second transparent filter is specifically used to According to the energy value of each frequency band in the multiple frequency bands of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band, an adjustment amount corresponding to each frequency band is determined, and according to the adjustment amount corresponding to each frequency band, the energy value of each frequency band of the sound signal after background noise reduction is adjusted.
- the first transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band; the second transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band.
- the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among N frequency bands of the sound signal, where N is a positive integer.
- the first frequency band is less than or equal to a preset first frequency threshold
- the second frequency band is greater than or equal to a preset second frequency threshold
- the first frequency threshold and the second frequency threshold are between 2 kHz and 3 kHz.
- a chip comprising a processor and a memory, wherein the memory stores computer instructions, and the processor calls the computer instructions to enable the device to implement the filtering method described in the first aspect or any implementation method of the first aspect.
- an earphone is provided with a transparency mode, the earphone comprising: a speaker; an external microphone; an internal microphone; and the filtering device described in the second aspect or any implementation of the second aspect, or the chip described in the third aspect.
- a filtering method is provided, which is applied to headphones with a transparency mode, the headphones including an external ear microphone, and the method comprising: determining energy values of multiple frequency bands of sound signals collected by the external ear microphone; adjusting the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands are less than or equal to energy thresholds corresponding to each of the multiple frequency bands.
- the adjusting the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands includes: processing the sound signal based on a transparent filter to obtain a filtered signal; wherein, the adjusting the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands includes: adjusting the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
- the adjusting the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to energy thresholds corresponding to each of the multiple frequency bands includes: based on the transparent filter or another filter other than the transparent filter, adjusting the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to energy thresholds corresponding to each of the multiple frequency bands.
- the adjusting the energy values of the multiple frequency bands of the filtered signal includes: determining an adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and an energy threshold corresponding to each frequency band, and adjusting the energy value of each frequency band of the sound signal based on the adjustment amount corresponding to each frequency band.
- determining the adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band includes: determining the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band.
- the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among N frequency bands of the sound signal, where N is a positive integer.
- the first frequency band is less than a preset first frequency threshold
- the second frequency band is greater than or equal to a preset second frequency threshold
- the first frequency threshold and the second frequency threshold are between 2 kHz and 3 kHz.
- a filtering device which is applied to headphones with a transparent mode, wherein the headphones include an external ear microphone for collecting sound signals.
- the filtering device includes: a processing module for determining energy values of multiple frequency bands of the sound signal; and a filter module for adjusting the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands are less than or equal to energy thresholds corresponding to the multiple frequency bands.
- the filter module includes a transparent filter, which is used to: process the sound signal to obtain a filtered signal; wherein the transparent filter is also used to: adjust the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to the energy thresholds corresponding to the multiple frequency bands; or, the filter module further includes another filter other than the transparent filter, which is used to: receive the filtered signal and adjust the energy values of the multiple frequency bands of the filtered signal. The values are adjusted so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to the energy thresholds corresponding to the multiple frequency bands respectively.
- the transparent filter or the other filter is specifically used to: determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the compensation signal according to the adjustment amount corresponding to each frequency band.
- the transparent filter or the another filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band and the energy threshold corresponding to each frequency band.
- the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among N frequency bands of the sound signal, where N is a positive integer.
- a chip comprising a processor and a memory, wherein the memory stores computer instructions, and the processor calls the computer instructions to enable the device to implement the filtering method described in the fifth aspect or any implementation method of the fifth aspect.
- an earphone is provided with a transparency mode, the earphone comprising: a speaker; an external microphone; an internal microphone; and the filtering device described in the sixth aspect or any implementation of the sixth aspect, or the chip described in the seventh aspect.
- the first transparent filter and the second transparent filter are used to process the sound signal collected by the external microphone respectively.
- the first transparent filter is a hardware transparent filter
- the second transparent filter is a software transparent filter.
- the passive isolation of the earphone to the high-frequency signal is strong, and a higher gain needs to be added to the high-frequency signal to lift it, resulting in the background noise being mainly concentrated in the high-frequency part.
- the gain of the hardware transparent filter to the low- and medium-frequency signals in the sound signal is greater than the gain to the high-frequency signal, and the first filtered signal obtained is mainly composed of low- and medium-frequency signals; in addition, the sound signal is subjected to background noise reduction processing, and the gain of the software transparent filter to the high-frequency signal in the sound signal after background noise reduction is greater than the gain to the low- and medium-frequency signals.
- the high-frequency signal after background noise reduction is mainly obtained in the second filtered signal, which can be used to compensate for the high-frequency signal in the first filtered signal.
- the compensation signal of the earphone can be obtained by combining the first filtered signal and the second filtered signal.
- the high-frequency signal in the second filtered signal is a signal after background noise reduction processing, the problem of large background noise in the compensation signal is solved.
- the sound that the human ear hears is the result of the superposition of the sound processed by the transparent filter and the sound leaking to the human ear, when the wearer speaks to himself, the frequency of the human voice is concentrated in the middle and low frequencies.
- the software transparent filter mainly processes the high-frequency signal and suppresses the middle and low-frequency signal. The signal can greatly reduce the processing delay of the software transparent filter on the sound signal, reduce the time difference between the processed sound and the sound leaked to the human ear, and reduce the sound distortion heard by the wearer.
- FIG1 is a schematic flow chart of a filtering method according to an embodiment of the present application.
- FIG. 2 is a schematic diagram of an earphone according to an embodiment of the present application.
- FIG. 3 is a schematic diagram of a possible implementation of the method shown in FIG. 1 .
- FIG. 4 is a schematic diagram of a first transparent filter in an earphone.
- FIG. 5 is a schematic diagram of another possible implementation of the method shown in FIG. 1 .
- FIG. 6 is a schematic diagram of another possible implementation of the method shown in FIG. 1 .
- FIG. 7 is a schematic diagram of another possible implementation of the method shown in FIG. 1 .
- FIG. 8 is a schematic diagram of a possible specific implementation of the method shown in FIG. 1 .
- FIG. 9 is a schematic flow chart of a filtering method according to another embodiment of the present application.
- FIG. 10 is a schematic block diagram of a filtering device according to an embodiment of the present application.
- FIG. 11 is a schematic block diagram of a filtering device according to another embodiment of the present application.
- the headphone's transparent mode can use the Hear Through (HT) filter to lift the sound outside the headphone, thereby restoring the external sound inside the ear.
- HT Hear Through
- this will also amplify the background noise of the headphone's internal circuit, causing the headphone's playback sound to carry a large background noise.
- the microphone needs to have a very small transparent sound.
- a large part of the input signal is the background noise of the circuit.
- the input signal is amplified by the HT filter, making the sound of the background noise particularly obvious. Reducing the background noise of the circuit itself through a hardware circuit requires a higher cost, and it is also difficult to eliminate the background noise.
- Noise is also one of the important factors that restrict the bandwidth of transparency.
- the bandwidth of the headphones currently on the market is usually around 2KHz-3.5KHz.
- a larger bandwidth can be achieved when designing the HT filter, and it can also be applied to hearing aids and other devices to solve the noise floor problem, which is less harmful to the human ear.
- software transparency can be used to remove the circuit noise mixed in the input signal and reduce the noise to below the sound threshold that the human ear can hear. It can solve the problem of background noise to a certain extent, but software transparency has a greater delay than hardware transparency, which will cause the wearer of the headset to hear his or her own voice distorted when speaking. This is because there is a time difference between the compensating human voice emitted by the speaker of the headset and the human voice transmitted by bone conduction.
- an embodiment of the present application provides a filtering method applied to headphones with a transparency mode, which processes the collected sound signals by combining software transparency and hardware transparency, thereby solving the above-mentioned background noise problem and sound distortion problem to a certain extent and improving the transparency effect of the headphones.
- FIG. 1 is a schematic flow chart of a filtering method according to an embodiment of the present application.
- the method 100 shown in FIG. 1 is applied to headphones with a transparent mode, for example, the headphones 10 shown in FIG. 2.
- the headphones described in the embodiment of the present application should be understood in a broad sense, and include not only headphones in the traditional sense shown in FIG. 2, but also other types of sound players such as auxiliary or hearing aid devices.
- the headphones 10 include a speaker 11, an external microphone 12, and an internal microphone 13.
- the external microphone 12 can be called a feed forward (FF) microphone or a reference microphone, which is used to collect sound signals transmitted from outside the ear, or external ear data.
- FF feed forward
- the internal microphone 13 can be called a feedback (FB) microphone, which is used to collect sound signals in the ear, or internal ear data.
- FB feedback
- the sound signal collected by the external microphone 12 is processed by the transparent filter to output a compensation signal, and the residual signal leaking from the outside of the headphones 10 into the human ear is superimposed, so that the human ear can hear the sound of the complete external environment.
- the user wears the earphone 10 to talk with other people, the user does not need to take off the earphone 10, but can directly switch the earphone 10 to the transparent mode to achieve a clear conversation with the other party.
- the method 100 shown in FIG1 can be executed by a filtering device in the headset 10, for example, by a chip in the headset 10, such as an audio codec chip or a Bluetooth audio system chip (System on a Chip, SOC).
- the sound signal collected by the external microphone 12 includes a signal of a first frequency band and a signal of a second frequency band. Among them, at least part of the frequency band in the first frequency band is lower than at least part of the frequency band in the second frequency band.
- the first frequency band can be regarded as a medium and low frequency signal
- the second frequency band can be regarded as a high frequency signal.
- the first frequency band is less than or equal to a preset first frequency threshold
- the second frequency band is greater than or equal to a preset second frequency threshold.
- the first frequency threshold is, for example, between 2KHz and 3KHz
- the second frequency threshold is, for example, between 2KHz and 3KHz.
- the first frequency threshold and the second frequency threshold may be equal, for example, the first frequency threshold and the second frequency threshold are both 2.5KHz, or the first frequency threshold and the second frequency threshold are both 2.8KHz.
- the first frequency threshold and the second frequency threshold may also be unequal, for example, the first frequency threshold is greater than the second frequency threshold, such as the first frequency threshold is 2.8KHz and the second frequency threshold is 2.5KHz; for another example, The first frequency threshold is smaller than the second frequency threshold.
- the first frequency threshold is 2.5 KHz
- the second frequency threshold is 2.8 KHz.
- method 100 includes part or all of the following steps.
- step 110 the sound signal collected by the external ear microphone 12 is processed based on the first transparent filter to obtain a first filtered signal of the sound signal.
- the first transparent filter is a hardware transparent filter, also known as a hardware transparent module, which can amplify the gain of signals in a specific frequency band.
- the hardware transparent filter is, for example, a hardware filter circuit.
- the first transparent filter is used to suppress the signal in the second frequency band of the collected sound signal, that is, to transparently transmit the signal in the first frequency band, and the obtained first filtered signal is mainly composed of the signal in the first frequency band.
- the gain of the first transparent filter on the signal in the first frequency band of the sound signal is greater than the gain of the first transparent filter on the signal in the second frequency band of the sound signal.
- the gain of the first transparent filter for the signal of the first frequency band can be greater than 1, equal to 1, or less than 1.
- the gain of the first transparent filter for the signal of the second frequency band can be greater than 1, equal to 1, or less than 1.
- the gain When the gain is greater than 1, it indicates that the signal of the second frequency band is amplified, when the gain is less than 1, it indicates that the signal of the second frequency band is reduced, and when the gain is equal to 1, it indicates that the signal of the second frequency band is not amplified or reduced.
- the gain of the first transparent filter for the signal of the first frequency band and the gain of the first transparent filter for the signal of the second frequency band are both greater than 1 or less than 1; or, the gain of the first transparent filter for the signal of the first frequency band is greater than 1, and the gain of the first transparent filter for the signal of the second frequency band is less than or equal to 1; or, the gain of the first transparent filter for the signal of the first frequency band is greater than or equal to 1, and the gain of the first transparent filter for the signal of the second frequency band is less than 1.
- step 120 the sound signal collected by the external ear microphone 12 is subjected to background noise reduction processing, and the sound signal after background noise reduction is processed based on a second transparent filter to obtain a second filtered signal of the sound signal.
- the second transparent filter is a software transparent filter, also known as a software transparent module.
- the software transparent filter is a digital filter designed in the program, which can amplify the gain of the signal in a specific frequency band through a filtering algorithm.
- the software transparent filter can include a finite impulse response (FIR) filter or an infinite impulse response (IIR) filter to perform software filtering on the sound signal after the background noise is eliminated;
- the hardware transparent filter can include a finite impulse response (FIR) filter or an infinite impulse response (IIR) filter.
- the sound signal collected by the external ear microphone 12 is filtered by hardware by means of an infinite impulse response (IIR) filter or the like.
- the second transparent filter is used to suppress the signal of the first frequency band in the collected sound signal, that is, to transparently filter the signal of the second frequency band, and the obtained second filtered signal is mainly composed of the signal of the second frequency band.
- the gain of the second transparent filter on the signal of the second frequency band in the sound signal is greater than the gain of the second transparent filter on the signal of the first frequency band in the sound signal.
- the gain of the second transparent filter for the signal of the first frequency band can be greater than 1, equal to 1, or less than 1.
- the gain of the second transparent filter for the signal of the second frequency band can be greater than 1, equal to 1, or less than 1.
- the gain When the gain is greater than 1, it indicates that the signal of the second frequency band is amplified, when the gain is less than 1, it indicates that the signal of the second frequency band is reduced, and when the gain is equal to 1, it indicates that the signal of the second frequency band is not amplified or reduced.
- the gain of the second transparent filter for the signal of the first frequency band and the gain of the second transparent filter for the signal of the second frequency band are both greater than 1 or less than 1; or, the gain of the second transparent filter for the signal of the first frequency band is less than or equal to 1, and the gain of the second transparent filter for the signal of the second frequency band is greater than 1; or, the gain of the second transparent filter for the signal of the first frequency band is less than 1, and the gain of the second transparent filter for the signal of the second frequency band is greater than 1.
- a compensation signal of the earphone 10 is determined according to the first filtered signal output by the first transparent filter and the second filtered signal output by the second transparent filter.
- a first transparent filter and a second transparent filter are used to process the sound signal collected by the external microphone 12 respectively.
- the first transparent filter is a hardware transparent filter
- the second transparent filter is a software transparent filter.
- the passive isolation of the earphone 10 to the high-frequency signal is strong, and a higher gain needs to be added to the high-frequency signal to lift it, resulting in the background noise being mainly concentrated in the high-frequency part. Therefore, the hardware transparent filter has a greater gain for the mid- and low-frequency signals in the sound signal than for the high-frequency signals, and the obtained first filtered signal is mainly composed of mid- and low-frequency signals.
- the software transparent filter mainly processes the high-frequency signal and suppresses the medium and low frequency signals, which can greatly reduce the processing delay of the software transparent filter on the sound signal, reduce the time difference between the processed sound and the sound leaked to the human ear, and reduce the sound distortion heard by the wearer.
- the background noise signal is usually the background noise introduced by various circuits set between the external ear microphone 12 and the transparent filter, such as the analog to digital converter (ADC) circuit.
- the headset 10 has strong passive isolation for high-frequency signals. Whether a hardware transparent filter or a software transparent filter is used, a higher gain needs to be added to the high-frequency signal to increase it, resulting in the background noise being mainly concentrated in the high-frequency part. Since the sound signal collected by the external ear microphone 12 is subjected to background noise reduction processing in step 120, the background noise carried in the high-frequency signal in the second filtered signal output by the second transparent filter is significantly reduced.
- the sound signal is subjected to noise reduction processing, including: obtaining a pre-estimated noise floor signal; determining the sound signal after noise floor reduction based on the noise floor signal and the sound signal collected by the external ear microphone 12.
- the noise floor signal can be obtained, for example, by experimental testing or the like.
- the pre-estimated noise floor signal By using the pre-estimated noise floor signal to offset the part of the noise floor signal carried in the sound signal, the actual signal outside the external ear microphone 12 can be obtained.
- the noise floor signal has an opposite sign to that of the sound signal, and by adding the noise floor signal to the sound signal, the noise floor signal can be removed from the sound signal.
- the background noise estimation module outputs a pre-estimated background noise signal, and the sign of the background noise signal is negative.
- the background noise signal By adding the background noise signal to the sound signal, the part of the background noise signal carried in the sound signal can be eliminated to obtain a sound signal with reduced background noise.
- the medium and low frequency signals are suppressed, and a second filtered signal mainly composed of high frequency signals is output.
- the background noise signal can be a fixed value; or, the background noise signal can be estimated in real time based on the sound signal currently collected by the external ear microphone 12. For example, the characteristics of the background noise signal are collected and counted, and a reference value of the background noise signal is preset.
- the reference value can be obtained by, for example, expanding the background noise signal of the circuit in the frequency domain, and the reference value is adjusted according to the sound signal currently collected by the external ear microphone 12 to obtain an estimated value of the background noise signal, thereby realizing real-time estimation of the background noise signal.
- the background noise is mainly concentrated in the high-frequency part, when the sound signal is lifted, the background noise will be amplified at the same time; if only a software transparent filter is used, although the corresponding background noise can be estimated by software and the background noise can be filtered out before the speaker 11 outputs the compensation signal, the software transparency has a greater delay than the hardware transparency. Since the sound that the human ear finally hears is formed by the superposition of the compensation sound processed by the transparent filter and the residual sound leaked to the human ear, the residual sound is physically transmitted and its delay can be ignored. If there is a large delay between the compensation sound input to the human ear and the residual sound leaked to the human ear, the wearer will hear the distortion of his own voice when speaking to himself.
- the embodiment of the present application adopts a combination of hardware transparency and software transparency. Since the background noise is mainly concentrated in the high-frequency part, the high-frequency signal in the sound signal is suppressed by a hardware transparency filter and the mid- and low-frequency signals are transparent. This can avoid introducing more background noise of high-frequency signals.
- the background noise in the sound signal is estimated (estimate noise floor), and the mid- and low-frequency signals in the sound signal after the background noise is reduced are suppressed by a software transparency filter and the high-frequency signal is transparent.
- DSP hardware may be used for acceleration in the second transparent filter, and most of the code implementation may be written in assembly language to complete background noise filtering and transparent filtering in fewer instruction cycles, thereby achieving ultra-low latency.
- the first filtered signal mainly composed of medium and low frequency signals output by the hardware transparent filter and the second filtered signal mainly composed of high frequency signals output by the software transparent filter can be combined to restore the signal of the entire frequency band.
- the hardware transparent filter and the software transparent filter can complement each other, reducing the background noise in the compensation signal and reducing the time difference between the compensation signal and the residual signal.
- the method 100 further includes: determining the secondary transfer function according to the audio signal output by the speaker 11 and the in-ear signal collected by the in-ear microphone 13; ...
- the first transparent filter is determined by the external ear signal in the wearing state and the signal received in the ear when the earphone 10 is not worn.
- the signal received in the ear when the earphone 10 is not worn refers to the signal collected from the ear when the earphone 10 is not worn.
- an additional microphone can be used to collect the signal in the ear.
- the ear signal collected by the ear microphone 13 is usually the signal collected by the ear microphone 13 in the earphone 10 when the earphone 10 is worn.
- the design of the first transparent filter is specifically described in conjunction with FIG4.
- the channel from the speaker 11 to the in-ear microphone 13 is a physical channel, and its modeling is called a secondary transfer function, denoted as SP.
- the secondary transfer function is a transfer function representing the transfer function from the speaker 11 to the in-ear microphone 13, also known as a secondary path transfer function.
- the purpose of transparency is to allow the wearer of the headset 10 to hear the sound of the outside world without passive isolation of the headset 10. In order to achieve this goal, it is necessary to compensate for the signal attenuated due to passive isolation, and output the compensation signal through the speaker 11.
- the signal at the in-ear microphone 13 is consistent with the signal at the external ear microphone 12, so that the signal played by the speaker 11 when the headset 10 is worn is superimposed with the residual signal in the ear after the secondary transmission path, and the signal received in the ear when the headset 10 is not worn.
- the path between the external ear microphone 12 and the speaker 11 is denoted as HT.
- the signal collected in the ear when the earphone 10 is not worn is recorded as D
- the size of the residual signal collected by the ear microphone 13 when the earphone 10 is worn is recorded as E
- the signal collected by the external ear microphone 12 is recorded as FF, ignoring the difference between the position of the ear microphone 13 and the position of signal collection when the earphone 10 is not worn.
- the first transparent filter needs to be designed to suppress high-frequency signals, so that the frequency band amplified by the hardware is concentrated in the middle and low frequencies.
- the earphone 10 When the earphone 10 is in the transparent mode, although it is hoped to maintain a clear perception of the ambient sound, there are often loud noises in the environment, such as firecrackers, knocking sounds during construction, etc. The restoration of these sounds will cause sensory discomfort to the wearer, and too high a volume may exceed the limit of the audio system's expression, resulting in clipping problems.
- the wearer In order to hear the ambient sound clearly, the wearer needs to turn on the transparent mode of the earphone. Turning on the transparent mode will restore all ambient sounds, while louder external sounds will cause ear discomfort. Turning off the transparent mode will isolate the earphone and effectively reduce the external noise from entering the eardrum, but it is not convenient for obtaining the ambient sound.
- the present application also provides a solution for environmental self-adaptation and transparency, which can reduce the large The transparency of the volume band, while the sound details of other frequency bands can be restored in the ear to the greatest extent, which is especially important for headphones with good passive isolation effects.
- method 100 also includes: obtaining energy values of multiple frequency bands of the sound signal collected by the external ear microphone 12; and adjusting the energy values of multiple frequency bands of the compensation signal according to the energy values of the multiple frequency bands of the sound signal, so that the energy values of the multiple frequency bands of the compensation signal are less than or equal to the energy thresholds corresponding to the multiple frequency bands.
- the sound signal collected by the external microphone 12 is divided into multiple frequency bands, or multiple frequency bands, and the energy value of each frequency band is counted.
- the energy value of each frequency band in the sound signal is adjusted respectively, so that the energy values of the multiple frequency bands of the compensation signal are less than or equal to their respective corresponding energy thresholds, thereby avoiding the external sound signal being too high to cause sensory discomfort to the wearer, and realizing adaptive processing of ambient sound.
- the multiple frequency bands are, for example, frequency bands whose energy values exceed corresponding energy thresholds among the N frequency bands of the sound signal, where N is a positive integer. For frequency bands whose energy values do not exceed their corresponding energy thresholds, no adjustment may be performed.
- the energy values of multiple frequency bands of the compensation signal are adjusted respectively according to the energy values of multiple frequency bands of the sound signal, including: determining the adjustment amount corresponding to each frequency band according to the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band; and adjusting the energy value of each frequency band of the compensation signal according to the adjustment amount corresponding to each frequency band.
- the adjustment amount corresponding to each frequency band may be determined according to the difference between the energy value of each frequency band in the multiple frequency bands and the energy threshold corresponding to each frequency band. The larger the difference, the larger the adjustment amount; the smaller the difference, the smaller the adjustment amount.
- the first filter signal and the second filter signal are combined to obtain a corresponding compensation signal, and the compensation signal can also be subjected to the above-mentioned adaptive processing.
- the time domain signal collected by the external ear microphone 12 can be expanded in the frequency domain, and the effective frequency band of the sample can be divided into N frequency bands by, for example, an octave, and the energy peaks of the N frequency bands are counted, and the energy of multiple frequency bands whose energy peaks exceed the corresponding energy thresholds is adjusted.
- the adjustment amount corresponding to the frequency band can be calculated according to the difference between the energy peak value of each frequency band in multiple frequency bands and its corresponding energy threshold, so as to adjust the energy value of the frequency band according to the adjustment amount, so that the energy value of the frequency band is suppressed below the corresponding energy threshold.
- This process is also called subband suppression.
- the external ear microphone 12 collects sound signals in real time, and can adjust the energy values of each frequency band in the compensation signal in real time according to the energy values of each frequency band in the real-time collected sound signals.
- N frequency bands correspond to N energy thresholds respectively.
- the energy values of the M frequency bands are adjusted according to the difference between the energy peak values of the M frequency bands of the sound signal and their corresponding energy thresholds.
- the adjustment amount of the i-th frequency band among the M frequency bands can be equal to the difference between the energy peak value of the i-th frequency band and the energy threshold corresponding to the i-th frequency band, where i ranges from 1 to M, and the energy value of the i-th frequency band is adjusted according to the adjustment amount of the i-th frequency band.
- the two software parts of software transparent processing and adaptive processing of ambient sound can also be combined into one software serial implementation.
- the process of detecting the energy peak and estimating the adjustment amount can be completed before the second transparent filter performs software transparent processing on the sound signal.
- method 100 also includes: obtaining energy values of multiple frequency bands of the sound signal collected by the external ear microphone 12; the first transparent filter is also used to adjust the energy values of multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands of the first filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands; the second transparent filter is also used to adjust the energy values of multiple frequency bands of the sound signal after background noise reduction so that the energy values of the multiple frequency bands of the second filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
- the first transparent filter can suppress the high-frequency signal in the sound signal and adjust the energy value of each frequency band in the sound signal, so that the output first filtered signal is mainly composed of medium and low frequency signals, and the energy of each frequency band in the first filtered signal is less than or equal to the corresponding energy threshold.
- the second transparent filter can suppress the medium and low frequency signals in the sound signal after the background noise is reduced and adjust the energy value of each frequency band in the sound signal after the background noise is reduced, so that the output second filtered signal is mainly composed of high frequency signals, and the energy of each frequency band in the second filtered signal is less than or equal to the corresponding energy threshold.
- the first transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal according to the adjustment amount corresponding to each frequency band;
- the second transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal after background noise reduction according to the adjustment amount corresponding to each frequency band.
- the first transparent filter can determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band; the second transparent filter can determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band of the sound signal after noise reduction and the energy threshold corresponding to each frequency band.
- energy band suppression can also be achieved inside the first transparent filter and the second transparent filter.
- the suppression of the energy value of each frequency band can be directly achieved in the design of the first transparent filter and the second transparent filter. That is to say, the first transparent filter and the second transparent filter can not only achieve the transparency of the sound signal, but also suppress the energy value of each frequency band according to the corresponding adjustment amount.
- the first filtered signal output by the first transparent filter includes the low- and medium-frequency signals after energy band suppression
- the second filtered signal output by the second transparent filter includes the high-frequency signal after energy band suppression.
- the suppression of the energy values of the corresponding frequency bands is achieved simultaneously in the first transparent filter and the second transparent filter, without the need to set up additional hardware circuits, making the entire system structure more compact and reducing costs.
- FIG8 shows a flowchart of a specific implementation of method 100.
- the environmental sound transparency stage may include hardware transparency and software transparency.
- a first transparency filter i.e., a hardware transparency filter
- the background noise signal is first estimated by software, and the background noise signal is removed from the sound signal collected by the external ear microphone 12.
- a software transparency filter is used to filter the sound signal after the background noise is removed, and a second filtered signal mainly composed of high frequency signals is output.
- the background noise signal in the second filtered signal has been basically eliminated.
- the first filtered signal and the second filtered signal are filtered. By superimposing the wave signals, a cleaner compensation signal can be obtained.
- the energy peak of each frequency band is estimated, and the frequency bands that need energy adjustment are determined.
- the adjustment amount g is determined based on the difference between the statistical value of the energy peak of each of these frequency bands and the corresponding energy threshold, that is, the statistical value minus the energy threshold.
- the adjustment amount is output.
- the energy peak of each frequency band can be counted in real time and the corresponding adjustment amount can be calculated until the difference gradually returns to 0.
- the energy of each frequency band in the compensation signal is adjusted according to the adjustment amount g, for example, the gain corresponding to each frequency band can be adjusted according to the corresponding adjustment amount.
- the microphone outputs the compensation signal after the adaptive processing stage.
- the above-mentioned solution for adaptive processing of ambient sound can be implemented in combination with the aforementioned software and hardware combined transparent solution, or it can be implemented separately.
- the embodiment of the present application further provides a filtering method 200.
- the method 200 can be performed by a filtering device in the headset 10, for example, by a chip in the headset 10, such as a codec chip or a Bluetooth audio SOC.
- the headset 10 includes an external ear microphone 12 for collecting sound signals.
- the method 200 includes some or all of the following steps.
- step 210 energy values of multiple frequency bands of the sound signal are determined.
- step 220 the energy values of the multiple frequency bands of the sound signal are adjusted so that the energy values of the multiple frequency bands are less than or equal to energy thresholds corresponding to the multiple frequency bands respectively.
- the multiple frequency bands may be, for example, frequency bands whose energy values exceed corresponding energy thresholds among the N frequency bands of the sound signal, where N is a positive integer.
- the energy values of the multiple frequency bands of the sound signal are adjusted so that the energy values of the multiple frequency bands are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands, including: based on a transparent filter, the sound signal is processed to obtain a filtered signal; wherein, the energy values of the multiple frequency bands of the sound signal are adjusted so that the energy values of the multiple frequency bands are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands, including: the energy values of the multiple frequency bands of the filtered signal are adjusted so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
- adjusting the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to energy thresholds corresponding to the multiple frequency bands respectively includes: based on the transparent filter or another filter other than the transparent filter, The energy values of the multiple frequency bands of the filtered signal are adjusted so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to energy thresholds corresponding to the multiple frequency bands respectively.
- the energy values of the multiple frequency bands of the filtered signal are adjusted, including: determining an adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and an energy threshold corresponding to each frequency band, and adjusting the energy value of each frequency band of the sound signal based on the adjustment amount corresponding to each frequency band.
- the adjustment amount corresponding to each frequency band is determined based on the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band, including: determining the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band.
- method 200 can be referred to the aforementioned description of the part regarding the adaptive processing of ambient sound in method 100, and for the sake of brevity, they will not be repeated here.
- the present application also provides a filtering device 300, which is applied to an earphone 10 with a transparent mode, the earphone 10 includes an external ear microphone 12, and the sound signal collected by the external ear microphone 12 includes a signal of a first frequency band and a signal of a second frequency band, and at least part of the frequency band in the first frequency band is lower than at least part of the frequency band in the second frequency band.
- the first frequency band is less than or equal to a preset first frequency threshold
- the second frequency band is greater than or equal to a preset second frequency threshold.
- the first frequency threshold and the second frequency threshold can be, for example, between 2KHz and 3KHz.
- the device 300 includes a first transparent filter 310 , a processing module 320 , and a second transparent filter 330 .
- the first transparent filter 310 is used to process the sound signal to obtain a first filtered signal of the sound signal
- the first transparent filter is a hardware transparent filter, and the gain of the first transparent filter on the signal of the first frequency band in the sound signal is greater than the gain of the first transparent filter on the signal of the second frequency band in the sound signal
- the processing module 320 is used to perform background noise reduction processing on the sound signal
- the second transparent filter 330 is used to process the sound signal after background noise reduction to obtain a second filtered signal of the sound signal
- the second transparent filter is a software transparent filter, and the gain of the second transparent filter on the signal of the second frequency band in the sound signal after background noise reduction is greater than the gain of the second transparent filter on the signal of the first frequency band in the sound signal after background noise reduction.
- the software transparent filter may be, for example, a FIR filter or an IIR filter
- the hardware transparent filter includes, for example, a FIR filter or an IIR filter.
- the processing module 320 is specifically used to: obtain a pre-estimated background noise signal; A sound signal after the background noise is reduced is determined according to the background noise signal and the sound signal.
- the earphone 10 also includes a speaker 11 and an in-ear microphone 13, and the processing module 320 is also used to: determine the secondary transfer function based on the audio signal output by the speaker 11 and the in-ear signal collected by the in-ear microphone 13; determine the first transparent filter 310 based on the extra-ear signal collected by the extra-ear microphone 12 when the earphone 10 is worn and the signal received in the ear when the earphone 10 is not worn.
- the processing module 320 is also used to: determine the energy values of the multiple frequency bands of the sound signal; and adjust the energy values of the multiple frequency bands of the compensation signal according to the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands of the compensation signal are less than or equal to the energy thresholds corresponding to the multiple frequency bands respectively.
- the processing module 320 is specifically used to: determine the adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band; and adjust the energy value of each frequency band of the compensation signal based on the adjustment amount corresponding to each frequency band.
- the processing module 320 is specifically configured to determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band and the energy threshold corresponding to each frequency band.
- the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among the N frequency bands of the sound signal, where N is a positive integer.
- the first transparent filter 310 is also used to adjust the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands of the first filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands; the first transparent filter 310 is also used to adjust the energy values of the multiple frequency bands of the sound signal after background noise reduction so that the energy values of the multiple frequency bands of the second filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
- the first transparent filter 310 is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal according to the adjustment amount corresponding to each frequency band;
- the second transparent filter 330 is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal after background noise reduction according to the adjustment amount corresponding to each frequency band.
- the first transparent filter 310 is specifically configured to: The adjustment amount corresponding to each frequency band is determined by the difference between the energy value of each frequency band and the energy threshold corresponding to each frequency band; the second transparent filter 330 is specifically used to determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band.
- the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among the N frequency bands of the sound signal, where N is a positive integer.
- the specific details of the filtering device 300 can refer to the above description of the filtering method 100, and for the sake of brevity, they are not repeated here.
- the present application also provides a filtering device 400 , which is applied to an earphone 10 with a transparent mode, and the earphone 10 includes an external ear microphone 12 for collecting sound signals.
- the filtering device 400 includes a processing module 410 and a filter module 420 .
- the processing module 410 is used to obtain energy values of multiple frequency bands of the sound signal; the filter module 420 is used to adjust the energy values of multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands are less than or equal to the energy thresholds corresponding to the multiple frequency bands.
- the multiple frequency bands may be, for example, frequency bands whose energy values exceed corresponding energy thresholds among the N frequency bands of the sound signal, where N is a positive integer.
- the filter module 420 includes a transparent filter, which is used to: process the sound signal to obtain a filtered signal; wherein the transparent filter is also used to: adjust the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands; or, the filter module also includes another filter other than the transparent filter, which is used to: receive the filtered signal and adjust the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
- the transparent filter or the other filter is specifically used to: determine the adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the compensation signal based on the adjustment amount corresponding to each frequency band.
- the transparent filter or the other filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band and the energy threshold corresponding to each frequency band.
- the present application also provides a chip, including a processor and a memory, including a processor and a memory, the memory stores computer instructions, and the processor calls the computer instructions to enable the device to implement the apparatus according to the first aspect or any implementation of the first aspect.
- the chip can be, for example, a codec chip in the headset 10 or a Bluetooth audio SOC.
- the present application also provides an earphone 10 having a transparent mode, and the earphone 10 includes: a speaker 11; an external microphone 12; an internal microphone 13; and a filtering device in any of the above embodiments, or a chip in any of the above embodiments.
- the systems, devices and methods disclosed in the embodiments of the present application may be implemented in other ways. For example, some features of the method embodiments described above may be ignored or not performed.
- the device embodiments described above are merely schematic, and the division of units is merely a logical function division. There may be other division methods in actual implementation, and multiple units or components may be combined or integrated into another system.
- the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the coupling may include electrical, mechanical or other forms of connection.
Landscapes
- Circuit For Audible Band Transducer (AREA)
Abstract
The present application provides a filtering method, a filter apparatus, a chip, and an earphone, which are capable of improving the transparency effect of the earphone. The earphone comprises an extra-aural microphone, sound signals collected by the extra-aural microphone comprising signals of a first frequency band and signals of a second frequency band, and the first frequency band being lower than the second frequency band. The method comprises: processing a sound signal on the basis of a first transparent filter so as to obtain a first filtered signal of the sound signal, wherein the first transparent filter causes a greater gain in a signal of a first frequency band than in a signal of a second frequency band; performing noise reduction processing on the sound signal, and on the basis of a second transparent filter, processing the noise-reduced sound signal so as to obtain a second filtered signal of the sound signal, wherein the second transparent filter causes a greater gain in a signal of the second frequency band than in a signal of the first frequency band; and according to the first filtered signal and the second filtered signal, determining a compensation signal for the earphone.
Description
本申请实施例涉及音频处理领域,并且更具体地,涉及一种滤波方法、滤波装置、芯片和耳机。Embodiments of the present application relate to the field of audio processing, and more specifically, to a filtering method, a filtering device, a chip, and a headset.
耳机,特别是入耳式的耳机,在正常佩戴时会阻挡住大部分的环境声,通常,耳机佩戴者希望在某些场景下能够清晰地听到环境的声音,因此,耳机需要具有通透模式。耳机的通透模式可以利用通透滤波器对耳机外部的声音的进行抬升,从而将外部的声音在耳内进行还原。耳机的通透效果直接影响用户的听觉感受,为此,如何提高耳机的通透效果,成为需要解决的问题。Headphones, especially in-ear headphones, block most of the ambient sound when worn normally. Usually, headphone wearers want to hear the ambient sound clearly in certain scenarios, so the headphones need to have a transparent mode. The transparent mode of the headphones can use a transparent filter to lift the sound outside the headphones, thereby restoring the external sound inside the ear. The transparent effect of the headphones directly affects the user's auditory experience. Therefore, how to improve the transparent effect of the headphones has become a problem that needs to be solved.
发明内容Summary of the invention
本申请实施例提供一种滤波方法、滤波装置、芯片和耳机,能够提高耳机的通透效果。The embodiments of the present application provide a filtering method, a filtering device, a chip and headphones, which can improve the transparency effect of the headphones.
第一方面,提供一种滤波方法,应用于具有通透模式的耳机,所述耳机包括耳外麦克风,所述耳外麦克风采集的声音信号包括第一频段的信号和第二频段的信号,所述第一频段中的至少部分频段低于所述第二频段中的至少部分频段,所述方法包括:基于第一通透滤波器对所述声音信号进行处理,得到所述声音信号的第一滤波信号,所述第一通透滤波器为硬件通透滤波器,所述第一通透滤波器对所述声音信号中所述第一频段的信号的增益,大于所述第一通透滤波器对所述声音信号中所述第二频段的信号的增益;对所述声音信号进行降底噪处理,并基于第二通透滤波器对降底噪后的所述声音信号进行处理,得到所述声音信号的第二滤波信号,所述第二通透滤波器为软件通透滤波器,所述第二通透滤波器对降底噪后的所述声音信号中所述第二频段的信号的增益,大于所述第二通透滤波器对降底噪后的所述声音信号中所述第一频段的信号的增益;根据所述第一滤波信号和所述第二滤波信号,确定所述耳机的补偿信号。In a first aspect, a filtering method is provided, which is applied to headphones with a transparent mode, the headphones comprising an external ear microphone, the sound signal collected by the external ear microphone comprising a signal of a first frequency band and a signal of a second frequency band, at least part of the frequency band in the first frequency band is lower than at least part of the frequency band in the second frequency band, the method comprising: processing the sound signal based on a first transparent filter to obtain a first filtered signal of the sound signal, the first transparent filter being a hardware transparent filter, and the gain of the first transparent filter for the signal of the first frequency band in the sound signal being greater than the gain of the first transparent filter for the signal of the second frequency band in the sound signal; performing background noise reduction processing on the sound signal, and processing the sound signal after background noise reduction based on a second transparent filter to obtain a second filtered signal of the sound signal, the second transparent filter being a software transparent filter, and the gain of the second transparent filter for the signal of the second frequency band in the sound signal after background noise reduction being greater than the gain of the second transparent filter for the signal of the first frequency band in the sound signal after background noise reduction; and determining a compensation signal of the headphone according to the first filtered signal and the second filtered signal.
所述软件通透滤波器例如包括FIR滤波器或者IIR滤波器,所述硬件通透滤波器例如包括FIR滤波器或者IIR滤波器。
The software transparent filter includes, for example, an FIR filter or an IIR filter, and the hardware transparent filter includes, for example, an FIR filter or an IIR filter.
在一种实现方式中,所述对所述声音信号进行降底噪处理,包括:获取预先估计的底噪信号;根据所述底噪信号和所述声音信号,确定降底噪后的所述声音信号。In one implementation, the performing background noise reduction processing on the sound signal includes: acquiring a pre-estimated background noise signal; and determining the sound signal after background noise reduction according to the background noise signal and the sound signal.
在一种实现方式中,所述耳机还包括扬声器和耳内麦克风,所述方法还包括:根据所述扬声器输出的音频信号、以及所述耳内麦克风采集的耳内信号,确定次级传递函数;根据所述耳机在佩戴状态下的所述耳外麦克风采集的耳外信号、以及在未佩戴所述耳机的状态下耳内接收的信号,确定所述第一通透滤波器。In one implementation, the headset also includes a speaker and an in-ear microphone, and the method also includes: determining a secondary transfer function based on an audio signal output by the speaker and an in-ear signal collected by the in-ear microphone; determining the first transparent filter based on an external ear signal collected by the external ear microphone when the headset is worn and a signal received in the ear when the headset is not worn.
在一种实现方式中,所述方法还包括:确定所述声音信号的多个频带的能量值;根据所述声音信号的多个频带的能量值,对所述补偿信号的所述多个频带的能量值分别进行调整,以使所述补偿信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值。In one implementation, the method also includes: determining energy values of multiple frequency bands of the sound signal; and adjusting the energy values of the multiple frequency bands of the compensation signal according to the energy values of the multiple frequency bands of the sound signal, so that the energy values of the multiple frequency bands of the compensation signal are less than or equal to energy thresholds corresponding to each of the multiple frequency bands.
在一种实现方式中,所述根据所述声音信号的多个频带的能量值,对所述补偿信号的所述多个频带的能量值分别进行调整,包括:根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量;根据所述每个频带对应的调整量,对所述补偿信号的所述每个频带的能量值进行调整。In one implementation, the energy values of the multiple frequency bands of the compensation signal are adjusted separately according to the energy values of the multiple frequency bands of the sound signal, including: determining the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band; and adjusting the energy value of each frequency band of the compensation signal according to the adjustment amount corresponding to each frequency band.
在一种实现方式中,所述根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量,包括:根据所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量。In one implementation, determining the adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band includes: determining the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band and the energy threshold corresponding to each frequency band.
在一种实现方式中,所述多个频带为所述声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。In one implementation, the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among N frequency bands of the sound signal, where N is a positive integer.
在一种实现方式中,所述方法还包括:确定所述声音信号的多个频带的能量值;所述第一通透滤波器还用于,对所述声音信号的所述多个频带的能量值进行调整,以使所述第一滤波信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值;所述第二通透滤波器还用于,对降底噪后的所述声音信号的所述多个频带的能量值进行调整,以使所述第二滤波信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值。In one implementation, the method also includes: determining energy values of multiple frequency bands of the sound signal; the first transparent filter is also used to adjust the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands of the first filtered signal are less than or equal to energy thresholds corresponding to each of the multiple frequency bands; the second transparent filter is also used to adjust the energy values of the multiple frequency bands of the sound signal after background noise reduction so that the energy values of the multiple frequency bands of the second filtered signal are less than or equal to energy thresholds corresponding to each of the multiple frequency bands.
在一种实现方式中,所述第一通透滤波器具体用于,根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,
确定所述每个频带对应的调整量,并根据所述每个频带对应的调整量,对所述声音信号的所述每个频带的能量值进行调整;所述第二通透滤波器具体用于,根据降底噪后的所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量,并根据所述每个频带对应的调整量,对降底噪后的所述声音信号的所述每个频带的能量值进行调整。In one implementation, the first transparent filter is specifically configured to, according to the energy value of each frequency band of the plurality of frequency bands of the sound signal and the energy threshold corresponding to each frequency band, Determine the adjustment amount corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal according to the adjustment amount corresponding to each frequency band; the second transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal after background noise reduction according to the adjustment amount corresponding to each frequency band.
在一种实现方式中,所述第一通透滤波器具体用于,根据所述声音信号的所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量;所述第二通透滤波器具体用于,根据降底噪后的所述声音信号的所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量。In one implementation, the first transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band; the second transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band.
在一种实现方式中,所述多个频带为所述声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。In one implementation, the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among N frequency bands of the sound signal, where N is a positive integer.
在一种实现方式中,所述第一频段小于或等于预设的第一频率阈值,所述第二频段大于或等于预设的第二频率阈值,所述第一频率阈值和所述第二频率阈值位于2KHz至3KHz之间。In one implementation, the first frequency band is less than or equal to a preset first frequency threshold, the second frequency band is greater than or equal to a preset second frequency threshold, and the first frequency threshold and the second frequency threshold are between 2 kHz and 3 kHz.
第二方面,提供一种滤波装置,应用于具有通透模式的耳机,所述耳机包括耳外麦克风,所述耳外麦克风采集的声音信号包括第一频段的信号和第二频段的信号,所述第一频段中的至少部分频段低于所述第二频段中的至少部分频段,所述滤波装置包括:第一通透滤波器,用于对所述声音信号进行处理,得到所述声音信号的第一滤波信号,所述第一通透滤波器为硬件通透滤波器,所述第一通透滤波器对所述声音信号中所述第一频段的信号的增益,大于所述第一通透滤波器对所述声音信号中所述第二频段的信号的增益;处理模块,用于对所述声音信号进行降底噪处理;第二通透滤波器,用于对降底噪后的所述声音信号进行处理,得到所述声音信号的第二滤波信号,所述第二通透滤波器为软件通透滤波器,所述第二通透滤波器对降底噪后的所述声音信号中所述第二频段的信号的增益,大于所述第二通透滤波器对降底噪后的所述声音信号中所述第一频段的信号的增益;In a second aspect, a filtering device is provided, which is applied to headphones with a transparent mode, the headphones comprising an external ear microphone, the sound signal collected by the external ear microphone comprising a signal of a first frequency band and a signal of a second frequency band, at least part of the frequency band in the first frequency band is lower than at least part of the frequency band in the second frequency band, the filtering device comprising: a first transparent filter, used to process the sound signal to obtain a first filtered signal of the sound signal, the first transparent filter is a hardware transparent filter, and the gain of the first transparent filter on the signal of the first frequency band in the sound signal is greater than the gain of the first transparent filter on the signal of the second frequency band in the sound signal; a processing module, used to perform background noise reduction processing on the sound signal; a second transparent filter, used to process the sound signal after background noise reduction to obtain a second filtered signal of the sound signal, the second transparent filter is a software transparent filter, and the gain of the second transparent filter on the signal of the second frequency band in the sound signal after background noise reduction is greater than the gain of the second transparent filter on the signal of the first frequency band in the sound signal after background noise reduction;
所述处理模块还用于,根据所述第一滤波信号和所述第二滤波信号,确定所述耳机的补偿信号。The processing module is further configured to determine a compensation signal of the earphone according to the first filtered signal and the second filtered signal.
所述软件通透滤波器例如包括FIR滤波器或者IIR滤波器,所述硬件通
透滤波器例如包括FIR滤波器或者IIR滤波器。The software transparent filter includes, for example, an FIR filter or an IIR filter. The transmission filter includes, for example, a FIR filter or an IIR filter.
在一种实现方式中,所述处理模块具体用于:获取预先估计的底噪信号;根据所述底噪信号和所述声音信号,确定降底噪后的所述声音信号。In one implementation, the processing module is specifically used to: obtain a pre-estimated background noise signal; and determine the sound signal after background noise reduction according to the background noise signal and the sound signal.
在一种实现方式中,所述耳机还包括扬声器和耳内麦克风,所述处理模块还用于:根据所述扬声器输出的音频信号、以及所述耳内麦克风采集的耳内信号,确定次级传递函数;根据所述耳机在佩戴状态下的所述耳外麦克风采集的耳外信号、以及在未佩戴所述耳机的状态下耳内的接收的信号,确定所述第一通透滤波器。In one implementation, the earphone also includes a speaker and an in-ear microphone, and the processing module is further used to: determine the secondary transfer function based on the audio signal output by the speaker and the in-ear signal collected by the in-ear microphone; determine the first transparent filter based on the external ear signal collected by the external ear microphone when the earphone is worn and the received signal in the ear when the earphone is not worn.
在一种实现方式中,所述处理模块还用于:确定所述声音信号的多个频带的能量值;根据所述声音信号的多个频带的能量值,对所述补偿信号的所述多个频带的能量值分别进行调整,以使所述补偿信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值。In one implementation, the processing module is also used to: determine the energy values of multiple frequency bands of the sound signal; and adjust the energy values of the multiple frequency bands of the compensation signal according to the energy values of the multiple frequency bands of the sound signal, so that the energy values of the multiple frequency bands of the compensation signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
在一种实现方式中,所述处理模块具体用于:根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量;根据所述每个频带对应的调整量,对所述补偿信号的所述每个频带的能量值进行调整。In one implementation, the processing module is specifically used to: determine the adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band; and adjust the energy value of each frequency band of the compensation signal based on the adjustment amount corresponding to each frequency band.
在一种实现方式中,所述处理模块具体用于:根据所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量。In one implementation, the processing module is specifically configured to determine the adjustment amount corresponding to each frequency band according to a difference between the energy value of each frequency band and an energy threshold corresponding to each frequency band.
在一种实现方式中,所述多个频带为所述声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。In one implementation, the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among N frequency bands of the sound signal, where N is a positive integer.
在一种实现方式中,所述第一通透滤波器还用于,对所述声音信号的所述多个频带的能量值进行调整,以使所述第一滤波信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值;所述第二通透滤波器还用于,对降底噪后的所述声音信号的所述多个频带的能量值进行调整,以使所述第二滤波信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值。In one implementation, the first transparent filter is further used to adjust the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands of the first filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands; the second transparent filter is further used to adjust the energy values of the multiple frequency bands of the sound signal after background noise reduction so that the energy values of the multiple frequency bands of the second filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
在一种实现方式中,所述第一通透滤波器具体用于,根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量,并根据所述每个频带对应的调整量,对所述声音信号的所述每个频带的能量值进行调整;所述第二通透滤波器具体用
于,根据降底噪后的所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量,并根据所述每个频带对应的调整量,对降底噪后的所述声音信号的所述每个频带的能量值进行调整。In one implementation, the first transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal according to the adjustment amount corresponding to each frequency band; the second transparent filter is specifically used to According to the energy value of each frequency band in the multiple frequency bands of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band, an adjustment amount corresponding to each frequency band is determined, and according to the adjustment amount corresponding to each frequency band, the energy value of each frequency band of the sound signal after background noise reduction is adjusted.
在一种实现方式中,所述第一通透滤波器具体用于,根据所述声音信号的所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量;所述第二通透滤波器具体用于,根据降底噪后的所述声音信号的所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量。In one implementation, the first transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band; the second transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band.
在一种实现方式中,所述多个频带为所述声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。In one implementation, the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among N frequency bands of the sound signal, where N is a positive integer.
在一种实现方式中,所述第一频段小于或等于预设的第一频率阈值,所述第二频段大于或等于预设的第二频率阈值,所述第一频率阈值和所述第二频率阈值位于2KHz至3KHz之间。In one implementation, the first frequency band is less than or equal to a preset first frequency threshold, the second frequency band is greater than or equal to a preset second frequency threshold, and the first frequency threshold and the second frequency threshold are between 2 kHz and 3 kHz.
第三方面,提供一种芯片,包括处理器和存储器,包括处理器和存储器,所述存储器存储计算机指令,所述处理器调用所述计算机指令以使所述设备实现根据第一方面或第一方面的任一实现方式中所述的滤波方法。According to a third aspect, a chip is provided, comprising a processor and a memory, wherein the memory stores computer instructions, and the processor calls the computer instructions to enable the device to implement the filtering method described in the first aspect or any implementation method of the first aspect.
第四方面,提供一种耳机,具有通透模式,所述耳机包括:扬声器;耳外麦克风;耳内麦克风;以及上述第二方面或第二方面的任一实现方式中所述的滤波装置,或者上述第三方面所述的芯片。In a fourth aspect, an earphone is provided with a transparency mode, the earphone comprising: a speaker; an external microphone; an internal microphone; and the filtering device described in the second aspect or any implementation of the second aspect, or the chip described in the third aspect.
第五方面,提供一种滤波方法,应用于具有通透模式的耳机,所述耳机包括耳外麦克风,所述方法包括:确定所述耳外麦克风采集的声音信号的多个频带的能量值;对所述声音信号的所述多个频带的能量值进行调整,以使所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值。In a fifth aspect, a filtering method is provided, which is applied to headphones with a transparency mode, the headphones including an external ear microphone, and the method comprising: determining energy values of multiple frequency bands of sound signals collected by the external ear microphone; adjusting the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands are less than or equal to energy thresholds corresponding to each of the multiple frequency bands.
在一种实现方式中,所述对所述声音信号的所述多个频带的能量值进行调整,以使所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值,包括:基于通透滤波器,对所述声音信号进行处理,得到滤波信号;其中,所述对所述声音信号的所述多个频带的能量值进行调整,以使所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值,包括:对所述滤波信号的所述多个频带的能量值进行调整,以使所述滤波信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值。
In one implementation, the adjusting the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands includes: processing the sound signal based on a transparent filter to obtain a filtered signal; wherein, the adjusting the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands includes: adjusting the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
在一种实现方式中,所述对所述滤波信号的所述多个频带的能量值进行调整,以使所述滤波信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值,包括:基于所述通透滤波器或者所述通透滤波器之外的另一滤波器,对所述滤波信号的所述多个频带的能量值进行调整,以使所述滤波信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值。In one implementation, the adjusting the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to energy thresholds corresponding to each of the multiple frequency bands includes: based on the transparent filter or another filter other than the transparent filter, adjusting the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to energy thresholds corresponding to each of the multiple frequency bands.
在一种实现方式中,所述对所述滤波信号的所述多个频带的能量值进行调整,包括:根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量,并根据所述每个频带对应的调整量,对所述声音信号的所述每个频带的能量值进行调整。In one implementation, the adjusting the energy values of the multiple frequency bands of the filtered signal includes: determining an adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and an energy threshold corresponding to each frequency band, and adjusting the energy value of each frequency band of the sound signal based on the adjustment amount corresponding to each frequency band.
在一种实现方式中,所述根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量,包括:根据所述声音信号的所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量。In one implementation, determining the adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band includes: determining the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band.
在一种实现方式中,所述多个频带为所述声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。In one implementation, the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among N frequency bands of the sound signal, where N is a positive integer.
在一种实现方式中,所述第一频段小于预设的第一频率阈值,所述第二频段大于或等于预设的第二频率阈值,所述第一频率阈值和所述第二频率阈值位于2KHz至3KHz之间。In one implementation, the first frequency band is less than a preset first frequency threshold, the second frequency band is greater than or equal to a preset second frequency threshold, and the first frequency threshold and the second frequency threshold are between 2 kHz and 3 kHz.
第六方面,提供一种滤波装置,应用于具有通透模式的耳机,所述耳机包括耳外麦克风,用于采集声音信号。所述滤波装置包括:处理模块,用于确定所述声音信号的多个频带的能量值;滤波器模块,用于对所述声音信号的所述多个频带的能量值进行调整,以使所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值。In a sixth aspect, a filtering device is provided, which is applied to headphones with a transparent mode, wherein the headphones include an external ear microphone for collecting sound signals. The filtering device includes: a processing module for determining energy values of multiple frequency bands of the sound signal; and a filter module for adjusting the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands are less than or equal to energy thresholds corresponding to the multiple frequency bands.
在一种实现方式中,所述滤波器模块包括通透滤波器,所述通透滤波器用于:对所述声音信号进行处理,得到滤波信号;其中,所述通透滤波器还用于:对所述滤波信号的所述多个频带的能量值进行调整,以使所述滤波信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值;或者,所述滤波器模块还包括所述通透滤波器之外的另一滤波器,所述另一滤波器用于:接收所述滤波信号,并对所述滤波信号的所述多个频带的能量
值进行调整,以使所述滤波信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值。In one implementation, the filter module includes a transparent filter, which is used to: process the sound signal to obtain a filtered signal; wherein the transparent filter is also used to: adjust the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to the energy thresholds corresponding to the multiple frequency bands; or, the filter module further includes another filter other than the transparent filter, which is used to: receive the filtered signal and adjust the energy values of the multiple frequency bands of the filtered signal. The values are adjusted so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to the energy thresholds corresponding to the multiple frequency bands respectively.
在一种实现方式中,所述通透滤波器或者所述另一滤波器具体用于:根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量,并根据所述每个频带对应的调整量,对所述补偿信号的所述每个频带的能量值进行调整。In one implementation, the transparent filter or the other filter is specifically used to: determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the compensation signal according to the adjustment amount corresponding to each frequency band.
在一种实现方式中,所述通透滤波器或者所述另一滤波器具体用于:根据所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量。In one implementation, the transparent filter or the another filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band and the energy threshold corresponding to each frequency band.
在一种实现方式中,所述多个频带为所述声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。In one implementation, the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among N frequency bands of the sound signal, where N is a positive integer.
第七方面,提供一种芯片,包括处理器和存储器,包括处理器和存储器,所述存储器存储计算机指令,所述处理器调用所述计算机指令以使所述设备实现根据第五方面或第五方面的任一实现方式中所述的滤波方法。In the seventh aspect, a chip is provided, comprising a processor and a memory, wherein the memory stores computer instructions, and the processor calls the computer instructions to enable the device to implement the filtering method described in the fifth aspect or any implementation method of the fifth aspect.
第八方面,提供一种耳机,具有通透模式,所述耳机包括:扬声器;耳外麦克风;耳内麦克风;以及上述第六方面或第六方面的任一实现方式中所述的滤波装置,或者上述第七方面所述的芯片。In an eighth aspect, an earphone is provided with a transparency mode, the earphone comprising: a speaker; an external microphone; an internal microphone; and the filtering device described in the sixth aspect or any implementation of the sixth aspect, or the chip described in the seventh aspect.
基于上述技术方案,采用第一通透滤波器和第二通透滤波器分别对而外麦克风采集的声音信号进行处理,第一通透滤波器为硬件通透滤波器,第二通透滤波器为软件通透滤波器。通常,耳机对高频信号的被动隔离较强,需要在高频信号中加入更高的增益进行抬升,导致底噪主要集中在高频部分,因此,硬件通透滤波器对该声音信号中的中低频信号的增益大于对高频信号的增益,得到的第一滤波信号中以中低频信号为主;此外,对该声音信号进行降底噪处理,且软件通透滤波器对降底噪后的该声音信号中的高频信号的增益大于对中低频信号的增益,这样,得到的第二滤波信号中以降底噪后的高频信号为主,能够用来弥补第一滤波信号中的高频信号。对该第一滤波信号和该第二滤波信号进行结合便可以得到耳机的补偿信号,由于第二滤波信号中的高频信号是经过降底噪处理之后的信号,因此解决了补偿信号中底噪较大的问题。并且,由于人耳最终听到的声音是经过通透滤波器处理后的声音与泄露至人耳的声音之间叠加形成的,在佩戴者自讲时,人说话的声音频率集中在中低频,软件通透滤波器主要对高频信号进行处理而抑制中低频信
号,能够极大地减小软件通透滤波器对声音信号的处理时延,减小处理后的声音与泄露至人耳的声音之间的时间差,减轻佩戴者听到的声音失真。Based on the above technical solution, the first transparent filter and the second transparent filter are used to process the sound signal collected by the external microphone respectively. The first transparent filter is a hardware transparent filter, and the second transparent filter is a software transparent filter. Usually, the passive isolation of the earphone to the high-frequency signal is strong, and a higher gain needs to be added to the high-frequency signal to lift it, resulting in the background noise being mainly concentrated in the high-frequency part. Therefore, the gain of the hardware transparent filter to the low- and medium-frequency signals in the sound signal is greater than the gain to the high-frequency signal, and the first filtered signal obtained is mainly composed of low- and medium-frequency signals; in addition, the sound signal is subjected to background noise reduction processing, and the gain of the software transparent filter to the high-frequency signal in the sound signal after background noise reduction is greater than the gain to the low- and medium-frequency signals. In this way, the high-frequency signal after background noise reduction is mainly obtained in the second filtered signal, which can be used to compensate for the high-frequency signal in the first filtered signal. The compensation signal of the earphone can be obtained by combining the first filtered signal and the second filtered signal. Since the high-frequency signal in the second filtered signal is a signal after background noise reduction processing, the problem of large background noise in the compensation signal is solved. In addition, since the sound that the human ear hears is the result of the superposition of the sound processed by the transparent filter and the sound leaking to the human ear, when the wearer speaks to himself, the frequency of the human voice is concentrated in the middle and low frequencies. The software transparent filter mainly processes the high-frequency signal and suppresses the middle and low-frequency signal. The signal can greatly reduce the processing delay of the software transparent filter on the sound signal, reduce the time difference between the processed sound and the sound leaked to the human ear, and reduce the sound distortion heard by the wearer.
图1是本申请实施例的滤波方法的示意性流程图。FIG1 is a schematic flow chart of a filtering method according to an embodiment of the present application.
图2是本申请实施例的耳机的示意图。FIG. 2 is a schematic diagram of an earphone according to an embodiment of the present application.
图3是图1所示的方法的一种可能的实现方式的示意图。FIG. 3 is a schematic diagram of a possible implementation of the method shown in FIG. 1 .
图4是耳机中第一通透滤波器的示意图。FIG. 4 is a schematic diagram of a first transparent filter in an earphone.
图5是图1所示的方法的另一种可能的实现方式的示意图。FIG. 5 is a schematic diagram of another possible implementation of the method shown in FIG. 1 .
图6是图1所示的方法的另一种可能的实现方式的示意图。FIG. 6 is a schematic diagram of another possible implementation of the method shown in FIG. 1 .
图7是图1所示的方法的另一种可能的实现方式的示意图。FIG. 7 is a schematic diagram of another possible implementation of the method shown in FIG. 1 .
图8是图1所示的方法的一种可能的具体实现方式的示意图。FIG. 8 is a schematic diagram of a possible specific implementation of the method shown in FIG. 1 .
图9是本申请另一实施例的滤波方法的示意性流程图。FIG. 9 is a schematic flow chart of a filtering method according to another embodiment of the present application.
图10是本申请实施例的滤波装置的示意性框图。FIG. 10 is a schematic block diagram of a filtering device according to an embodiment of the present application.
图11是本申请另一实施例的滤波装置的示意性框图。FIG. 11 is a schematic block diagram of a filtering device according to another embodiment of the present application.
下面将结合附图,对本申请中的技术方案进行描述。The technical solution in this application will be described below in conjunction with the accompanying drawings.
耳机的通透模式可以利用通透(Hear Through,HT)滤波器对耳机外部的声音的进行抬升,从而将外部的声音在耳内进行还原。但是,这同时会将耳机内部电路的底噪一起放大,使得耳机的播放声音中携带较大的底噪。在安静的环境下例如办公室等环境下,麦克风需要通透的声音很小,此时输入信号中很大一部分为电路的底噪,输入信号经过HT滤波器进行放大,使得该底噪的声音尤为明显,通过硬件电路将电路本身的底噪降低,需要更大的成本,并且也很难消除底噪。The headphone's transparent mode can use the Hear Through (HT) filter to lift the sound outside the headphone, thereby restoring the external sound inside the ear. However, this will also amplify the background noise of the headphone's internal circuit, causing the headphone's playback sound to carry a large background noise. In a quiet environment such as an office, the microphone needs to have a very small transparent sound. At this time, a large part of the input signal is the background noise of the circuit. The input signal is amplified by the HT filter, making the sound of the background noise particularly obvious. Reducing the background noise of the circuit itself through a hardware circuit requires a higher cost, and it is also difficult to eliminate the background noise.
底噪还是制约通透带宽的重要因素之一。考虑到底噪的问题,目前市面上的耳机的通透带宽通常在大约2KHz-3.5KHz,保证该频率范围内的通透效果,如果能够解决底噪的问题,则可以在设计HT滤波器时实现更大的带宽,也能够应用到助听器等设备中解决底噪的问题,这对人耳的损伤更小。Noise is also one of the important factors that restrict the bandwidth of transparency. Considering the noise floor, the bandwidth of the headphones currently on the market is usually around 2KHz-3.5KHz. To ensure the transparency effect within this frequency range, if the noise floor problem can be solved, a larger bandwidth can be achieved when designing the HT filter, and it can also be applied to hearing aids and other devices to solve the noise floor problem, which is less harmful to the human ear.
通常,可以采用软件通透的方式去除输入信号中混合的电路底噪,将底噪降低至人耳能够听到的声音阈值以下。单纯地使用软件通透的方式虽然可
以在一定程度上解决底噪的问题,但是软件通透相比于硬件通透存在更大的时延,这会使耳机的佩戴者在自讲话时听到自己说话的声音失真,这是因为耳机的扬声器发出的补偿人声与骨传导传递的人声之间存在时间差。Usually, software transparency can be used to remove the circuit noise mixed in the input signal and reduce the noise to below the sound threshold that the human ear can hear. It can solve the problem of background noise to a certain extent, but software transparency has a greater delay than hardware transparency, which will cause the wearer of the headset to hear his or her own voice distorted when speaking. This is because there is a time difference between the compensating human voice emitted by the speaker of the headset and the human voice transmitted by bone conduction.
为此,本申请实施例提供一种应用于具有通透模式的耳机的滤波方法,利用软件通透和硬件通透结合的方式,对采集的声音信号进行处理,在一定程度上解决了上述的底噪的问题和声音失真的问题,提高了耳机的通透效果。To this end, an embodiment of the present application provides a filtering method applied to headphones with a transparency mode, which processes the collected sound signals by combining software transparency and hardware transparency, thereby solving the above-mentioned background noise problem and sound distortion problem to a certain extent and improving the transparency effect of the headphones.
图1是本申请实施例的滤波方法的示意性流程图。图1所示的方法100应用于具有通透模式的耳机,例如,可以应用于图2所示的耳机10。本申请实施例中所述的耳机应作广义理解,其不仅包括图2所示的传统意义上的耳机,还包括辅助或者助听设备等其他类型的声音播放器。如图2所示,耳机10包括扬声器11、耳外麦克风12和耳内麦克风13。耳外麦克风12可以称为前馈(Feed Forward,FF)麦克风或者参考麦克风,用于采集耳外传输过来的声音信号,或者说耳外数据。耳内麦克风13可以称为反馈(Feed Back,FB)麦克风,用于采集耳内的声音信号,或者说耳内数据。在通透模式下,耳外麦克风12采集的声音信号经过通透滤波器的处理后输出补偿信号,并叠加耳机10的外部泄露进入人耳的残留信号,使人耳可以听到完整的外界环境的声音。当用户佩戴耳机10与其他人进行对话时,可以不用摘下耳机10,直接将耳机10切换至通透模式,从而实现与对方的清晰对话。FIG. 1 is a schematic flow chart of a filtering method according to an embodiment of the present application. The method 100 shown in FIG. 1 is applied to headphones with a transparent mode, for example, the headphones 10 shown in FIG. 2. The headphones described in the embodiment of the present application should be understood in a broad sense, and include not only headphones in the traditional sense shown in FIG. 2, but also other types of sound players such as auxiliary or hearing aid devices. As shown in FIG. 2, the headphones 10 include a speaker 11, an external microphone 12, and an internal microphone 13. The external microphone 12 can be called a feed forward (FF) microphone or a reference microphone, which is used to collect sound signals transmitted from outside the ear, or external ear data. The internal microphone 13 can be called a feedback (FB) microphone, which is used to collect sound signals in the ear, or internal ear data. In the transparent mode, the sound signal collected by the external microphone 12 is processed by the transparent filter to output a compensation signal, and the residual signal leaking from the outside of the headphones 10 into the human ear is superimposed, so that the human ear can hear the sound of the complete external environment. When the user wears the earphone 10 to talk with other people, the user does not need to take off the earphone 10, but can directly switch the earphone 10 to the transparent mode to achieve a clear conversation with the other party.
图1所示的方法100可以由耳机10中的滤波装置执行,例如,由耳机10中芯片,比如音频编解码器(codec)芯片或者蓝牙音频系统芯片(System on a Chip,SOC)等执行。耳外麦克风12采集的声音信号包括第一频段的信号和第二频段的信号。其中,第一频段中的至少部分频段低于第二频段中的至少部分频段。这里,第一频段可以看作是中低频信号,第二频段可以看作是高频信号。可选地,该第一频段小于或等于预设的第一频率阈值,第二频段大于或等于预设的第二频率阈值。第一频率阈值例如位于2KHz至3KHz之间,第二频率阈值例如位于2KHz至3KHz之间。The method 100 shown in FIG1 can be executed by a filtering device in the headset 10, for example, by a chip in the headset 10, such as an audio codec chip or a Bluetooth audio system chip (System on a Chip, SOC). The sound signal collected by the external microphone 12 includes a signal of a first frequency band and a signal of a second frequency band. Among them, at least part of the frequency band in the first frequency band is lower than at least part of the frequency band in the second frequency band. Here, the first frequency band can be regarded as a medium and low frequency signal, and the second frequency band can be regarded as a high frequency signal. Optionally, the first frequency band is less than or equal to a preset first frequency threshold, and the second frequency band is greater than or equal to a preset second frequency threshold. The first frequency threshold is, for example, between 2KHz and 3KHz, and the second frequency threshold is, for example, between 2KHz and 3KHz.
其中,第一频率阈值和第二频率阈值可以相等,例如,第一频率阈值和第二频率阈值均为2.5KHz,或者第一频率阈值和第二频率阈值均为2.8KHz。第一频率阈值和第二频率阈值也可以不相等,例如,第一频率阈值大于第二频率阈值,比如第一频率阈值为2.8KHz,第二频率阈值为2.5KHz;又例如,
第一频率阈值小于第二频率阈值,比如第一频率阈值为2.5KHz,第二频率阈值为2.8KHz。The first frequency threshold and the second frequency threshold may be equal, for example, the first frequency threshold and the second frequency threshold are both 2.5KHz, or the first frequency threshold and the second frequency threshold are both 2.8KHz. The first frequency threshold and the second frequency threshold may also be unequal, for example, the first frequency threshold is greater than the second frequency threshold, such as the first frequency threshold is 2.8KHz and the second frequency threshold is 2.5KHz; for another example, The first frequency threshold is smaller than the second frequency threshold. For example, the first frequency threshold is 2.5 KHz, and the second frequency threshold is 2.8 KHz.
如图1所示,方法100包括以下步骤中的部分或者全部。As shown in FIG. 1 , method 100 includes part or all of the following steps.
在步骤110中,基于第一通透滤波器对耳外麦克风12采集的声音信号进行处理,得到该声音信号的第一滤波信号。In step 110, the sound signal collected by the external ear microphone 12 is processed based on the first transparent filter to obtain a first filtered signal of the sound signal.
第一通透滤波器为硬件通透滤波器,也称硬件通透模块,其可以对特定频段的信号进行增益放大。硬件通透滤波器例如是硬件滤波电路。本申请实施例中,第一通透滤波器用于抑制采集到的该声音信号中第二频段的信号,即对第一频段的信号进行通透,得到的第一滤波信号中以第一频段的信号为主。也就是说,第一通透滤波器对该声音信号中第一频段的信号的增益,大于对第一通透滤波器对该声音信号中第二频段的信号的增益。The first transparent filter is a hardware transparent filter, also known as a hardware transparent module, which can amplify the gain of signals in a specific frequency band. The hardware transparent filter is, for example, a hardware filter circuit. In the embodiment of the present application, the first transparent filter is used to suppress the signal in the second frequency band of the collected sound signal, that is, to transparently transmit the signal in the first frequency band, and the obtained first filtered signal is mainly composed of the signal in the first frequency band. In other words, the gain of the first transparent filter on the signal in the first frequency band of the sound signal is greater than the gain of the first transparent filter on the signal in the second frequency band of the sound signal.
第一通透滤波器对第一频段的信号的增益可以大于1、等于1或者小于1,增益大于1时表示对第一频段的信号进行放大,增益小于1时表示对第一频段的信号进行减小,增益等于1时表示对第一频段的信号不进行放大或者减小。同样,第一通透滤波器对第二频段的信号的增益可以大于1、等于1或者小于1,增益大于1时表示对第二频段的信号进行放大,增益小于1时表示对第二频段的信号进行减小,增益等于1时表示对第二频段的信号不进行放大或者减小。例如,第一通透滤波器对第一频段的信号的增益和对第二频段的信号的增益均大于1或者均小于1;或者,第一通透滤波器对第一频段的信号的增益大于1,对第二频段的信号的增益小于或等于1;或者,第一通透滤波器对第一频段的信号的增益大于或等于1,对第二频段的信号的增益小于1。The gain of the first transparent filter for the signal of the first frequency band can be greater than 1, equal to 1, or less than 1. When the gain is greater than 1, it indicates that the signal of the first frequency band is amplified, when the gain is less than 1, it indicates that the signal of the first frequency band is reduced, and when the gain is equal to 1, it indicates that the signal of the first frequency band is not amplified or reduced. Similarly, the gain of the first transparent filter for the signal of the second frequency band can be greater than 1, equal to 1, or less than 1. When the gain is greater than 1, it indicates that the signal of the second frequency band is amplified, when the gain is less than 1, it indicates that the signal of the second frequency band is reduced, and when the gain is equal to 1, it indicates that the signal of the second frequency band is not amplified or reduced. For example, the gain of the first transparent filter for the signal of the first frequency band and the gain of the first transparent filter for the signal of the second frequency band are both greater than 1 or less than 1; or, the gain of the first transparent filter for the signal of the first frequency band is greater than 1, and the gain of the first transparent filter for the signal of the second frequency band is less than or equal to 1; or, the gain of the first transparent filter for the signal of the first frequency band is greater than or equal to 1, and the gain of the first transparent filter for the signal of the second frequency band is less than 1.
在步骤120中,对耳外麦克风12采集的声音信号进行降底噪处理,并基于第二通透滤波器对降底噪后的该声音信号进行处理,得到该声音信号的第二滤波信号。In step 120, the sound signal collected by the external ear microphone 12 is subjected to background noise reduction processing, and the sound signal after background noise reduction is processed based on a second transparent filter to obtain a second filtered signal of the sound signal.
第二通透滤波器为软件通透滤波器,也称软件通透模块。软件通透滤波器是在程序中设计的数字滤波器,可以通过滤波算法对特定频段的信号进行增益放大,例如,该软件通透滤波器可以包括有限冲激响应(Finite Impulse Response,FIR)滤波器或者无限冲激响应(Infinite Impulse Response,IIR)滤波器等方式,以对消除底噪后的声音信号进行软件滤波;又例如,该硬件通透滤波器可以包括有限冲激响应(Finite Impulse Response,FIR)滤波器或
者无限冲激响应(Infinite Impulse Response,IIR)滤波器等方式,以对耳外麦克风12采集的声音信号进行硬件滤波。本申请实施例中,第二通透滤波器用于抑制采集到的声音信号中第一频段的信号,即对第二频段的信号进行通透,得到的第二滤波信号中以第二频段的信号为主。或者说,第二通透滤波器对该声音信号中第二频段的信号的增益,大于第二通透滤波器对该声音信号中第一频段的信号的增益。The second transparent filter is a software transparent filter, also known as a software transparent module. The software transparent filter is a digital filter designed in the program, which can amplify the gain of the signal in a specific frequency band through a filtering algorithm. For example, the software transparent filter can include a finite impulse response (FIR) filter or an infinite impulse response (IIR) filter to perform software filtering on the sound signal after the background noise is eliminated; for another example, the hardware transparent filter can include a finite impulse response (FIR) filter or an infinite impulse response (IIR) filter. The sound signal collected by the external ear microphone 12 is filtered by hardware by means of an infinite impulse response (IIR) filter or the like. In the embodiment of the present application, the second transparent filter is used to suppress the signal of the first frequency band in the collected sound signal, that is, to transparently filter the signal of the second frequency band, and the obtained second filtered signal is mainly composed of the signal of the second frequency band. In other words, the gain of the second transparent filter on the signal of the second frequency band in the sound signal is greater than the gain of the second transparent filter on the signal of the first frequency band in the sound signal.
第二通透滤波器对第一频段的信号的增益可以大于1、等于1或者小于1,增益大于1时表示对第一频段的信号进行放大,增益小于1时表示对第一频段的信号进行减小,增益等于1时表示对第一频段的信号不进行放大或者减小。同样,第二通透滤波器对第二频段的信号的增益可以大于1、等于1或者小于1,增益大于1时表示对第二频段的信号进行放大,增益小于1时表示对第二频段的信号进行减小,增益等于1时表示对第二频段的信号不进行放大或者减小。例如,第二通透滤波器对第一频段的信号的增益和对第二频段的信号的增益均大于1或者均小于1;或者,第二通透滤波器对第一频段的信号的增益小于或等于1,对第二频段的信号的增益大于1;或者,第二通透滤波器对第一频段的信号的增益小于1,对第二频段的信号的增益大于或等于1。The gain of the second transparent filter for the signal of the first frequency band can be greater than 1, equal to 1, or less than 1. When the gain is greater than 1, it indicates that the signal of the first frequency band is amplified, when the gain is less than 1, it indicates that the signal of the first frequency band is reduced, and when the gain is equal to 1, it indicates that the signal of the first frequency band is not amplified or reduced. Similarly, the gain of the second transparent filter for the signal of the second frequency band can be greater than 1, equal to 1, or less than 1. When the gain is greater than 1, it indicates that the signal of the second frequency band is amplified, when the gain is less than 1, it indicates that the signal of the second frequency band is reduced, and when the gain is equal to 1, it indicates that the signal of the second frequency band is not amplified or reduced. For example, the gain of the second transparent filter for the signal of the first frequency band and the gain of the second transparent filter for the signal of the second frequency band are both greater than 1 or less than 1; or, the gain of the second transparent filter for the signal of the first frequency band is less than or equal to 1, and the gain of the second transparent filter for the signal of the second frequency band is greater than 1; or, the gain of the second transparent filter for the signal of the first frequency band is less than 1, and the gain of the second transparent filter for the signal of the second frequency band is greater than 1.
在步骤130中,根据第一通透滤波器输出的第一滤波信号、以及第二通透滤波器输出的第二滤波信号,确定耳机10的补偿信号。In step 130, a compensation signal of the earphone 10 is determined according to the first filtered signal output by the first transparent filter and the second filtered signal output by the second transparent filter.
该补偿信号用于对因被动隔离而衰减的信号进行补偿,并由扬声器11输出,该补偿信号与泄露至人耳的残留信号叠加,形成人耳最终听到的声音。The compensation signal is used to compensate for the signal attenuated by the passive isolation and is output by the loudspeaker 11. The compensation signal is superimposed on the residual signal leaked to the human ear to form the sound finally heard by the human ear.
本申请实施例中,采用第一通透滤波器和第二通透滤波器分别对耳外麦克风12采集的声音信号进行处理,第一通透滤波器为硬件通透滤波器,第二通透滤波器为软件通透滤波器。通常,耳机10对高频信号的被动隔离较强,需要在高频信号中加入更高的增益进行抬升,导致底噪主要集中在高频部分,因此,硬件通透滤波器对该声音信号中的中低频信号的增益大于对高频信号的增益,得到的第一滤波信号中以中低频信号为主;此外,对该声音信号进行降底噪处理,且软件通透滤波器对降底噪后的该声音信号中的高频信号的增益大于对中低频信号的增益,这样,得到的第二滤波信号中以降底噪后的高频信号为主,能够用来弥补第一滤波信号中的高频信号。对该第一滤波信号和该第二滤波信号进行结合便可以得到耳机的补偿信号,由于第二
滤波信号中的高频信号是经过降底噪处理之后的信号,因此解决了补偿信号中底噪较大的问题。并且,由于人耳最终听到的声音是经过通透滤波器处理后的声音与泄露至人耳的声音之间叠加形成的,在佩戴者自讲时,人说话的声音频率集中在中低频,软件通透滤波器主要对高频信号进行处理而抑制中低频信号,能够极大地减小软件通透滤波器对声音信号的处理时延,减小处理后的声音与泄露至人耳的声音之间的时间差,减轻佩戴者听到的声音失真。In the embodiment of the present application, a first transparent filter and a second transparent filter are used to process the sound signal collected by the external microphone 12 respectively. The first transparent filter is a hardware transparent filter, and the second transparent filter is a software transparent filter. Usually, the passive isolation of the earphone 10 to the high-frequency signal is strong, and a higher gain needs to be added to the high-frequency signal to lift it, resulting in the background noise being mainly concentrated in the high-frequency part. Therefore, the hardware transparent filter has a greater gain for the mid- and low-frequency signals in the sound signal than for the high-frequency signals, and the obtained first filtered signal is mainly composed of mid- and low-frequency signals. In addition, the sound signal is subjected to background noise reduction processing, and the software transparent filter has a greater gain for the high-frequency signals in the sound signal after background noise reduction than for the mid- and low-frequency signals. In this way, the obtained second filtered signal is mainly composed of the high-frequency signals after background noise reduction, which can be used to compensate for the high-frequency signals in the first filtered signal. The first filtered signal and the second filtered signal are combined to obtain a compensation signal for the earphone. Since the second The high-frequency signal in the filtered signal is the signal that has been processed by the noise reduction process, thus solving the problem of large noise in the compensation signal. In addition, since the sound that the human ear finally hears is the superposition of the sound processed by the transparent filter and the sound leaked to the human ear, when the wearer speaks to himself, the frequency of the human voice is concentrated in the medium and low frequencies. The software transparent filter mainly processes the high-frequency signal and suppresses the medium and low frequency signals, which can greatly reduce the processing delay of the software transparent filter on the sound signal, reduce the time difference between the processed sound and the sound leaked to the human ear, and reduce the sound distortion heard by the wearer.
可以理解,底噪信号通常是由耳外麦克风12至通透滤波器之间设置的各种电路例如模数转换器(Analog to Digital Converter,ADC)电路等引入的背景噪声,通常,耳机10对高频信号的被动隔离较强,无论采用硬件通透滤波器还是软件通透滤波器,都需要在高频信号中加入更高的增益进行抬升,导致由于底噪主要集中在高频部分。由于在步骤120中,对耳外麦克风12采集的声音信号进行了降底噪处理,使得第二通透滤波器输出的第二滤波信号中的高频信号中携带的底噪明显降低。It can be understood that the background noise signal is usually the background noise introduced by various circuits set between the external ear microphone 12 and the transparent filter, such as the analog to digital converter (ADC) circuit. Usually, the headset 10 has strong passive isolation for high-frequency signals. Whether a hardware transparent filter or a software transparent filter is used, a higher gain needs to be added to the high-frequency signal to increase it, resulting in the background noise being mainly concentrated in the high-frequency part. Since the sound signal collected by the external ear microphone 12 is subjected to background noise reduction processing in step 120, the background noise carried in the high-frequency signal in the second filtered signal output by the second transparent filter is significantly reduced.
本申请实施例中,所述的耳外麦克风12采集的声音信号,是指第一通透滤波器和第二通透滤波器等从耳外麦克风12接收到的声音信号,即,携带了底噪的声音信号。In the embodiment of the present application, the sound signal collected by the external ear microphone 12 refers to the sound signal received from the external ear microphone 12 by the first transparent filter and the second transparent filter, that is, the sound signal carrying background noise.
在一种实现方式中,在步骤120中,对声音信号进行降底噪处理,包括:获取预先估计的底噪信号;根据该底噪信号和耳外麦克风12采集的声音信号,确定降底噪后的声音信号。该底噪信号例如可以通过实验测试等方式获取。通过预先估计的底噪信号,抵消该声音信号中携带的底噪信号的部分,便可以得到耳外麦克风12外部的实际信号。例如,该底噪信号与该声音信号的符号相反,对该底噪信号与该声音信号相加,便可以从该声音信号中去除该底噪信号。In one implementation, in step 120, the sound signal is subjected to noise reduction processing, including: obtaining a pre-estimated noise floor signal; determining the sound signal after noise floor reduction based on the noise floor signal and the sound signal collected by the external ear microphone 12. The noise floor signal can be obtained, for example, by experimental testing or the like. By using the pre-estimated noise floor signal to offset the part of the noise floor signal carried in the sound signal, the actual signal outside the external ear microphone 12 can be obtained. For example, the noise floor signal has an opposite sign to that of the sound signal, and by adding the noise floor signal to the sound signal, the noise floor signal can be removed from the sound signal.
例如,如图3所示,在硬件通透阶段,耳外麦克风12采集的声音信号经过第一通透滤波器后,高频信号被抑制,输出以中低频信号为主的第一滤波信号;在软件通透阶段,底噪估计模块输出预先估计的底噪信号,底噪信号的符号为负,对底噪信号与声音信号相加,便能够消除该声音信号中携带的底噪信号的部分,得到降底噪后的声音信号,降底噪后的声音信号经过第二通透滤波器后,中低频信号被抑制,输出以高频信号为主的第二滤波信号。对第一滤波信号和第二滤波信号进行合并,可以得到扬声器11输出的补偿
信号。For example, as shown in FIG3 , in the hardware transparent stage, after the sound signal collected by the external ear microphone 12 passes through the first transparent filter, the high-frequency signal is suppressed, and a first filtered signal mainly composed of medium and low frequency signals is output; in the software transparent stage, the background noise estimation module outputs a pre-estimated background noise signal, and the sign of the background noise signal is negative. By adding the background noise signal to the sound signal, the part of the background noise signal carried in the sound signal can be eliminated to obtain a sound signal with reduced background noise. After the sound signal with reduced background noise passes through the second transparent filter, the medium and low frequency signals are suppressed, and a second filtered signal mainly composed of high frequency signals is output. By merging the first filtered signal and the second filtered signal, a compensation signal output by the speaker 11 can be obtained. Signal.
该底噪信号可以是固定值;或者,也可以基于当前耳外麦克风12采集的声音信号实时估计该底噪信号,例如,对底噪信号的特性进行采集和统计,并预设底噪信号的基准值,该基准值例如可以通过对电路的底噪信号进行频域展开等方式来获得,根据当前耳外麦克风12采集的声音信号调整该基准值,便得到该底噪信号的估计值,从而实现对底噪信号的实时估计。The background noise signal can be a fixed value; or, the background noise signal can be estimated in real time based on the sound signal currently collected by the external ear microphone 12. For example, the characteristics of the background noise signal are collected and counted, and a reference value of the background noise signal is preset. The reference value can be obtained by, for example, expanding the background noise signal of the circuit in the frequency domain, and the reference value is adjusted according to the sound signal currently collected by the external ear microphone 12 to obtain an estimated value of the background noise signal, thereby realizing real-time estimation of the background noise signal.
如果仅采用硬件通透滤波器,如上所述,由于底噪主要集中在高频部分,在对声音信号进行抬升时,同时会将底噪一起放大;如果仅采用软件通透滤波器,尽管能够通过软件的方式估计出相应的底噪并在扬声器11输出补偿信号之前将底噪滤除,但是软件通透相比于硬件通透具有更大的时延。由于人耳最终听到的声音是经过通透滤波器处理后的补偿声音与泄露至人耳的残留声音之间叠加形成的,残留声音为物理传输,其时延可以忽略,如果输入人耳的补偿声音与泄露至人耳的残留声音之间存在较大时延,则佩戴者在自讲话时会听到自己说话的声音失真。If only a hardware transparent filter is used, as mentioned above, since the background noise is mainly concentrated in the high-frequency part, when the sound signal is lifted, the background noise will be amplified at the same time; if only a software transparent filter is used, although the corresponding background noise can be estimated by software and the background noise can be filtered out before the speaker 11 outputs the compensation signal, the software transparency has a greater delay than the hardware transparency. Since the sound that the human ear finally hears is formed by the superposition of the compensation sound processed by the transparent filter and the residual sound leaked to the human ear, the residual sound is physically transmitted and its delay can be ignored. If there is a large delay between the compensation sound input to the human ear and the residual sound leaked to the human ear, the wearer will hear the distortion of his own voice when speaking to himself.
而本申请实施例采用了硬件通透与软件通透结合的方式,由于底噪主要集中在高频部分,因此,利用硬件通透滤波器抑制该声音信号中的高频信号并对中低频信号进行通透,能够避免引入较多高频信号的底噪;对该声音信号中的底噪进行估计(estimate noise floor),并利用软件通透滤波器抑制降底噪后的声音信号中的中低频信号并对高频信号进行通透,能够避免软件通透滤波器花费较多时间在人声集中的中低频信号的处理上,减小了补偿声音与残留声音之间的时间差,或者说是补偿声音与残留声音之间的时延,减轻了佩戴者听到的声音失真。The embodiment of the present application adopts a combination of hardware transparency and software transparency. Since the background noise is mainly concentrated in the high-frequency part, the high-frequency signal in the sound signal is suppressed by a hardware transparency filter and the mid- and low-frequency signals are transparent. This can avoid introducing more background noise of high-frequency signals. The background noise in the sound signal is estimated (estimate noise floor), and the mid- and low-frequency signals in the sound signal after the background noise is reduced are suppressed by a software transparency filter and the high-frequency signal is transparent. This can avoid the software transparency filter spending more time on processing the mid- and low-frequency signals concentrated on the human voice, reducing the time difference between the compensated sound and the residual sound, or the time delay between the compensated sound and the residual sound, and reducing the sound distortion heard by the wearer.
可选地,可以在第二通透滤波器中采用DSP硬件进行加速,将大部分的代码实现采用汇编的形式进行编写,以便在更少的指令周期内完成对底噪的滤除和通透滤波,实现超低延时。Optionally, DSP hardware may be used for acceleration in the second transparent filter, and most of the code implementation may be written in assembly language to complete background noise filtering and transparent filtering in fewer instruction cycles, thereby achieving ultra-low latency.
将硬件通透滤波器输出的以中低频信号为主的第一滤波信号,以及软件通透滤波器输出的以高频信号为主的第二滤波信号结合,可以还原整个频带的信号。这样,硬件通透滤波器和软件通透滤波器可以相互弥补,既减轻补偿信号中的底噪,又减小了补偿信号与残留信号之间的时间差。The first filtered signal mainly composed of medium and low frequency signals output by the hardware transparent filter and the second filtered signal mainly composed of high frequency signals output by the software transparent filter can be combined to restore the signal of the entire frequency band. In this way, the hardware transparent filter and the software transparent filter can complement each other, reducing the background noise in the compensation signal and reducing the time difference between the compensation signal and the residual signal.
在一种实现方式中,方法100还包括:根据扬声器11输出的音频信号、以及耳内麦克风13采集的耳内信号,确定次级传递函数;根据耳机10在佩
戴状态下的该耳外信号、以及在未佩戴耳机10的状态下耳内接收的信号,确定第一通透滤波器。可以理解,未佩戴耳机10的状态下耳内接收的信号,是指人耳在未佩戴耳机10的状态下从耳内采集到的信号,例如,在人耳在未佩戴耳机10的状态下,可以采用额外的麦克风对人耳内的信号进行采集。而在确定次级传递函数时,耳内麦克风13采集的耳内信号,通常是耳机10在佩戴的情况下由耳机10中的耳内麦克风13采集的信号。In one implementation, the method 100 further includes: determining the secondary transfer function according to the audio signal output by the speaker 11 and the in-ear signal collected by the in-ear microphone 13; ... The first transparent filter is determined by the external ear signal in the wearing state and the signal received in the ear when the earphone 10 is not worn. It can be understood that the signal received in the ear when the earphone 10 is not worn refers to the signal collected from the ear when the earphone 10 is not worn. For example, when the ear is not worn, an additional microphone can be used to collect the signal in the ear. When determining the secondary transfer function, the ear signal collected by the ear microphone 13 is usually the signal collected by the ear microphone 13 in the earphone 10 when the earphone 10 is worn.
结合图4具体说明第一通透滤波器的设计。作为示例,如图4所示,扬声器11到耳内麦克风13的通道是物理通道,其建模称为次级传递函数,记作SP,该次级传递函数是表示从扬声器11到耳内麦克风13的传递函数,也称次级路径传递函数。通透的目的是让耳机10的佩戴者,听到外界的声音是未经过耳机10被动隔离的。为了达到这个目的,需要对因被动隔离而衰减的信号进行补偿,通过扬声器11输出补偿信号。如图4所示,通常,希望耳内麦克风13处的信号和耳外麦克风12处的信号一致,由此希望在佩戴耳机10的情况下由扬声器11播放出来的信号经过次级传输路径后与耳内的残留信号叠加得到的信号,与未佩戴耳机10时耳内接收的信号相同。这里,将耳外麦克风12与扬声器11之间的路径记作HT。具体而言,针对同一音源,未佩戴耳机10的情况下在耳内采集到的信号记作D,佩戴耳机10的情况下耳内麦克风13采集到的残留信号的大小记作E,耳外麦克风12采集到的信号记作FF,忽略耳内麦克风13的位置和未佩戴耳机10的情况下信号采集的位置的差异。第一通透滤波器的优化目标为,FF*HT*SP+E=D,通过该方式能够得到对应的第一通透滤波器。此外,还需要设计第一通透滤波器,使其对高频信号进行抑制,从而使硬件放大的频段集中在中低频。The design of the first transparent filter is specifically described in conjunction with FIG4. As an example, as shown in FIG4, the channel from the speaker 11 to the in-ear microphone 13 is a physical channel, and its modeling is called a secondary transfer function, denoted as SP. The secondary transfer function is a transfer function representing the transfer function from the speaker 11 to the in-ear microphone 13, also known as a secondary path transfer function. The purpose of transparency is to allow the wearer of the headset 10 to hear the sound of the outside world without passive isolation of the headset 10. In order to achieve this goal, it is necessary to compensate for the signal attenuated due to passive isolation, and output the compensation signal through the speaker 11. As shown in FIG4, it is usually hoped that the signal at the in-ear microphone 13 is consistent with the signal at the external ear microphone 12, so that the signal played by the speaker 11 when the headset 10 is worn is superimposed with the residual signal in the ear after the secondary transmission path, and the signal received in the ear when the headset 10 is not worn. Here, the path between the external ear microphone 12 and the speaker 11 is denoted as HT. Specifically, for the same sound source, the signal collected in the ear when the earphone 10 is not worn is recorded as D, the size of the residual signal collected by the ear microphone 13 when the earphone 10 is worn is recorded as E, and the signal collected by the external ear microphone 12 is recorded as FF, ignoring the difference between the position of the ear microphone 13 and the position of signal collection when the earphone 10 is not worn. The optimization goal of the first transparent filter is FF*HT*SP+E=D, and the corresponding first transparent filter can be obtained in this way. In addition, the first transparent filter needs to be designed to suppress high-frequency signals, so that the frequency band amplified by the hardware is concentrated in the middle and low frequencies.
当耳机10处于通透模式时,虽然希望对环境声音保持清晰的感知,但是环境中经常会有很大的噪声,例如鞭炮声、施工的敲声等,对这部分声音的还原会引起佩戴者感官上的不适,并且过高的音量可能会超过音频系统表达的极限,从而导致削波的问题。设想,当佩戴者通过耳机语音导航经过一个施工场地,此时会陷入一个两难的境地,为了听清环境的声音,佩戴者需要开启耳机的通透模式,开启通透模式会对所有环境声进行还原,而较大的外界声音会引起耳朵不适,关闭通透模式耳机起到隔离的作用能够有效减少外界噪声传入耳膜,但是不便于获取环境的声音。When the earphone 10 is in the transparent mode, although it is hoped to maintain a clear perception of the ambient sound, there are often loud noises in the environment, such as firecrackers, knocking sounds during construction, etc. The restoration of these sounds will cause sensory discomfort to the wearer, and too high a volume may exceed the limit of the audio system's expression, resulting in clipping problems. Imagine that when the wearer passes a construction site through the earphone voice navigation, he will be in a dilemma. In order to hear the ambient sound clearly, the wearer needs to turn on the transparent mode of the earphone. Turning on the transparent mode will restore all ambient sounds, while louder external sounds will cause ear discomfort. Turning off the transparent mode will isolate the earphone and effectively reduce the external noise from entering the eardrum, but it is not convenient for obtaining the ambient sound.
为此,本申请还提供一种环境自适应通透的方案,能够降低环境中的大
音量频段的通透量,而其他频段的声音细节能够最大程度地在耳内进行还原,这对于被动隔离效果较好的耳机尤为重要。To this end, the present application also provides a solution for environmental self-adaptation and transparency, which can reduce the large The transparency of the volume band, while the sound details of other frequency bands can be restored in the ear to the greatest extent, which is especially important for headphones with good passive isolation effects.
在一种实现方式中,方法100还包括:获取耳外麦克风12采集的声音信号的多个频带的能量值;根据该声音信号的多个频带的能量值,对补偿信号的多个频带的能量值分别进行调整,以使该补偿信号的多个频带的能量值小于或等于该多个频带各自对应的能量阈值。In one implementation, method 100 also includes: obtaining energy values of multiple frequency bands of the sound signal collected by the external ear microphone 12; and adjusting the energy values of multiple frequency bands of the compensation signal according to the energy values of the multiple frequency bands of the sound signal, so that the energy values of the multiple frequency bands of the compensation signal are less than or equal to the energy thresholds corresponding to the multiple frequency bands.
该实施例中,将耳外麦克风12采集的声音信号划分为多个频带,或者说多个频段,并统计各个频带的能量值,根据声音信号中各个频段的能量值,对上述补偿信号中各个频段的能量值分别进行调整,使得该补偿信号的多个频带的能量值小于或等于各自对应的能量阈值,从而避免外部的声音信号过高引起佩戴者的感官不适,实现对环境声音的自适应处理。In this embodiment, the sound signal collected by the external microphone 12 is divided into multiple frequency bands, or multiple frequency bands, and the energy value of each frequency band is counted. According to the energy value of each frequency band in the sound signal, the energy value of each frequency band in the above-mentioned compensation signal is adjusted respectively, so that the energy values of the multiple frequency bands of the compensation signal are less than or equal to their respective corresponding energy thresholds, thereby avoiding the external sound signal being too high to cause sensory discomfort to the wearer, and realizing adaptive processing of ambient sound.
该多个频带例如为声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。而对于能量值未超过其对应的能量阈值的频段,可以不进行调整。The multiple frequency bands are, for example, frequency bands whose energy values exceed corresponding energy thresholds among the N frequency bands of the sound signal, where N is a positive integer. For frequency bands whose energy values do not exceed their corresponding energy thresholds, no adjustment may be performed.
这里,所述的能量值例如可以是能量峰值或者能量均值等,以下,均以能量峰值为例进行描述。不同频带对应的能量阈值例如可以通过实验测试或者响应度曲线等方式确定。N个频带中任意两个频带对应的能量阈值可以相等,也可以不相等。Here, the energy value may be, for example, an energy peak value or an energy mean value, and the following description is made by taking the energy peak value as an example. The energy thresholds corresponding to different frequency bands may be determined, for example, by experimental tests or response curves. The energy thresholds corresponding to any two frequency bands in the N frequency bands may be equal or unequal.
可选地,根据该声音信号的多个频带的能量值,对补偿信号的多个频带的能量值分别进行调整,包括:根据该声音信号的每个频带的能量值、以及每个频带对应的能量阈值,确定每个频带对应的调整量;根据每个频带对应的调整量,对该补偿信号的每个频带的能量值进行调整。Optionally, the energy values of multiple frequency bands of the compensation signal are adjusted respectively according to the energy values of multiple frequency bands of the sound signal, including: determining the adjustment amount corresponding to each frequency band according to the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band; and adjusting the energy value of each frequency band of the compensation signal according to the adjustment amount corresponding to each frequency band.
例如,可以根据多个频带中的每个频带的能量值与每个频带对应的能量阈值之间的差值,确定每个频带对应的调整量。该差值越大,调整量越大;该差值越小,调整量越小。For example, the adjustment amount corresponding to each frequency band may be determined according to the difference between the energy value of each frequency band in the multiple frequency bands and the energy threshold corresponding to each frequency band. The larger the difference, the larger the adjustment amount; the smaller the difference, the smaller the adjustment amount.
例如,如图5所示,第一通透滤波器输出第一滤波信号、以及第二通透滤波器输出第二滤波信号后,对第一滤波信号和第二滤波信号进行合并得到相应的补偿信号,并且,还可以对该补偿信号进行上述的自适应处理。具体地,可以根据耳外麦克风12采集的时域信号进行频域展开,采用例如倍频程等方式将采样的有效频带划分为N个频带,统计N个频带各自的能量峰值,并对其中能量峰值超过对应的能量阈值的多个频带进行能量调整。在能
量峰值的检测和调整量的估计(environment adaptive energy detection and suppression estimate)的过程中,可以根据多个频带中每个频带的能量峰值与其对应的能量阈值之间的差值,计算该频带对应的调整量,从而根据该调整量对该频带的能量值进行调整,以使该频带的能量值被压制在对应的能量阈值以下,也将该过程称为能带压制(subband suppression)。在实际应用中,耳外麦克风12实时采集声音信号,可以根据实时采集的声音信号中各个频带的能量值,对补偿信号中各个频带的能量值进行实时调整。For example, as shown in FIG5 , after the first transparent filter outputs the first filter signal and the second transparent filter outputs the second filter signal, the first filter signal and the second filter signal are combined to obtain a corresponding compensation signal, and the compensation signal can also be subjected to the above-mentioned adaptive processing. Specifically, the time domain signal collected by the external ear microphone 12 can be expanded in the frequency domain, and the effective frequency band of the sample can be divided into N frequency bands by, for example, an octave, and the energy peaks of the N frequency bands are counted, and the energy of multiple frequency bands whose energy peaks exceed the corresponding energy thresholds is adjusted. In the process of detecting the energy peak value and estimating the adjustment amount (environment adaptive energy detection and suppression estimate), the adjustment amount corresponding to the frequency band can be calculated according to the difference between the energy peak value of each frequency band in multiple frequency bands and its corresponding energy threshold, so as to adjust the energy value of the frequency band according to the adjustment amount, so that the energy value of the frequency band is suppressed below the corresponding energy threshold. This process is also called subband suppression. In practical applications, the external ear microphone 12 collects sound signals in real time, and can adjust the energy values of each frequency band in the compensation signal in real time according to the energy values of each frequency band in the real-time collected sound signals.
举例来说,N个频带分别对应N个能量阈值,假设声音信号的N个频带中有M个频带的能量峰值都超过各自对应的能量阈值,则根据声音信号的这M个频带的能量峰值与各自对应的能量阈值之间的差值,对M个频带的能量值进行调整,例如,M个频带中第i个频带的调整量可以等于第i个频带的能量峰值与第i个频带对应的能量阈值之间的差值,i从1至M,根据第i个频带的调整量,对第i个频带的能量值进行调整。For example, N frequency bands correspond to N energy thresholds respectively. Assuming that the energy peak values of M frequency bands among the N frequency bands of the sound signal exceed their corresponding energy thresholds, the energy values of the M frequency bands are adjusted according to the difference between the energy peak values of the M frequency bands of the sound signal and their corresponding energy thresholds. For example, the adjustment amount of the i-th frequency band among the M frequency bands can be equal to the difference between the energy peak value of the i-th frequency band and the energy threshold corresponding to the i-th frequency band, where i ranges from 1 to M, and the energy value of the i-th frequency band is adjusted according to the adjustment amount of the i-th frequency band.
本申请实施例中,也可以将软件通透处理和环境声音的自适应处理这两路软件部分,合并为一路软件串行实现。例如,如图6所示,能量峰值的检测和调整量的估计的过程可以在第二通透滤波器对声音信号进行软件通透的过程之前完成。In the embodiment of the present application, the two software parts of software transparent processing and adaptive processing of ambient sound can also be combined into one software serial implementation. For example, as shown in FIG6 , the process of detecting the energy peak and estimating the adjustment amount can be completed before the second transparent filter performs software transparent processing on the sound signal.
在另一实现方式中,方法100还包括:获取耳外麦克风12采集的声音信号的多个频带的能量值;第一通透滤波器还用于,对声音信号的多个频带的能量值进行调整,以使第一滤波信号的多个频带的能量值小于或等于多个频带各自对应的能量阈值;第二通透滤波器还用于,对降底噪后的声音信号的多个频带的能量值进行调整,以使第二滤波信号的多个频带的能量值小于或等于多个频带各自对应的能量阈值。In another implementation, method 100 also includes: obtaining energy values of multiple frequency bands of the sound signal collected by the external ear microphone 12; the first transparent filter is also used to adjust the energy values of multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands of the first filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands; the second transparent filter is also used to adjust the energy values of multiple frequency bands of the sound signal after background noise reduction so that the energy values of the multiple frequency bands of the second filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
该实施例中,如图7所示,第一通透滤波器既能够实现对声音信号中的高频信号的抑制,同时能够实现对声音信号中各个频带的能量值的调整,使得输出第一滤波信号中以中低频信号为主,且第一滤波信号中各个频带的能量均小于或等于各自对应的能量阈值。类似地,第二通透滤波器既能够实现对降底噪后的声音信号中的中低频信号的抑制,同时能够实现对降底噪后的声音信号中各个频带的能量值的调整,使得输出第二滤波信号中以高频信号为主,且第二滤波信号中各个频带的能量均小于或等于各自对应的能量阈值。
In this embodiment, as shown in FIG7 , the first transparent filter can suppress the high-frequency signal in the sound signal and adjust the energy value of each frequency band in the sound signal, so that the output first filtered signal is mainly composed of medium and low frequency signals, and the energy of each frequency band in the first filtered signal is less than or equal to the corresponding energy threshold. Similarly, the second transparent filter can suppress the medium and low frequency signals in the sound signal after the background noise is reduced and adjust the energy value of each frequency band in the sound signal after the background noise is reduced, so that the output second filtered signal is mainly composed of high frequency signals, and the energy of each frequency band in the second filtered signal is less than or equal to the corresponding energy threshold.
可选地,第一通透滤波器具体用于,根据声音信号的每个频带的能量值、以及每个频带对应的能量阈值,确定每个频带对应的调整量,并根据每个频带对应的调整量,对声音信号的每个频带的能量值进行调整;第二通透滤波器具体用于,根据降底噪后的声音信号的每个频带的能量值、以及每个频带对应的能量阈值,确定每个频带对应的调整量,并根据每个频带对应的调整量,对降底噪后的声音信号的每个频带的能量值进行调整。Optionally, the first transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal according to the adjustment amount corresponding to each frequency band; the second transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal after background noise reduction according to the adjustment amount corresponding to each frequency band.
例如,第一通透滤波器具体可以根据声音信号的每个频带的能量值与每个频带对应的能量阈值之间的差值,确定每个频带对应的调整量;第二通透滤波器可以根据降底噪后的声音信号的每个频带的能量值与每个频带对应的能量阈值之间的差值,确定每个频带对应的调整量。For example, the first transparent filter can determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band; the second transparent filter can determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band of the sound signal after noise reduction and the energy threshold corresponding to each frequency band.
对于上述的环境声音的自适应处理的过程,例如,如图5或者图6所示,在经过第一通透滤波器和第二通透滤波器分别得到第一滤波信号和第二滤波信号之后,可以利用其他滤波器,对合并后的第一滤波信号和第二滤波信号中需要进行能带压制的频带的能量值进行调整。For the above-mentioned adaptive processing of ambient sound, for example, as shown in FIG5 or FIG6, after the first filtered signal and the second filtered signal are obtained respectively through the first transparent filter and the second transparent filter, other filters can be used to adjust the energy value of the frequency band that needs to be suppressed in the merged first filtered signal and the second filtered signal.
不同于图5和图6,也可以在第一通透滤波器和第二通透滤波器内部实现能带压制。例如,如图7所示,可以在第一通透滤波器和第二通透滤波器的设计中直接实现对各个频带的能量值的压制。也就是说,第一通透滤波器和第二通透滤波器既能够实现对声音信号的通透,又能够根据相应的调整量对各个频带的能量值进行压制。这样,第一通透滤波器输出的第一滤波信号中包括经过能带压制后的中低频信号,第二通透滤波器输出的第二滤波信号中包括经过能带压制后的高频信号。在第一通透滤波器和第二通透滤波器内同时实现对相应频带的能量值的压制,无需设置额外的硬件电路,使整个系统结构更加紧凑,并且降低了成本。Different from FIG. 5 and FIG. 6 , energy band suppression can also be achieved inside the first transparent filter and the second transparent filter. For example, as shown in FIG. 7 , the suppression of the energy value of each frequency band can be directly achieved in the design of the first transparent filter and the second transparent filter. That is to say, the first transparent filter and the second transparent filter can not only achieve the transparency of the sound signal, but also suppress the energy value of each frequency band according to the corresponding adjustment amount. In this way, the first filtered signal output by the first transparent filter includes the low- and medium-frequency signals after energy band suppression, and the second filtered signal output by the second transparent filter includes the high-frequency signal after energy band suppression. The suppression of the energy values of the corresponding frequency bands is achieved simultaneously in the first transparent filter and the second transparent filter, without the need to set up additional hardware circuits, making the entire system structure more compact and reducing costs.
图8示出了方法100的一种具体的实现方式的流程框图。如图8所示,环境声音的通透阶段可以包括硬件通透和软件通透,在硬件通透部分,采用第一通透滤波器即硬件通透滤波器对耳外麦克风12采集的声音信号进行滤波,并输出以中低频信号为主的第一滤波信号,这里,由于中低频信号中的底噪很小,可以忽略。在软件通透部分,先采用软件方式估计底噪信号,并从耳外麦克风12采集的声音信号中去除底噪信号,然后采用软件通透滤波器对去除底噪后的声音信号进行滤波,并输出以高频信号为主的第二滤波信号,第二滤波信号中的底噪信号已经基本被消除。对第一滤波信号和第二滤
波信号进行叠加,可以得到较为干净的补偿信号。FIG8 shows a flowchart of a specific implementation of method 100. As shown in FIG8 , the environmental sound transparency stage may include hardware transparency and software transparency. In the hardware transparency part, a first transparency filter, i.e., a hardware transparency filter, is used to filter the sound signal collected by the external ear microphone 12, and output a first filtered signal mainly composed of medium and low frequency signals. Here, since the background noise in the medium and low frequency signals is very small, it can be ignored. In the software transparency part, the background noise signal is first estimated by software, and the background noise signal is removed from the sound signal collected by the external ear microphone 12. Then, a software transparency filter is used to filter the sound signal after the background noise is removed, and a second filtered signal mainly composed of high frequency signals is output. The background noise signal in the second filtered signal has been basically eliminated. The first filtered signal and the second filtered signal are filtered. By superimposing the wave signals, a cleaner compensation signal can be obtained.
如图8所示,在环境声音的自适应处理阶段,估计各个频带的能量峰值,并确定需要进行能量调整的频带,根据这些频带各自的能量峰值的统计值与对应的能量阈值之间的差值,即统计值减去能量阈值,确定调整量g,g可以为数组形式,其包括多个频带对应的调整量。当该差值大于或等于0即统计值-能量阈值≥0时,输出该调整量。可以实时对各个频带的能量峰值进行统计并计算对应的调整量,直至该差值逐渐恢复至0。其中,根据调整量g对补偿信号中各个频带的能量进行调整,例如可以是根据对应的调整量对各个频带对应的增益进行调整。最后,由麦克风输出经过该自适应处理阶段后的补偿信号。As shown in FIG8 , in the adaptive processing stage of the ambient sound, the energy peak of each frequency band is estimated, and the frequency bands that need energy adjustment are determined. The adjustment amount g is determined based on the difference between the statistical value of the energy peak of each of these frequency bands and the corresponding energy threshold, that is, the statistical value minus the energy threshold. When the difference is greater than or equal to 0, that is, the statistical value-energy threshold ≥ 0, the adjustment amount is output. The energy peak of each frequency band can be counted in real time and the corresponding adjustment amount can be calculated until the difference gradually returns to 0. Among them, the energy of each frequency band in the compensation signal is adjusted according to the adjustment amount g, for example, the gain corresponding to each frequency band can be adjusted according to the corresponding adjustment amount. Finally, the microphone outputs the compensation signal after the adaptive processing stage.
上述对环境声音的自适应处理的方案,可以与前述的软硬件结合的通透方案结合实现,也可以单独实现。The above-mentioned solution for adaptive processing of ambient sound can be implemented in combination with the aforementioned software and hardware combined transparent solution, or it can be implemented separately.
例如,如图9所示,本申请实施例还提供一种滤波方法200。方法200可以由耳机10中的滤波装置执行,例如,由耳机10中的芯片,比如codec芯片或者蓝牙音频SOC等执行。耳机10包括耳外麦克风12,用于采集声音信号。如图1所示,方法200包括以下步骤中的部分或者全部。For example, as shown in FIG9 , the embodiment of the present application further provides a filtering method 200. The method 200 can be performed by a filtering device in the headset 10, for example, by a chip in the headset 10, such as a codec chip or a Bluetooth audio SOC. The headset 10 includes an external ear microphone 12 for collecting sound signals. As shown in FIG1 , the method 200 includes some or all of the following steps.
在步骤210中,确定该声音信号的多个频带的能量值。In step 210, energy values of multiple frequency bands of the sound signal are determined.
在步骤220中,对该声音信号的多个频带的能量值进行调整,以使所述多个频带的能量值小于或等于该多个频带各自对应的能量阈值。In step 220, the energy values of the multiple frequency bands of the sound signal are adjusted so that the energy values of the multiple frequency bands are less than or equal to energy thresholds corresponding to the multiple frequency bands respectively.
其中,该多个频带例如可以是该声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。The multiple frequency bands may be, for example, frequency bands whose energy values exceed corresponding energy thresholds among the N frequency bands of the sound signal, where N is a positive integer.
在一种实现方式中,对该声音信号的该多个频带的能量值进行调整,以使该多个频带的能量值小于或等于该多个频带各自对应的能量阈值,包括:基于通透滤波器,对该声音信号进行处理,得到滤波信号;其中,所述对该声音信号的该多个频带的能量值进行调整,以使该多个频带的能量值小于或等于该多个频带各自对应的能量阈值,包括:对该滤波信号的该多个频带的能量值进行调整,以使该滤波信号的该多个频带的能量值小于或等于该多个频带各自对应的能量阈值。In one implementation, the energy values of the multiple frequency bands of the sound signal are adjusted so that the energy values of the multiple frequency bands are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands, including: based on a transparent filter, the sound signal is processed to obtain a filtered signal; wherein, the energy values of the multiple frequency bands of the sound signal are adjusted so that the energy values of the multiple frequency bands are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands, including: the energy values of the multiple frequency bands of the filtered signal are adjusted so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
在一种实现方式中,对该滤波信号的该多个频带的能量值进行调整,以使该滤波信号的该多个频带的能量值小于或等于该多个频带各自对应的能量阈值,包括:基于该通透滤波器或者该通透滤波器之外的另一滤波器,对
该滤波信号的该多个频带的能量值进行调整,以使该滤波信号的该多个频带的能量值小于或等于该多个频带各自对应的能量阈值。In one implementation, adjusting the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to energy thresholds corresponding to the multiple frequency bands respectively includes: based on the transparent filter or another filter other than the transparent filter, The energy values of the multiple frequency bands of the filtered signal are adjusted so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to energy thresholds corresponding to the multiple frequency bands respectively.
在一种实现方式中,对该滤波信号的该多个频带的能量值进行调整,包括:根据该声音信号的该多个频带中每个频带的能量值、以及每个频带对应的能量阈值,确定每个频带对应的调整量,并根据每个频带对应的调整量,对该声音信号的每个频带的能量值进行调整。In one implementation, the energy values of the multiple frequency bands of the filtered signal are adjusted, including: determining an adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and an energy threshold corresponding to each frequency band, and adjusting the energy value of each frequency band of the sound signal based on the adjustment amount corresponding to each frequency band.
在一种实现方式中,根据该声音信号的该多个频带中每个频带的能量值、以及每个频带对应的能量阈值,确定每个频带对应的调整量,包括:根据该声音信号的该多个频带中每个频带的能量值与每个频带对应的能量阈值之间的差值,确定每个频带对应的调整量。In one implementation, the adjustment amount corresponding to each frequency band is determined based on the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band, including: determining the adjustment amount corresponding to each frequency band based on the difference between the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band.
应理解,方法200的具体细节可以参考前述针对方法100中关于环境声音的自适应处理的部分的描述,为了简洁,此处不再赘述。It should be understood that the specific details of method 200 can be referred to the aforementioned description of the part regarding the adaptive processing of ambient sound in method 100, and for the sake of brevity, they will not be repeated here.
本申请还提供一种滤波装置300,装置300应用于具有通透模式的耳机10,耳机10包括耳外麦克风12,耳外麦克风12采集的声音信号包括第一频段的信号和第二频段的信号,该第一频段中的至少部分频段低于该第二频段中的至少部分频段。例如,第一频段小于或等于预设的第一频率阈值,第二频段大于或等于预设的第二频率阈值。第一频率阈值和第二频率阈值例如可以位于2KHz至3KHz之间。The present application also provides a filtering device 300, which is applied to an earphone 10 with a transparent mode, the earphone 10 includes an external ear microphone 12, and the sound signal collected by the external ear microphone 12 includes a signal of a first frequency band and a signal of a second frequency band, and at least part of the frequency band in the first frequency band is lower than at least part of the frequency band in the second frequency band. For example, the first frequency band is less than or equal to a preset first frequency threshold, and the second frequency band is greater than or equal to a preset second frequency threshold. The first frequency threshold and the second frequency threshold can be, for example, between 2KHz and 3KHz.
如图10所示,装置300包括第一通透滤波器310、处理模块320和第二通透滤波器330。As shown in FIG. 10 , the device 300 includes a first transparent filter 310 , a processing module 320 , and a second transparent filter 330 .
其中,第一通透滤波器310用于对声音信号进行处理,得到该声音信号的第一滤波信号,第一通透滤波器为硬件通透滤波器,第一通透滤波器对该声音信号中第一频段的信号的增益,大于第一通透滤波器对该声音信号中第二频段的信号的增益;处理模块320用于对该声音信号进行降底噪处理;第二通透滤波器330用于对降底噪后的该声音信号进行处理,得到该声音信号的第二滤波信号,第二通透滤波器为软件通透滤波器,第二通透滤波器对降底噪后的该声音信号中第二频段的信号的增益,大于第二通透滤波器对降底噪后的该声音信号中第一频段的信号的增益。Among them, the first transparent filter 310 is used to process the sound signal to obtain a first filtered signal of the sound signal, the first transparent filter is a hardware transparent filter, and the gain of the first transparent filter on the signal of the first frequency band in the sound signal is greater than the gain of the first transparent filter on the signal of the second frequency band in the sound signal; the processing module 320 is used to perform background noise reduction processing on the sound signal; the second transparent filter 330 is used to process the sound signal after background noise reduction to obtain a second filtered signal of the sound signal, the second transparent filter is a software transparent filter, and the gain of the second transparent filter on the signal of the second frequency band in the sound signal after background noise reduction is greater than the gain of the second transparent filter on the signal of the first frequency band in the sound signal after background noise reduction.
该软件通透滤波器例如可以是FIR滤波器或者IIR滤波器,该硬件通透滤波器例如包括FIR滤波器或者IIR滤波器。The software transparent filter may be, for example, a FIR filter or an IIR filter, and the hardware transparent filter includes, for example, a FIR filter or an IIR filter.
在一种实现方式中,处理模块320具体用于:获取预先估计的底噪信号;
根据该底噪信号和该声音信号,确定降底噪后的声音信号。In one implementation, the processing module 320 is specifically used to: obtain a pre-estimated background noise signal; A sound signal after the background noise is reduced is determined according to the background noise signal and the sound signal.
在一种实现方式中,耳机10还包括扬声器11和耳内麦克风13,处理模块320还用于:根据扬声器11输出的音频信号、以及耳内麦克风13采集的耳内信号,确定次级传递函数;根据耳机10在佩戴状态下的耳外麦克风12采集的耳外信号、以及在未佩戴耳机10的状态下耳内接收的信号,确定第一通透滤波器310。In one implementation, the earphone 10 also includes a speaker 11 and an in-ear microphone 13, and the processing module 320 is also used to: determine the secondary transfer function based on the audio signal output by the speaker 11 and the in-ear signal collected by the in-ear microphone 13; determine the first transparent filter 310 based on the extra-ear signal collected by the extra-ear microphone 12 when the earphone 10 is worn and the signal received in the ear when the earphone 10 is not worn.
在一种实现方式中,处理模块320还用于:确定该声音信号的该多个频带的能量值;根据该声音信号的该多个频带的能量值,对补偿信号的该多个频带的能量值分别进行调整,以使该补偿信号的该多个频带的能量值小于或等于该多个频带各自对应的能量阈值。In one implementation, the processing module 320 is also used to: determine the energy values of the multiple frequency bands of the sound signal; and adjust the energy values of the multiple frequency bands of the compensation signal according to the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands of the compensation signal are less than or equal to the energy thresholds corresponding to the multiple frequency bands respectively.
在一种实现方式中,处理模块320具体用于:根据该声音信号的该多个频带中每个频带的能量值、以及每个频带对应的能量阈值,确定每个频带对应的调整量;根据每个频带对应的调整量,对该补偿信号的每个频带的能量值进行调整。In one implementation, the processing module 320 is specifically used to: determine the adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band; and adjust the energy value of each frequency band of the compensation signal based on the adjustment amount corresponding to each frequency band.
在一种实现方式中,处理模块320具体用于:根据每个频带的能量值与每个频带对应的能量阈值之间的差值,确定每个频带对应的调整量。In one implementation, the processing module 320 is specifically configured to determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band and the energy threshold corresponding to each frequency band.
在一种实现方式中,该多个频带为该声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。In one implementation, the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among the N frequency bands of the sound signal, where N is a positive integer.
在一种实现方式中,第一通透滤波器310还用于,对该声音信号的该多个频带的能量值进行调整,以使第一滤波信号的该多个频带的能量值小于或等于该多个频带各自对应的能量阈值;第一通透滤波器310还用于,对降底噪后的声音信号的该多个频带的能量值进行调整,以使第二滤波信号的该多个频带的能量值小于或等于该多个频带各自对应的能量阈值。In one implementation, the first transparent filter 310 is also used to adjust the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands of the first filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands; the first transparent filter 310 is also used to adjust the energy values of the multiple frequency bands of the sound signal after background noise reduction so that the energy values of the multiple frequency bands of the second filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
在一种实现方式中,第一通透滤波器310具体用于,根据该声音信号的该多个频带中每个频带的能量值、以及每个频带对应的能量阈值,确定每个频带对应的调整量,并根据每个频带对应的调整量,对该声音信号的每个频带的能量值进行调整;第二通透滤波器330具体用于,根据降底噪后的声音信号的该多个频带中每个频带的能量值、以及每个频带对应的能量阈值,确定每个频带对应的调整量,并根据每个频带对应的调整量,对降底噪后的声音信号的每个频带的能量值进行调整。In one implementation, the first transparent filter 310 is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal according to the adjustment amount corresponding to each frequency band; the second transparent filter 330 is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal after background noise reduction according to the adjustment amount corresponding to each frequency band.
在一种实现方式中,第一通透滤波器310具体用于,根据该声音信号的
每个频带的能量值与每个频带对应的能量阈值之间的差值,确定每个频带对应的调整量;第二通透滤波器330具体用于,根据降底噪后的声音信号的每个频带的能量值与每个频带对应的能量阈值之间的差值,确定每个频带对应的调整量。In one implementation, the first transparent filter 310 is specifically configured to: The adjustment amount corresponding to each frequency band is determined by the difference between the energy value of each frequency band and the energy threshold corresponding to each frequency band; the second transparent filter 330 is specifically used to determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band.
在一种实现方式中,该多个频带为该声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。In one implementation, the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among the N frequency bands of the sound signal, where N is a positive integer.
应理解,滤波装置300的具体细节可以参考前述针对滤波方法100的描述,为了简洁,此处不再赘述。It should be understood that the specific details of the filtering device 300 can refer to the above description of the filtering method 100, and for the sake of brevity, they are not repeated here.
本申请还提供一种滤波装置400,滤波装置400应用于具有通透模式的耳机10,耳机10包括耳外麦克风12,用于采集声音信号。如图11所示,滤波装置400包括处理模块410和滤波器模块420。The present application also provides a filtering device 400 , which is applied to an earphone 10 with a transparent mode, and the earphone 10 includes an external ear microphone 12 for collecting sound signals. As shown in FIG. 11 , the filtering device 400 includes a processing module 410 and a filter module 420 .
其中,处理模块410用于获取该声音信号的多个频带的能量值;滤波器模块420用于对声音信号的多个频带的能量值进行调整,以使该多个频带的能量值小于或等于该多个频带各自对应的能量阈值。The processing module 410 is used to obtain energy values of multiple frequency bands of the sound signal; the filter module 420 is used to adjust the energy values of multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands are less than or equal to the energy thresholds corresponding to the multiple frequency bands.
其中,该多个频带例如可以是该声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。The multiple frequency bands may be, for example, frequency bands whose energy values exceed corresponding energy thresholds among the N frequency bands of the sound signal, where N is a positive integer.
在一种实现方式中,滤波器模块420包括通透滤波器,该通透滤波器用于:对该声音信号进行处理,得到滤波信号;其中,该通透滤波器还用于:对该滤波信号的该多个频带的能量值进行调整,以使该滤波信号的该多个频带的能量值小于或等于该多个频带各自对应的能量阈值;或者,该滤波器模块还包括该通透滤波器之外的另一滤波器,该另一滤波器用于:接收该滤波信号,并对该滤波信号的该多个频带的能量值进行调整,以使该滤波信号的该多个频带的能量值小于或等于该多个频带各自对应的能量阈值。In one implementation, the filter module 420 includes a transparent filter, which is used to: process the sound signal to obtain a filtered signal; wherein the transparent filter is also used to: adjust the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands; or, the filter module also includes another filter other than the transparent filter, which is used to: receive the filtered signal and adjust the energy values of the multiple frequency bands of the filtered signal so that the energy values of the multiple frequency bands of the filtered signal are less than or equal to the energy thresholds corresponding to each of the multiple frequency bands.
在一种实现方式中,该通透滤波器或者该另一滤波器具体用于:根据该声音信号的该多个频带中每个频带的能量值、以及每个频带对应的能量阈值,确定每个频带对应的调整量,并根据每个频带对应的调整量,对该补偿信号的每个频带的能量值进行调整。In one implementation, the transparent filter or the other filter is specifically used to: determine the adjustment amount corresponding to each frequency band based on the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the compensation signal based on the adjustment amount corresponding to each frequency band.
在一种实现方式中,该通透滤波器或者该另一滤波器具体用于:根据每个频带的能量值与每个频带对应的能量阈值之间的差值,确定每个频带对应的调整量。In one implementation, the transparent filter or the other filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band and the energy threshold corresponding to each frequency band.
应理解,滤波装置400的具体细节可以参考前述针对滤波方法200的描
述,为了简洁,此处不再赘述。It should be understood that the specific details of the filtering device 400 can refer to the description of the filtering method 200 above. For the sake of brevity, I will not go into details here.
本申请还提供一种芯片,包括处理器和存储器,包括处理器和存储器,存储器存储计算机指令,处理器调用计算机指令以使设备实现根据第一方面或第一方面的任一实现方式中的装置。该芯片例如可以是耳机10中的codec芯片或者蓝牙音频SOC等。The present application also provides a chip, including a processor and a memory, including a processor and a memory, the memory stores computer instructions, and the processor calls the computer instructions to enable the device to implement the apparatus according to the first aspect or any implementation of the first aspect. The chip can be, for example, a codec chip in the headset 10 or a Bluetooth audio SOC.
本申请还提供一种耳机10,具有通透模式,耳机10包括:扬声器11;耳外麦克风12;耳内麦克风13;以及上述任一实施例中的滤波装置,或者上述任一实施例中的芯片。The present application also provides an earphone 10 having a transparent mode, and the earphone 10 includes: a speaker 11; an external microphone 12; an internal microphone 13; and a filtering device in any of the above embodiments, or a chip in any of the above embodiments.
需要说明的是,在不冲突的前提下,本申请描述的各个实施例和/或各个实施例中的技术特征可以任意的相互组合,组合之后得到的技术方案也应落入本申请的保护范围。It should be noted that, under the premise of no conflict, the various embodiments described in this application and/or the technical features in each embodiment can be arbitrarily combined with each other, and the technical solution obtained after the combination should also fall within the protection scope of this application.
本申请实施例中所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的方法实施例的一些特征可以忽略或者不执行。以上所描述的装置实施例仅仅是示意性的,单元的划分仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,多个单元或组件可以结合或者可以集成到另一个系统。另外,各单元之间的耦合或各个组件之间的耦合可以是直接耦合,也可以是间接耦合,上述耦合包括电的、机械的或其它形式的连接。The systems, devices and methods disclosed in the embodiments of the present application may be implemented in other ways. For example, some features of the method embodiments described above may be ignored or not performed. The device embodiments described above are merely schematic, and the division of units is merely a logical function division. There may be other division methods in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the coupling may include electrical, mechanical or other forms of connection.
本领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置和设备的具体工作过程以及产生的技术效果,可以参考前述方法实施例中对应的过程和技术效果,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described devices and equipment and the technical effects produced can refer to the corresponding processes and technical effects in the aforementioned method embodiments, and will not be repeated here.
应理解,本申请实施例中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围,本领域技术人员可以在上述实施例的基础上进行各种改进和变形,而这些改进或者变形均落在本申请的保护范围内。It should be understood that the specific examples in the embodiments of the present application are only to help those skilled in the art to better understand the embodiments of the present application, rather than to limit the scope of the embodiments of the present application. Those skilled in the art can make various improvements and modifications based on the above embodiments, and these improvements or modifications all fall within the scope of protection of the present application.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims (24)
- 一种滤波方法,其特征在于,应用于具有通透模式的耳机,所述耳机包括耳外麦克风,所述耳外麦克风采集的声音信号包括第一频段的信号和第二频段的信号,所述第一频段中的至少部分频段低于所述第二频段中的至少部分频段,所述方法包括:A filtering method, characterized in that it is applied to headphones with a transparent mode, the headphones include an external ear microphone, the sound signal collected by the external ear microphone includes a signal of a first frequency band and a signal of a second frequency band, at least part of the frequency band in the first frequency band is lower than at least part of the frequency band in the second frequency band, and the method includes:基于第一通透滤波器对所述声音信号进行处理,得到所述声音信号的第一滤波信号,所述第一通透滤波器为硬件通透滤波器,所述第一通透滤波器对所述声音信号中所述第一频段的信号的增益,大于所述第一通透滤波器对所述声音信号中所述第二频段的信号的增益;Processing the sound signal based on a first transparent filter to obtain a first filtered signal of the sound signal, wherein the first transparent filter is a hardware transparent filter, and a gain of the first transparent filter for the signal in the first frequency band of the sound signal is greater than a gain of the first transparent filter for the signal in the second frequency band of the sound signal;对所述声音信号进行降底噪处理,并基于第二通透滤波器对降底噪后的所述声音信号进行处理,得到所述声音信号的第二滤波信号,所述第二通透滤波器为软件通透滤波器,所述第二通透滤波器对降底噪后的所述声音信号中所述第二频段的信号的增益,大于所述第二通透滤波器对降底噪后的所述声音信号中所述第一频段的信号的增益;Performing noise reduction processing on the sound signal, and processing the sound signal after the noise reduction based on a second transparent filter to obtain a second filtered signal of the sound signal, wherein the second transparent filter is a software transparent filter, and the gain of the second transparent filter for the signal in the second frequency band in the sound signal after the noise reduction is greater than the gain of the second transparent filter for the signal in the first frequency band in the sound signal after the noise reduction;根据所述第一滤波信号和所述第二滤波信号,确定所述耳机的补偿信号。A compensation signal of the earphone is determined according to the first filtered signal and the second filtered signal.
- 根据权利要求1所述的滤波方法,其特征在于,所述对所述声音信号进行降底噪处理,包括:The filtering method according to claim 1, characterized in that the noise reduction processing of the sound signal comprises:获取预先估计的底噪信号;Obtaining a pre-estimated background noise signal;根据所述底噪信号和所述声音信号,确定降底噪后的所述声音信号。The sound signal after the background noise is reduced is determined according to the background noise signal and the sound signal.
- 根据权利要求1或2所述的滤波方法,其特征在于,所述耳机还包括扬声器和耳内麦克风,所述方法还包括:The filtering method according to claim 1 or 2, characterized in that the earphone further comprises a speaker and an in-ear microphone, and the method further comprises:根据所述扬声器输出的音频信号、以及所述耳内麦克风采集的耳内信号,确定次级传递函数;Determine a secondary transfer function according to the audio signal output by the speaker and the in-ear signal collected by the in-ear microphone;根据所述耳机在佩戴状态下的所述耳外麦克风采集的耳外信号、以及在未佩戴所述耳机的状态下耳内接收的信号,确定所述第一通透滤波器。The first transparent filter is determined according to an external ear signal collected by the external ear microphone when the earphone is worn and a signal received in the ear when the earphone is not worn.
- 根据权利要求1至3中任一项所述的滤波方法,其特征在于,所述方法还包括:The filtering method according to any one of claims 1 to 3, characterized in that the method further comprises:确定所述声音信号的多个频带的能量值;determining energy values of a plurality of frequency bands of the sound signal;根据所述声音信号的多个频带的能量值,对所述补偿信号的所述多个频带的能量值分别进行调整,以使所述补偿信号的所述多个频带的能量值小于 或等于所述多个频带各自对应的能量阈值。According to the energy values of the multiple frequency bands of the sound signal, the energy values of the multiple frequency bands of the compensation signal are adjusted respectively so that the energy values of the multiple frequency bands of the compensation signal are less than Or equal to the energy threshold corresponding to each of the multiple frequency bands.
- 根据权利要求4所述的滤波方法,其特征在于,所述根据所述声音信号的多个频带的能量值,对所述补偿信号的所述多个频带的能量值分别进行调整,包括:The filtering method according to claim 4, characterized in that the energy values of the multiple frequency bands of the sound signal are adjusted respectively according to the energy values of the multiple frequency bands of the sound signal, comprising:根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量;Determine an adjustment amount corresponding to each frequency band according to an energy value of each frequency band of the sound signal and an energy threshold corresponding to each frequency band;根据所述每个频带对应的调整量,对所述补偿信号的所述每个频带的能量值进行调整。The energy value of each frequency band of the compensation signal is adjusted according to the adjustment amount corresponding to each frequency band.
- 根据权利要求5所述的滤波方法,其特征在于,所述根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量,包括:The filtering method according to claim 5, characterized in that the step of determining the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band comprises:根据所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量。The adjustment amount corresponding to each frequency band is determined according to the difference between the energy value of each frequency band and the energy threshold corresponding to each frequency band.
- 根据权利要求1至3中任一项所述的滤波方法,其特征在于,所述方法还包括:The filtering method according to any one of claims 1 to 3, characterized in that the method further comprises:确定所述声音信号的多个频带的能量值;determining energy values of a plurality of frequency bands of the sound signal;其中,所述第一通透滤波器还用于,对所述声音信号的所述多个频带的能量值进行调整,以使所述第一滤波信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值;The first transparent filter is further used to adjust the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands of the first filtered signal are less than or equal to the energy thresholds corresponding to the multiple frequency bands respectively;所述第二通透滤波器还用于,对降底噪后的所述声音信号的所述多个频带的能量值进行调整,以使所述第二滤波信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值。The second transparent filter is further used to adjust the energy values of the multiple frequency bands of the sound signal after background noise reduction so that the energy values of the multiple frequency bands of the second filtered signal are less than or equal to energy thresholds corresponding to the multiple frequency bands respectively.
- 根据权利要求7所述的滤波方法,其特征在于,The filtering method according to claim 7, characterized in that:所述第一通透滤波器具体用于,根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量,并根据所述每个频带对应的调整量,对所述声音信号的所述每个频带的能量值进行调整;The first transparent filter is specifically used to determine, according to the energy value of each frequency band of the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band, an adjustment amount corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal according to the adjustment amount corresponding to each frequency band;所述第二通透滤波器具体用于,根据降底噪后的所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量,并根据所述每个频带对应的调整量,对降底噪后的所述声音信号的所述每个频带的能量值进行调整。 The second transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal after background noise reduction according to the adjustment amount corresponding to each frequency band.
- 根据权利要求8所述的滤波方法,其特征在于,The filtering method according to claim 8, characterized in that:所述第一通透滤波器具体用于,根据所述声音信号的所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量;The first transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band;所述第二通透滤波器具体用于,根据降底噪后的所述声音信号的所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量。The second transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band.
- 根据权利要求4至9中任一项所述的滤波方法,其特征在于,所述多个频带为所述声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。The filtering method according to any one of claims 4 to 9 is characterized in that the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among the N frequency bands of the sound signal, and N is a positive integer.
- 根据权利要求1至10中任一项所述的滤波方法,其特征在于,所述第一频段小于或等于预设的第一频率阈值,所述第二频段大于或等于预设的第二频率阈值,所述第一频率阈值和所述第二频率阈值位于2KHz至3KHz之间。The filtering method according to any one of claims 1 to 10 is characterized in that the first frequency band is less than or equal to a preset first frequency threshold, the second frequency band is greater than or equal to a preset second frequency threshold, and the first frequency threshold and the second frequency threshold are between 2 kHz and 3 kHz.
- 一种滤波装置,其特征在于,应用于具有通透模式的耳机,所述耳机包括耳外麦克风,所述耳外麦克风采集的声音信号包括第一频段的信号和第二频段的信号,所述第一频段中的至少部分频段低于所述第二频段中的至少部分频段,所述滤波装置包括:A filtering device, characterized in that it is applied to headphones with a transparent mode, the headphones include an external ear microphone, the sound signal collected by the external ear microphone includes a signal of a first frequency band and a signal of a second frequency band, at least part of the frequency band in the first frequency band is lower than at least part of the frequency band in the second frequency band, and the filtering device includes:第一通透滤波器,用于对所述声音信号进行处理,得到所述声音信号的第一滤波信号,所述第一通透滤波器为硬件通透滤波器,所述第一通透滤波器对所述声音信号中所述第一频段的信号的增益,大于所述第一通透滤波器对所述声音信号中所述第二频段的信号的增益;a first transparent filter, used to process the sound signal to obtain a first filtered signal of the sound signal, wherein the first transparent filter is a hardware transparent filter, and a gain of the first transparent filter for the signal in the first frequency band of the sound signal is greater than a gain of the first transparent filter for the signal in the second frequency band of the sound signal;处理模块,用于对所述声音信号进行降底噪处理;A processing module, used for performing noise reduction processing on the sound signal;第二通透滤波器,用于对降底噪后的所述声音信号进行处理,得到所述声音信号的第二滤波信号,所述第二通透滤波器为软件通透滤波器,所述第二通透滤波器对降底噪后的所述声音信号中所述第二频段的信号的增益,大于所述第二通透滤波器对降底噪后的所述声音信号中所述第一频段的信号的增益;a second transparent filter, used for processing the sound signal after background noise reduction to obtain a second filtered signal of the sound signal, wherein the second transparent filter is a software transparent filter, and a gain of the second transparent filter for the signal of the second frequency band in the sound signal after background noise reduction is greater than a gain of the second transparent filter for the signal of the first frequency band in the sound signal after background noise reduction;所述处理模块还用于,根据所述第一滤波信号和所述第二滤波信号,确定所述耳机的补偿信号。The processing module is further configured to determine a compensation signal of the earphone according to the first filtered signal and the second filtered signal.
- 根据权利要求12所述的滤波装置,其特征在于,所述处理模块具 体用于:The filtering device according to claim 12 is characterized in that the processing module has Body is used for:获取预先估计的底噪信号;Obtaining a pre-estimated background noise signal;根据所述底噪信号和所述声音信号,确定降底噪后的所述声音信号。The sound signal after the background noise is reduced is determined according to the background noise signal and the sound signal.
- 根据权利要求12或13所述的滤波装置,其特征在于,所述耳机还包括扬声器和耳内麦克风,所述处理模块还用于:The filtering device according to claim 12 or 13, characterized in that the earphone further comprises a speaker and an in-ear microphone, and the processing module is further used for:根据所述扬声器输出的音频信号、以及所述耳内麦克风采集的耳内信号,确定次级传递函数;Determine a secondary transfer function according to the audio signal output by the speaker and the in-ear signal collected by the in-ear microphone;根据所述耳机在佩戴状态下的所述耳外麦克风采集的耳外信号、以及在未佩戴所述耳机的状态下耳内接收的信号,确定所述第一通透滤波器。The first transparent filter is determined according to an external ear signal collected by the external ear microphone when the earphone is worn and a signal received in the ear when the earphone is not worn.
- 根据权利要求12至14中任一项所述的滤波装置,其特征在于,所述处理模块还用于:The filtering device according to any one of claims 12 to 14, characterized in that the processing module is further used for:确定所述声音信号的多个频带的能量值;determining energy values of a plurality of frequency bands of the sound signal;根据所述声音信号的多个频带的能量值,对所述补偿信号的所述多个频带的能量值分别进行调整,以使所述补偿信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值。According to the energy values of the multiple frequency bands of the sound signal, the energy values of the multiple frequency bands of the compensation signal are adjusted respectively so that the energy values of the multiple frequency bands of the compensation signal are less than or equal to the energy thresholds corresponding to the multiple frequency bands respectively.
- 根据权利要求15所述的滤波装置,其特征在于,所述处理模块具体用于:The filtering device according to claim 15, characterized in that the processing module is specifically used for:根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量;Determine an adjustment amount corresponding to each frequency band according to an energy value of each frequency band of the sound signal and an energy threshold corresponding to each frequency band;根据所述每个频带对应的调整量,对所述补偿信号的所述每个频带的能量值进行调整。The energy value of each frequency band of the compensation signal is adjusted according to the adjustment amount corresponding to each frequency band.
- 根据权利要求16所述的滤波装置,其特征在于,所述处理模块具体用于:The filtering device according to claim 16, characterized in that the processing module is specifically used for:根据所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量。The adjustment amount corresponding to each frequency band is determined according to the difference between the energy value of each frequency band and the energy threshold corresponding to each frequency band.
- 根据权利要求12至14中任一项所述的滤波装置,其特征在于,The filter device according to any one of claims 12 to 14, characterized in that所述第一通透滤波器还用于,对所述声音信号的所述多个频带的能量值进行调整,以使所述第一滤波信号的所述多个频带的能量值小于或等于所述多个频带各自对应的能量阈值;The first transparent filter is further used to adjust the energy values of the multiple frequency bands of the sound signal so that the energy values of the multiple frequency bands of the first filtered signal are less than or equal to energy thresholds corresponding to the multiple frequency bands respectively;所述第一通透滤波器还用于,对降底噪后的所述声音信号的所述多个频带的能量值进行调整,以使所述第二滤波信号的所述多个频带的能量值小于 或等于所述多个频带各自对应的能量阈值。The first transparent filter is further used to adjust the energy values of the multiple frequency bands of the sound signal after the background noise is reduced so that the energy values of the multiple frequency bands of the second filtered signal are less than Or equal to the energy threshold corresponding to each of the multiple frequency bands.
- 根据权利要求18所述的滤波装置,其特征在于,The filtering device according to claim 18, characterized in that所述第一通透滤波器具体用于,根据所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量,并根据所述每个频带对应的调整量,对所述声音信号的所述每个频带的能量值进行调整;The first transparent filter is specifically used to determine, according to the energy value of each frequency band of the multiple frequency bands of the sound signal and the energy threshold corresponding to each frequency band, an adjustment amount corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal according to the adjustment amount corresponding to each frequency band;所述第二通透滤波器具体用于,根据降底噪后的所述声音信号的所述多个频带中每个频带的能量值、以及所述每个频带对应的能量阈值,确定所述每个频带对应的调整量,并根据所述每个频带对应的调整量,对降底噪后的所述声音信号的所述每个频带的能量值进行调整。The second transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the energy value of each frequency band in the multiple frequency bands of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band, and adjust the energy value of each frequency band of the sound signal after background noise reduction according to the adjustment amount corresponding to each frequency band.
- 根据权利要求19所述的滤波装置,其特征在于,The filter device according to claim 19, characterized in that所述第一通透滤波器具体用于,根据所述声音信号的所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量;The first transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band of the sound signal and the energy threshold corresponding to each frequency band;所述第二通透滤波器具体用于,根据降底噪后的所述声音信号的所述每个频带的能量值与所述每个频带对应的能量阈值之间的差值,确定所述每个频带对应的调整量。The second transparent filter is specifically used to determine the adjustment amount corresponding to each frequency band according to the difference between the energy value of each frequency band of the sound signal after background noise reduction and the energy threshold corresponding to each frequency band.
- 根据权利要求15至20中任一项所述的滤波装置,其特征在于,所述多个频带为所述声音信号的N个频带中能量值超过对应的能量阈值的频带,N为正整数。The filtering device according to any one of claims 15 to 20 is characterized in that the multiple frequency bands are frequency bands whose energy values exceed corresponding energy thresholds among the N frequency bands of the sound signal, and N is a positive integer.
- 根据权利要求12至21中任一项所述的滤波装置,其特征在于,所述第一频段小于或等于预设的第一频率阈值,所述第二频段大于或等于预设的第二频率阈值,所述第一频率阈值和所述第二频率阈值位于2KHz至3KHz之间。The filtering device according to any one of claims 12 to 21 is characterized in that the first frequency band is less than or equal to a preset first frequency threshold, the second frequency band is greater than or equal to a preset second frequency threshold, and the first frequency threshold and the second frequency threshold are between 2 kHz and 3 kHz.
- 一种芯片,其特征在于,包括处理器和存储器,包括处理器和存储器,所述存储器存储计算机指令,所述处理器调用所述计算机指令以使所述芯片实现根据权利要求1至11中任一项所述的滤波方法。A chip, characterized in that it comprises a processor and a memory, wherein the memory stores computer instructions, and the processor calls the computer instructions to enable the chip to implement the filtering method according to any one of claims 1 to 11.
- 一种耳机,其特征在于,具有通透模式,所述耳机包括:A headset, characterized in that it has a transparent mode, comprising:扬声器;speaker;耳外麦克风;External ear microphone;耳内麦克风;以及, In-ear microphone; and,上述权利要求12至22中任一项所述的滤波装置,或者上述权利要求23所述的芯片。 The filtering device according to any one of claims 12 to 22, or the chip according to claim 23.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2023/089150 WO2024216532A1 (en) | 2023-04-19 | 2023-04-19 | Filtering method, filter apparatus, chip, and earphone |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2023/089150 WO2024216532A1 (en) | 2023-04-19 | 2023-04-19 | Filtering method, filter apparatus, chip, and earphone |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024216532A1 true WO2024216532A1 (en) | 2024-10-24 |
Family
ID=93151681
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/089150 WO2024216532A1 (en) | 2023-04-19 | 2023-04-19 | Filtering method, filter apparatus, chip, and earphone |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2024216532A1 (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111885460A (en) * | 2020-07-29 | 2020-11-03 | 歌尔科技有限公司 | Transparent mode adjusting device and method of wireless earphone and wireless earphone |
CN113473304A (en) * | 2021-08-17 | 2021-10-01 | 北京小米移动软件有限公司 | Howling suppression method, howling suppression device, earphone and storage medium |
US20210390972A1 (en) * | 2020-06-11 | 2021-12-16 | Apple Inc. | Self-voice adaptation |
CN113938785A (en) * | 2021-11-24 | 2022-01-14 | 英华达(上海)科技有限公司 | Noise reduction processing method, device, equipment, earphone and storage medium |
CN114554353A (en) * | 2022-02-24 | 2022-05-27 | 北京小米移动软件有限公司 | Audio processing method, device, equipment and storage medium |
US20220322002A1 (en) * | 2021-03-31 | 2022-10-06 | Bose Corporation | Gain-adaptive active noise reduction (anr) device |
CN115802224A (en) * | 2022-10-18 | 2023-03-14 | 昆山联滔电子有限公司 | Noise elimination method and device, electronic equipment, earphone and storage medium |
-
2023
- 2023-04-19 WO PCT/CN2023/089150 patent/WO2024216532A1/en unknown
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210390972A1 (en) * | 2020-06-11 | 2021-12-16 | Apple Inc. | Self-voice adaptation |
CN111885460A (en) * | 2020-07-29 | 2020-11-03 | 歌尔科技有限公司 | Transparent mode adjusting device and method of wireless earphone and wireless earphone |
US20220322002A1 (en) * | 2021-03-31 | 2022-10-06 | Bose Corporation | Gain-adaptive active noise reduction (anr) device |
CN113473304A (en) * | 2021-08-17 | 2021-10-01 | 北京小米移动软件有限公司 | Howling suppression method, howling suppression device, earphone and storage medium |
CN113938785A (en) * | 2021-11-24 | 2022-01-14 | 英华达(上海)科技有限公司 | Noise reduction processing method, device, equipment, earphone and storage medium |
CN114554353A (en) * | 2022-02-24 | 2022-05-27 | 北京小米移动软件有限公司 | Audio processing method, device, equipment and storage medium |
CN115802224A (en) * | 2022-10-18 | 2023-03-14 | 昆山联滔电子有限公司 | Noise elimination method and device, electronic equipment, earphone and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6017825B2 (en) | A microphone and earphone combination audio headset with means for denoising proximity audio signals, especially for "hands-free" telephone systems | |
JP5770405B2 (en) | Headset communication method and headset in strong noise environment | |
CN103959813B (en) | Earhole Wearable sound collection device, signal handling equipment and sound collection method | |
JP6069829B2 (en) | Ear hole mounting type sound collecting device, signal processing device, and sound collecting method | |
JP6731555B2 (en) | Speech intelligibility improvement system | |
AU2017402614B2 (en) | System and method for relative enhancement of vocal utterances in an acoustically cluttered environment | |
US20150332662A1 (en) | Anc noise active control audio headset with prevention of the effects of a saturation of the feedback microphone signal | |
KR20160140161A (en) | Noise Cancelling Method and Earphone havinng Noise Cancelling Function | |
US11978469B1 (en) | Ambient noise aware dynamic range control and variable latency for hearing personalization | |
WO2023098401A1 (en) | Earphone having active noise reduction function and active noise reduction method | |
KR20140006394A (en) | Noise reduction processing device of earphone and headphone. | |
Ho et al. | Integrated active noise control for open-fit hearing aids with customized filter | |
CN109068217A (en) | A kind of sidetone Enhancement Method, device and the In-Ear Headphones of In-Ear Headphones | |
JP2017533664A (en) | Self-voice blockage reduction in headset | |
CN112954530A (en) | Earphone noise reduction method, device and system and wireless earphone | |
TWI597936B (en) | Sound signal amplitude supressing apparatus | |
JP6197930B2 (en) | Ear hole mounting type sound collecting device, signal processing device, and sound collecting method | |
Kumar et al. | Acoustic Feedback Noise Cancellation in Hearing Aids Using Adaptive Filter | |
CN113395629B (en) | Earphone, audio processing method and device thereof, and storage medium | |
WO2024216532A1 (en) | Filtering method, filter apparatus, chip, and earphone | |
CN116156385B (en) | Filtering method, filtering device, chip and earphone | |
CN115942177A (en) | Method for realizing transparent mode of earphone | |
WO2021129196A1 (en) | Voice signal processing method and device | |
JP4976012B2 (en) | Audio signal amplitude limiter | |
CN118870277A (en) | Hearing aid method with active noise reduction, head-mounted device and computer program product |