WO2021227696A1 - 一种主动降噪方法及装置 - Google Patents

一种主动降噪方法及装置 Download PDF

Info

Publication number
WO2021227696A1
WO2021227696A1 PCT/CN2021/084775 CN2021084775W WO2021227696A1 WO 2021227696 A1 WO2021227696 A1 WO 2021227696A1 CN 2021084775 W CN2021084775 W CN 2021084775W WO 2021227696 A1 WO2021227696 A1 WO 2021227696A1
Authority
WO
WIPO (PCT)
Prior art keywords
filter parameters
frequency response
signal
earphone
curve information
Prior art date
Application number
PCT/CN2021/084775
Other languages
English (en)
French (fr)
Inventor
余晓伟
李玉龙
范泛
覃景繁
杨小洪
欧阳山
孙宇皓
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202011120314.7A external-priority patent/CN113676804B/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to JP2022568881A priority Critical patent/JP2023525138A/ja
Priority to KR1020227043382A priority patent/KR20230009487A/ko
Publication of WO2021227696A1 publication Critical patent/WO2021227696A1/zh
Priority to US17/986,549 priority patent/US20230080298A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • H04R3/04Circuits for transducers, loudspeakers or microphones for correcting frequency response
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1083Reduction of ambient noise
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K2210/00Details of active noise control [ANC] covered by G10K11/178 but not provided for in any of its subgroups
    • G10K2210/10Applications
    • G10K2210/108Communication systems, e.g. where useful sound is kept and noise is cancelled
    • G10K2210/1081Earphones, e.g. for telephones, ear protectors or headsets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2420/00Details of connection covered by H04R, not provided for in its groups
    • H04R2420/07Applications of wireless loudspeakers or wireless microphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2460/00Details of hearing devices, i.e. of ear- or headphones covered by H04R1/10 or H04R5/033 but not provided for in any of their subgroups, or of hearing aids covered by H04R25/00 but not provided for in any of its subgroups
    • H04R2460/01Hearing devices using active noise cancellation

Definitions

  • the embodiments of the present application relate to the field of audio technology, and in particular, to an active noise reduction method and device.
  • semi-open earphones do not have a rubber sleeve on the sound outlet, and have better wearing comfort, no stethoscope effect, and are suitable for long-term wearing.
  • the embodiments of the present application provide an active noise reduction method and device, which can improve the noise reduction effect of headphones.
  • an embodiment of the present application provides an active noise reduction method applied to a headset with ANC function.
  • the method includes: when the headset is in the ANC working mode, the headset obtains a first set of filter parameters; and the headset uses the first set of filter parameters. Group filter parameters for noise reduction.
  • the first set of filter parameters is one of the N 1 sets of filter parameters pre-stored by the earphone; the N 1 sets of filter parameters are respectively used for noise reduction of ambient sound under N 1 leakage states; the N 1 types The leakage state is formed by the earphone and N 1 different ear canal environments; wherein, in the current wearing state of the earphone, for the same environmental noise, the noise reduction effect of the earphone when the first set of filter parameters is applied is better than The noise reduction effect of the earphone when other filter parameters in the N 1 group of filter parameters are applied; N 1 is a positive integer greater than or equal to 2.
  • the above-described N 1 expression status may leak Species Species N 1 with the fit range of the human ear headphones, earphone N 1 can be expressed with the degree of sealing of the human ear; any leak condition is not specific to a particular headphone Wearing state, but based on the impedance characteristics of the leakage state, a large number of statistics are obtained, and the typical or differentiated leakage scenarios are obtained.
  • the active noise reduction method can determine a set of filter parameters (that is, the current wearing state) that matches the current leakage state (also can be understood as the current wearing state) according to the user's ear canal environment and the leakage state formed by the earphone when the user wears the earphone.
  • the above-mentioned first set of filter parameters), and the environmental sound noise reduction based on this set of filter parameters can meet the user's personalized noise reduction needs and improve the noise reduction effect.
  • the active noise reduction method provided in the embodiment of the present application further includes: generating N 2 sets of filter parameters at least according to the first set of filter parameters and the second set of filter parameters.
  • the N 2 sets of filter parameters correspond to different ANC noise reduction intensities; the second set of filter parameters is one of the N 1 sets of filter parameters pre-stored in the earphone; the second set of filter parameters is used to leak in N 1 leakage states Environmental noise reduction is performed in the state of the smallest degree.
  • the N 2 sets of filter parameters include the first set of filter parameters and the second set of filter parameters described above.
  • the active noise reduction method provided in the embodiment of the present application further includes: obtaining the target ANC noise reduction intensity; and determining the third group of filter parameters from the N 2 groups of filter parameters according to the target ANC noise reduction intensity; and Use the third set of filter parameters to reduce noise.
  • N 2 sets of filter parameters adapted to the current user are generated based on the first set of filter parameters and the second set of filter parameters, and From the N 2 groups of filter parameters, the third group of filter parameters corresponding to the target ANC noise reduction intensity is further determined, so that the third group of filter parameters is used for noise reduction, so that the appropriate ANC noise reduction intensity can be selected according to the state of environmental noise ,
  • the noise reduction effect is more in line with the needs of users.
  • the foregoing method for obtaining the first set of filter parameters includes: receiving first indication information from a terminal, where the first indication information is used to instruct the earphone to use the first set of filter parameters to reduce noise.
  • the headset includes an error microphone; the method for obtaining the first set of filter parameters includes: collecting a first signal through the error microphone of the headset, and obtaining a downlink signal of the headset; determining according to the first signal and the downlink signal The current frequency response curve information of the secondary channel; and from the preset frequency response curve information of N 1 secondary channels, determine the target frequency response curve information that matches the current frequency response curve information; and change the target frequency response curve information
  • the corresponding set of filter parameters is determined as the first set of filter parameters, and N 1 sets of filter parameters correspond to frequency response curve information of N 1 secondary channels.
  • the headset includes an error microphone and a reference microphone; the method for obtaining the first set of filter parameters includes: collecting the first signal through the error microphone of the headset, and collecting the second signal through the reference microphone of the headset, and Obtain the downlink signal of the headset; then determine the residual signal of the error microphone based on the first signal and the second signal; and determine the current frequency response curve information of the secondary channel based on the residual signal and the downlink signal of the error microphone; In the frequency response curve information of N 1 secondary channel, determine the target frequency response curve information that matches the current frequency response curve information; and then determine a set of filter parameters corresponding to the target frequency response curve information as the first set of filter parameters, N One set of filtering parameters corresponds to the frequency response curve information of N 1 secondary channels.
  • the headset includes an error microphone and a reference microphone; the method for obtaining the first set of filter parameters includes: collecting a first signal through the error microphone of the headset, and collecting a second signal through the reference microphone of the headset; Determine the current frequency response curve information of the primary channel according to the first signal and the second signal; and determine the target frequency response curve information matching the current frequency response curve information from the preset frequency response curve information of N 1 primary channels; And a group of filter parameters corresponding to the target frequency response curve information is determined as the first group of filter parameters, and the N 1 group of filter parameters correspond to the frequency response curve information of the N 1 primary channels.
  • the above-mentioned earphone includes an error microphone and a reference microphone; the above-mentioned method for obtaining the first set of filter parameters includes: collecting the first signal through the error microphone of the earphone, collecting the second signal through the reference microphone of the earphone, and obtaining The downlink signal of the earphone; then the current frequency response curve information of the primary channel is determined according to the first signal and the second signal, and the current frequency response curve information of the secondary channel is determined according to the first signal and the downlink signal; and the current frequency response ratio curve is determined Information, the current frequency response ratio curve information is the ratio of the current frequency response curve information of the primary channel to the current frequency response curve information of the secondary channel; then from the preset N 1 frequency response ratio curve information, determine the current frequency response The target frequency response ratio curve information matched by the ratio curve information; and then a group of filter parameters corresponding to the target frequency response ratio curve information is determined as the first group of filter parameters, and N 1 groups of filter parameters correspond to N 1 frequency response ratio curve information
  • the earphone microphone and a reference microphone includes an error; and the obtaining of the first set of filter parameters comprising: determining a frequency response difference N curve information error microphone and reference microphone 1 corresponding to each set of filter parameters; And determine the frequency response difference curve with the smallest amplitude corresponding to the target frequency band among the N 1 sets of filter parameters corresponding to the N 1 frequency response difference curve information as the target frequency response difference curve, and the frequency response difference between the error microphone and the reference microphone
  • the value curve information is the difference between the frequency response curve information of the error microphone and the frequency response curve information of the reference microphone; and then a set of filter parameters corresponding to the target frequency response difference curve information is determined as the first set of filter parameters.
  • the foregoing method of generating N 2 sets of filter parameters at least according to the first set of filter parameters and the second set of filter parameters includes: interpolating the first set of filter parameters and the second set of filter parameters to generate N 2 Group filter parameters.
  • the above method for obtaining the target ANC noise reduction intensity includes: receiving second indication information from the terminal, the second indication information is used to instruct the headset to use a third set of filter parameters corresponding to the target ANC noise reduction intensity to perform noise reduction. noise.
  • the foregoing method for obtaining the target ANC noise reduction intensity includes: determining the target ANC noise reduction intensity according to the current environmental noise state. For example, the current environment is relatively quiet, and the headset adaptively selects the ANC noise reduction strength with weaker noise reduction according to the environmental noise state; when the current environment is relatively noisy, the headset adaptively selects the ANC with stronger noise reduction strength according to the state of the environmental noise Noise reduction intensity.
  • the active noise reduction method before acquiring the first set of filter parameters, further includes: receiving a first instruction, the headset works in the ANC working mode, and the first instruction is used to control the headset Work in the ANC working mode; or, detect whether the earphone is in the ear; when it is detected that the earphone is in the ear, the earphone works in the ANC working mode.
  • the active noise reduction method provided in the embodiments of the present application is applied in a scenario where the headset is in the ANC working mode. It can be seen that the headset is in the ANC working mode as a trigger condition for determining the first set of filter parameters.
  • the headset plays the prompt sound that the ANC is turned on, and the first set of filter parameters is determined during the process of playing the in-ear prompt sound, that is, the in-ear prompt sound is used as the test signal, and the user listens subjectively Sound perception determines the first set of filtering parameters.
  • the earphone when it is detected that the earphone is in the ear, the earphone works in the ANC working mode, and at the same time, the earphone will play the in-ear prompt sound.
  • the first set of filter parameters is determined during the process of playing the in-ear prompt sound, that is, the The in-ear prompt sound is used as a test signal, and the user determines the first set of filtering parameters based on subjective listening experience.
  • the foregoing method for obtaining the first set of filter parameters specifically includes: when the headset is in the ANC working mode, receiving a second instruction, where the second instruction is used to instruct the headset to obtain the first set of filter parameters; Wherein, the first set of filter parameters is different from the filter parameters used by the headset before receiving the second instruction.
  • the earphone reduces noise based on the first set of filter parameters. Subsequently, during the operation of the earphone, the user can choose to re-determine a set of filter parameters according to the actual situation. For noise reduction, at this time, it is also possible to instruct the headset to obtain the first set of filtering parameters by sending a second instruction.
  • the active noise reduction method after obtaining the first set of filter parameters, before generating N 2 sets of filter parameters at least according to the first set of filter parameters and the second set of filter parameters, the active noise reduction method provided in the embodiment of the present application also It includes: receiving a third instruction, which is used to trigger the headset to generate N 2 sets of filter parameters.
  • the third set of filter parameters is determined from the N 2 sets of filter parameters, and the headset reduces noise based on the third set of filter parameters.
  • the user can also choose to re-determine a set of filter parameters for noise reduction according to actual needs, that is, the headset reacquires the first set of filter parameters.
  • the headset restores the N 2 sets of filter parameters in the headset to the aforementioned N 1 sets of filter parameters, and then redetermines the first set of filter parameters from the N 1 sets of filter parameters, and uses the newly acquired first set of filter parameters to perform Noise reduction.
  • the aforementioned N 1 group of filtering parameters are determined according to the recording signal of the secondary channel SP mode and the recording signal of the primary channel PP mode.
  • the recording signal of the SP mode includes the downstream signal, the signal of the tympanic microphone and the signal of the error microphone of the earphone;
  • the recording signal of the PP mode includes the signal of the eardrum microphone, the signal of the error microphone of the earphone, and the signal of the reference microphone of the earphone.
  • the active noise reduction method provided by the embodiment of the present application further includes: detecting whether there is abnormal noise, and the abnormal noise includes at least one of the following: howling noise, clipping noise, or noise floor; In the case of abnormal noise, update the filter parameters, which include the first set of filter parameters or the third set of filter parameters; and collect sound signals through the reference microphone and error microphone of the headset; based on the updated filter parameters, the reference The sound signal collected by the microphone and the sound signal collected by the error microphone are processed to generate a reverse noise signal.
  • the above-mentioned reverse noise signal is used to attenuate the user’s in-ear noise signal.
  • the in-ear noise signal can be understood as the residual noise after the environmental noise is isolated by the earphone after the user wears the earphone.
  • the residual noise signal is similar to the external noise signal.
  • Environmental noise, earphones, and the fit between the earphones and the ear canal are related to factors; after the earphone generates a reverse noise signal, the earphone plays the reverse noise signal, and the reverse noise signal has the opposite phase to the noise signal in the user’s ear. In this way, the reverse noise signal can attenuate the noise signal in the user's ear, thereby reducing abnormal noise in the ear.
  • the earphone can detect abnormal noise and perform noise reduction processing on the abnormal noise, the interference of the abnormal noise is reduced, the stability of the earphone is improved, and the user's listening experience can be improved.
  • the above-mentioned earphone includes a semi-open active noise reduction earphone.
  • an embodiment of the present application provides an active noise reduction method, which is applied to a terminal that establishes a communication connection with a headset, and the headset is in ANC working mode.
  • the method includes: determining a first set of filtering parameters; and sending a first instruction to the headset Information, the first indication information is used to instruct the earphone to use the first set of filter parameters to reduce noise.
  • the first set of filter parameters is the set of filter parameters N 1 pre-stored in the headphone set; N 1 set of filter parameters for each noise environment sound leakage state at one kind of N; N is one kind of leakage condition Headphones and N 1 different ear canal environments are formed; among them, in the current wearing state of the headphones, for the same environmental noise, the noise reduction effect of the first set of filter parameters applied to the headphones is better than that of the N 1 set of filter parameters applied to the headphones Noise reduction effect for other filtering parameters; N 1 is a positive integer greater than or equal to 2.
  • the active noise reduction method can determine a set of filter parameters (that is, the first set of filter parameters) matching the current leakage state according to the user’s ear canal environment and the leakage state formed by the earphone when the user wears the earphone, and is based on This set of filtering parameters performs environmental sound noise reduction, which can meet the user's personalized noise reduction needs and improve the noise reduction effect.
  • the above method for determining the first set of filter parameters includes: receiving the first signal collected by the error microphone of the earphone, and obtaining the downlink signal of the earphone; and then determining the secondary channel according to the first signal and the downlink signal.
  • Current frequency response curve information and from the preset frequency response curve information of N 1 secondary channels, determine the target frequency response curve information that matches the current frequency response curve information; and a set of target frequency response curve information corresponding
  • the filter parameters are determined as the first set of filter parameters, and the N 1 sets of filter parameters correspond to the frequency response curve information of the N 1 secondary channels.
  • the above method for determining the first set of filter parameters includes: receiving the first signal collected by the error microphone of the earphone and the second signal collected by the reference microphone of the earphone, and obtaining the downlink signal of the earphone; and then based on the first signal.
  • the signal and the second signal determine the residual signal of the error microphone; then the current frequency response curve information of the secondary channel is determined according to the residual signal of the error microphone and the downlink signal; then the frequency response curve of the preset N 1 secondary channels In the information, determine the target frequency response curve information that matches the current frequency response curve information; then determine the filter parameter corresponding to the target frequency response curve information as the first set of filter parameters, and N 1 sets of filter parameters correspond to the N 1 secondary channels Frequency response curve information.
  • the method for determining the first set of filter parameters includes: receiving a first signal collected by the error microphone of the headset and a second signal collected by the reference microphone of the headset; and then determining according to the first signal and the second signal The current frequency response curve information of the primary channel; and from the preset frequency response curve information of N 1 primary channels, determine the target frequency response curve information that matches the current frequency response curve information; and the target frequency response curve information corresponding
  • the filter parameters are determined as the first set of filter parameters, and the N 1 sets of filter parameters correspond to the frequency response curve information of the N 1 primary channels.
  • the foregoing method for determining the first set of filter parameters includes: receiving a first signal collected by the error microphone of the headset and a second signal collected by the reference microphone of the headset, and acquiring the downlink signal of the headset; The first signal and the second signal determine the current frequency response curve information of the primary channel, and determine the current frequency response curve information of the secondary channel according to the first signal and the downlink signal; and determine the current frequency response ratio curve information, the current frequency response ratio curve information It is the ratio of the current frequency response curve information of the primary channel to the current frequency response curve information of the secondary channel; then from the preset N 1 frequency response ratio curve information, determine the target frequency response that matches the current frequency response ratio curve information Ratio curve information; and further determine the filter parameter corresponding to the target frequency response ratio curve information as the first group of filter parameters, and N 1 groups of filter parameters correspond to N 1 frequency response ratio curve information.
  • the above-described method of determining a first set of filter parameters comprises: determining a set of filter parameters N 1 respectively corresponding to the difference frequency response error microphone and reference microphone curve information; and the corresponding N 1 of the set of filter parameters Among N 1 frequency response difference curve information, the frequency response difference curve with the smallest amplitude corresponding to the target frequency band is determined as the target frequency response difference curve, and the frequency response difference curve information of the error microphone and the reference microphone is the frequency response of the error microphone The difference between the curve information and the frequency response curve information of the reference microphone; and then the filter parameter corresponding to the target frequency response difference curve information is determined as the first set of filter parameters.
  • the active noise reduction method provided in the embodiment of the present application further includes: receiving an operation on the first option of the first interface of the terminal, and the first interface is An interface for setting the working mode of the headset; in response to the operation of the first option, a first instruction is sent to the headset, and the first instruction is used to control the headset to work in the ANC working mode.
  • the active noise reduction method further includes: displaying an ANC control list; the ANC control list includes at least the following At least one of the options: the first control option, the second control option, or the third control option; wherein the first control option is used to trigger the determination of the first set of filter parameters, and the second control option is used to trigger the generation of N 2 sets of filters Parameters, the third control option is used to trigger the re-determination of the first set of filter parameters.
  • the foregoing method for determining the first set of filtering parameters includes: receiving an operation on the first control option in the ANC control list, displaying a first control, and the first control includes N 1 preset positions, The N 1 preset positions correspond to N 1 sets of filter parameters; and an operation on the first position in the first control is received; the first position is one of the N 1 preset positions, and the first position corresponds to one
  • the noise reduction effect when the set of filter parameters is applied to the earphone is better than the noise reduction effect when the filter parameters corresponding to the other positions in the N 1 preset positions are applied to the earphone; and in response to the operation on the first position, the first position is determined
  • the corresponding set of filtering parameters is the first set of filtering parameters.
  • the active noise reduction method provided in the embodiment of the present application further includes: receiving an operation on the third control option in the ANC control list; and in response to the operation on the third control option, re-determining the first Group filter parameters.
  • the active noise reduction method provided in the embodiment of the present application further includes: receiving an operation on the third control option in the ANC control list; and in response to the operation on the third control option, sending the first control option to the headset Two instructions, the second instruction is used to instruct the headset to obtain the first set of filter parameters; wherein, the first set of filter parameters are different from the filter parameters used by the headset before receiving the second instruction.
  • the active noise reduction method provided in the embodiment of the present application further includes: receiving an operation on the second control option in the ANC control list; and in response to the operation on the second control option, sending the first control option to the headset Three instructions.
  • the third instruction is used to trigger the headset to generate N 2 sets of filter parameters.
  • the N 2 sets of filter parameters are generated according to the first set of filter parameters and the second set of filter parameters.
  • the second set of filter parameters is N 1 sets of filter parameters.
  • One group of parameters, the second group of filtering parameters is used to reduce noise of environmental sound in the state where the leakage degree is the smallest among the N 1 leakage states.
  • the active noise reduction method further includes: displaying a second control; the second control includes N 2 Preset positions, the N 2 preset positions correspond to N 2 kinds of ANC noise reduction intensities, and the N 2 kinds of ANC noise reduction intensities correspond to N 2 sets of filter parameters; and an operation on the second position in the second control is received;
  • the second position is one of the N 2 preset positions, and the filter parameter corresponding to the ANC noise reduction intensity at the second position has better noise reduction effect when applied to the earphones than other positions in the N 2 preset positions
  • the filter parameter corresponding to the ANC noise reduction intensity of the ANC is applied to the noise reduction effect of the earphone; and in response to the operation of the second position, the ANC noise reduction intensity corresponding to the second position is determined as the target ANC noise reduction intensity;
  • the second indication information is used to instruct the earphone to use the third set of filter parameters corresponding to the target
  • an embodiment of the present application provides a headset that has an ANC function, and the headset includes an acquisition module and a processing module.
  • the acquisition module is used to acquire the first set of filter parameters when the headset is in the ANC working mode;
  • the first set of filter parameters is one of the N 1 sets of filter parameters pre-stored by the headset;
  • the N 1 sets of filter parameters are respectively for environmental noise at one kind of sound leakage state N;
  • N is one kind of leakage condition N formed by one kind of earphone and the ear canal of different environments; wherein the headset in the current state of wearing, for the same ambient noise,
  • the noise reduction effect of the earphone when the first set of filter parameters is applied is better than the noise reduction effect of the earphone when the other filter parameters in the N 1 set of filter parameters are applied;
  • N 1 is a positive integer greater than or equal to 2.
  • the processing module is used for noise reduction using the first set of filter parameters.
  • the headset provided in the embodiment of the present application further includes a generation module; the generation module is configured to generate N 2 sets of filter parameters according to at least the first set of filter parameters and the second set of filter parameters; the N 2 sets of filter parameters The parameters correspond to different ANC noise reduction intensities; the second set of filter parameters is one of the N 1 sets of filter parameters pre-stored in the earphone; this second set of filter parameters is used for the state with the smallest degree of leakage among the N 1 leakage states Perform environmental noise reduction.
  • the generation module is configured to generate N 2 sets of filter parameters according to at least the first set of filter parameters and the second set of filter parameters; the N 2 sets of filter parameters The parameters correspond to different ANC noise reduction intensities; the second set of filter parameters is one of the N 1 sets of filter parameters pre-stored in the earphone; this second set of filter parameters is used for the state with the smallest degree of leakage among the N 1 leakage states Perform environmental noise reduction.
  • the headset provided in the embodiment of the present application further includes a determining module; the above-mentioned acquiring module is also used to acquire the target ANC noise reduction intensity; the determining module is used to select N 2 groups of filter parameters according to the target ANC noise reduction intensity The third group of filter parameters is determined; the above-mentioned processing module is also used for noise reduction by using the third group of filter parameters.
  • the earphone provided in this embodiment of the application further includes a receiving module; the receiving module is used to receive first indication information from the terminal, and the first indication information is used to instruct the earphone to use the first set of filter parameters to perform the reduction. noise.
  • the earphone provided in the embodiment of the present application further includes a first signal acquisition module; the first signal acquisition module is used to collect the first signal through the error microphone of the earphone; the above-mentioned acquisition module is also used to acquire the earphone
  • the above-mentioned determining module is also used to determine the current frequency response curve information of the secondary channel according to the first signal and the downlink signal; and from the preset frequency response curve information of N 1 secondary channels, determine the current frequency response curve information
  • the target frequency response curve information matched by the response curve information; and a group of filter parameters corresponding to the target frequency response curve information is determined as the first group of filter parameters, and the N 1 group of filter parameters correspond to the frequency response curve information of the N 1 secondary channels.
  • the earphone provided in the embodiment of the present application further includes a first signal acquisition module and a second signal acquisition module.
  • the first signal collection module is used to collect the first signal through the error microphone of the earphone;
  • the second signal collection module is used to collect the second signal through the reference microphone of the earphone;
  • the above-mentioned acquisition module is also used to acquire the downlink signal of the earphone;
  • the above-mentioned determination module It is also used to determine the residual signal of the error microphone based on the first signal and the second signal; and to determine the current frequency response curve information of the secondary channel according to the residual signal of the error microphone and the downlink signal; from the preset N 1 secondary In the frequency response curve information of the channel, determine the target frequency response curve information that matches the current frequency response curve information; and determine a set of filter parameters corresponding to the target frequency response curve information as the first set of filter parameters, and N 1 sets of filter parameters correspond to N frequency response curve information of 1 secondary channel.
  • the earphone provided in the embodiment of the present application further includes a first signal acquisition module and a second signal acquisition module.
  • the first signal acquisition module is used to collect the first signal through the error microphone of the earphone;
  • the second signal acquisition module is used to collect the second signal through the reference microphone of the earphone;
  • the above determination module is also used to determine according to the first signal and the second signal
  • the current frequency response curve information of the primary channel and from the preset frequency response curve information of N 1 primary channels, determine the target frequency response curve information that matches the current frequency response curve information; and the target frequency response curve information corresponding
  • One set of filter parameters is determined as the first set of filter parameters, and N 1 sets of filter parameters correspond to frequency response curve information of N 1 primary channels.
  • the earphone provided in the embodiment of the present application further includes a first signal acquisition module and a second signal acquisition module.
  • the first signal collection module is used to collect the first signal through the error microphone of the earphone;
  • the second signal collection module is used to collect the second signal through the reference microphone of the earphone;
  • the above-mentioned acquisition module is also used to acquire the downlink signal of the earphone;
  • the above-mentioned determination module It is also used to determine the current frequency response curve information of the primary channel according to the first signal and the second signal, and determine the current frequency response curve information of the secondary channel according to the first signal and the downlink signal; and determine the current frequency response ratio curve information, the current The frequency response ratio curve information is the ratio of the current frequency response curve information of the primary channel to the current frequency response curve information of the secondary channel; and then from the preset N 1 frequency response ratio curve information, the current frequency response ratio curve information is determined Matched target frequency response ratio curve information; and a group of filter parameters corresponding to the target frequency response ratio curve
  • the determination module is further for determining a difference value N frequency response curve information error microphone and reference microphone 1 respectively corresponding to the set of filter parameters
  • the difference curve information the frequency response difference curve with the smallest amplitude corresponding to the target frequency band is determined as the target frequency response difference curve
  • the frequency response difference curve information of the error microphone and the reference microphone is the frequency response curve information of the error microphone and the reference microphone
  • the difference between the frequency response curve information; and a set of filter parameters corresponding to the target frequency response difference curve information is determined as the first set of filter parameters.
  • the foregoing generating module is specifically configured to interpolate the first set of filter parameters and the second set of filter parameters to generate N 2 sets of filter parameters.
  • the foregoing receiving module is further configured to receive second indication information from the terminal, and the second indication information is used to instruct the earphone to use the target ANC noise reduction intensity corresponding to the third set of filter parameters to perform noise reduction.
  • the above determination module is further configured to determine the target ANC noise reduction intensity according to the current environmental noise state.
  • the headset provided in the embodiment of the present application further includes a detection module.
  • the above-mentioned receiving module is also used to receive a first instruction, the headset works in the ANC working mode, and the first instruction is used to control the headset to work in the ANC working mode.
  • the detection module is used to detect whether the earphone is in the ear. When the detection module detects that the earphone is in the ear, the earphone works in the ANC working mode.
  • the above-mentioned receiving module is further configured to receive a second instruction when the headset is in the ANC working mode, and the second instruction is used to instruct the headset to obtain the first set of filtering parameters; wherein, the first set The filter parameter is different from the filter parameter used by the earphone before receiving the second instruction.
  • the foregoing receiving module is further configured to receive a third instruction, and the third instruction is used to trigger the headset to generate N 2 sets of filter parameters.
  • the above N 1 filter parameters are determined based on the recording signal of the secondary channel SP mode and the primary channel PP mode recording signal; wherein the recording signal of the SP mode includes the downstream signal and the tympanic microphone signal And the signal of the error microphone of the earphone; the recording signal of the PP mode includes the signal of the eardrum microphone, the signal of the error microphone of the earphone, and the signal of the reference microphone of the earphone.
  • the headset provided in the embodiment of the present application further includes an update module.
  • the above detection module is also used to detect whether there is abnormal noise.
  • the abnormal noise includes at least one of the following: howling noise, clipping noise or bottom noise; the update module is used to update the filter when the detection module detects the presence of abnormal noise Parameters, the filter parameters include the first set of filter parameters or the third set of filter parameters.
  • the above-mentioned first signal collection module is also used to collect sound signals through the reference microphone of the earphone; the second signal collection module is also used to collect sound signals through the error microphone of the earphone; the above-mentioned processing module is also used to compare the reference The sound signal collected by the microphone and the sound signal collected by the error microphone are processed to generate a reverse noise signal.
  • an embodiment of the present application provides a terminal, the terminal establishes a communication connection with a headset, the headset is in an ANC working mode, and the terminal includes a determining module and a sending module.
  • the determining module is used to determine the first set of filter parameters; the first set of filter parameters is one of the N 1 sets of filter parameters pre-stored by the earphone; the N 1 sets of filter parameters are respectively used to perform under N 1 leakage states Environmental noise reduction; N 1 leakage state is formed by the earphone and N 1 different ear canal environments; among them, the earphone is in the current wearing state, for the same environmental noise, the reduction of the earphone when the first set of filter parameters is applied The noise effect is better than the noise reduction effect of the earphone when other filter parameters in the N 1 group of filter parameters are applied; N 1 is a positive integer greater than or equal to 2.
  • the sending module is configured to send first instruction information to the headset, where the first instruction information is used to instruct the headset to use the first set of filter
  • the terminal provided in the embodiment of the present application further includes a receiving module and an acquiring module.
  • the receiving module is used to receive the first signal collected by the error microphone of the earphone; the obtaining module is used to obtain the downlink signal of the earphone; the determining module is specifically used to determine the current frequency response curve information of the secondary channel according to the first signal and the downlink signal; And from the preset frequency response curve information of the N 1 secondary channels, determine the target frequency response curve information that matches the current frequency response curve information; and determine a set of filter parameters corresponding to the target frequency response curve information as the first Set of filter parameters, N 1 set of filter parameters correspond to the frequency response curve information of N 1 secondary channels.
  • the terminal provided in the embodiment of the present application further includes a receiving module and an acquiring module.
  • the receiving module is used to receive the first signal collected by the error microphone of the earphone and the second signal collected by the reference microphone of the earphone;
  • the acquisition module is used to obtain the downlink signal of the earphone;
  • the determining module is specifically used to determine based on the first signal and the second signal.
  • the residual signal of the error microphone determines the current frequency response curve information of the secondary channel according to the residual signal of the error microphone and the downlink signal; and determine the current frequency response curve information from the preset N 1 secondary channel frequency response curve information
  • the target frequency response curve information matched by the frequency response curve information; and the filter parameter corresponding to the target frequency response curve information is determined as the first set of filter parameters, and the N 1 sets of filter parameters correspond to the frequency response curve information of the N 1 secondary channels.
  • the terminal provided in the embodiment of the present application further includes a receiving module; the receiving module is configured to receive the first signal collected by the error microphone of the earphone and the second signal collected by the reference microphone of the earphone; the above determination module is specifically Used to determine the current frequency response curve information of the primary channel according to the first signal and the second signal; and determine the current frequency response curve information from the preset frequency response curve information of N 1 primary channels Matching target frequency response curve information; and determining a filter parameter corresponding to the target frequency response curve information as the first set of filter parameters, and the N 1 set of filter parameters correspond to frequency response curve information of N 1 primary channels.
  • the terminal provided in the embodiment of the present application further includes a receiving module and an acquiring module.
  • the receiving module is used to receive the first signal collected by the error microphone of the earphone and the second signal collected by the reference microphone of the earphone;
  • the acquisition module is used to obtain the downlink signal of the earphone;
  • the signal determines the current frequency response curve information of the primary channel, and determines the current frequency response curve information of the secondary channel according to the first signal and the downlink signal; and determines the current frequency response ratio curve information, which is the current frequency response curve information of the primary channel
  • the ratio of the frequency response curve information to the current frequency response curve information of the secondary channel and then from the preset N 1 frequency response ratio curve information, determine the target frequency response ratio curve information that matches the current frequency response ratio curve information; and
  • the filter parameter corresponding to the target frequency response ratio curve information is determined as the first group of filter parameters, and N 1 groups of filter parameters correspond to N 1 frequency response ratio curve information.
  • the N 1 N 1 corresponding to the frequency response and the set of filter parameters; one possible implementation, the determination module configured to determine a difference frequency response curve information N error microphone and reference microphone 1 respectively corresponding to the set of filter parameters
  • the difference curve information the frequency response difference curve with the smallest amplitude corresponding to the target frequency band is determined as the target frequency response difference curve
  • the frequency response difference curve information of the error microphone and the reference microphone is the frequency response curve information of the error microphone and the Referencing the difference between the frequency response curve information of the microphone; and determining the filter parameter corresponding to the target frequency response difference curve information as the first set of filter parameters.
  • the above-mentioned receiving module is further configured to receive an operation on a first option of a first interface of the terminal, and the first interface is an interface for setting the working mode of the headset; the above-mentioned sending module It is also used to send a first instruction to the headset in response to the operation of the first option, and the first instruction is used to control the headset to work in the ANC working mode.
  • the terminal provided in the embodiment of the present application further includes a display module; the display module is used to display an ANC control list; the ANC control list includes at least one of the following options: the first control option, the second The second control option or the third control option.
  • the first control option is used to trigger the determination of the first set of filter parameters
  • the second control option is used to trigger the generation of N 2 sets of filter parameters
  • the third control option is used to trigger the re-determination of the first set of filter parameters.
  • the above-mentioned receiving module is also used to receive an operation on the first control option in the ANC control list;
  • the above-mentioned display module is also used to display a first control, and the first control includes N 1 preset positions , The N 1 preset positions correspond to N 1 sets of filter parameters;
  • the receiving module is also used to receive an operation on the first position in the first control;
  • the first position is one of the N 1 preset positions, the The noise reduction effect when a set of filter parameters corresponding to the first position is applied to the earphone is better than the noise reduction effect when the filter parameters corresponding to other positions in the N 1 preset positions are applied to the earphone;
  • the above determination module is specifically used to respond to For the operation at the first position, it is determined that a group of filter parameters corresponding to the first position is the first group of filter parameters.
  • the receiving module is further configured to receive an operation on the third control option in the ANC control list; the determining module is further configured to re-determine the first set of filtering in response to the operation on the third control option parameter.
  • the receiving module is also used to receive an operation on the third control option in the ANC control list; the sending module is also used to send a second instruction to the headset in response to the operation on the third control option , The second instruction is used to instruct the headset to obtain the first set of filter parameters; wherein, the first set of filter parameters are different from the filter parameters used by the headset before receiving the second instruction.
  • the above-mentioned receiving module is also used to receive an operation on the second control option in the ANC control list; the above-mentioned sending module is also used to send a third instruction to the headset in response to the operation on the second control option , The third instruction is used to trigger the headset to generate N 2 sets of filter parameters.
  • the N 2 sets of filter parameters are generated according to the first set of filter parameters and the second set of filter parameters.
  • the second set of filter parameters is one of the N 1 sets of filter parameters.
  • One group; the second group of filter parameters is used to reduce noise of ambient sound in the state with the smallest degree of leakage among the N 1 leakage states.
  • the display module is further for displaying a second control;
  • the N 2 comprises a second control position preset, the preset position corresponding to N 2 N 2 Species ANC noise reduction intensity, the N 2
  • This kind of ANC noise reduction intensity corresponds to N 2 sets of filter parameters;
  • the above receiving module is also used to receive an operation on the second position in the second control;
  • the second position is one of N 2 preset positions, and the second position
  • the filter parameter corresponding to the ANC noise reduction intensity at the position when applied to the earphone has a better noise reduction effect than the filter parameters corresponding to the ANC noise reduction intensity at other positions in the N 2 preset positions.
  • the noise reduction effect when applied to the earphone is also used to determine the ANC noise reduction intensity corresponding to the second position as the target ANC noise reduction intensity in response to the operation on the second position; the above sending module is also used to send second indication information to the headset, the second The indication information is used to instruct the earphone to use the third set of filter parameters corresponding to the target ANC noise reduction intensity to perform noise reduction.
  • an embodiment of the present application provides a headset, including a memory and at least one processor connected to the memory.
  • the memory is used to store instructions. After the instructions are read by at least one processor, the first aspect and its possibilities are executed. The method described in any one of the implementation modes.
  • an embodiment of the present application provides a computer-readable storage medium, including a computer program, and when the computer program runs on a computer, the method described in the first aspect and any one of its possible implementation manners is executed.
  • embodiments of the present application provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the method described in the first aspect and any one of its possible implementation manners.
  • an embodiment of the present application provides a chip including a memory and a processor.
  • the memory is used to store computer instructions.
  • the processor is used to call and run the computer instruction from the memory to execute the method described in any one of the first aspect and its possible implementation manners.
  • an embodiment of the present application provides a terminal, including a memory and at least one processor connected to the memory.
  • the memory is used to store instructions. After the instructions are read by at least one processor, the second aspect and its possibilities are executed. The method described in any one of the implementation modes.
  • an embodiment of the present application provides a computer-readable storage medium, including a computer program, and when the computer program runs on a computer, the method described in the second aspect and any one of its possible implementation manners is executed.
  • an embodiment of the present application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the method described in the second aspect and any one of its possible implementation manners.
  • an embodiment of the present application provides a chip including a memory and a processor.
  • the memory is used to store computer instructions.
  • the processor is used to call and run the computer instructions from the memory to execute the method described in the second aspect and any one of its possible implementation manners.
  • an embodiment of the present application provides an active noise reduction method applied to a headset with ANC function.
  • the method includes: when the headset is in the ANC working mode, detecting whether the leakage state between the headset and the ear canal has changed In the case of detecting a change in the leakage state between the earphone and the ear canal, the filter parameters of the earphone are updated from the first set of filter parameters to the second set of filter parameters, and the second set of filter parameters are used for noise reduction.
  • the first set of filter parameters and the second set of filter parameters are two different sets of filter parameters among the N sets of filter parameters pre-stored by the headset, and the N sets of filter parameters are used to reduce environmental sound noise under N types of leakage conditions. ; In the current wearing state of the headset, for the same environmental noise, the noise reduction effect of the headset when the second set of filter parameters is applied is better than the noise reduction effect of the headset when the other filter parameters of the N sets of filter parameters are applied.
  • the filter parameters of the earphone can be adaptively updated according to the change of the leakage state between the earphone and the ear canal when the user uses the earphone.
  • the noise reduction is performed based on the updated filtering parameters, which can improve the noise reduction effect.
  • the leakage state between the earphone and the ear canal changes. It should be understood that the leakage state between the earphone and the ear canal reflects the degree of sealing between the earphone and the human ear.
  • the leakage state is formed by the earphone and different ear canal environments.
  • the ear canal environment is related to the characteristics of the user’s ear canal and the posture of the user wearing the earphone. Different ear canal characteristics and different postures of wearing the earphone are related.
  • the combination can form a variety of ear canal environments and also correspond to a variety of leakage conditions.
  • N kinds of leakage states can express the range of the fit between N kinds of earphones and human ears, and can express the degree of sealing between N kinds of earphones and human ears; High, the less likely to leak the sound.
  • Any kind of leakage state does not specifically refer to a specific earphone wearing state, but a large amount of statistics based on the impedance characteristics of the leakage state, and a typical or differentiated leakage scene is obtained.
  • the wearing state of the earphone corresponds to a kind of ear canal environment, thereby forming a leakage state.
  • the wearing state of the earphone is different due to the characteristics of the user's ear canal and the posture of the user wearing the earphone.
  • the current wearing state of the earphone corresponds to a stable ear canal environment, that is, to a stable ear canal feature and wearing posture.
  • the noise reduction effect of the above-mentioned N groups of filter parameters when applied to the earphone varies with the change of the wearing state of the earphone.
  • the above method for detecting whether the leakage state between the earphone and the ear canal has changed may include: collecting the first signal through the error microphone of the earphone, and collecting the first signal through the earphone.
  • the second signal is collected by the reference microphone; the long-term energy ratio is calculated frame by frame according to the first signal and the second signal; the long-term energy ratio of the current frame increases, and the long-term energy ratio of the current frame is compared with the long-term energy of the historical frame In the case where the difference of the ratio is greater than the first threshold, it is determined that the leakage state between the earphone and the ear canal has changed; otherwise, it is determined that the leakage state between the earphone and the ear canal has not changed.
  • the long-term energy ratio of an audio frame is an indicator that reflects the noise reduction effect.
  • a larger long-term energy ratio indicates a worse noise reduction effect, and a smaller long-term energy ratio indicates a better noise reduction effect.
  • a certain threshold for example, the above-mentioned first threshold
  • the N sets of pre-stored filter parameters of the earphones correspond to the N types of leakage states in order to reflect the degree of sealing between the earphones and the human ear from high to low, and the filter parameters of the earphones are updated from the first set of filter parameters to
  • the method for the second set of filter parameters may include: updating the filter parameters of the earphone from the first set of filter parameters to a third set of filter parameters, where the index of the first set of filter parameters in the pre-stored N sets of filter parameters is n, The index of the third set of filter parameters is n-1; determine the long-term energy ratio of the current frame when the earphone applies the third set of filter parameters for noise reduction; if the earphone applies the third set of filter parameters for noise reduction, the current frame’s When the long-term energy ratio decreases, the index of the third set of filter parameters is used as the starting point, and the index of the filter parameters is reduced one by one until the headset applies a set of filter parameters corresponding to the current index
  • the earphone applies the third group of filter parameters for noise reduction, the long-term energy ratio of the current frame increases, then the earphone’s filter parameters are updated from the third group of filter parameters to the fourth group of filter parameters.
  • the index is n+1; and the long-term energy ratio of the current frame is determined when the earphone applies the fourth set of filter parameters for noise reduction; if the long-term energy ratio of the current frame decreases, the index of the fourth set of filter parameters is taken as the starting point , Increase the index of the filter parameters one by one until the earphone applies a set of filter parameters corresponding to the current index to reduce noise, the difference between the long-term energy ratio of the current frame and the long-term energy ratio of the historical frame is less than the second threshold, and the current index
  • the corresponding set of filtering parameters is the second set of filtering parameters.
  • the filter parameter when a change in the leakage state between the earphone and the ear canal is detected, the filter parameter may be updated by reducing the index of the filter parameter first, and the index of the filter parameter is adjusted from n to n- 1. Then determine the noise reduction effect when the earphone is applied with the filter parameter index of n-1 for noise reduction.
  • the noise reduction effect becomes better, indicating that the filter parameter is reduced
  • the method of indexing is feasible, and then it is determined whether to continue to reduce the index of the filter parameter; if the noise reduction effect of the earphone when the filter parameter of index n-1 is used for noise reduction becomes worse, it means that the method of reducing the index of the filter parameter is not possible. OK, at this time, increase the index of the filter parameter to n+1, and apply the filter parameter with index n+1 for noise reduction. If the noise reduction effect becomes better, it means that the way to increase the index of the filter parameter is feasible.
  • the N sets of pre-stored filter parameters in the earphone correspond to the N types of leakage states in turn, reflecting that the degree of sealing between the earphone and the human ear has changed from high to low.
  • the above detection of the earphone and the ear may include: collecting the first signal through the error microphone of the earphone, collecting the second signal through the reference microphone of the earphone, and obtaining the reverse noise signal played by the speaker of the earphone; and according to the first Signal, second signal and reverse noise signal to determine the current frequency response curve information of the secondary channel; and from the frequency response curve information of the N sets of secondary channels corresponding to the pre-stored N sets of filter parameters, determine the The current frequency response curve information matches the target frequency response curve information; wherein the index of the first group of filter parameters in the pre-stored N groups of filter parameters is n, and the index of a group of filter parameters corresponding to the target frequency response
  • the index x of a group of filter parameters corresponding to the target frequency response curve information of the secondary channel and the index n of the first group of filter parameters satisfy
  • the above method for determining the current frequency response curve information of the secondary channel based on the first signal, the second signal and the reverse noise signal includes: calculating the error of the earphone based on the first signal and the second signal The residual signal of the microphone; then the reverse noise signal is used as a reference signal, and the residual signal of the error microphone is adaptively filtered to obtain the current frequency response curve information of the secondary channel.
  • the reverse noise signal is used as the reference signal
  • the Kalman filter and the NLMS filter are used to adaptively filter the residual signal of the error microphone, and the amplitude of the converged filter is calculated, that is, Get the current frequency response curve information of the secondary channel.
  • the active noise reduction method provided in the embodiment of the present application further includes: collecting a third signal through an out-of-ear microphone of the headset.
  • the out-of-ear microphone of the headset may include a call microphone or a reference microphone; and determining the third signal Whether the energy of is greater than the second preset energy threshold. If the energy of the third signal is greater than the preset threshold, it indicates that the environment is noisy; otherwise, the environment is relatively quiet.
  • the foregoing method of updating the filter parameters of the earphone from the first set of filter parameters to the second set of filter parameters may include: when the energy of the third signal is greater than the second preset energy threshold or the second signal When the energy is greater than the third preset energy threshold, the filter parameters of the earphone are updated from the first set of filter parameters to the second set of filter parameters.
  • the above method of determining the frequency response curve information of the secondary channel based on the first signal, the second signal and the reverse noise signal to detect whether the leakage state between the earphone and the ear canal has changed is suitable for noise Larger environments (that is, noisy environments) are not suitable for quiet environments. Because in a quiet environment, the reverse noise is very small, and the frequency response curve information of the secondary channel calculated with too small reverse noise is inaccurate, which may lead to inaccurate detection results.
  • the N sets of filter parameters pre-stored in the earphone correspond to the N types of leakage states in turn reflecting the degree of sealing between the earphone and the human ear from high to low.
  • the above-mentioned detection of the earphone and the ear may include: collecting the first signal through the error microphone of the earphone, and obtaining the downlink signal of the earphone; and determining the current frequency response curve information of the secondary channel according to the first signal and the downlink signal And from the frequency response curve information of the N groups of secondary channels corresponding to the pre-stored N groups of filter parameters, determine the target frequency response curve information that matches the current frequency response curve information of the secondary channel; wherein, the first group of filter parameters
  • the index in the pre-stored N groups of filter parameters is n, the index of a group of filter parameters corresponding to the target frequency response curve information is x; the index of a group of filter parameters corresponding to the
  • the index x of a group of filter parameters corresponding to the target frequency response curve information of the secondary channel and the index n of the first group of filter parameters satisfy
  • the above method for determining the current frequency response curve information of the secondary channel based on the first signal and the downlink signal includes: using the downlink signal as a reference signal, adaptively filtering the first signal to obtain the secondary channel The current frequency response curve information of the channel.
  • the lower row signal is used as the reference signal
  • the Kalman filter and the NLMS filter are used to adaptively filter the first signal
  • the amplitude of the converged filter is calculated to obtain the current value of the secondary channel. Frequency response curve information.
  • the foregoing method of updating the filter parameters of the earphone from the first set of filter parameters to the second set of filter parameters may include: taking the index n of the first set of filter parameters as a starting point, and changing the index of the filter parameters from n is adjusted to x one by one, and a group of filter parameters corresponding to index x is the second group of filter parameters.
  • the filter parameter index is updated from n to x.
  • Adjust the index of the filter parameter one by one until the index of the filter parameter is x, so that the noise reduction effect smoothly transitions to the best effect.
  • an embodiment of the present application provides a headset that has an ANC function, and the headset includes a detection module, an update module, and a processing module.
  • the detection module is used to detect whether the leakage state between the earphone and the ear canal has changed when the earphone is in the ANC working mode
  • the update module is used to detect whether the leakage state between the earphone and the ear canal has changed when the detection module detects a change in the leakage state between the earphone and the ear canal
  • update the filter parameters of the earphone from the first set of filter parameters to the second set of filter parameters
  • the processing module is used to reduce noise by using the second set of filter parameters.
  • the first set of filter parameters and the second set of filter parameters are two different sets of filter parameters among the N sets of filter parameters pre-stored by the earphone; the N sets of filter parameters are respectively used for environmental noise reduction under N types of leakage conditions ,
  • the N leakage states are formed by the earphone and N different ear canal environments.
  • the noise reduction effect of the earphone when the second set of filter parameters is applied is better than the noise reduction effect of the earphone when the other filter parameters of the N sets of filter parameters are applied.
  • the leakage state between the earphone and the ear canal changes. It should be understood that the leakage state between the earphone and the ear canal reflects the degree of sealing between the earphone and the human ear.
  • the earphone provided in the embodiment of the present application further includes a first signal acquisition module and a second signal acquisition module.
  • the first signal collection module is used to collect the first signal through the error microphone of the earphone; the second signal collection module is used to collect the second signal through the reference microphone of the earphone.
  • the above detection module is specifically used to calculate the long-term energy ratio frame by frame according to the first signal and the second signal when the headset has no downlink signal; the long-term energy ratio of the current frame increases, and the long-term energy ratio of the current frame is equal to If the difference in the long-term energy ratio of the historical frame is greater than the first threshold, it is determined that the leakage state between the earphone and the ear canal has changed; otherwise, it is determined that the leakage state between the earphone and the ear canal has not changed.
  • the N sets of pre-stored filter parameters of the earphone correspond to the N types of leakage states in order to reflect the degree of sealing between the earphone and the human ear from high to low
  • the above-mentioned update module is specifically used to change the filter parameters of the earphone from the first
  • the group of filter parameters is updated to the third group of filter parameters, where the index of the first group of filter parameters in the pre-stored N groups of filter parameters is n, and the index of the third group of filter parameters is n-1; it is determined that the third group of earphones is applied
  • the filter parameter is used for noise reduction, the long-term energy ratio of the current frame
  • the index of the third set of filter parameters is The starting point is to reduce the index of the filter parameters one by one, until the earphone applies a set of filter parameters corresponding to the current index to reduce noise, the difference between the long-term
  • the earphone When the earphone applies the third group of filter parameters for noise reduction, and the long-term energy ratio of the current frame increases, the earphone’s filter parameters are updated from the third group of filter parameters to the fourth group of filter parameters.
  • the index of the parameter is n+1; and it is determined that when the earphone applies the fourth set of filter parameters for noise reduction, the long-term energy ratio of the current frame; if the long-term energy ratio of the current frame decreases, the index of the fourth set of filter parameters
  • the set of filter parameters corresponding to the current index is the second set of filter parameters.
  • the headset provided in the embodiment of the present application further includes a first signal acquisition module, a second signal acquisition module, and an acquisition module.
  • the first signal acquisition module is used to acquire the first signal through the error microphone of the earphone;
  • the second signal acquisition module is used to acquire the second signal through the reference microphone of the earphone;
  • the acquisition module is used to acquire the reverse direction of the speaker of the earphone. Noise signal.
  • the N sets of filter parameters pre-stored in the earphone correspond to the N types of leakage states that reflect the degree of sealing between the earphone and the human ear from high to low.
  • the detection module is specifically used to determine the second signal according to the first signal, the second signal, and the reverse noise signal.
  • the index of the first set of filter parameters in the pre-stored N sets of filter parameters is n
  • the index of a set of filter parameters corresponding to the target frequency response curve information is x
  • the set of filter parameters corresponding to the target frequency response curve information If the index x of and the index n of the first set of filter parameters satisfy
  • the above detection module is specifically configured to calculate the residual signal of the error microphone of the earphone according to the first signal and the second signal; and use the reverse noise signal as the reference signal to compare the residual signal of the error microphone. Perform adaptive filtering to obtain the current frequency response curve information of the secondary channel.
  • the headset provided in the embodiment of the present application further includes a third signal acquisition module and a determination module.
  • the third signal collection module is used to collect the third signal through the earphone's out-of-ear microphone.
  • the earphone's out-of-ear microphone may include a call microphone or a reference microphone; the determination module is used to determine whether the energy of the third signal is greater than the second preset energy threshold .
  • the above-mentioned update module is specifically configured to change the filter parameter of the earphone from when the energy of the third signal is greater than the second preset energy threshold or the energy of the second signal is greater than the third preset energy threshold.
  • the first set of filtering parameters is updated to the second set of filtering parameters.
  • the headset provided in the embodiment of the present application further includes a first signal acquisition module and an acquisition module.
  • the first signal collection module is used to collect the first signal through the error microphone of the earphone; the acquisition module is used to obtain the downlink signal of the earphone.
  • the N sets of pre-stored filter parameters in the earphone correspond to the N types of leakage states that reflect the degree of sealing between the earphone and the human ear from high to low.
  • the above detection module is specifically used to determine when the earphone has a downlink signal, according to the first signal and the downlink signal The current frequency response curve information of the secondary channel; and from the frequency response curve information of the N groups of secondary channels corresponding to the pre-stored N groups of filter parameters, determine the target frequency response curve that matches the current frequency response curve information of the secondary channel Information; where the index of the first group of filter parameters in the pre-stored N groups of filter parameters is n, the index of a group of filter parameters corresponding to the target frequency response curve information is x; and the group of filter parameters corresponding to the target frequency response curve information When the index of the filter parameter and the index of the first group of filter parameters satisfy
  • the aforementioned detection module is specifically configured to use the downlink signal as a reference signal to perform adaptive filtering on the first signal to obtain the current frequency response curve information of the secondary channel.
  • the above-mentioned update module is specifically configured to take the index n of the first group of filter parameters as a starting point, and adjust the index of the filter parameters from n to x one by one, and the group of filter parameters corresponding to index x is the second group. Filtering parameters.
  • an embodiment of the present application provides a headset.
  • the headset includes a memory and at least one processor connected to the memory.
  • the memory is used to store instructions. After the instructions stored in the memory are read by at least one processor, the above-mentioned first The method described in any one of the thirteen aspects and possible implementation manners thereof.
  • embodiments of the present application provide a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, any one of the above-mentioned thirteenth aspect and its possible implementation manners is described Methods.
  • embodiments of the present application provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the method described in the thirteenth aspect and any one of its possible implementation manners.
  • an embodiment of the present application provides a chip including a memory and a processor.
  • the memory is used to store computer instructions.
  • the processor is used to call and run the computer instructions from the memory to execute the method described in any one of the thirteenth aspect and its possible implementation manners.
  • FIG. 1 is a schematic diagram of an application scenario of an active noise reduction method provided by an embodiment of the application
  • FIG. 2 is a schematic diagram of the hardware of a semi-open active noise reduction headset provided by an embodiment of the application;
  • FIG. 3 is a schematic diagram of the hardware of a mobile phone provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of the processing flow of an active noise reduction method provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of hardware of a recording device provided by an embodiment of the application.
  • FIG. 6 is a schematic flow chart of modeling a secondary channel from a speaker to an error microphone according to an embodiment of the application
  • FIG. 7 is a schematic flow chart of modeling a secondary channel from a speaker to a tympanic microphone according to an embodiment of the application
  • FIG. 8 is a schematic diagram of a process for determining filter parameters according to an embodiment of the application.
  • FIG. 9 is a schematic diagram 1 of an active noise reduction method provided by an embodiment of this application.
  • FIG. 10 is a schematic diagram 1 of a method for determining a first set of filtering parameters according to an embodiment of this application;
  • FIG. 11 is a second schematic diagram of a method for determining a first set of filtering parameters according to an embodiment of this application.
  • FIG. 12 is a third schematic diagram of a method for determining a first set of filtering parameters according to an embodiment of this application.
  • FIG. 13 is a fourth schematic diagram of a method for determining a first set of filtering parameters according to an embodiment of this application.
  • FIG. 14 is a schematic diagram 5 of a method for determining a first set of filtering parameters according to an embodiment of this application;
  • FIG. 15 is a second schematic diagram of an active noise reduction method provided by an embodiment of this application.
  • FIG. 16 is a third schematic diagram of an active noise reduction method provided by an embodiment of this application.
  • FIG. 17 is the first schematic diagram of the display effect in the active noise reduction method provided by the embodiment of the application.
  • 18A is the second schematic diagram of the display effect in the active noise reduction method provided by the embodiment of this application.
  • 18B is the third schematic diagram of the display effect in the active noise reduction method provided by the embodiment of the application.
  • 19A is a fourth schematic diagram of the display effect in the active noise reduction method provided by an embodiment of the application.
  • 19B is the fifth schematic diagram of the display effect in the active noise reduction method provided by the embodiment of the application.
  • 20 is a sixth schematic diagram of the display effect in the active noise reduction method provided by an embodiment of the application.
  • 21A is a seventh schematic diagram of the display effect in the active noise reduction method provided by an embodiment of the application.
  • 21B is the eighth schematic diagram of the display effect in the active noise reduction method provided by the embodiment of this application.
  • FIG. 22 is a fourth schematic diagram of an active noise reduction method provided by an embodiment of this application.
  • FIG. 23A is a schematic diagram 9 of the display effect in the active noise reduction method provided by an embodiment of the application.
  • FIG. 23B is a tenth schematic diagram of the display effect in the active noise reduction method provided by the embodiment of the application.
  • FIG. 24 is a fifth schematic diagram of an active noise reduction method provided by an embodiment of this application.
  • FIG. 25 is a schematic diagram of the working principle of a semi-open active noise reduction headset provided by an embodiment of the application.
  • FIG. 26 is a schematic diagram 1 of a howling detection method provided by an embodiment of this application.
  • FIG. 27 is a second schematic diagram of a howling detection method provided by an embodiment of this application.
  • FIG. 28 is a schematic diagram of the working principle of howling detection and noise reduction processing provided by an embodiment of this application.
  • FIG. 29 is a schematic diagram of a clipping detection method provided by an embodiment of the application.
  • FIG. 30 is a schematic diagram of a working principle of clipping detection and noise reduction processing provided by an embodiment of this application.
  • FIG. 31 is a schematic diagram of a noise floor detection method provided by an embodiment of this application.
  • FIG. 32 is a schematic diagram of the working principle of noise floor detection and noise reduction processing provided by an embodiment of this application.
  • FIG. 33 is a schematic diagram of a wind noise detection method provided by an embodiment of the application.
  • FIG. 34 is a schematic diagram of the working principle of wind noise detection and noise reduction processing provided by an embodiment of this application.
  • FIG. 35 is a schematic diagram of a wind noise control state provided by an embodiment of this application.
  • FIG. 36 is a schematic diagram of filtering parameters corresponding to a wind noise control state according to an embodiment of the present application.
  • FIG. 37 is a sixth schematic diagram of a display effect in an active noise reduction method provided by an embodiment of the application.
  • FIG. 38 is a schematic diagram 7 of the display effect in an active noise reduction method provided by an embodiment of this application.
  • FIG. 39 is a first structural diagram of a headset provided by an embodiment of this application.
  • FIG. 40 is a schematic structural diagram of a terminal provided by an embodiment of this application.
  • FIG. 41 is a sixth schematic diagram of an active noise reduction method provided by an embodiment of this application.
  • FIG. 42 is a seventh schematic diagram of an active noise reduction method provided by an embodiment of this application.
  • FIG. 43 is an eighth schematic diagram of an active noise reduction method provided by an embodiment of this application.
  • FIG. 44 is a schematic diagram 9 of an active noise reduction method provided by an embodiment of this application.
  • FIG. 45 is a second structural diagram of a headset provided by an embodiment of the application.
  • first and second in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of objects.
  • first set of filter parameters, the second set of filter parameters, and the third set of filter parameters are used to distinguish different filter parameters, rather than to describe the specific order of the filter parameters.
  • words such as “exemplary” or “for example” are used as examples, illustrations, or illustrations. Any embodiment or design solution described as “exemplary” or “for example” in the embodiments of the present application should not be construed as being more preferable or advantageous than other embodiments or design solutions. To be precise, words such as “exemplary” or “for example” are used to present related concepts in a specific manner.
  • multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
  • embodiments of the present application provide an active noise reduction method and device, which are applied to a headset with active noise cancellation (ANC) function.
  • ANC active noise cancellation
  • the headset acquires the first
  • the first set of filter parameters is used for noise reduction.
  • the first set of filter parameters is one of the N 1 sets of filter parameters pre-stored in the earphone, and the N 1 sets of filter parameters are used for the N 1
  • Environmental sound noise reduction is performed in the leakage state, and the N 1 leakage states are formed by the earphone and N 1 different ear canal environments.
  • the active noise reduction method provided by the embodiments of the present application can determine a set of filter parameters matching the current leakage state according to the user's ear canal environment and the leakage state formed by the earphone when the user wears the earphone, and perform processing based on the set of filter parameters.
  • Environmental sound noise reduction can meet the user's personalized noise reduction needs and improve the noise reduction effect.
  • the active noise reduction method provided in the embodiments of the present application may be applied to earphones that have sound leakage with the user's ear canal.
  • sound leakage refers to the fact that after the user wears the earphone, the earphone and the user’s ear canal cannot fit closely, there is a gap between the user’s ear canal and the earphone, which causes sound leakage, and different human ear characteristics and different wearing postures , There will be differences in leakage.
  • the active noise reduction method provided by the embodiments of the present application can be applied to semi-open active noise reduction (the sound outlet of the semi-open active noise reduction earphone does not have a rubber sleeve, so that there is a gap between the earphone and the ear canal).
  • the earphone is a semi-open type active noise reduction earphone as an example for description.
  • FIG. 1 is a schematic diagram of an application scenario of the active noise reduction method provided by an embodiment of the application.
  • the semi-open active noise reduction earphone 101 and the electronic device 102 communicate through wired transmission or wireless transmission.
  • the semi-open active noise reduction earphone 101 and the electronic device 102 communicate through Bluetooth for communication, or communication through other wireless networks.
  • the embodiment of the present application relates to the transmission of audio data and control signaling between the semi-open active noise reduction earphone 101 and the electronic device 102.
  • the electronic device 102 sends the audio data to the semi-open active noise reduction earphone 101 for playback.
  • the electronic device 102 sends control signaling to the semi-open active noise reduction earphone 101 to control the working mode of the semi-open active noise reduction earphone 101 and so on.
  • the electronic device 102 in FIG. 1 can be an electronic device such as a mobile phone, a computer (such as a laptop computer, a desktop computer), a tablet computer (a handheld tablet computer, a car-mounted tablet computer), and the electronic device 102 can also be other terminal devices. , Such as smart speakers, car speakers, etc.
  • the embodiment of the present application does not limit the specific type and structure of the electronic device 102.
  • the semi-open type active noise reduction earphone provided in the embodiment of the present application may be wired or wireless, which is not limited.
  • the following describes the hardware structure of the semi-open active noise reduction headset in combination with the wearing form of the semi-open active noise reduction headset in the human ear.
  • the semi-open active noise reduction headset includes a speaker (speaker) 201 and micro-processing A micro control unit (MCU) 202, an ANC chip 203, a memory 204, and multiple microphones.
  • the multiple microphones may include a reference microphone 205, a call microphone 206, and an error microphone 207.
  • the speaker 201 is used to play a downstream signal (music or voice).
  • the speaker 201 is also used to play a reverse noise signal (can be referred to as ANTI signal for short).
  • ANTI signal can be referred to as ANTI signal for short.
  • MCU microprocessor
  • the ANC chip 203 is used to reduce the noise of the ambient sound, specifically, to process the signals collected by the reference microphone 205 and the error microphone 207 to generate a reverse noise signal to reduce the noise signal in the user's ear canal.
  • the memory 204 is used to store multiple sets of filter parameters (also called ANC parameters).
  • a set of filter parameters includes filter parameters corresponding to the feedforward path (also called FF coefficients), and filter parameters corresponding to the feedback path (also called ANC parameters).
  • FB coefficients) and the filter parameters (SPE coefficients) corresponding to the downlink compensation path for example, N 1 sets of filter parameters and N 2 sets of filter parameters in the embodiment of the present application are stored.
  • the microprocessor 202 determines the set of filter parameters from a first set of filter parameters N 1, the first set of filtering parameters read from memory 204, and the first set of filter parameters Write to the ANC chip 203, so that the ANC chip 203 processes the audio signal collected by the related microphone based on the first set of filter parameters to generate a reverse noise signal.
  • the reference microphone 205 is used to collect external environmental noise.
  • the call microphone 206 is used to collect the user's voice signal when the user is in a call.
  • the error microphone 207 is used to collect noise signals in the ear canal of the user.
  • the semi-open active noise reduction earphone may also include other elements, such as a proximity light sensor, which is used to detect whether the semi-open active noise reduction earphone is in the ear.
  • the semi-open active noise reduction headset is a wireless headset
  • the semi-open active noise reduction headset may also include a wireless communication module, and the wireless communication module may be a wireless local area network (WLAN) (such as a Wi-Fi network). ) Module or Bluetooth (bluetooth, BT) module.
  • the Bluetooth module is used for the semi-open active noise reduction headset to communicate with other devices via Bluetooth.
  • the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the semi-open active noise reduction earphones.
  • the semi-open active noise reduction earphones may include more Or fewer parts, or combine some parts, or split some parts, or arrange different parts.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • FIG. 3 is a schematic diagram of the hardware structure of a mobile phone according to an embodiment of the application.
  • the mobile phone 300 includes a processor 310, a memory (including an external memory interface 320 and an internal memory 321), a universal serial bus (USB) interface 330, a charging management module 340, and a power management module 341, Battery 342, antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, audio module 370, speaker 370A, receiver 370B, microphone 370C, earphone interface 370D, sensor module 380, buttons 390, motor 391, indicator 392, Camera 393, display 394, subscriber identification module (SIM) card interface 395, etc.
  • SIM subscriber identification module
  • the sensor module 380 may include a gyroscope sensor 380A, an acceleration sensor 380B, an ambient light sensor 380C, a depth sensor 380D, a magnetic sensor, a pressure sensor, a distance sensor, a proximity light sensor, a heart rate sensor, an air pressure sensor, a fingerprint sensor, a temperature sensor, Touch sensor, bone conduction sensor, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 300.
  • the mobile phone 300 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 310 may include one or more processing units.
  • the processor 310 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video or audio codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit, NPU) and so on.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video or audio codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit NPU
  • the controller may be the nerve center and command center of the mobile phone 300.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
  • a memory may also be provided in the processor 310 to store instructions and data.
  • the memory in the processor 310 is a cache memory.
  • the memory can store instructions or data that the processor 310 has just used or used cyclically. If the processor 310 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 310 is reduced, and the efficiency of the system is improved.
  • the processor 310 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter/receiver (universal asynchronous) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter/receiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 310 may include multiple sets of I2C buses.
  • the processor 310 may couple the touch sensor, the charger, the flash, the camera 393, etc., respectively through different I2C bus interfaces.
  • the processor 310 may couple the touch sensor through an I2C interface, so that the processor 310 and the touch sensor 3 communicate through the I2C bus interface to implement the touch function of the mobile phone 300.
  • the I2S interface can be used for audio communication.
  • the processor 310 may include multiple sets of I2S buses.
  • the processor 310 may be coupled with the audio module 370 through an I2S bus to implement communication between the processor 310 and the audio module 370.
  • the audio module 370 may transmit audio signals to the wireless communication module 360 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 370 and the wireless communication module 360 may be coupled through a PCM bus interface.
  • the audio module 370 may also transmit audio signals to the wireless communication module 360 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 310 and the wireless communication module 360.
  • the processor 310 communicates with the Bluetooth module in the wireless communication module 360 through the UART interface to realize the Bluetooth function.
  • the audio module 370 may transmit audio signals to the wireless communication module 360 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 310 with the display screen 394, the camera 393 and other peripheral devices.
  • the MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and so on.
  • the processor 310 and the camera 393 communicate through a CSI interface to implement the shooting function of the mobile phone 300.
  • the processor 310 and the display screen 394 communicate through a DSI interface to realize the display function of the mobile phone 300.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 310 with the camera 393, the display 394, the wireless communication module 360, the audio module 370, the sensor module 380, and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the mobile phone 300.
  • the mobile phone 300 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 340 is used to receive charging input from the charger.
  • the power management module 341 is used to connect the battery 342, the charging management module 340 and the processor 310.
  • the power management module 341 receives input from the battery 342 and/or the charge management module 340, and supplies power to the processor 310, the internal memory 321, the display screen 394, the camera 393, and the wireless communication module 360.
  • the power management module 341 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the wireless communication function of the mobile phone 300 can be realized by the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the mobile phone 300 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 350 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied on the mobile phone 300.
  • the mobile communication module 350 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like.
  • the mobile communication module 350 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 350 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 350 may be provided in the processor 310.
  • at least part of the functional modules of the mobile communication module 350 and at least part of the modules of the processor 310 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the application processor outputs a sound signal through an audio device (not limited to a speaker 370A, a receiver 370B, etc.), or displays an image or video through the display screen 394.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 310 and be provided in the same device as the mobile communication module 350 or other functional modules.
  • the wireless communication module 360 can provide applications on the mobile phone 300 including wireless local area networks (wireless local area networks, WLAN) (such as Wi-Fi networks), Bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS) , Frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 360 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 360 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 310.
  • the wireless communication module 360 may also receive the signal to be sent from the processor 310, perform frequency modulation, amplify it, and convert it into electromagnetic waves and radiate it through the antenna 2.
  • the antenna 1 of the mobile phone 300 is coupled with the mobile communication module 350, and the antenna 2 is coupled with the wireless communication module 360, so that the mobile phone 300 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (LTE), new radio (New Radio, NR) ), BT, GNSS, WLAN, NFC, FM, and/or IR technology, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • CDMA code division multiple access
  • WCDMA broadband Code division multiple access
  • time division code division multiple access time-division code division multiple access
  • TD-SCDMA time-division code division multiple access
  • LTE long term evolution
  • New Radio, NR new radio
  • BT
  • the mobile phone 300 implements a display function through a GPU, a display screen 394, and an application processor.
  • the GPU is an image processing microprocessor, which is connected to the display screen 394 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering. In the embodiment of the present application, the GPU can be used for three-dimensional model rendering and virtual-real superposition.
  • the processor 310 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 394 is used to display images, videos, and the like. In the embodiment of the present application, the display screen 394 may be used to display the virtual superimposed image.
  • the display screen 394 includes a display panel.
  • the display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active matrix organic light-emitting diode active-matrix organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the mobile phone 300 may
  • the mobile phone 300 can realize a shooting function through an ISP, a camera 393, a video codec, a GPU, a display screen 394, and an application processor.
  • the ISP is used to process the data fed back by the camera 393. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 393.
  • the camera 393 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the mobile phone 300 may include one or N cameras 393, and N is a positive integer greater than one.
  • the digital signal processor is used to process digital signals, such as processing digital image signals or digital audio signals, and can also process other digital signals. For example, when the mobile phone 300 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video or audio codecs are used to compress or decompress digital video or audio.
  • the mobile phone 300 can support one or more audio codecs, for example, the advanced audio distribution profile (A2DP) default SBC, and the moving picture experts group (moving picture experts group, MPEG) advanced audio coding (advanced) audio coding, AAC) series of encoders, etc. In this way, the mobile phone 300 can play or record audio in multiple encoding formats.
  • A2DP advanced audio distribution profile
  • MPEG moving picture experts group
  • AAC advanced audio coding
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • applications such as intelligent cognition of the mobile phone 300 can be implemented, such as image recognition, face recognition, voice recognition, text understanding, action generation, and so on.
  • the external memory interface 320 may be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the mobile phone 300.
  • the external memory card communicates with the processor 310 through the external memory interface 320 to realize the data storage function.
  • the internal memory 321 may be used to store computer executable program code, where the executable program code includes instructions.
  • the internal memory 321 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function, and the like.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the mobile phone 300.
  • the internal memory 321 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • the processor 310 executes various functional applications and data processing of the mobile phone 300 by running instructions stored in the internal memory 321 and/or instructions stored in a memory provided in the processor.
  • the mobile phone 300 can implement audio functions through the audio module 370, the speaker 370A, the receiver 370B, the microphone 370C, the earphone interface 370D, and the application processor. For example, music playback, recording, etc.
  • the audio module 370 is used to convert digital audio information into an analog audio signal for output, and also used to convert an analog audio input into a digital audio signal.
  • the audio module 370 can also be used to encode and decode audio signals.
  • the speaker 370A also called a "speaker" is used to convert audio electrical signals into sound signals.
  • the mobile phone 300 can listen to music through the speaker 370A, or listen to a hands-free call.
  • the receiver 370B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the mobile phone 300 answers a call or a voice message, it can receive the voice by bringing the receiver 370B close to the human ear.
  • Microphone 370C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 370C through the human mouth, and input the sound signal to the microphone 370C.
  • the mobile phone 300 can be provided with at least one microphone 370C.
  • the mobile phone 300 may be provided with two microphones 370C, in addition to collecting sound signals, it may also implement a noise reduction function (the noise reduction function microphone is a feedback microphone).
  • the mobile phone 300 may also be provided with three, four or more microphones 370C to collect sound signals, reduce noise, identify the source of sound, and realize the function of directional recording.
  • the gyroscope sensor 380A can be used to determine the movement posture of the mobile phone 300.
  • the angular velocity of the mobile phone 300 around three axes ie, x, y, and z axes
  • the gyroscope sensor 380A can be determined by the gyroscope sensor 380A.
  • the acceleration sensor 380B can detect the movement direction and movement acceleration of the mobile phone 300. When the mobile phone 300 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the mobile phone 300, and is used in applications such as horizontal and vertical screen switching, pedometers, and so on.
  • the ambient light sensor 380C is used to sense the brightness of the ambient light.
  • the mobile phone 300 can adaptively adjust the brightness of the display screen 394 according to the perceived brightness of the ambient light.
  • the ambient light sensor 380C can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 380C can also cooperate with the proximity light sensor to detect whether the mobile phone 300 is in the pocket to prevent accidental touch.
  • the depth sensor 380D is used to determine the distance from each point on the object to the mobile phone 300.
  • the depth sensor 380D may collect depth data of the target object to generate a depth map of the target object. Wherein, each pixel in the depth map represents the distance from the point on the object corresponding to the pixel to the mobile phone 300.
  • the indicator 392 may be an indicator light, which may be used to indicate the charging status, power change, and may also be used to indicate messages, missed calls, notifications, and so on.
  • the button 390 includes a power-on button, a volume button, and so on.
  • the button 390 may be a mechanical button. It can also be a touch button.
  • the motor 391 can generate vibration prompts.
  • the indicator 392 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 395 is used to connect to the SIM card.
  • the SIM card can be connected to and separated from the mobile phone 300 by inserting into the SIM card interface 395 or pulling out from the SIM card interface 395.
  • a set of filter parameters includes filter parameters corresponding to the feedforward path, filter parameters corresponding to the feedback path, and filter parameters corresponding to the downstream compensation path.
  • the above-mentioned ANC chip 203 respectively processes the sound signals of the feedforward path, the feedback path, and the downstream compensation path based on the filter parameters, so as to realize active noise reduction.
  • the feedforward path, the feedback path, and the downstream compensation path are briefly introduced in combination with the processing flowchart described in FIG. 4.
  • Feedforward path refers to the path for processing the sound signal collected by the reference microphone.
  • the filter parameters corresponding to the feedforward path are related to the signal processing method in the feedforward path.
  • the feedforward path includes gain processing and biquad filtering. Processing, limiting processing, etc., the filter parameters corresponding to the feedforward path may include the gain of the feedforward path, the parameters of the biquad filter in the feedforward path, and the parameters of the limiter.
  • Feedback path refers to the path for processing the sound signal collected by the error microphone.
  • the filter parameter corresponding to the feedback path is also related to the signal processing method in the feedback path.
  • the filter parameter corresponding to the feedback path may include the feedback path. The gain, the parameters of the biquad filter in the feedback path, the parameters of the limiter, etc.
  • Downstream compensation path refers to the path for processing downstream signals (music played by users, etc.).
  • the filtering parameters corresponding to the downstream compensation path may include the gain of the downstream compensation path and the parameters of the downstream compensation filter.
  • the signal after processing the downstream signal through the downstream compensation path is used as an input signal of the feedback path, thereby passing through the feedback path Process the signal collected by the error microphone and the processed downstream signal to obtain the reverse noise signal of the feedback path; and process the sound signal collected by the reference microphone through the feedforward path to obtain the reverse noise signal of the feedforward path; The directional noise signal of the feedforward path and the reverse noise signal of the feedback path are summed to obtain a reverse noise signal.
  • the leakage state is formed by the earphone and different ear canal environments, the ear canal environment and the user’s ear canal characteristics (referring to the physiological characteristics of the ear canal, such as the width and shape of the ear canal) and the user
  • the posture of wearing the headset is related.
  • different ear canal environments may include: ear canal environments formed by earphones at different positions of the ear canal of the same user, ear canal environments formed by earphones at the same position of the ear canals of different users, or a combination of these two situations.
  • the application examples are not limited.
  • the ear canal can be divided into a small ear canal, a middle ear canal, a large ear canal, and so on.
  • a semi-open active noise reduction headset for users with small ear canals, the degree of sealing between the headset and the ear canal is better, and the sound played by the earphone leaks less, that is, the sound played by the earphone leaks less;
  • the degree of sealing between the earphone and the ear canal is poor (there is a gap between the earphone and the ear canal), the sound played by the earphone leaks more, and the degree of sound leakage is relatively large.
  • the degree of leakage of the sound played by the earphone is also related to the posture of the user wearing the earphone.
  • the earphone may be located at different positions of the ear canal, and the degree of leakage may be different.
  • the leakage state can reflect the degree of sealing between the earphone and the user's ear canal. The smaller the degree of leakage, the better the degree of sealing between the earphone and the user's ear canal, and the less likely it is for sound to leak.
  • Howling A phenomenon in which the amplitude or energy of a single-frequency sound signal suddenly increases from small.
  • the howling of a semi-open active noise reduction headset may be caused by actions such as the headset being squeezed or the user quickly changing the wearing posture of the headset ,
  • the sound signal emitted during howling is called howling noise. Howling can cause discomfort to the user and interfere with the playback of the downlink signal, which seriously affects the audio playback effect.
  • Clipping is a phenomenon in which a low-frequency signal overflows to produce crackling noise.
  • the crackling produced is claimed as clipping noise.
  • clipping noise Generally, when there is a sudden low-frequency noise in the environment, clipping will occur, such as a large bump of a vehicle, and a large-scale low-frequency noise during an airplane landing.
  • Noise floor the background noise.
  • the noise floor can also be called background noise.
  • the noise floor is the noise caused by the performance limitations of the equipment's hardware (such as the circuit in the earphone or other components), such as the TV sound except for the program sound The rustle and so on.
  • the noise floor In a noisy environment, the noise floor is generally not perceivable (heard) by the user. When the environment is quiet, the user can perceive the noise floor. Excessive background noise will not only make people irritable, but also drown out the weaker details in the sound.
  • Wind noise It is the whirring sound generated when there is wind in the environment. Wind noise affects the normal use of headphones. And because the direction of wind noise is relatively random, the impact of wind noise on the user's ears is different, that is, the left and right ears have different hearing perceptions under the influence of wind noise.
  • the active noise reduction method provided in the embodiment of the present application includes three stages, which are specifically as follows:
  • the first stage the design process of N 1 sets of filter parameters.
  • the second stage for a specific user, the process of determining a set of filtering parameters suitable for the user.
  • the third stage After determining a set of filtering parameters for the user, in the process of using the set of filtering parameters to reduce noise, the process of detecting abnormal noise and updating the filtering parameters. Or, after a set of filter parameters are determined for the user, during the process of using the earphone, the wearing posture of the earphone changes and the filter parameter is updated.
  • the first stage the design process of N 1 sets of filter parameters.
  • the filters of the feedforward path, the feedback path, and the downstream compensation path may be FIR filters or IIR filters.
  • the following embodiments, to passage of said feedforward filter, the feedback path and the downlink path is an FIR filter to compensate an example method for generating a set of filter parameters N 1.
  • the recording apparatus 500 comprises a semi-open active noise reduction headset 501, the tympanic membrane microphone 502, ANC circuit board 503 and computing device 504 .
  • the hardware structure of the semi-open active noise reduction earphone 501 is the same as the structure of the semi-open active noise reduction earphone shown in FIG. .
  • the reference microphone, error microphone, and speaker of the semi-open active noise reduction headset 501 are respectively connected to the ANC circuit board 503, and the tympanic membrane microphone 502 is also connected to the ANC circuit board 503.
  • the ANC circuit board 503 uses the integrated chip digital audio transmission interface (IIS ) Is connected to the computing device 504.
  • IIS integrated chip digital audio transmission interface
  • the signals of the reference microphone, error microphone, speaker, and tympanic microphone are sent to the computing device 504 through the ANC circuit board 503 to complete the recording, and then the computing device 504 processes the recorded signals to generate N 1 sets of filter parameters, and subsequently, the N 1 sets of filter parameters are pre-stored in the memory of the semi-open active noise reduction headset.
  • the foregoing N 1 set of filter parameters are obtained by processing signals recorded in N 1 ear canal environments based on the foregoing recording device.
  • the N 1 filter parameters are determined according to the recording signal of the secondary channel SP mode and the recording signal of the primary channel PP mode.
  • the recording signal of the SP mode includes the downlink signal, the signal of the tympanic membrane microphone and the signal of the error microphone of the semi-open active noise reduction headset;
  • the recording signal of the PP mode includes the signal of the tympanic membrane microphone and the error microphone of the semi-open active noise reduction headset Signal and the signal of the reference microphone.
  • the process of generating a set of filtering parameters includes step 601 to step 609.
  • Step 601 When there is a downlink signal, obtain the downlink signal of the loudspeaker, the signal of the error microphone, and the signal of the eardrum microphone.
  • Step 602 When there is no downlink signal, obtain the signal of the reference microphone, the signal of the error microphone, and the signal of the eardrum microphone.
  • the signal collected in step 601 can be used for secondary channel modeling.
  • the recording process with downlink signals in step 601 is referred to as secondary channel (SP) mode for short.
  • the signal collected in step 602 can be used for primary channel modeling.
  • the recording process without downlink signal in step 602 is simply referred to as the primary channel (PP) mode.
  • Step 603 Perform secondary channel modeling according to the downlink signal obtained in step 601, the signal of the error microphone, and the signal of the tympanic microphone, to obtain filter parameters corresponding to the downlink compensation path.
  • the secondary channel modeling includes the modeling of the secondary channel from the speaker to the error microphone and the modeling of the secondary channel from the speaker to the tympanic microphone.
  • Step 604 Combining the secondary channel model from the speaker to the error microphone and the secondary channel model from the speaker to the tympanic microphone, and the signal obtained in the PP mode, determine the filter parameter corresponding to the feedforward path and the filter parameter corresponding to the feedback path.
  • Fig. 6 is a schematic diagram of the process of modeling the secondary channel from the speaker to the error microphone.
  • the process of modeling the secondary channel from the speaker to the error microphone includes steps 6031a to 6031d.
  • Step 6031a Filter the downlink signal through the first filter.
  • the first filter is an FIR filter
  • the parameters of the first filter can be a preset set of parameters, or all of them can be set to 0, or a set of randomly generated parameters.
  • the application examples are not limited.
  • Step 6031b Superimpose the signal of the error microphone acquired in the SP mode with the inverted signal of the filtered downlink signal to obtain the residual signal of the error microphone.
  • Step 6031c Perform framing processing on the residual signal of the error microphone and perform Fourier transform; perform framing processing on the downlink signal and perform Fourier transform.
  • Step 6031d Use the above-mentioned Fourier transformed downlink signal as a reference signal, and use the Fourier transformed residual signal as an error, and process it through the normalized least mean square (NLMS) algorithm, and perform the inverse Fourier transform of the processing result.
  • the inner transform, the result of the inverse Fourier transform is the parameter of the first filter.
  • the parameters of the first filter obtained in step 6031d are used to update the parameters of the first filter initialized in step 6031a, and steps 6031a to 6031d are repeated, and finally it will converge (referring to the residual error of the error microphone).
  • the model of the first filter for signal convergence is the model of the secondary channel from the speaker to the error microphone.
  • the parameters of the converged set of filters are used as the filter parameters corresponding to the downlink compensation path.
  • FIG. 7 is a schematic diagram of the process of modeling the secondary channel from the speaker to the tympanic microphone.
  • the process of modeling the secondary channel from the speaker to the tympanic microphone includes steps 6032a to 6032d.
  • Step 6032a Filter the downlink signal through the second filter.
  • the second filter is an FIR filter
  • the parameters of the second filter can be a preset set of parameters, or all of them can be set to 0, or a set of randomly generated parameters.
  • the application examples are not limited.
  • Step 6021b Superimpose the signal of the eardrum microphone acquired in the SP mode with the inverted signal of the filtered downlink signal to obtain the residual signal of the eardrum microphone.
  • Step 6031c Perform framing processing on the residual signal of the tympanic membrane microphone and perform Fourier transform; perform framing processing on the downlink signal and perform Fourier transform.
  • Step 6031d Use the above-mentioned Fourier transformed downlink signal as a reference signal, and use the Fourier transformed residual signal as an error, and process it through the normalized least mean square (NLMS) algorithm, and perform the inverse Fourier transform of the processing result.
  • the inner transform, the result of the inverse Fourier transform is the parameter of the second filter.
  • the parameters of the second filter obtained in step 6032d are used to update the parameters of the second filter initialized in step 6032a, and steps 6032a to 6032d are repeated, and finally it will converge (referring to the residual error of the tympanic microphone
  • the model of the second filter for signal convergence is the model of the secondary channel from the speaker to the tympanic microphone.
  • FIG. 8 is a schematic flowchart of determining the filter parameters corresponding to the feedforward path and the filter parameters corresponding to the feedback path.
  • determining the filter parameters corresponding to the feedforward path and the filter parameters corresponding to the feedback path specifically includes steps 6041a to 6041i.
  • Step 6041a Filter the signal of the reference microphone acquired in the PP mode through the filter of the feedforward path to obtain the reverse noise signal of the feedforward path (denoted as the AntiFF signal).
  • the parameters of the filter of the feedforward path are a set of initialized parameters.
  • the parameters of the filter of the feedforward path may be a preset set of parameters, or The parameters of the filter of the feed path are all set to 0, or a set of parameters generated randomly, which is not limited in the embodiment of the present application.
  • Step 6041b Process the residual signal of the error microphone through the filter of the feedback path to obtain the reverse noise signal of the feedback path (denoted as the AntiFB signal).
  • the residual signal of the error microphone in step 6041b is the reverse noise signal at the previous moment (denoted as the Anti signal).
  • the processing result of the secondary channel model from the speaker to the error microphone is inverted and then the PP mode is reversed.
  • the sum of the signals of the error microphone obtained below.
  • the Anti signal at the previous time is the sum of the AntiFF signal at the previous time and the AntiFB signal at the previous time at the previous time.
  • the AntiFF signal in step 6041c and step 6041a is superimposed (ie summed) with the AntiFB signal in step 6041b to obtain a reverse noise signal (ie Anti signal).
  • the Anti signal is processed by the secondary channel model from the speaker to the eardrum microphone. Inverted and superimposed with the signal of the tympanic microphone in the PP mode to obtain the residual signal of the tympanic microphone.
  • Step 6041d the signal of the reference microphone in the PP mode is processed by the secondary channel model from the speaker to the tympanic microphone.
  • Step 6041e Perform framing processing on the processing result of Step 6041d and perform Fourier transform; perform framing processing on the residual signal of the eardrum microphone and perform Fourier transform.
  • Step 6041f use the Fourier transformed signal in step 6041e (referring to the signal obtained by framing and Fourier transformation of the processing result of step 6041d) as a reference signal, and use the Fourier transformed signal in step 6041e
  • the residual signal of the tympanic microphone is used as an error, processed by the normalized least mean square (NLMS) algorithm, and the processing result is subjected to inverse Fourier transform.
  • the result of the inverse Fourier transform is the filter of the feedforward path Parameters.
  • Step 6041g the residual signal of the error microphone is processed by the secondary channel model from the speaker to the error microphone.
  • Step 6041h Perform framing processing on the processing result of Step 6041g and perform Fourier transform; perform framing processing on the residual signal of the eardrum microphone and perform Fourier transform.
  • Step 6041i Use the Fourier-transformed signal in step 6041h (referring to the signal obtained by framing and Fourier-transforming the processing result of step 6041g) as a reference signal, and use the Fourier-transformed signal in step 6041h
  • the residual signal of the tympanic membrane microphone is used as the error, processed by the normalized least mean square (NLMS) algorithm, and the processing result is subjected to inverse Fourier transform.
  • the result of the inverse Fourier transform is the filter of the feedback path. parameter.
  • the parameters of the filter of the feedforward path obtained in step 6041f are used to update the parameters of the filter of the initialized feedforward path
  • the parameters of the filter of the feedback path obtained in step 6041i are used to update the filter of the initialized feedback path.
  • the parameters of the filter; and repeat steps 6041a to 6041i, and finally the parameters of the convergent filter are used as the filter parameters and the feedback path corresponding to the feedforward path Corresponding filtering parameters.
  • N 1 sets of filter parameters are obtained by processing the recording signals corresponding to N 1 different ear canal environments, and the N 1 sets of filter parameters are stored in the memory of the semi-open active noise reduction headset . It should be understood that the N 1 group of filter parameters are used for noise reduction of ambient sound under N 1 leakage states, and has universal applicability, meeting the individual needs of different people.
  • the N 1 sets of filter parameters are used as alternative filter parameters for selection.
  • the second stage for a specific user, the process of determining a set of filtering parameters suitable for the user.
  • an embodiment of the present application provides an active noise reduction method, which is applied to a headset with ANC function (for example, the semi-open active noise reduction headset shown in FIG. 1), and the active noise reduction method includes the steps 901 to step 902.
  • Step 901 when the headset is in the ANC operation mode, the headset obtaining first set of filter parameters, the filter parameters are first set of N 1 set of filter parameters prestored in the headphone set, the N 1 group of filter parameters for each N 1 type of leakage state for environmental sound noise reduction.
  • N 1 leakage state is formed by the earphone and N 1 different ear canal environments.
  • the noise reduction effect of the earphone when the first set of filter parameters is applied is better than
  • the leakage state is formed by the earphone and different ear canal environments.
  • the ear canal environment is related to the characteristics of the user’s ear canal and the posture of the user wearing the earphone. Different ear canal characteristics and different postures of wearing the earphone are related.
  • the combination can form a variety of ear canal environments and also correspond to a variety of leakage conditions.
  • the above-described N 1 expression status may leak Species Species N 1 with the fit range of the human ear headphones, earphone N 1 can be expressed with the degree of sealing of the human ear; any leak condition is not specific to a particular headphone
  • the wearing state is based on a large number of statistics based on the impedance characteristics of the leakage state, and the typical or differentiated leakage scenarios are obtained.
  • the wearing state of the earphone corresponds to an ear canal environment, thereby forming a leakage state.
  • the wearing state of the earphone is different due to the characteristics of the user's ear canal and the posture of the user wearing the earphone.
  • the current wearing state of the earphone corresponds to a stable ear canal environment, that is, to a stable ear canal feature and wearing posture.
  • the noise reduction effect of the above N 1 filter parameters when applied to the earphone varies with the wearing state of the earphone.
  • the first set of filter parameters mentioned above is that the N 1 filter parameters are applied to the same environmental sound in the current wearing state of the earphone. When noise reduction, a set of filtering parameters with the best noise reduction effect.
  • the environmental noise is the noise formed by the external environment in the ear canal of the user.
  • the environmental noise includes background noise in different scenes, such as high-speed rail scenes, office scenes, airplane flight scenes, etc., which are not limited in the embodiments of the present application.
  • a set of filter parameters includes filter parameters (FF coefficients) corresponding to the feedforward path, filter parameters (FB coefficients) corresponding to the feedback path, and filter parameters (SPE coefficients) corresponding to the downstream compensation path.
  • FF coefficients filter parameters
  • FB coefficients filter parameters
  • SPE coefficients filter parameters
  • the above-mentioned first set of filtering parameters may be determined by the user based on a subjective test of the terminal, or determined by the terminal or determined by the parameter matching algorithm executed by the headset. Based on this, the earphone acquiring the first group of filter parameters includes the earphone acquiring the first group of filter parameters from the terminal or the earphone determining the first group of filter parameters. The specific details will be detailed in the following embodiments.
  • Step 902 The earphone uses the first set of filter parameters to reduce noise.
  • using the first set of filter parameters to perform noise reduction specifically includes: using the first set of filter parameters to process the sound signal collected by the reference microphone of the headset and the sound signal collected by the error microphone of the headset to generate Reverse noise signal, the reverse noise signal can attenuate part of the environmental noise signal in the ear canal, thereby weakening the noise signal in the user's ear canal, and realizing the noise reduction of the environmental sound.
  • the active noise reduction method can determine a set of filter parameters (that is, the current wearing state) that matches the current leakage state (also can be understood as the current wearing state) according to the user's ear canal environment and the leakage state formed by the earphone when the user wears the earphone.
  • the above-mentioned first set of filter parameters), and the environmental sound noise reduction based on this set of filter parameters can meet the user's personalized noise reduction needs and improve the noise reduction effect.
  • the terminal when said first set of filter parameters is obtained from a terminal, the terminal is determined by a set of filter parameters N 1 from the first set of filter parameters, and headset transmit indication information to indicate that the first set of filter parameter.
  • the earphone executes a matching algorithm to determine the first set of filter parameters. Specifically, it includes the following steps 1001 to 1004, or steps 1101 to 1105, or steps 1201 to 1204, or steps 1301 to 1304, or steps 1401 to 1403.
  • a first set of filter parameters to determine the headset 10 from N 1 set of filter parameters comprises the step 1001 to step 1004.
  • Step 1001 Collect the first signal through the error microphone of the earphone, and obtain the downlink signal of the earphone.
  • Step 1002 Determine current frequency response curve information of the secondary channel according to the first signal and the downlink signal.
  • the frequency response of the secondary channel is the ratio of the frequency spectrum (ie amplitude) of the first signal after Fourier transformation to the frequency spectrum of the downlink signal after Fourier transformation.
  • the frequency response curve information is a curve describing the changing trend of the ratio between the frequency spectrum of the first signal after Fourier transformation and the frequency spectrum of the downlink signal after Fourier transformation.
  • the above downlink signal may be a test audio signal (for example, playing a customized music signal online), and the frequency response curve of the secondary channel can be obtained by testing in the frequency range of 100 Hz (Hz)-500 Hz.
  • the frequency range may also be other frequency ranges, which are specifically determined according to actual requirements, and are not limited in the embodiment of the present application.
  • Step 1003 Determine the target frequency response curve information matching the current frequency response curve information from the preset frequency response curve information of multiple sets of secondary channels.
  • the frequency response curve information of the above-mentioned preset multiple sets of secondary channels is for different users in offline testing (specifically refers to users with different ear canal characteristics, such as large ear canal, middle ear canal, or small ear canal. )
  • the frequency response curve information of the secondary channel, and the test frequency range is also 100Hz-500Hz.
  • the quantity of the frequency response curve information of the above-mentioned preset multiple sets of secondary channels can be determined according to actual conditions, which is not limited in the embodiment of the present application.
  • the frequency response curve information of the above-mentioned preset multiple sets of secondary channels The number is 9, and the frequency response curves of the 9 groups of secondary channels are frequency response curves that can reflect different ear canal characteristics.
  • Step 1004 Determine a group of filter parameters corresponding to the target frequency response curve information as the first group of filter parameters.
  • the aforementioned N 1 sets of filter parameters correspond to the frequency response curve information of the N 1 secondary channels.
  • the method determines the headset from the first set of filter parameters N 1 set of filter parameters comprises the step 1101 to step 1105.
  • Step 1101 Collect the first signal through the error microphone of the headset, collect the second signal through the reference microphone of the headset, and acquire the downlink signal of the headset.
  • Step 1102 Determine a residual signal of the error microphone based on the first signal and the second signal.
  • the short-time Fourier transform is performed on the first signal and the second signal respectively, and then the Fourier-transformed second signal is used as the reference signal, and the Fourier-transformed first signal is used as the target signal.
  • Kalman filtering and normalized least mean square (NLMS) filtering are used to obtain the residual signal of the error microphone. It should be understood that the residual signal of the error microphone is the frequency spectrum (that is, the amplitude) of the residual signal.
  • Step 1103 Determine the current frequency response curve information of the secondary channel according to the residual signal of the error microphone and the downlink signal.
  • the current frequency response of the secondary channel is the ratio of the frequency spectrum of the residual signal of the error microphone to the frequency spectrum of the downlink signal after Fourier transform
  • the current frequency response curve of the secondary channel describes the error microphone The curve of the change trend of the ratio between the frequency spectrum of the residual signal and the frequency spectrum of the downlink signal after Fourier transform.
  • the current frequency response curve of the secondary channel may be time-linearly recursively smoothed to remove abnormal points or noise points on the frequency response curve.
  • Step 1104 Determine the target frequency response curve information matching the current frequency response curve information from the frequency response curve information of the multiple preset groups of secondary channels.
  • Step 1105 Determine a group of filter parameters corresponding to the target frequency response curve information as the first group of filter parameters.
  • the N 1 sets of filter parameters correspond to the frequency response curve information of the N 1 secondary channels.
  • the adaptive filtering algorithm filters out the environmental noise and the sound signal of the wearer, and then calculates the frequency response curve information of the secondary channel to improve the accuracy of the frequency response curve of the secondary channel.
  • the downlink signal used to determine the first set of filter parameters may be the prompt sound when the ANC function is turned on, that is, the prompt sound when the ANC function is turned on is used as the test signal, and there is no need to test separately, which can improve the working efficiency of the headset.
  • the method determines the headset from the first set of filter parameters N 1 set of filter parameters comprises the step 1201 to step 1204.
  • Step 1201 Collect the first signal through the error microphone of the headset, and collect the second signal through the reference microphone of the headset.
  • Step 1202 Determine current frequency response curve information of the primary channel according to the first signal and the second signal.
  • the frequency response of the primary channel is the ratio of the frequency spectrum (ie amplitude) of the first signal after Fourier transformation to the frequency spectrum of the second signal after Fourier transformation
  • the current frequency response of the secondary channel is a curve describing the changing trend of the ratio between the frequency spectrum of the first signal after Fourier transformation and the frequency spectrum of the downlink signal after Fourier transformation.
  • Step 1203 Determine target frequency response curve information that matches the current frequency response curve information from the preset frequency response curve information of multiple sets of primary channels.
  • the frequency response curve information of the multiple preset groups of primary channels is the frequency response of the primary channels of different users in offline testing (specifically refers to users with different ear canal characteristics, such as large ear canal, middle ear canal, or small ear canal) Curve information.
  • the frequency response curve information of multiple groups of primary channels can be matched with the current frequency response curve information in the target frequency band to determine the target frequency response curve information.
  • the target frequency band is 1000Hz-2000Hz
  • the information in the 1000Hz-2000Hz frequency band of the frequency response curve information of multiple sets of primary channels is matched with the information in the 1000Hz-2000Hz frequency band of the current frequency response curve to determine the target frequency response curve information.
  • the target frequency band may also be other frequency bands, which are specifically determined according to actual requirements, which are not limited in the embodiment of the present application.
  • Step 1204 Determine a group of filter parameters corresponding to the target frequency response curve information as the first group of filter parameters.
  • the aforementioned N 1 sets of filter parameters correspond to the frequency response curve information of the N 1 primary channels.
  • an adaptive filtering algorithm may also be used to determine the frequency response curve information of the current primary channel, and further determine the target frequency response curve information of the primary channel.
  • the method of using an adaptive filtering algorithm to determine the frequency response curve information of the current primary channel includes: performing short-time Fourier transform on the first signal and the second signal respectively, and then using the Fourier transformed second signal as the reference signal, Take the first signal after Fourier transform as the target signal, and use Kalman filter or NLMS filter to minimize the residual signal of the error microphone.
  • the amplitude-frequency curve of the final converged Kalman filter or NLMS filter is the primary channel Frequency response curve.
  • the method determines the headset from the first set of filter parameters N 1 set of filter parameters comprises the step 1301 to step 1304.
  • Step 1301 Collect the first signal through the error microphone of the headset, collect the second signal through the reference microphone of the headset, and acquire the downlink signal of the headset.
  • Step 1302 Determine the current frequency response curve information of the primary channel according to the first signal and the second signal, determine the current frequency response curve information of the secondary channel according to the first signal and the downlink signal, and determine the current frequency response ratio curve information.
  • the current frequency response ratio curve information is the ratio of the current frequency response curve information of the primary channel to the current frequency response curve information of the secondary channel.
  • Step 1303 Determine the target frequency response ratio curve information that matches the current frequency response ratio curve information from the preset multiple sets of frequency response ratio curve information.
  • Step 1304 Determine a group of filter parameters corresponding to the target frequency response ratio curve information as the first group of filter parameters.
  • the N 1 sets of filter parameters correspond to N 1 frequency response ratio curve information.
  • the method determines from the headset first set of filter parameters from the set of filter parameters N 1 comprising the step 1401 to step 1403.
  • Step 1401 Obtain frequency response difference curve information of the error microphone and the reference microphone corresponding to the N 1 groups of filter parameters.
  • the method of obtaining the frequency response difference curve information of the error microphone and the reference microphone corresponding to the set of filter parameters may include: setting the filter parameters of the semi-open active noise reduction headset For this set of filtering parameters, the first signal is collected through the error microphone of the semi-open active noise reduction headset, and the second signal is collected through the reference microphone of the semi-open active noise reduction headset; the error is determined according to the first signal and the second signal.
  • the frequency response curve information of the microphone and the frequency response curve information of the reference microphone, and the frequency response difference curve information of the error microphone and the reference microphone is determined.
  • the frequency response difference curve information of the error microphone and the reference microphone is the difference between the frequency response curve information of the error microphone and the frequency response curve information of the reference microphone.
  • Step 1402 among the N 1 frequency response difference curve information corresponding to the N 1 groups of filter parameters, the frequency response difference curve with the smallest amplitude corresponding to the target frequency band is determined as the target frequency response difference curve.
  • Step 1403 Determine a group of filter parameters corresponding to the target frequency response difference curve information as the first group of filter parameters.
  • the active noise reduction method provided in the embodiment of the present application further includes step 903.
  • Step 903 The earphone generates N 2 sets of filter parameters at least according to the first set of filter parameters and the second set of filter parameters, and the N 2 sets of filter parameters respectively correspond to different ANC noise reduction intensities.
  • the foregoing second set of filter parameters is one of the N 1 sets of filter parameters pre-stored by the earphone; the second set of filter parameters is used for noise reduction of ambient sound in the state where the leakage degree is the smallest among the N 1 leakage states.
  • the above N 1 sets of filter parameters are used to reduce noise in the environment in N 1 leakage states.
  • the leakage degree corresponding to the N 1 leakage states increases in order
  • the above second set of filter parameters It is a set of filtering parameters corresponding to a kind of leakage state with the smallest degree of leakage.
  • step 903 may be implemented through step 9031.
  • Step 9031 the headset interpolates the first set of filter parameters and the second set of filter parameters to generate N 2 sets of filter parameters.
  • a set of filter parameters includes K parameters.
  • the first set of filter parameters is taken as the N 2 set of filter parameters in the N 2 sets of filter parameters, which is denoted as Take the second set of filter parameters as the first set of filter parameters of the N 2 sets of filter parameters, denoted as P 1,1 , P 1,2 ,..., P 1,K , and use linear interpolation to filter the first set
  • the parameters and the N 2th group of filter parameters are linearly interpolated, and N-2 groups of new filter parameters are inserted. It should be understood that the first set of filtering parameters, the N-2 sets of filtering parameters obtained by interpolation, and the second set of filtering parameters constitute the N 2 sets of filtering parameters.
  • the i-th group of filtering parameters is determined according to the following formula, and the value of i is 2, 3,..., N 2 -1.
  • ⁇ 1, ⁇ 2,..., ⁇ K are respectively the step factor of K parameters in a set of filtering parameters.
  • i take 2, 3,..., N 2 -1 respectively, and N 2 sets of filtering parameters can be obtained by interpolation.
  • step 902 and step 903 can be performed first, step 903 can be performed first, and step 902 can be performed, or step 902 and step 902 can be performed at the same time. 903.
  • the active noise reduction method provided in the embodiment of the present application further includes step 904 to step 906.
  • Step 904 The earphone obtains the target ANC noise reduction intensity.
  • the target ANC noise reduction intensity may be determined by a subjective test performed by the user based on the terminal, or determined by the headset, or determined by the terminal.
  • the earphone determines the target ANC noise reduction intensity according to the current state of environmental noise. For example, the current environment is relatively quiet, and the headset adaptively selects the ANC noise reduction strength with weaker noise reduction according to the environmental noise state; when the current environment is relatively noisy, the headset adaptively selects the ANC with stronger noise reduction strength according to the state of the environmental noise Noise reduction intensity.
  • Step 905 The earphone determines a third set of filter parameters from the N 2 sets of filter parameters according to the target ANC noise reduction strength.
  • the ANC noise intensity N 2 set of filter parameters corresponding relation the N different noise reduction parameters corresponding to the intensity of the filter 2 groups, different noise reduction.
  • the third group of filter parameters corresponding to the target ANC noise reduction intensity is determined from the N 2 groups of filter parameters.
  • Step 906 The earphone uses the third set of filter parameters to reduce noise.
  • the third set of filter parameters is used to replace the first set of filter parameters, that is, the third set of filter parameters is used to perform processing on the sound signal collected by the reference microphone of the headset and the sound signal collected by the error microphone of the headset. Processing to generate a reverse noise signal, which can attenuate part of the environmental noise signal in the ear canal, and achieve noise reduction of environmental sound.
  • N 2 sets of filters adapted to the current user are generated based on the first set of filter parameters and the second set of filter parameters.
  • the third group of filter parameters corresponding to the target ANC noise reduction intensity is further determined from the N 2 groups of filter parameters, so that the third group of filter parameters is used for noise reduction.
  • a suitable ANC can be selected according to the state of environmental noise The noise reduction intensity and the noise reduction effect are more in line with the needs of users.
  • the active noise reduction method provided in the embodiment of the present application includes step 1601 to step 1604.
  • Step 1601 The terminal determines a first set of filtering parameters.
  • the first set of filter parameters is one of the N 1 sets of filter parameters pre-stored by the headset.
  • the N 1 sets of filter parameters are used to reduce noise in the environment under N 1 leakage states.
  • the N 1 leakage states are It is formed by earphones and N 1 different ear canal environments. Among them, in the current wearing state of the earphone, for the same environmental noise, the noise reduction effect of the earphone when the first set of filter parameters is applied is better than the noise reduction effect of the earphone when the other filter parameters in the N 1 set of filter parameters are applied, N 1 It is a positive integer greater than or equal to 2.
  • Step 1602 The terminal sends first instruction information to the headset, where the first instruction information is used to instruct the headset to use the first set of filter parameters to reduce noise.
  • Step 1603 The headset receives the first indication information from the terminal.
  • Embodiment after receiving the first earphone indication information sent by the terminal, determining a first set of filter parameters of the first indication information from the set of filter parameters N 1 headphone stored embodiment of the present application.
  • Step 1604 The earphone uses the first set of filter parameters to reduce noise.
  • the active noise reduction method can determine a set of filter parameters (that is, the first set of filter parameters) matching the current leakage state according to the user’s ear canal environment and the leakage state formed by the earphone when the user wears the earphone, and is based on This set of filtering parameters performs environmental sound noise reduction, which can meet the user's personalized noise reduction needs and improve the noise reduction effect.
  • the above step 1601 (that is, the terminal determines the first set of filter parameters) can be implemented by the terminal executing a matching algorithm, specifically including the following steps 16011a to 16011e, or steps 16012a to 16012e, or steps 16013a to steps 16013e, or step 16014a to step 16014d, or step 16015a to step 16015d.
  • the method for the terminal to determine the first set of filtering parameters includes step 16011a to step 16011e.
  • Step 16011a The terminal receives the first signal collected by the error microphone of the headset and the second signal collected by the reference microphone of the headset, and acquires the downlink signal of the headset.
  • Step 16011b The terminal determines the residual signal of the error microphone based on the first signal and the second signal.
  • Step 16011c The terminal determines the current frequency response curve information of the secondary channel according to the residual signal of the error microphone and the downlink signal.
  • Step 16011d The terminal determines the target frequency response curve information matching the current frequency response curve information from the preset frequency response curve information of the N 1 secondary channels.
  • Step 16011e The terminal determines the filter parameter corresponding to the target frequency response curve information as the first group of filter parameters, and the N 1 group of filter parameters corresponds to the frequency response curve information of the N 1 secondary channels.
  • the method for the terminal to determine the first set of filtering parameters includes step 16012a to step 16012e.
  • Step 16012a The terminal receives the first signal collected by the error microphone of the earphone and the second signal collected by the reference microphone of the earphone, and acquires the downlink signal of the earphone.
  • Step 16012b The terminal determines the residual signal of the error microphone based on the first signal and the second signal.
  • Step 16012c The terminal determines the current frequency response curve information of the secondary channel according to the residual signal of the error microphone and the downlink signal.
  • Step 16012d The terminal determines the target frequency response curve information matching the current frequency response curve information from the preset frequency response curve information of the N 1 secondary channels;
  • Step 16012e The terminal determines the filter parameter corresponding to the target frequency response curve information as the first group of filter parameters, and the N 1 group of filter parameters corresponds to the frequency response curve information of the N 1 secondary channels.
  • the method for the terminal to determine the first set of filtering parameters includes step 16013a to step 16013e.
  • Step 16013a The terminal receives the first signal collected by the error microphone of the headset and the second signal collected by the reference microphone of the headset, and acquires the downlink signal of the headset.
  • Step 16013b The terminal determines the residual signal of the error microphone based on the first signal and the second signal.
  • Step 16013c The terminal determines the current frequency response curve information of the secondary channel according to the residual signal of the error microphone and the downlink signal.
  • Step 16013d The terminal determines the target frequency response curve information matching the current frequency response curve information from the preset frequency response curve information of the N 1 secondary channels.
  • Step 16013e The terminal determines the filter parameter corresponding to the target frequency response curve information as the first group of filter parameters, and the N 1 group of filter parameters corresponds to the frequency response curve information of the N 1 secondary channels.
  • the method for the terminal to determine the first set of filtering parameters includes step 16014a to step 16014d.
  • Step 16014a The terminal receives the first signal collected by the error microphone of the headset and the second signal collected by the reference microphone of the headset.
  • Step 16014b The terminal determines the current frequency response curve information of the primary channel according to the first signal and the second signal.
  • Step 16014c The terminal determines the target frequency response curve information matching the current frequency response curve information from the preset frequency response curve information of the N 1 primary channels.
  • Step 16014d The terminal determines the filter parameter corresponding to the target frequency response curve information as the first group of filter parameters, and the N 1 group of filter parameters corresponds to the frequency response curve information of the N 1 primary channels.
  • the method for the terminal to determine the first set of filtering parameters includes step 16015a to step 16015d.
  • Step 16015a The terminal receives the first signal collected by the error microphone of the headset and the second signal collected by the reference microphone of the headset, and acquires the downlink signal of the headset.
  • Step 16015b The terminal determines the current frequency response curve information of the primary channel according to the first signal and the second signal, and determines the current frequency response curve information of the secondary channel according to the first signal and the downlink signal; and determines the current frequency response ratio curve information.
  • the current frequency response ratio curve information is the ratio of the current frequency response curve information of the primary channel to the current frequency response curve information of the secondary channel.
  • Step 16015c The terminal determines the target frequency response ratio curve information that matches the current frequency response ratio curve information from the preset N 1 frequency response ratio curve information.
  • Step 16015d The terminal determines the filter parameter corresponding to the target frequency response ratio curve information as the first group of filter parameters, and N 1 groups of filter parameters correspond to N 1 frequency response ratio curve information.
  • the active noise reduction method provided by the embodiment of the present application is applied in a scenario where the headset is in the ANC working mode. It can be seen that the headset is in the ANC working mode as a trigger condition for determining the first set of filter parameters. Specifically, the method for making the headset work in the ANC working mode includes the following method 1 or method 2.
  • the above-mentioned method one includes step A1 to step A3.
  • Step A1 The terminal receives an operation on the first option of the first interface of the terminal, and the first interface is an interface for setting the working mode of the headset.
  • Step A2 In response to the operation of the first option, the terminal sends a first instruction to the headset, where the first instruction is used to control the headset to work in the ANC working mode.
  • an application corresponding to the headset is installed on the terminal. After the user opens the application and establishes a communication connection with the headset (left headset and/or right headset), the user displays the Perform corresponding operations on the first interface to control the headset to be in different working modes, such as general mode or ANC mode.
  • the general mode here is a mode in which the noise reduction function is not turned on.
  • the foregoing first operation may be a touch screen operation or a key operation, etc., which is not specifically limited in the embodiment of the present invention.
  • the aforementioned touch screen operation is a user's pressing operation, long press operation, sliding operation, click operation, hovering operation (the user's operation near the touch screen), etc., on the touch screen of the terminal.
  • the key operation corresponds to the user's single-click operation, double-click operation, long-press operation, and combination key operation of the terminal's power button, volume button, and home button.
  • the interface 1701 shown in FIG. 17 is an example of the foregoing first interface.
  • the first interface contains different options for setting the working mode of the headset. By selecting different options, the user sets the working mode of the headset.
  • the above-mentioned first option corresponds to the ANC working mode.
  • the first interface 1701 includes a "general mode” option 1702 and an "ANC mode” option 1703, and the "ANC mode” option 1703 is the first option.
  • the user clicks the "ANC mode” option 1703 to control the headset to work in the ANC working mode.
  • Step A3 The headset receives the first instruction, and the headset works in the ANC working mode.
  • the above-mentioned first instruction may also be an operation instruction of the user on the headset.
  • the headset has a key or button to turn on the ANC function. After the user wears the headset, the user presses to turn on the ANC. Function button (equivalent to the first command), the headset enters the ANC working mode.
  • the second method above includes step B1 to step B2.
  • Step B1 Detect whether the earphone is in the ear.
  • the ear-in detection technology is used to detect whether the earphone is in the ear.
  • the earphone includes a proximity light sensor, and whether the earphone is in the ear can be detected according to the signal collected by the proximity light sensor.
  • Step B2 When it is detected that the earphone has been put into the ear, the earphone works in the ANC working mode.
  • the earphone when the earphone detects that the earphone is in the ear, the earphone can automatically turn on the ANC function, so that the earphone works in the ANC working mode.
  • the earphone plays an in-ear prompt sound, and after a preset time period when the prompt sound ends (indicating that the earphone is stable in the ear), the earphone works in the ANC working mode.
  • the terminal executes the step of determining the first set of filter parameters, or the headset executes the step of acquiring the first set of filter parameters.
  • another trigger condition for determining (or acquiring) the first set of filter parameters is: when the headset is already in the ANC working mode, the user performs auxiliary operations on the terminal or headset according to actual needs, thereby triggering the terminal to determine the first set of filter parameters.
  • One set of filter parameters or headphones acquire the first set of filter parameters.
  • the headset plays the prompt sound that the ANC is turned on, and the first set of filter parameters is determined during the process of playing the in-ear prompt sound, that is, the in-ear prompt sound is used as the test signal ,
  • the user determines the first set of filtering parameters based on subjective listening experience.
  • the earphone when it is detected that the earphone is in the ear, the earphone works in the ANC working mode, and at the same time, the earphone will play the in-ear prompt sound.
  • the first set of filter parameters is determined during the process of playing the in-ear prompt sound, that is, the The in-ear prompt sound is used as a test signal, and the user determines the first set of filtering parameters based on subjective listening experience.
  • the active noise reduction method further includes: displaying an ANC control list.
  • the ANC control list includes at least one of the following options: a first control option, a second control option, or a third control option; wherein the first control option is used to trigger the determination of the first set of filtering parameters, and the second control option It is used to trigger the generation of N 2 sets of filter parameters, and the third control option is used to trigger the re-determination of the first set of filter parameters.
  • FIG. 18A is a schematic diagram of a display effect of the above-mentioned ANC control list
  • the interface shown in (a) in FIG. 18A is the first interface 1801
  • the first option is the "ANC mode” in the first interface.
  • “Option 1801a After the user clicks the "ANC mode” option 1801a in the first interface 1801 shown in (a) of FIG. 18A, the terminal displays the interface 1802 shown in (b) of FIG. 18A. It can be seen that in the interface 1802, the ANC control list 1802a is displayed below the "ANC mode” option.
  • the first control option in the ANC control list 1802a is the "optimal gear matching" option, and the second control option is "adaptation".
  • the third control option is the "parameter rematch” option.
  • the user can select the ANC control mode according to the needs in the ANC control list.
  • the ANC control list may also include other options for setting the control mode of the ANC, which are specifically determined according to actual needs and are not limited in the embodiment of the present application.
  • FIG. 18B is a schematic diagram of another display effect of the above-mentioned ANC control list
  • the interface shown in (a) in FIG. 18B is the first interface 1803, and the first option is the first interface 1803.
  • "ANC mode" option 1803a After the user clicks on the "ANC mode” option 1803a in the first interface 1803 shown in (a) in FIG. 18B, the terminal displays the interface 1804 shown in (b) in FIG. 18B, which includes an ANC control list 1804a .
  • the ANC control list 1804a includes an option of "optimal gear matching", an option of "adaptation parameter generation", and an option of "parameter rematch".
  • step 1601 that is, the terminal determines the first set of filter parameters
  • step 1601c the above step 1601 (that is, the terminal determines the first set of filter parameters)
  • Step 1601a The terminal receives an operation on the first control option in the ANC control list, and displays a first control.
  • the first control includes N 1 preset positions, and the N 1 preset positions correspond to N 1 sets of filter parameters.
  • Step 1601b The terminal receives an operation on the first position in the first control, where the first position is one of N 1 preset positions.
  • the noise reduction effect when a set of filter parameters corresponding to the first position is applied to the earphone is better than the noise reduction effect when the filter parameters corresponding to other positions in the N 1 preset positions are applied to the earphone.
  • Step 1601c In response to the operation on the first position, the terminal determines that a group of filter parameters corresponding to the first position is the first group of filter parameters.
  • FIG. 19A is a schematic diagram of a display effect of the above-mentioned first control.
  • the terminal displays the interface 1901 shown in (a) in FIG. 19A. That is, (b) in FIG. 18A), the interface 1901 contains the ANC control list.
  • the user selects the first control option in the interface 1901, such as the "best gear matching" option 1901a, and the terminal displays FIG. 19A (B) in the interface 1902, in this interface 1902, the first control 1902a is displayed below the ANC control list.
  • the first control 1902a may be in the shape of a disc (the first control 1902a may also be referred to as a gear wheel), and the first control 1902a includes a gear adjustment button and N 1 gears, so that the user is in the first Operate in a control 1902a to determine the first set of filtering parameters.
  • FIG. 19B is a schematic diagram of another display effect of the above-mentioned first control.
  • the terminal displays the interface shown in (a) in FIG. 19B.
  • 1903 that is, (b) in Figure 18B
  • the interface 1903 contains the ANC control list
  • the user selects the first control option in the interface 1903, such as the "best gear matching" option 1903a
  • the terminal displays
  • the interface 1904 includes the first control 1904a.
  • the first control 1904a may be in the shape of a disc.
  • the first control 1904a includes a gear adjustment button and N 1 gears, and then the user operates in the first control 1904a to determine the first set of filtering parameters.
  • the headset or the terminal executes a matching algorithm to determine the first set of filter parameters, and presents the gear corresponding to the first set of filter parameters in the displayed first control.
  • the position corresponding to the gear adjustment button in the first control is the gear corresponding to the current first set of filtering parameters.
  • the aforementioned N 1 gears are distributed in the first control, and the first control may be in the shape of a disc, and the N 1 gears are arranged in the first control in a disc shape; the first control may also If it is a bar shape, the N 1 gears are arranged in a bar shape in the first control.
  • the foregoing first control may also be a control of other shapes, which is not limited in the embodiment of the present application.
  • the user slides the gear adjustment button in the first control to make the gear adjustment button traverse N 1 gear positions, that is, traverse N 1 preset positions.
  • the gear adjustment button traverse N 1 gear positions, that is, traverse N 1 preset positions.
  • the corresponding noise reduction effect is different. If the above-mentioned gear adjustment button is adjusted to the first position, the user will experience the best effect of the audio played by the headset, and the user no longer adjusts the position of the gear adjustment button, so that the user subjectively feels the best noise reduction effect.
  • the corresponding filtering parameters are determined as the first group of filtering parameters.
  • the user operates on the first position of the first control to determine the first set of filtering parameters.
  • the above-mentioned operation on the first position may be that the user slides the gear adjustment button 2001
  • the operation to the first position and the stay time is longer than the preset time (for example, 10 seconds).
  • the terminal detects this operation and, in response to the operation on the first position, determines a group corresponding to the first position
  • the filter parameters are the first group of filter parameters.
  • the interface where the first control is located further includes a selection box 2002.
  • the operation in the first position may be an operation in which the user selects the "OK" button in the selection box 2002 after the user slides the gear adjustment button 2003 to the first position.
  • the terminal detects this operation and, in response to the operation on the first position, determines that the first position corresponds to One set of filter parameters is the first set of filter parameters.
  • the above-mentioned obtaining of the first set of filtering parameters specifically includes step C1 to step C3.
  • Step C1 The terminal receives an operation on the third control option in the ANC control list.
  • Step C2 In response to the operation on the third control option, the terminal sends a second instruction to the headset, where the second instruction is used to instruct the headset to obtain the first set of filtering parameters.
  • the first set of filter parameters acquired according to the instructions of the second instruction is different from the filter parameters used by the headset before receiving the second instruction.
  • the earphone reduces noise based on the first set of filter parameters. Subsequently, during the operation of the earphone, the user can also follow the actual situation (for example, The noise reduction effect using the first set of filter parameters cannot meet the needs of the user.) choose to re-determine a set of filter parameters for noise reduction. In this case, the headset can also be instructed to obtain the first set of filter parameters by sending a second instruction. In another case, in other working stages of the headset, the user can also choose to re-determine the first set of filtering parameters according to actual needs, which is not limited in the embodiment of the present application.
  • the "parameter rematch” option in the ANC control list in this interface is the above third control option. If the user clicks on "parameter rematch" In the “matching” option, the terminal sends a second instruction to the headset to instruct the headset to obtain the first set of filtering parameters.
  • Step C3 The earphone receives the second instruction, and the earphone obtains the first set of filtering parameters.
  • a first set of filter parameters acquired earphone of the headset performs matching algorithm is to determine the set of filter parameters from a first set of filter parameters N 1.
  • the terminal displays an interface including the first control, so that the first set of filtering parameters is re-determined by operating on the first control.
  • the terminal displays the interface 2102 shown in (b) in FIG.
  • a first control 2102a is displayed below the ANC control list, and the user operates in the first control 2102a to re-determine the first set of filtering parameters.
  • the terminal displays the interface 2104 shown in (b) of the above interface in FIG. 21B. It contains the first control 2104a, and the user operates in the first control 2104a to re-determine the first set of filtering parameters.
  • the headset or the terminal executes a matching algorithm to determine the first set of filter parameters, and presents the gears corresponding to the first set of filter parameters in the displayed first control, specifically ,
  • the position corresponding to the gear adjustment button in the first control is the gear corresponding to the current first set of filter parameters.
  • the active noise reduction method provided in the embodiment of the present application further includes steps D1 to D2.
  • Step D1 The terminal receives an operation on the third control option in the ANC control list.
  • Step D2 In response to the operation of the third control option, the terminal re-determines the first set of filtering parameters.
  • step D2 For a detailed description of step D2, please refer to the description of step 1601 and related content, which will not be repeated here.
  • the active noise reduction method provided in the embodiment of the present application further includes step 1605 to step 16010.
  • Step 1605 The headset generates N 2 sets of filter parameters at least according to the first set of filter parameters and the second set of filter parameters.
  • the above N 2 sets of filter parameters correspond to different ANC noise reduction intensities
  • the above second set of filter parameters is one of the N 1 sets of filter parameters pre-stored by the earphone; the second set of filter parameters is used to N 1 type of leakage state, the environmental sound noise reduction is performed in the state with the smallest degree of leakage.
  • step 1605 For a detailed description of step 1605, reference may be made to the description of step 903 (including step 9031) in the foregoing embodiment, which is not repeated here.
  • the user may also perform operations on the terminal to control the headset to generate N 2 sets of filter parameters, that is, after the first set of filter parameters is determined, the active noise reduction method provided in the embodiment of the present application further includes Step E1 to Step E3.
  • Step E1 The terminal receives an operation on the second control option of the ANC control list of the terminal.
  • Step E2 In response to the operation of the second control option, the terminal sends a third instruction to the headset, and the third instruction is used to trigger the headset to generate N 2 sets of filter parameters.
  • the "adaptation parameter generation” option in the interface is the second control option. If the user clicks on "adaptation""Parametergeneration” option, the terminal sends a third instruction to the headset to trigger the headset to generate N 2 sets of filter parameters.
  • Step E3 The headset receives the third instruction.
  • the headset after the headset receives the third instruction, the headset generates N 2 sets of filter parameters according to the first set of filter parameters and the second set of filter parameters.
  • the N 2 different set of filter parameters corresponding to the noise reduction intensity ANC e.g. N 2 N 2 set of filter parameters corresponding to the noise reduction intensity th ANC
  • 2 N is the set of filter parameters adapted to the current user's ear canal N 2 environment set of filter Parameters
  • the earphone adopts N 2 groups of filter parameters for noise reduction when the noise reduction intensity is sequentially enhanced.
  • Step 1606 The terminal determines the target ANC noise reduction intensity.
  • the terminal may determine the target ANC noise reduction intensity according to the current state of environmental noise. For example, the current environment is relatively quiet, and the terminal adaptively selects the ANC with weaker noise reduction intensity according to the environmental noise state; when the current environment is relatively noisy, the terminal adaptively selects the ANC with stronger noise reduction intensity according to the state of environmental noise Noise reduction intensity.
  • the user can interact with the terminal to determine the target ANC noise reduction intensity.
  • the specific method includes steps 1606a to 1606c.
  • Step 1606a The terminal displays a second control.
  • the second control includes N 2 preset positions, the N 2 preset positions correspond to N 2 kinds of ANC noise reduction intensities, and the N 2 kinds of ANC noise reduction intensities correspond to N 2 sets of filtering. parameter.
  • the terminal displays (b) in FIG. 23A
  • a second control 2302a (gear position dial) is displayed below the ANC control list.
  • the second control 2302a includes a gear adjustment button and N 2 gears.
  • the N The 2 gear positions correspond to N 2 preset positions, and the N 2 preset positions correspond to N 2 sets of filter parameters. It should be noted that, in the first control shown in (b) of FIG. 23A, the noise reduction intensity of the N 2 gears is sequentially increased, and the environmental noise after noise reduction is sequentially reduced by using the N 2 filter parameters.
  • the terminal displays as shown in (b) in FIG. 23B Interface 2304, the interface 2304 includes a second control 2304a (gear wheel), the second control 2304a includes a gear adjustment button and N 2 gears, the N 2 gears correspond to N 2 preset positions , And the N 2 preset positions correspond to N 2 sets of filter parameters.
  • the interface 2304 includes a second control 2304a (gear wheel), the second control 2304a includes a gear adjustment button and N 2 gears, the N 2 gears correspond to N 2 preset positions , And the N 2 preset positions correspond to N 2 sets of filter parameters.
  • Step 1606b The terminal receives an operation on the second position in the second control, where the second position is one of N 2 preset positions.
  • the aforementioned N 2 types of ANC noise reduction intensities correspond to N 2 sets of filter parameters, and the N 2 sets of filter parameters are generated according to the first set of filter parameters and the second set of filter parameters.
  • the noise reduction effect is better than when the filter parameter corresponding to the ANC noise reduction intensity at other positions in the N 2 preset positions is applied to the earphone. The noise reduction effect.
  • Step 1606c In response to the operation on the second position, the terminal determines the ANC noise reduction intensity corresponding to the second position as the target ANC noise reduction intensity.
  • the second control is similar to the above-mentioned first control.
  • the user slides the gear adjustment button in the second control to make the gear adjustment button traverse N 2 gears, that is, traverse N 2 preset positions.
  • To determine the target ANC noise reduction intensity The process of the user operating the second position in the second control to determine the target ANC noise reduction intensity is similar to the process of determining the first set of filtering parameters by the user operating the first position in the first control.
  • Figure 20 As well as the content of the above-mentioned embodiment, it will not be repeated here.
  • the gear corresponding to the target ANC noise reduction intensity is presented in the second control displayed above, specifically, the gear in the second control
  • the position corresponding to the adjustment button is the gear position corresponding to the target ANC noise reduction intensity, refer to (b) in FIG. 23A and (b) in FIG. 23B.
  • Step 1607 The terminal sends second instruction information to the headset, where the second instruction information is used to instruct the headset to use the third set of filter parameters corresponding to the target ANC noise reduction strength to perform noise reduction.
  • Step 1608 The headset receives the second indication information from the terminal.
  • Step 1609 The earphone determines the third set of filter parameters from the N 2 sets of filter parameters according to the target ANC noise reduction strength.
  • the earphone determines the filter parameter indicated by the second indication information in the N 2 groups of filter parameters as the third group of filter parameters.
  • Step 16010 The earphone uses the third set of filter parameters to reduce noise.
  • the active noise reduction method provided by the embodiments of the present application can be respectively applied to the earphone corresponding to the left ear (hereinafter referred to as the left earphone) and the earphone corresponding to the right ear (hereinafter referred to as the right earphone) to achieve the left ear noise reduction and Right ear noise reduction.
  • the same set of filter parameters are used to perform left ear noise reduction and right ear noise reduction respectively, which is not limited in the embodiment of the present application.
  • the third set of filter parameters is determined from the N 2 sets of filter parameters, and the headset reduces noise based on the third set of filter parameters.
  • the user can also choose to re-determine a set of filter parameters for noise reduction according to actual needs, that is, the headset reacquires the first set of filter parameters. Referring to Figure 18A or Figure 18B, the user selects the "parameter rematch" option, the headset restores the N 2 filter parameters in the headset to the above N 1 filter parameters, and then redefines the first filter from the N 1 filter parameters Parameters, and use the first set of filter parameters for noise reduction.
  • the headset may also send information to the terminal. For example, after the headset executes the matching algorithm to determine the first set of filter parameters or the third set of filter parameters, the headset sends instruction information to the terminal to indicate the first set of filter parameters or the third set of filter parameters, and then the terminal is in the first set of filter parameters according to the instruction information.
  • the gear corresponding to the first set of filter parameters is presented in one control or the gear corresponding to the third set of filter parameters is presented in the second control (that is, the gear corresponding to the target ANC intensity).
  • N 2 sets of filters adapted to the current user are generated based on the first set of filter parameters and the second set of filter parameters.
  • the third group of filter parameters corresponding to the target ANC noise reduction intensity is further determined from the N 2 groups of filter parameters, so that the third group of filter parameters is used for noise reduction, because the user can select the appropriate ANC according to the state of environmental noise The intensity of noise reduction, so the noise reduction effect is more in line with the needs of users.
  • the third stage the process of detecting abnormal noise and updating filter parameters.
  • the active noise reduction method further includes the detection and processing of abnormal noise.
  • the active noise reduction method provided in the embodiment of the present application further includes step 2401 to step 2404.
  • Step 2401 Detect whether there is abnormal noise.
  • the abnormal noise includes at least one of the following: howling noise, clipping noise, or bottom noise.
  • the user when the user uses the headset, the user turns on the active noise reduction function of the headset (that is, turns on the ANC function of the headset), or switches the working mode of the headset to the ANC working mode.
  • the active noise reduction function of the headset that is, turns on the ANC function of the headset
  • it is detected in real time whether there is at least one abnormal noise among howling noise, clipping noise or bottom noise, and noise reduction processing is performed.
  • the above-mentioned abnormal noise may also include other noises such as wind noise. It should be noted that for different types of noise, detection methods for abnormal noise are different, which will be described in detail in the following embodiments.
  • Step 2402 if abnormal noise is detected, update the filter parameters of the earphone.
  • the filter parameter of the earphone may be the aforementioned first group of filter parameters or the third group of filter parameters.
  • the first group of filter parameters is updated
  • the current filter parameter of the earphone is the third group of filter parameters
  • the third group of filter parameters is updated.
  • Step 2403 Sound signals collected by the reference microphone and the error microphone.
  • Step 2404 Based on the updated filter parameters, process the sound signal collected by the reference microphone of the headset and the sound signal collected by the error microphone to generate a reverse noise signal.
  • the above-mentioned reverse noise signal is used to attenuate the user’s in-ear noise signal.
  • the in-ear noise signal can be understood as the residual noise after the environmental noise is isolated by the earphone after the user wears the earphone.
  • the residual noise signal is similar to the external noise signal.
  • Environmental noise, earphones, and the fit between the earphones and the ear canal are related to factors; after the earphone generates a reverse noise signal, the earphone plays the reverse noise signal, and the reverse noise signal has the opposite phase to the noise signal in the user’s ear. In this way, the reverse noise signal can attenuate the noise signal in the user's ear, thereby reducing abnormal noise in the ear.
  • the step 2401 of detecting abnormal noise and the step 2402 of updating filter parameters are executed by the microprocessor of the headset.
  • the ANC chip Perform noise reduction processing (step 2404).
  • the noise reduction processing of the ANC chip includes processing of the signal of the feedforward path (that is, the sound signal collected by the reference microphone), the processing of the signal of the feedback path (that is, the signal collected by the error microphone), and Processing of the signal of the downstream compensation path (ie downstream audio).
  • the earphone can detect abnormal noise and perform noise reduction processing on the abnormal noise, the interference of the abnormal noise is reduced, the stability of the earphone is improved, and the user's listening experience can be improved.
  • the following describes the abnormal noise detection process and the noise signal processing process in detail from the perspective of howling noise, clipping noise, noise floor, and wind noise.
  • the method for detecting whether there is howling noise specifically includes step 2601 to step 2602.
  • Step 2601. Collect the first signal through the error microphone of the earphone.
  • the first signal is down-sampled at a frequency of 16 KHz, and then howling noise is detected based on the first signal.
  • Step 2602. If the energy peak of the first signal is greater than the first threshold, determine that there is howling noise; if the energy peak of the first signal is less than or equal to the first threshold, determine that there is no howling noise.
  • the energy peak value of the first signal is the energy value corresponding to the peak frequency of the first signal.
  • the least mean square (LMS) algorithm is used to determine the first signal The peak frequency. If the peak frequency of the first signal is within the above-mentioned howling detection frequency range, the Gotzel algorithm is used to calculate the energy peak of the first signal, that is, the energy corresponding to the peak frequency of the first signal, so as to be based on the first signal's peak frequency. The energy peak determines whether there is howling noise.
  • LMS least mean square
  • the low-frequency cut-off frequency of the high-pass filter depends on the lowest frequency of howling, such as 600 Hz.
  • the LMS algorithm is used to determine the peak frequency of the first signal on the above-mentioned filtered first signal, specifically to minimize the coefficient error function e(n):
  • n is the nth sample data of the current frame, n ⁇ L, and L is the number of sample data contained in the current frame.
  • each sample point of the current frame is sequentially iterated, and the frequency w m obtained after iterating to L samples is the peak frequency of the current frame convergence, that is, the peak frequency of the first signal.
  • the peak frequency of the current frame is saved as the initial frequency of the next frame, and the peak frequency of the next frame can be obtained by continuing to update the next frame, and so on.
  • the Gotzel algorithm is used to calculate the energy peak of the first signal, that is, the energy corresponding to the peak frequency of the first signal, so as to be based on the first signal's peak frequency.
  • the energy peak determines whether there is howling noise.
  • the peak energy of the first signal is recorded as It is determined by the following formula
  • n is the nth sample data of the current frame
  • n ⁇ L is the number of sample data contained in the current frame.
  • Gotzel algorithm is used to iterate each sample point of the current frame in turn to obtain s(L), s(L-1), and then calculate the peak energy of the first signal
  • the method for detecting whether there is howling noise specifically includes step 2701 to step 2702.
  • Step 2701. Obtain a reverse noise signal.
  • the reverse noise signal is down-sampled at a frequency of 16KHz, and then howling noise is detected based on the reverse noise signal.
  • Step 2702 If the energy peak of the reverse noise signal is greater than the second threshold, determine that there is howling noise; if the energy peak of the reverse noise signal is less than or equal to the second threshold, determine that there is no howling noise.
  • the energy peak of the reverse noise is the energy value corresponding to the peak frequency of the reverse noise signal.
  • step 2602 the method for determining the peak frequency and energy peak of the reverse noise signal is similar to the method for determining the peak frequency and energy peak of the first signal. For details, refer to the relevant description of step 2602 above, which will not be repeated here.
  • FIG. 28 is a schematic diagram of the working principle of howling detection and noise reduction processing. Refer to FIG. 28 to understand the active noise reduction method described in this application.
  • the above method for updating filter parameters specifically includes step 24021a to step 24021c.
  • Step 24021a Determine the type of howling noise according to the first signal collected by the error microphone and the second signal collected by the reference microphone.
  • howling noise includes howling noise caused by the feedback path and howling noise caused by the feedforward path.
  • howling noise caused by the feedback path is called the first howling noise.
  • the howling noise caused by the feedforward path is called the second howling noise, and the types of howling noise include the first howling noise and the second howling noise.
  • the peak frequency of the first signal collected by the error microphone is recorded as the first frequency.
  • the type of howling noise is determined to be the first howling noise; when the ratio of the energy of the first signal error signal at the first frequency to the energy of the second signal at the first frequency is greater than or equal to the preset threshold, the type of howling is determined
  • the type of calling noise is the second howling noise.
  • Step 24021b When the howling noise is the first howling noise, reduce the gain of the feedback path in the filter parameter, and the first howling noise is howling noise caused by the feedback path.
  • updating the filter parameters refers to reducing the gain of the feedback path, for example, updating the gain of the feedback path to 0, or reducing the gain of the feedback path according to actual needs.
  • the examples are not limited.
  • Step 24021c When the howling noise is the second howling noise, reduce the gain of the feedforward path in the filter parameters, and the second howling noise is howling interference caused by the feedforward path.
  • updating the filter parameters refers to reducing the gain of the feedforward path, for example, updating the gain of the feedforward path to 0, or reducing the gain of the feedforward path according to actual requirements ,
  • the embodiments of this application are not limited.
  • the above method for updating filter parameters specifically includes step 24022.
  • Step 24022 Reduce the gain of the feedforward path and the gain of the feedback path in the filter parameters.
  • the gain of the feedforward path and the gain of the feedback path can be reduced by the same magnitude (or multiple), for example, the gain of the feedforward path is reduced to 0.8 times the original gain, and the gain of the feedback path is also reduced to 0.8 times the original gain. Times.
  • the gain of the feedforward path and the gain of the feedback path can be reduced according to different amplitudes (or multiples). For example, the gain of the feedforward path is reduced to 0.8 times of the original gain, and the gain of the feedback path is also reduced to 0.6 times of the original gain. It is specifically determined according to actual needs, and is not limited in the embodiment of the present application.
  • the gain of the feedforward path and the gain of the feedback path may not be updated, but the gain of the ANTI signal (that is, the output of the feedforward path) may be updated (reduced).
  • the sum of the signal and the output signal of the feedback path for example, update the gain of the ANTI signal to 0.
  • the signal of the feedforward path ie the sound signal collected by the reference microphone
  • the signal of the feedback path ie the sound signal collected by the error microphone
  • Generate a reverse noise signal reduce the howling noise in the ear canal, can reduce the interference of abnormal noise, improve the stability of the earphone, and then enhance the user's listening experience.
  • the method for detecting whether there is clipping noise specifically includes step 2901 to step 2902.
  • Step 2901 Collect the first signal through the error microphone of the headset, or collect the second signal through the reference microphone of the headset.
  • the first signal or the second signal is collected, the first signal or the second signal is down-sampled at a frequency of 16KHz.
  • Step 2902 If the number of first target frames is greater than the preset number or the number of second target frames is greater than the preset number in the preset time period, it is determined that there is clipping noise; the first target frame is within the preset time period When the number of is less than or equal to the preset number or the number of second target frames is less than or equal to the preset number, it is determined that there is clipping noise.
  • the first target frame is a signal frame whose energy is greater than the third threshold in the signal frame contained in the first signal
  • the second target frame is a signal frame whose energy is greater than the fourth threshold in the signal frame contained in the second signal.
  • the clipping noise in the embodiments of the present application refers to low-frequency clipping noise.
  • the first signal or the second signal is collected by the earphone, the first signal or the second signal is low-pass filtered to filter out the first signal or the second signal.
  • the high-frequency spurious signal in the first signal or the second signal improves the accuracy of the first signal and the second signal, thereby also improving the accuracy of detecting whether there is clipping noise.
  • the foregoing preset time period may be 100 milliseconds, 200 millimeters, 500 milliseconds, etc., and the duration of the preset time period may be adjusted according to actual conditions, which is not limited in the embodiment of the present application.
  • the above-mentioned first target frame may also be a signal frame in which the maximum value of the signal in the signal frame contained in the first signal is greater than a certain preset threshold
  • the second target frame may be the signal frame in the signal frame contained in the second signal.
  • FIG. 30 is a schematic diagram of the working principle of clipping detection and noise reduction processing. Refer to FIG. 30 to understand the active noise reduction method described in this application.
  • the above-mentioned method for updating filter parameters specifically includes step 24023a to step 24023b.
  • Step 24023a Determine the index corresponding to the current filter parameter, where the index is the index of the current filter parameter in the first filter parameter set.
  • the filter parameter corresponding to the current index refers to the current filter index parameter preset in the plurality of sets of filter parameters
  • the filter parameters may be a plurality of sets of the above-described set of filter parameters N 1 or N 2 filter parameters set, the N 1 The group of filter parameters constitute the first filter parameter set, and the N 2 groups of filter parameters constitute the second filter parameter set.
  • Step 24023b Use the filter parameter corresponding to the index in the third filter parameter set to update the filter parameter corresponding to the feedforward path and/or the filter parameter corresponding to the feedback path in the filter parameters.
  • the third filter parameter set includes multiple sets of filter parameters corresponding to the feedforward path and/or multiple sets of filter parameters corresponding to the feedback path.
  • the index of the filter parameter is 3.
  • the third filter parameter set is used Part or all of the filter parameters corresponding to the feedforward path and/or the filter parameters corresponding to the feedback path in the third set of filter parameters replace the filter parameters corresponding to the feedforward path and/or the feedback path in the current filter parameters Filter parameters.
  • the method for detecting whether there is a noise floor specifically includes steps 3101 to 3103.
  • Step 3101 Collect a second signal through the reference microphone of the headset.
  • the second signal is down-sampled at a frequency of 16KHz.
  • Step 3102 Perform noise floor tracking on the second signal to obtain an environmental noise signal.
  • the second signal is used as the input of the noise floor tracking (NFT) algorithm to output the sound pressure level of the environmental noise signal.
  • NFT noise floor tracking
  • Step 3103 When the sound pressure level of the environmental noise signal is less than or equal to the fifth threshold, it is determined that there is a noise floor; when the sound pressure level of the environmental noise is greater than the fifth threshold, it is determined that there is no noise.
  • the sound pressure level of the environmental noise signal is less than or equal to the fifth threshold, indicating that the environment is relatively quiet. From the description of the above embodiment, it can be seen that when the environment is quiet, the user can perceive the noise to the bottom, that is, when the environment is quiet enough, The noise floor can be detected. Therefore, in the embodiment of the present application, when the sound pressure level of the environmental noise signal is less than or equal to the fifth threshold, it is determined that there is a noise floor, and the noise floor needs to be reduced.
  • FIG. 32 is a schematic diagram of the working principle of background noise detection and noise reduction processing. Refer to FIG. 32 to understand the active noise reduction method described in this application.
  • the above method for updating filtering parameters specifically includes step 24024.
  • Step 24024 Reduce the gain of the feedforward path and the gain of the feedback path in the filter parameters.
  • the gain of the feedforward path and the gain of the feedback path respectively have a linear relationship with the environmental noise signal, and the gain of the feedforward path and the gain of the feedback path change with the smooth change of the sound pressure level of the environmental noise signal.
  • the smaller the sound pressure level of the environmental noise signal the smaller the gain of the feedforward path and the gain of the feedback path.
  • the gain of the feedforward path and the gain of the feedback path are determined according to the linear relationship between the gain of the feedforward path and the gain of the feedback path and the environmental noise signal respectively.
  • the method for detecting whether there is wind noise specifically includes step 3301 to step 3302.
  • Step 3301 Collect the second signal through the reference microphone of the headset, and collect the third signal through the call microphone of the headset.
  • the second signal and the third signal are collected, the second signal and the third signal are down-sampled at a frequency of 16KHz.
  • Step 3302 in the case that the correlation between the second signal and the third signal is less than the sixth threshold, determine that there is wind noise interference; if the correlation between the second signal and the third signal is greater than or equal to the sixth threshold In this case, it is determined that there is no wind noise interference.
  • the second signal and the third signal are respectively Fourier transformed, and then the correlation function (the existing correlation calculation method) is used to calculate the correlation between the second signal and the third signal, and then based on the correlation
  • the size of the sex determines whether there is wind noise. It should be understood that the result of wind noise detection is no wind or wind.
  • FIG. 34 is a schematic diagram of the working principle of wind noise detection and noise reduction processing. Refer to FIG. 34 to understand the active noise reduction method described in this application.
  • the above-mentioned method for updating filter parameters specifically includes step 24025a to step 24025c.
  • Step 24025a Analyze the energy of the second signal to determine the level of wind noise interference.
  • the level of wind noise interference may include light wind or strong wind.
  • two preset thresholds can be set, such as a first preset threshold and a second preset threshold.
  • the first preset threshold is less than the second preset threshold.
  • the threshold is set, it is determined that there is no wind.
  • the energy of the second signal is greater than the first preset threshold and less than the second preset threshold, the level of wind noise interference is low wind, and when the energy of the second signal is greater than or equal to the second preset At the threshold, the level of wind noise interference is strong wind.
  • Step 24025b Monitor the level of wind noise interference, and determine the corresponding wind noise control state.
  • the wind noise control state may include one of the following (11 types): no wind state, no wind entering small wind state, small wind entering high wind state, strong wind entering small wind state, strong wind entering small wind and then entering high wind State, small wind enters no wind state, small wind enters no wind and then enters low wind state, small wind hold state, high wind hold state, high wind to small wind retreat state or small wind to no wind retreat state.
  • the above-mentioned 11 wind noise control state can also be illustrated by FIG. 35.
  • Step 24025c Use the fourth filter parameter to concentrate the filter parameters corresponding to the wind noise control state, and update the filter parameters corresponding to the feedforward path in the filter parameters.
  • the fourth filter parameter set includes filter parameters corresponding to the feedforward path corresponding to various wind noise control states.
  • the filter parameter corresponding to the feedforward path may be the parameter of the low frequency shelf filter in the feedforward path, including the center frequency and gain of the low frequency shelf filter.
  • the filter parameters corresponding to the above-mentioned feedforward path change smoothly with time. For example, in a set time period, one set of filter parameters is used for wind noise control, and another set of filter parameters is used for wind noise control in another set time period.
  • the filter parameter corresponding to the feed-forward path is the parameter of the low-frequency shelf filter as an example.
  • the embodiment of the present application provides a parameter design solution for the low-frequency shelf filter. Referring to FIG. 35 and FIG. 36, the above can be determined Filter parameters corresponding to 11 different wind noise control states. For example, referring to Fig. 36, for the state where small wind turns to strong wind, wind noise control is performed within 50 milliseconds by means of smooth transition of parameters.
  • the center frequency and gain are (712Hz, -11.2dB) ), (1024Hz, -12.4dB), (1544Hz, -14.4dB), (2272Hz, -17.2dB) and (3000Hz, -20dB) are used as the parameters of the low-frequency shelf filter to process the signal of the feedforward path.
  • the signal of the feedforward path is processed with a parameter with a gain of -140dB.
  • the low-frequency shelf filter is updated to a through filter.
  • control duration corresponding to each group of center frequency and gain can be set, which is specifically determined according to actual conditions and is not limited in the embodiment of the present application.
  • the wind noise control state determined in the above step 2045b as the state 4 in the above table 1 (the state of strong wind entering small wind and then entering high wind) as an example, 20 seconds, (3000Hz, -20dB), (2636Hz, -18.6dB) , (2272Hz, -17.2dB), (1908Hz, -15.8dB), (1544Hz, -14.4dB), (1180Hz, -13dB), (1024Hz, -12.4dB), (868Hz, -11.8dB), (712Hz , -11.2dB), (556Hz, -10.6dB) and within 500 milliseconds, the center frequency and gain are (712Hz, -11.2dB), (1024Hz, -12.4dB), (1544Hz, -14.4dB), ( 2272Hz, -17.2dB) and (3000Hz, -20dB) are used as the filter parameters corresponding to the updated feedforward path.
  • the earphone includes the earphone corresponding to the left ear and the earphone corresponding to the right ear.
  • the earphone corresponding to the left ear is referred to as the left earphone for short
  • the earphone corresponding to the right ear is referred to as the right earphone.
  • the headset When a user uses a headset, the user can wear one headset (left headset or right headset) or two headsets (left headset and right headset).
  • the hardware structure of the left earphone and the right earphone are similar, and both have corresponding microphones, ANC chips, and microprocessors. In the noise reduction process, the left earphone and the right earphone respectively perform active noise reduction methods.
  • the active noise reduction method further includes: synchronously performing wind noise control on the left and right ears of the user.
  • the wind noise control state corresponding to the left ear and the wind noise control state corresponding to the right ear are respectively determined, and then the wind noise control state corresponding to the left ear and the wind noise control state corresponding to the right ear are performed. Synchronization, thereby updating the filter parameter according to the synchronized wind noise control state, the left earphone performs noise reduction processing based on the filter parameter, and the right earphone also performs noise reduction processing based on the filter parameter.
  • the above method for synchronizing the wind noise control state corresponding to the left ear and the wind noise control state corresponding to the right ear specifically includes: according to the priority of the wind noise control state, the wind noise control state corresponding to the left ear and the right ear are synchronized. In the wind noise control state corresponding to the ear, the low priority wind noise control state is adjusted to the high priority wind noise control state.
  • the left earphone and the right earphone can communicate with each other through Bluetooth.
  • the left earphone detects the wind noise control state and the right earphone detects the wind noise control state change the left earphone and the right earphone notify each other of their respective The wind noise control state, and then the wind noise control state synchronization is performed according to the above priority strategy.
  • the wind noise control states of the left ear and the right ear need to be synchronized, that is, the wind noise control state corresponding to the left earphone or the right earphone is shown in Table 2. In either case, the respective wind noise control status needs to be sent to the other party for synchronization.
  • the priorities of the above six wind noise control states from high to low are: 2, 4, 3, 6, 1, 5.
  • the other earphone will enter the wind noise control state synchronously. For example, if the wind noise control state (state number) corresponding to the left earphone is 4, the left earphone will Wind noise control status 4 is sent to the right earphone. If the wind noise control status corresponding to the right earphone is 1, then the right earphone needs to change its corresponding wind noise control status to 4, that is, the wind noise control status corresponding to the right earphone remains Synchronize.
  • the priority of wind noise control state 3 can also be the same as wind noise control state 4.
  • the priority of the wind noise control state 1 can be the same as the wind noise control state 6. Have the same priority.
  • an application corresponding to the headset is installed on the terminal. After the user opens the application and establishes a communication connection with the headset (left headset and/or right headset), the user can perform corresponding operations on the terminal , To control the headset to work in different working modes, for example, to make the headset work in the ANC working mode.
  • different noise reduction modes may be further selected in the ANC working mode.
  • the user can turn on one or more of the above-mentioned howling noise, clipping noise, noise floor or wind noise according to the characteristics of the environment where the user is currently located. For example, if the user is currently on a windy hillside, the user can turn on the wind noise control mode to detect wind noise and reduce noise.
  • the terminal may also display a setting interface in the ANC working mode, which at least includes the options and settings of the ANC control mode in the above embodiment.
  • a setting interface in the ANC working mode which at least includes the options and settings of the ANC control mode in the above embodiment.
  • the terminal displays the interface shown in FIG. 18A (b) or FIG. 18B (b) in the foregoing embodiment.
  • the terminal displays an interface 3702 shown in (b) in Figure 37.
  • the interface 3702 includes options for different noise control modes.
  • the interface 3702 includes "Howell Call control mode” option 3702a, "clipping control mode” option 3702b, "noise control mode” option 3702c and “wind noise control mode” option 3702d, when the user selects "wind noise control mode” option 3702d in this interface 3702
  • “wind noise control mode” option 3702d if the user clicks the "wind noise control mode” option 3702d, the headset will perform wind noise detection and noise reduction processing.
  • the user can activate one control mode or multiple control modes at the same time according to actual needs.
  • the active noise reduction method provided in the embodiment of the present application further includes: the terminal displays a noise detection result, and the noise detection result includes at least one of the following: howling noise, clipping noise, noise floor, or wind noise.
  • the earphone after the earphone detects the abnormal noise, the earphone sends instruction information to the terminal to indicate the type of the abnormal noise, and the terminal displays the noise detection result.
  • the terminal may also display a setting list in the ANC working mode, and the setting list includes at least the options set by the ANC control mode in the foregoing embodiment
  • ANC noise reduction mode setting options can also include viewing options for noise detection results.
  • the terminal displays the interface 3801 as shown in Figure 38(a), and below the "ANC Mode” option in the interface 3801 is displayed "Noise Reduction Mode” Settings” option and "Noise detection result” option.
  • the terminal displays the interface 3802 shown in (b) in Figure 38.
  • the interface 3802 displays the type of noise currently detected. For example, it is detected that the current noise type is howling noise. .
  • the active noise reduction method provided in the embodiment of the present application further includes: the terminal displays an index corresponding to the filter parameter, and the index is an index of the current filter parameter in a preset filter parameter set.
  • the index of the filter parameter may be represented by different gears.
  • the filter parameter includes N 1 gears, and each gear corresponds to a different filter parameter.
  • the gear position of the filter parameter is displayed on the terminal in the form of a disc, or may be displayed in the form of a bar, of course, it may also be displayed in other forms, which is not limited in the embodiment of the present application.
  • the earphone detects the presence of abnormal noise, and then updates the filter parameters on the basis of a set of initialized filter parameters, and displays the updated filter parameter index (that is, gear) on the display screen of the terminal, so that the user can intuitively know the current drop noisysy situation (e.g. Figure 20).
  • an embodiment of the present application provides a headset.
  • the headset includes an acquisition module 3901 and a processing module 3902.
  • the obtaining module 3901 is used in the case of ANC headset is in operating mode, acquiring a first set of filter parameters; the first set of filter parameters N 1 headphone set of filter parameters prestored in a group, for example the acquisition module 3901 It is used to execute step 901 in the foregoing method embodiment.
  • the processing module 3902 is configured to use the first set of filter parameters to reduce noise.
  • the processing module 3902 is configured to perform step 902 in the foregoing method embodiment.
  • the headset provided in the embodiment of the present application further includes a generating module 3903, a determining module 3904, a receiving module 3905, a first signal acquisition module 3906, a second signal acquisition module 3907, a detection module 3908, and an update module 3909.
  • the generating module 3903 is configured to execute step 903 (including step 9031) and step 1605 in the foregoing method embodiment.
  • the determination module 3904 is used to execute step 905, step 1002 to step 1004, or step 1102 to step 1105, or step 1202 to step 1204, or step 1302 to step 1304, or step 1402 to step 1403 and step in the above method embodiment 1609.
  • the receiving module 3905 is configured to execute step 1603 and step 1608 in the foregoing embodiment.
  • the first signal collection module 3906 is configured to execute step 1001, step 1101, step 1201, step 1301, step 2403, etc. in the foregoing method embodiment.
  • the second signal collection module 3907 is configured to execute step 1101, step 1201, step 1301, step 2403, etc. in the foregoing method embodiment.
  • the detection module 3908 is used to update the first set of filter parameters. For example, the detection module 3908 is used to perform step 2401 in the above method embodiment.
  • the update module 3909 is configured to execute step 2402 in the foregoing method embodiment.
  • the foregoing modules can also perform other related actions in the foregoing method embodiments.
  • the acquisition module 3901 is also used to perform step 904 and step 1401
  • the processing module 3902 is also used to perform step 906, step 1604, step 16010, and step 2404.
  • steps 904 and step 1401 are also used to perform step 906, step 1604, step 16010, and step 2404.
  • the device embodiment described in FIG. 39 is only illustrative.
  • the division of the above-mentioned units (or modules) is only a logical function division, and there may be other divisions in actual implementation, such as multiple units. Or components can be combined or integrated into another system, or some features can be omitted or not implemented.
  • the functional units in the various embodiments of the present application may be integrated into one module, or each module may exist alone physically, or two or more units may be integrated into one module.
  • the above-mentioned modules in FIG. 39 can be implemented in the form of hardware or software functional units.
  • the acquisition module 3901, the processing module 3902, the generation module 3903, the determination module 3904, the detection module 3908, and the update module 3909 may be generated by the processor of the headset after reading the program code stored in the memory Software function module to achieve.
  • the above modules can also be implemented by different hardware of the headset, for example, the acquisition module 3901, the generation module 3903, the determination module 3904, the detection module 3908, and the update module 3909 are implemented by the headset's microprocessor (for example, the microprocessor 202 in FIG. 2).
  • a part of the processing resources (for example, one core or two cores in a multi-core processor) is implemented in a multi-core processor, and the processing module 3902 is implemented by the ANC chip of the headset (for example, the ANC chip 203 in FIG. 2).
  • the above-mentioned first signal acquisition module 3906 is implemented by the error microphone of the earphone
  • the second signal acquisition module 3907 is implemented by the reference microphone of the earphone
  • the receiving module 3905 is realized by the network interface of the earphone or the like.
  • the above functional modules can also be implemented by a combination of software and hardware.
  • the detection module 3908 and the update module 3909 are software functional modules generated after the processor reads the program code stored in the memory.
  • the terminal includes a determining module 4001 and a sending module 4002.
  • the determining module 4001 for determining a first set of filter parameters; the first set of filter parameters N 1 headphone set of filter parameters prestored in a group, for example, determining module 4001 for performing the above-described method steps in the embodiment 1601, Specifically, it includes step 16011b to step 16011e, step 16012b to step 16012e, step 16013b to step 16013e, step 16014b to step 16014d, or step 16015b to step 16015d.
  • the sending module 4002 is used to send first indication information to the earphone, and the first indication information is used to instruct the earphone to use the first set of filter parameters to reduce noise.
  • the sending module 4002 is used to execute step 1602 in the above method embodiment and so on.
  • the terminal provided in the embodiment of the present application further includes a receiving module 4003, an obtaining module 4004, and a display module 4005.
  • the receiving module 4003 is used to execute step 16011a, step 16012a, step 16013a, step 16014a, step 16015a, step 1601b, step 1606b, etc. in the foregoing method embodiment.
  • the above-mentioned acquisition module 4004 is used to execute step 16011a, step 16012a, step 16013a, step 16015a, etc. in the above method embodiment.
  • the above-mentioned display module 4005 is used to execute step 1601a and step 1606a in the above-mentioned method embodiment.
  • the above modules can also perform other related actions in the above method embodiments.
  • the determining module 4001 is also used to perform step 1601c, step 1606, step 1606c, etc.
  • the sending module is also used to perform step 1607.
  • the device embodiment described in FIG. 40 is only illustrative.
  • the division of the above-mentioned units (or modules) is only a logical function division.
  • components can be combined or integrated into another system, or some features can be omitted or not implemented.
  • the functional units in the various embodiments of the present application may be integrated into one module, or each module may exist alone physically, or two or more units may be integrated into one module.
  • the above-mentioned modules in FIG. 40 can be implemented in the form of hardware or software functional units.
  • the above determination module 4001 and acquisition module 4004 may be implemented by software function modules generated after the processor of the terminal reads the program code stored in the memory.
  • the above-mentioned modules can also be implemented by different hardware of the terminal.
  • the determining module 4001 is implemented by a part of the processing resources in the terminal's processor (for example, one core or two cores in a multi-core processor), or a field programmable gate array is used. (field-programmable gate array, FPGA), or programmable devices such as coprocessors.
  • the foregoing sending module 4002 and receiving module 4003 are implemented by the network interface of the terminal and the like.
  • the display module 4005 is implemented by the display screen of the terminal.
  • N groups of filter parameters are pre-stored on the earphone, and the N groups of filter parameters are respectively used in Environmental sound noise reduction is performed in N kinds of leakage states, and the noise reduction effect of the N groups of filter parameters when applied to the earphone varies with the change of the leakage state between the earphone and the ear canal.
  • recording signals corresponding to N different ear canal environments can be processed to generate N sets of filter parameters, and the N sets of filter parameters are stored in the memory of the semi-open active noise reduction headset.
  • the N groups of filter parameters are used for noise reduction of ambient sound under N kinds of leakage states, and have universal applicability, and meet the individual needs of different people.
  • the method for generating the N groups of filter parameters reference may be made to the related description in the foregoing embodiment, which is not described in detail here.
  • the N groups of filter parameters are used as alternative filter parameters for selection.
  • a scenario in the process of the user using the active noise reduction headset is: during the online operation of the headset with the ANC function turned on, the wearing state of the headset has changed, resulting in a leakage state between the headset and the ear canal. Changes, the set of filtering parameters currently applied by the headset is no longer the optimal set of filtering parameters, that is, the noise reduction effect of the headset when the current set of filtering parameters is applied for noise reduction becomes worse, which affects the user's listening experience.
  • the headset is not off the ear, the user feels that the current wearing posture is uncomfortable, the user manually adjusts the headset, or is affected by other external factors, so that the degree of sealing (or fit) between the headset and the user’s ear canal occurs Changes, for example, the degree of sealing becomes lower or the degree of sealing becomes higher.
  • an embodiment of the present application provides an active noise reduction method, which is applied to a headset with an ANC function.
  • the active noise reduction method includes steps 4101 to 4103.
  • Step 4101 When the earphone is in the ANC working mode, detect whether the leakage state between the earphone and the ear canal has changed.
  • the leakage state is formed by the earphone and different ear canal environments.
  • the ear canal environment is related to the characteristics of the user’s ear canal and the posture of the user wearing the earphone. Different ear canal characteristics and different postures of wearing the earphone are related.
  • the combination can form a variety of ear canal environments and also correspond to a variety of leakage conditions.
  • N kinds of leakage states can express the range of the fit between N kinds of earphones and human ears, and can express the degree of sealing between N kinds of earphones and human ears; any kind of leakage state does not specifically refer to a specific earphone wearing state. Instead, perform a large number of statistics based on the impedance characteristics of the leakage state, and obtain typical or differentiated leakage scenarios.
  • the wearing state of the earphone corresponds to an ear canal environment, thereby forming a leakage state.
  • the wearing state of the earphone is different due to the characteristics of the user's ear canal and the posture of the user wearing the earphone.
  • the current wearing state of the earphone corresponds to a stable ear canal environment, that is, to a stable ear canal feature and wearing posture.
  • the noise reduction effect of the above-mentioned N groups of filter parameters when applied to the earphone varies with the change of the wearing state of the earphone.
  • the frequency band for detecting whether the leakage state between the earphone and the ear canal has changed (hereinafter referred to as the detection frequency band) can be set according to the actual situation, for example, the detection frequency band can be 100Hz-1kHz, 125Hz -500 Hz and other low and medium frequency bands, or other frequency bands, this embodiment of the application does not limit this.
  • Step 4102 in a case where a change in the leakage state between the earphone and the ear canal is detected, update the filter parameters of the earphone from the first set of filter parameters to the second set of filter parameters.
  • the first set of filter parameters and the second set of filter parameters are two different sets of filter parameters in the N sets of filter parameters pre-stored by the headset, and the N sets of filter parameters are used to perform environmental sound reduction under N types of leakage conditions.
  • Noise, N kinds of leakage states are formed by the earphone and N different ear canal environments.
  • the noise reduction effect of the earphone when the second set of filter parameters is applied is better than the noise reduction effect of the earphone when the other filter parameters of the N sets of filter parameters are applied.
  • the environmental noise is the noise formed by the external environment in the ear canal of the user.
  • the environmental noise includes background noise in different scenes, such as high-speed rail scenes, office scenes, airplane flight scenes, etc., which are not limited in the embodiments of the present application.
  • the above-mentioned first set of filter parameters is a set of filter parameters applied by the earphone when the leakage state between the earphone and the ear canal does not change.
  • the first set of filter parameters may be a set of initial filter parameters determined after the ANC function of the headset is turned on.
  • the prompt sound is used as the test audio to be adapted for the user
  • a set of optimal filter parameters, or a set of initial filter parameters set by other means; the first set of filter parameters can also be implemented by implementing the active noise reduction method provided in the embodiment of this application.
  • the last time The updated set of filtering parameters is not specifically limited in the embodiment of the present application.
  • Step 4103 Use the second set of filter parameters to reduce noise.
  • using the second set of filter parameters to perform noise reduction specifically includes: using the second set of filter parameters to process the sound signal collected by the reference microphone of the headset and the sound signal collected by the error microphone of the headset to generate Reverse noise signal, the reverse noise signal can attenuate part of the environmental noise signal in the ear canal, thereby weakening the noise signal in the user's ear canal, and realizing the noise reduction of the environmental sound.
  • the filter parameters of the earphone are updated from the first set of filter parameters to the second set of filter parameters.
  • the above step 4101 can be continued. , To detect whether the leakage state between the earphone and the ear canal changes, and if the leakage state between the earphone and the ear canal changes again, continue to update the filter parameters of the earphone.
  • the filter parameters of the earphone can be adaptively updated according to the change of the leakage state between the earphone and the ear canal when the user uses the earphone.
  • the noise reduction is performed based on the updated filtering parameters, which can improve the noise reduction effect.
  • the active noise reduction method provided in the embodiments of the present application can be applied to a scenario where the headset has no downlink signal, and can also be applied to a scenario where the headset has a downlink signal.
  • the method for determining whether the headset has a downlink signal may include: acquiring the downlink signal of the headset during the operation of the headset, and if the energy of the downlink signal of the headset is less than the first preset energy threshold, then It is determined that the earphone has no downlink signal; if the energy of the downlink signal of the earphone is greater than or equal to the first preset energy threshold, it is determined that the earphone has a downlink signal.
  • the energy of the downlink signal may be the frame energy of the downlink signal.
  • the downlink signal of the headset is obtained as described above, the downlink signal is filtered to obtain the downlink signal in the detection frequency band, and then the frame energy of the downlink signal is calculated When the frame energy of the downlink signal is less than the first preset energy threshold, it is determined that there is no downlink signal.
  • the energy of the downlink signal may be the total energy of the amplitude spectrum.
  • a short-time Fourier transform is performed on the downlink signal, and the total amplitude spectrum of the downlink signal in the detection frequency band is calculated. Energy. When the total energy of the amplitude spectrum of the downlink signal is less than the first preset energy threshold, it is determined that the headset has no downlink signal.
  • the first preset energy threshold corresponding to the different definition methods may be different, and the first preset energy threshold can be set according to actual needs. Not limited.
  • step 4101 (that is, detecting whether the leakage state between the earphone and the ear canal has changed) may go through steps 41011a to 41011c.
  • Step 41011a Collect the first signal through the error microphone of the headset, and collect the second signal through the reference microphone of the headset.
  • Step 41011b Calculate the long-term energy ratio frame by frame according to the first signal and the second signal.
  • the sampling frequency of the first signal or the second signal is a frequency of 16 kHz
  • the duration of each frame signal can be preset, for example, set to 5 milliseconds (ms) or 20 ms, which is specifically set according to actual conditions.
  • the application examples are not limited.
  • the long-term energy ratio of the audio frame is an indicator that reflects the noise reduction effect.
  • a larger long-term energy ratio indicates a worse noise reduction effect, and a smaller long-term energy ratio indicates a better noise reduction effect.
  • the long-term energy ratio of the current frame can be implemented by the following A1-A2.
  • A1. Calculate the average energy ratio of the current frame of the first signal and the second signal.
  • the following formula (1) is used to calculate the average energy ratio of the current frame of the first signal and the second signal.
  • R(m) is the average energy ratio of the current frame of the first signal and the second signal
  • P err (m) is the average energy of the current frame of the first signal
  • Pref (m) is the current frame of the second signal
  • the average energy of the current frame is the mth frame.
  • A2. Determine the long-term energy ratio of the current frame according to the average energy ratio of the current frame of the first signal and the second signal.
  • the long-term energy ratio of the current frame is a smooth result of the energy ratio of the current frame and the historical frame (the historical frame in the embodiment of the present application refers to the previous frame of the current frame).
  • the long-term energy ratio of the current frame may be a smooth result of the energy ratio of the current frame and the long-term energy ratio of the historical frame.
  • the following formula (2) is used to calculate the long-term energy ratio of the current frame.
  • R smooth (m) is the long-term energy ratio of the current frame
  • R(m) is the average energy ratio of the current frame
  • R smooth (m-1) is the long-term energy ratio of the historical frame
  • is the smoothing factor.
  • the frame is the m-1th frame.
  • the detection frequency band can be 100Hz-1kHz
  • the first signal is collected by the error microphone
  • the second signal is collected by the reference microphone
  • the first signal and the second signal can be processed by a bandpass filter. Filter processing to obtain the first signal and the second signal in the detection frequency band.
  • the long-term energy ratio of the current frame can also be implemented by the following B1-B3.
  • a short-time Fourier transform is performed on the first signal and the second signal to obtain the frequency spectrum of the first signal and the second signal.
  • the order of the aforementioned short-time Fourier transform may be 256. If the signal frame of the first signal or the second signal contains less than 256 samples, the first signal or the second signal is framed Processing, the number of sample points of the signal frame is assembled into 256 samples, that is, the frequency band of 0Hz-16kHz corresponds to 256 frequency points.
  • the long-term stationary energy of the current frame of the first signal can be calculated using the following formula (3).
  • P err (m, w i ) is the frequency point w i , the long-term stationary energy of the current frame of the first signal
  • P err (m-1, w i ) is the frequency point w i
  • a and b are smoothing coefficients.
  • the long-term stationary energy of the current frame of the second signal can be calculated using the following formula (4).
  • Pref (m, w i ) is the long-term stationary energy of the current frame of the second signal at the frequency point w i
  • Pref (m-1, w i ) is the frequency point w i
  • the second signal Long-term stationary energy of historical frames
  • a and b are smoothing coefficients.
  • B3. Determine the long-term energy ratio of the current frame according to the long-term stationary energy of the current frame of the first signal and the long-term stationary energy of the current frame of the second signal.
  • R(m, w i ) is the long-term stationary energy ratio of the current frame of the first signal and the second signal frame at the frequency point w i.
  • the average frame of the long-term stationary energy ratio of all frequency points of the current frame is calculated, and the average value of the long-term stationary energy ratio is the long-term energy ratio of the current frame, specifically referring to the following formula (6).
  • R smooth (m) is the long-term energy ratio of the current frame
  • K is the total number of frequency points corresponding to the current frame.
  • the detection frequency band may be 100Hz-1kHz.
  • the transformation result in the detection frequency band is selected to calculate the length of the current frame. Time-to-energy ratio.
  • Step 41011c when the long-term energy ratio of the current frame is increased, and the difference between the long-term energy ratio of the current frame and the long-term energy ratio of the historical frame is greater than the first threshold, determine the leakage between the earphone and the ear canal The state has changed; otherwise, it is determined that the leakage state between the earphone and the ear canal has not changed.
  • the long-term energy ratio R smooth (m) of the current frame is obtained, and the difference between the long-term energy ratio of the current frame and the long-term energy ratio of the historical frame R smooth (m)-R smooth (m-1) is used.
  • R smooth (m)-R smooth (m-1)>0 the long-term energy ratio of the current frame increases, and the noise reduction effect of the headset becomes worse;
  • R smooth (m)-R smooth (m-1) ⁇ 0 the long-term energy ratio of the current frame is reduced, and the noise reduction effect of the earphone becomes better.
  • the magnitude of the increase in the long-term energy ratio of the current frame is greater than the first preset threshold, that is, R smooth (m)-R smooth (m-1)> ⁇ 1 ( ⁇ 1 is the first threshold, and ⁇ 1 is greater than 0. ), indicating that the leakage state between the earphone and the ear canal has changed, and the noise reduction effect of the earphone is relatively poor due to the change in the leakage state between the earphone and the ear canal.
  • the filter parameters of the earphone need to be updated to improve The noise reduction effect of headphones.
  • the degree of sealing between the earphone and the human ear may become higher, or the degree of sealing of the earphone may become lower, that is, the higher or lower degree of sealing of the earphone may affect the earphone.
  • the noise reduction effect of the earphone results in the deterioration of the noise reduction effect when the earphone applies the current set of filter parameters (for example, the first set of filter parameters mentioned above) for noise reduction.
  • the magnitude of the increase in the long-term energy ratio of the current frame is less than or equal to the first preset threshold, that is, R smooth (m)-R smooth (m-1) ⁇ 1 ( ⁇ 1 is the first threshold, ⁇ 1 Greater than 0), indicating that the leakage state between the earphone and the ear canal has not changed, and the noise reduction effect of the earphone has not deteriorated.
  • the first preset threshold that is, R smooth (m)-R smooth (m-1) ⁇ 1 ( ⁇ 1 is the first threshold, ⁇ 1 Greater than 0
  • the N sets of pre-stored filter parameters corresponding to the N types of leakage states in turn reflect that the degree of sealing between the headset and the human ear changes from high to low, or the N sets of pre-stored filter parameters in the headphones sequentially correspond to the N types of leakage states that reflect the headphones.
  • the degree of sealing with the human ear changes from low to high, which is not limited in the embodiment of the present application.
  • the N types of leakage states corresponding to the N sets of filter parameters pre-stored in the earphone in turn reflect the change in the degree of sealing between the earphone and the human ear as an example to illustrate the process of updating the filter parameters.
  • sexual description
  • the above step 4102 (update the filter parameters of the earphone from the first set of filter parameters to the second set of filter parameters) It can be implemented through step 41021a to step 41021c, or through step 41021a to step 41021b, and step 41021d to step 41021f.
  • Step 41021a Update the filter parameters of the earphone from the first set of filter parameters to the third set of filter parameters.
  • the index of the first group of filter parameters in the pre-stored N groups of filter parameters is n
  • the index of the third group of filter parameters is n-1.
  • R smooth (m)-R smooth (m-1)> ⁇ 1 it can be known that the leakage state between the earphone and the ear canal has changed. At this time, it is impossible to know whether the degree of sealing between the earphone and the human ear becomes higher or lower. It should be understood that if the degree of sealing between the earphone and the human ear becomes higher, when the filter parameter of the earphone is updated, the index of the filter parameter should be reduced, for example, the index of the filter parameter of the earphone should be reduced to n-1. If the degree of sealing between the earphone and the human ear becomes lower, when the filter parameter of the earphone is updated, the index of the filter parameter should be increased, for example, the index of the filter parameter of the earphone should be increased to n+1.
  • the direction of updating the filter parameter of the earphone may be: reducing the index of the filter parameter or increasing the index of the filter parameter.
  • the filter parameter is updated in a manner of reducing the index of the filter parameter.
  • the filter parameters of the headset are updated from the first set of filter parameters (index n) to the third set of filter parameters (index n-1), and the noise reduction effect when the third set of filter parameters is applied to the headset is detected, and further Yes, according to the noise reduction effect when the earphone applies the third set of filter parameters, it is determined whether the direction of updating the filter parameters this time is appropriate, that is, whether the method of reducing the index of the filter parameters is appropriate.
  • Step 41021b Determine the long-term energy ratio of the current frame when the earphone applies the third set of filter parameters for noise reduction.
  • the long-term energy ratio of the current frame is used to measure the noise reduction effect of the earphone. If the earphone applies the third set of filter parameters for noise reduction, the long-term energy ratio of the current frame continues to increase, that is, R smooth (m) -R smooth (m-1)>0, it means that the noise reduction effect becomes worse. If the earphone applies the third set of filter parameters for noise reduction, the long-term energy ratio of the current frame will decrease, that is, R smooth (m)-R smooth (m-1) ⁇ 0, it means that the noise reduction effect becomes better.
  • Step 41021c If the earphone applies the third set of filter parameters for noise reduction, the long-term energy ratio of the current frame is reduced, then the index of the third set of filter parameters is used as the starting point, and the index of the filter parameters is reduced one by one until the earphone applies the current
  • the difference between the long-term energy ratio of the current frame and the long-term energy ratio of the historical frame is less than the second threshold, and the set of filter parameters corresponding to the current index is the second set of filter parameters .
  • the long-term energy ratio of the current frame is reduced, that is, R smooth (m)-R smooth (m-1) ⁇ 0, which indicates the noise reduction of the earphone
  • the effect becomes better.
  • the direction of updating the filter parameter of the earphone in the above step 41021a is appropriate, that is, the method of reducing the index of the filter parameter is feasible.
  • the third set of filter parameters may not be the best Filter parameters.
  • the filter parameters of the earphone are updated from the first set of filter parameters to the third set of filter parameters, when the earphone applies the third set of filter parameters for noise reduction, the long duration of the current frame is When the reduction of the energy ratio is greater than the second threshold, starting from the index of the third set of filter parameters, continue to reduce the index of the filter parameters one by one until the earphone applies a set of filter parameters corresponding to a certain index to reduce noise, The difference between the long-term energy ratio of the current frame and the long-term energy ratio of the historical frame is less than the second threshold, and the set of filter parameters is determined as the second set of filter parameters, and subsequently, the headset applies the second set of filter parameters for noise reduction .
  • Step 41021d If the earphone applies the third set of filter parameters for noise reduction, the long-term energy ratio of the current frame is increased, then the filter parameters of the earphone are updated from the third set of filter parameters to the fourth set of filter parameters.
  • the index of the fourth group of filter parameters is n+1.
  • the long-term energy ratio of the current frame increases, that is, R smooth (m)-R smooth (m-1)>0, indicating the noise reduction of the earphone
  • the index of the filter parameter of the earphone should be increased.
  • the filter parameter of the earphone is increased from n-1 to n+1, that is, step 41021d is to update the filter in the direction of increasing the index of the filter parameter. parameter.
  • Step 41021e Determine the long-term energy ratio of the current frame when the earphone applies the fourth set of filter parameters for noise reduction.
  • Step 41021f If the long-term energy ratio of the current frame decreases, starting from the index of the fourth group of filter parameters, increase the index of the filter parameters one by one until the earphone applies a group of filter parameters corresponding to the current index for noise reduction, The difference between the long-term energy ratio of the current frame and the long-term energy ratio of the historical frame is less than the second threshold, and a group of filter parameters corresponding to the current index is the second group of filter parameters.
  • the long-term energy ratio of the current frame is reduced, that is, R smooth (m)-R smooth (m-1) ⁇ 0, indicating that the earphone has noise reduction
  • the effect becomes better.
  • the direction of updating the filter parameter of the earphone in the above step 41021d is appropriate, that is, the way of increasing the index of the filter parameter is feasible.
  • the fourth set of filter parameters may not be the best filter parameters.
  • the long-term energy ratio of the current frame is When the reduction is greater than the second threshold, the index of the fourth set of filter parameters is used as the starting point, and the indexes of the filter parameters are increased one by one until the earphone applies a set of filter parameters corresponding to a certain index to reduce noise, the current frame's The difference between the long-term energy ratio and the long-term energy ratio of the historical frame is less than the second threshold, and the set of filter parameters is determined as the second set of filter parameters, and subsequently, the earphone applies the second set of filter parameters for noise reduction.
  • the filter parameters can also be updated by increasing the index of the filter parameters, for example, the earphones Adjust the index of the filter parameter from n to n+1, and then determine the noise reduction effect when the filter parameter with index n+1 is applied to noise reduction. If the filter parameter with index n+1 is applied to the earphone to reduce noise The noise effect becomes better, indicating that it is feasible to increase the index of the filter parameter, and then determine whether to continue to increase the index of the filter parameter; if the earphone applies the filter parameter of index n+1 for noise reduction, the noise reduction effect becomes worse.
  • the filter parameters of the earphone are updated from the first group of filter parameters to the second group of filter parameters.
  • the parameter process is the opposite of the above steps 41021a to 41021f. Based on the description of steps 41021a to 41021f, it can be clarified that when the N sets of pre-stored filter parameters of the headset correspond to the N types of leakage states in turn, they reflect the degree of sealing between the headset and the human ear.
  • the process of updating the filter parameters of the earphone from the first set of filter parameters to the second set of filter parameters will not be described in detail in the embodiment of the present application.
  • step 4101 can pass through step 41012a to step 41012d.
  • Step 41012a Collect the first signal through the error microphone of the headset, collect the second signal through the reference microphone of the headset, and acquire the reverse noise signal played by the speaker of the headset.
  • Step 41012b Determine the current frequency response curve information of the secondary channel according to the first signal, the second signal and the reverse noise signal.
  • the method for determining the current frequency response curve information of the secondary channel according to the first signal, the second signal and the reverse noise signal may specifically include: calculating the error microphone error of the earphone according to the first signal and the second signal. Residual signal; then use the reverse noise signal as a reference signal to adaptively filter the residual signal of the error microphone to obtain the current frequency response curve information of the secondary channel.
  • the first signal, the second signal, and the reverse noise signal are respectively subjected to short-time Fourier transform, and the transform result of the target noise reduction frequency band is selected to calculate the current frequency response curve information of the secondary channel.
  • the target noise reduction frequency band may be 100 Hz-1 kHz.
  • the following formula (7) can be used to calculate the residual signal of the error microphone at each frequency point of the earphone, and the residual signal of the error microphone is the error microphone
  • the signal ie, the first signal
  • w i is the frequency, the frequency spectrum of the residual signal of the error microphone X res (w i) (i.e., amplitude), X err (w i) w i is the frequency, the spectrum of the first signal, X ref (w i ) is the frequency spectrum of the second signal at the frequency point w i , and M PP (w i ) is the frequency response curve information (ie the transfer function of the primary channel) of a variety of offline designed primary channels at the frequency point w i The average value of the value.
  • X ref (w i )*M PP (w i ) is the environmental noise signal caused by the change of the leakage state.
  • the detection frequency band may be 100Hz-1kHz.
  • the transformation result in the detection frequency band is selected Used to calculate the current frequency response curve information of the secondary channel.
  • the reverse noise signal is used as the reference signal, and the Kalman filter and the normalized least mean square (NLMS) filter are used to obtain the residual signal of the error microphone.
  • NLMS normalized least mean square
  • Step 41012c Determine the target frequency response curve information matching the current frequency response curve information of the secondary channel from the frequency response curve information of the N sets of secondary channels corresponding to the N sets of pre-stored filter parameters.
  • the index of the first group of filter parameters in the pre-stored N groups of filter parameters is n
  • the index of a group of filter parameters corresponding to the target frequency response curve information is x
  • Step 41012d When the index x of a group of filter parameters corresponding to the target frequency response curve information and the index n of the first group of filter parameters satisfy
  • the index x of a set of filter parameters corresponding to the target frequency response curve information and the index n of the first set of filter parameters satisfy
  • the large deviation between the historical frequency response curve information of the first-level channel indicates that the noise reduction effect of applying the first set of filter parameters for noise reduction has deteriorated. In this case, it is determined that the leakage state between the earphone and the ear canal occurs Variety.
  • the foregoing step 4102 may be implemented through step 41022a.
  • Step 41022a Using the index n of the first group of filter parameters as a starting point, adjust the index of the filter parameters from n to x one by one, and a group of filter parameters corresponding to the index x is the second group of filter parameters.
  • the index of the filter parameter is updated from n to x.
  • the index of the filter parameter is Adjust one by one until the index of the filter parameter is x, so that the noise reduction effect smoothly transitions to the best effect.
  • the above-mentioned active noise reduction method in steps 41012a to 41012c and step 41022a is suitable for a noisy environment (that is, a noisy environment), and is not suitable for a quiet environment.
  • the reverse noise is very small.
  • the frequency response curve information of the secondary channel calculated with too small reverse noise is not accurate.
  • the following method may be used to determine whether the environment is noisy: the third signal is collected through the earphone's out-of-ear microphone, which may include a call microphone or a reference microphone; and the energy of the third signal is determined Whether it is greater than the second preset energy threshold. If the energy of the third signal is greater than the preset threshold, it indicates that the environment is noisy; otherwise, the environment is relatively quiet.
  • the energy of the third signal may be the long-term stationary energy of the third signal, and the long-term stationary energy is the long-term stationary energy of each frequency point in the detection frequency band after the short-time Fourier transform of the third signal average of.
  • the out-of-ear microphone of the headset may also be other out-of-ear microphones capable of collecting environmental noise other than the aforementioned call microphone and reference microphone, which is not limited in the embodiment of the present application.
  • the above method of updating the filter parameters of the earphone from the first set of filter parameters to the second set of filter parameters specifically includes: when the energy of the third signal is greater than the second preset energy threshold or the energy of the second signal is greater than the third preset When the energy threshold is set, the filter parameters of the earphone are updated from the first set of filter parameters to the second set of filter parameters.
  • step 4101 may pass through step 41013a to step 41013d.
  • Step 41013a Collect the first signal through the error microphone of the earphone, and obtain the downlink signal.
  • Step 41013b Determine the current frequency response curve information of the secondary channel according to the first signal and the downlink signal.
  • the above method for determining the current frequency response curve information of the secondary channel based on the first signal and the downlink signal may specifically include: using the downlink signal as a reference signal, and adaptively filtering the first signal to obtain the secondary channel Current frequency response curve information.
  • the lower row signal is used as the reference signal
  • the Kalman filter and the NLMS filter are used to perform adaptive filtering on the first signal
  • the amplitude of the converged filter is calculated, namely Get the current frequency response curve information of the secondary channel.
  • Step 41013c Determine the target frequency response curve information matching the current frequency response curve information of the secondary channel from the frequency response curve information of the N sets of secondary channels corresponding to the N sets of pre-stored filter parameters.
  • the index of a group of filter parameters corresponding to the target frequency response curve information is x, and the index of the above-mentioned first group of filter parameters in the pre-stored N groups of filter parameters is n.
  • Step 41013d when the index of a set of filter parameters corresponding to the target frequency response curve information and the index of the first set of filter parameters satisfy
  • the detection frequency band may be 125Hz-500Hz.
  • the transformation result in the detection frequency band is selected Used to calculate the current frequency response curve information of the secondary channel.
  • the foregoing step 4102 may be implemented through step 41023a.
  • Step 41023a Using the index n of the first group of filter parameters as a starting point, adjust the index of the filter parameters from n to x one by one, and a group of filter parameters corresponding to the index x is the second group of filter parameters.
  • step 41023a Please refer to the description of step 41022a in the foregoing embodiment, which will not be repeated here.
  • FIG. 45 shows a schematic diagram of a possible structure of the earphone involved in the foregoing embodiment.
  • the headset includes a detection module 4501, an update module 4502, and a processing module 4503.
  • the detection module 4501 is used for detecting whether the leakage state between the earphone and the ear canal has changed when the earphone is in the ANC working mode, for example, performing step 4101 (including step 4101 1b to step 4101 1c, or step 4012b to step 4101 in the above method embodiment). 41012d, or step 41013b to step 41013d).
  • the update module 4502 is configured to update the filter parameters of the earphone from the first set of filter parameters to the second set of filter parameters when the detection module detects that the leakage state between the earphone and the ear canal has changed, for example, execute the above method embodiment
  • step 4102 may include step 41021a to step 41021f, or 41022a, or step 41023a.
  • the processing module 4503 is configured to use the second set of filter parameters to reduce noise, for example, perform step 4103 in the foregoing method embodiment.
  • the headset provided in the embodiment of the present application further includes a first signal acquisition module 4504 and a second signal acquisition module 4505.
  • the first signal collection module 4504 is configured to collect the first signal through the error microphone of the earphone, for example, perform the actions of collecting the first signal in step 41011a, step 41012a, and step 41013a in the foregoing method embodiment.
  • the second signal collection module 4505 is configured to collect the second signal through the reference microphone of the earphone, for example, perform the actions of collecting the second signal in step 41011a and step 41012a in the foregoing method embodiment.
  • the earphone provided by the embodiment of the present application further includes an acquisition module 4506.
  • the acquisition module 4506 is used to acquire the reverse noise signal played by the speaker of the earphone. Action; or the acquisition module 4506 is used to acquire the downlink signal of the headset, for example, execute the action of collecting the downlink signal in step 41013a in the above method embodiment.
  • the headset provided in the embodiment of the present application further includes a third signal collection module 4507 and a determination module 4508, and the third signal collection module 4507 is configured to collect the third signal through the call microphone of the headset.
  • the determining module 4508 is used to determine whether the energy of the third signal is greater than the second preset energy threshold, so as to determine whether the environment is noisy.
  • Each module of the above-mentioned earphone can also be used to perform other actions in the above-mentioned method embodiment, and all relevant content of each step involved in the above-mentioned method embodiment can be quoted from the functional description of the corresponding functional module, which will not be repeated here.
  • the structure of the headset described in FIG. 45 is only schematic.
  • the division of each unit or module of the headset is only a logical function division.
  • the modules can be combined or can be divided. Integrate into another system, or some features can be ignored or not implemented.
  • Each functional unit or module in each embodiment of the present application may be integrated into one module, or each module may exist alone physically, or two or more units or modules may be integrated into one module.
  • the above-mentioned modules in FIG. 45 can be implemented in the form of hardware or software functional units.
  • the detection module 4501, the update module 4502, the processing module 4503, the acquisition module 4506, and the determination module 4508 may be software functional modules generated after the processor of the headset reads the program code stored in the memory. accomplish.
  • the above modules can also be implemented by different hardware of the headset.
  • the detection module 4501, the update module 4502, the acquisition module 4506, and the determination module 4508 are processed by part of the headset's microprocessor (for example, the microprocessor 202 in FIG. 2).
  • Resources for example, one core or two cores in a multi-core processor
  • the processing module 4502 is implemented by the ANC chip of the headset (for example, the ANC chip 203 in FIG. 2).
  • the first signal acquisition module 4504 is implemented by the error microphone of the earphone
  • the second signal acquisition module 4505 is implemented by the reference microphone of the earphone
  • the third signal acquisition module 4507 is implemented by the call microphone or the reference microphone of the earphone.
  • the above functional modules can also be implemented in a combination of software and hardware.
  • the detection module 4501, the update module 4502, and the determination module 4508 are software functional modules generated after the processor reads the program code stored in the memory.
  • the above embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • a software program it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instruction may be transmitted from a website, computer, server, or data center through a cable (Such as coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium can be a magnetic medium (for example, a floppy disk, a magnetic disk, a tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid state drive (SSD)), etc. .
  • the disclosed system, device, and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be divided. It can be combined or integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage media include: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Soundproofing, Sound Blocking, And Sound Damping (AREA)
  • Headphones And Earphones (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

本申请实施例提供一种主动降噪方法及装置,涉及音频技术领域,能够提升耳机的降噪效果。该方法应用于具有ANC功能的耳机,该方法包括:当耳机处于ANC工作模式时,获取第一组滤波参数,并利用该第一组滤波参数进行降噪。该第一组滤波参数是耳机预存储的N1组滤波参数中的一组,该N1组滤波参数分别用于在N1种泄漏状态下进行环境音降噪,该N1种泄漏状态是由耳机与N1种不同的耳道环境形成的。其中,耳机在当前的佩戴状态下,针对同一环境噪声,该耳机应用第一组滤波参数时的降噪效果优于耳机应用N1组滤波参数中其它滤波参数时的降噪效果,N1为大于或等于2的正整数。

Description

一种主动降噪方法及装置
本申请要求于2020年05月14日提交国家知识产权局、申请号为202010407692.7、申请名称为“一种半开放式耳机的主动降噪方法”的中国专利申请以及于2020年10月19日提交国家知识产权局、申请号为202011120314.7、申请名称为“一种主动降噪方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及音频技术领域,尤其涉及一种主动降噪方法及装置。
背景技术
相比于入耳式的耳机,半开放式耳机的出声口没有胶套,佩戴舒适性较好,无听诊器效应,适合长期佩戴。
由于半开放式耳机无胶套,无法被动隔离噪声,且半开放式耳机在不同的人耳、不同的佩戴姿势下音频的播放效果差异较大,因此对于半开放式耳机,主动降噪是面临的一个重要的问题。
发明内容
本申请实施例提供一种主动降噪方法及装置,能够提升耳机的降噪效果。
为达到上述目的,本申请实施例采用如下技术方案:
第一方面,本申请实施例提供一种主动降噪方法,应用于具有ANC功能的耳机,该方法包括:当耳机处于ANC工作模式时,耳机获取第一组滤波参数;并且耳机利用该第一组滤波参数进行降噪。其中,第一组滤波参数是耳机预存储的N 1组滤波参数中的一组;所述N 1组滤波参数分别用于在N 1种泄漏状态下进行环境音降噪;所述N 1种泄漏状态是由所述耳机与N 1种不同的耳道环境形成的;其中,所述耳机在当前的佩戴状态下,针对同一环境噪声,耳机应用第一组滤波参数时的降噪效果优于耳机应用N 1组滤波参数中其它滤波参数时的降噪效果;N 1为大于或等于2的正整数。
应理解,上述N 1种泄漏状态可以表达N 1种耳机与人耳的贴合度范围,可以表达N 1种耳机与人耳的密封程度;任意一种泄漏状态并非特指一种特定的耳机佩戴状态,而是根据泄漏状态的阻抗特性进行大量统计,得到的典型的或具备可差异化的泄漏场景。
本申请实施例提供的主动降噪方法可以根据用户佩戴耳机时该用户的耳道环境与耳机形成的泄漏状态确定与当前泄漏状态(也可以理解为当前佩戴状态)匹配的一组滤波参数(即上述第一组滤波参数),并基于该组滤波参数进行环境音降噪,能够满足用户的个性化降噪需求,提升降噪效果。
一种可能的实现方式中,本申请实施例提供的主动降噪方法还包括:至少根据第一组滤波参数和第二组滤波参数生成N 2组滤波参数。该N 2组滤波参数分别对应不同的ANC降噪强度;第二组滤波参数是耳机预存储的N 1组滤波参数中的一组;第二组滤波参数用于在N 1种泄漏状态中泄漏程度最小的状态下进行环境音降噪。应理解,该N 2组滤波参数中包括上述第一组滤波参数和第二组滤波参数。
一种可能的实现方式中,本申请实施例提供的主动降噪方法还包括:获取目标 ANC降噪强度;并且根据目标ANC降噪强度从N 2组滤波参数中确定第三组滤波参数;以及利用第三组滤波参数进行降噪。
本申请实施例提供的主动降噪方法中,在上述确定出第一组滤波参数之后,基于该第一组滤波参数和第二组滤波参数生成与当前用户适配的N 2组滤波参数,并且从该N 2组滤波参数中进一步确定与目标ANC降噪强度对应的第三组滤波参数,从而采用第三组滤波参数进行降噪,如此,能够根据环境噪声的状态选择合适的ANC降噪强度,降噪效果更加符合用户的需求。
一种可能的实现方式中,上述获取第一组滤波参数的方法包括:从终端接收第一指示信息,该第一指示信息用于指示耳机利用第一组滤波参数进行降噪。
一种可能的实现方式中,上述耳机包括误差麦克风;上述获取第一组滤波参数的方法包括:通过耳机的误差麦克风采集第一信号,并且获取耳机的下行信号;根据第一信号和下行信号确定次级通道的当前频响曲线信息;并且从预设的N 1个次级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息;以及将目标频响曲线信息对应的一组滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个次级通道的频响曲线信息。
一种可能的实现方式中,上述耳机包括误差麦克风和参考麦克风;上述获取第一组滤波参数的方法包括:通过耳机的误差麦克风采集第一信号,并且通过耳机的参考麦克风采集第二信号,以及获取耳机的下行信号;然后基于第一信号和第二信号确定误差麦克风的残差信号;以及根据误差麦克风的残差信号和下行信号确定次级通道的当前频响曲线信息;并且从预设的N 1个次级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息;进而将目标频响曲线信息对应的一组滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个次级通道的频响曲线信息。
一种可能的实现方式中,上述耳机包括误差麦克风和参考麦克风;上述获取第一组滤波参数的方法包括:通过耳机的误差麦克风采集第一信号,并且通过耳机的参考麦克风采集第二信号;然后根据第一信号和第二信号确定初级通道的当前频响曲线信息;并从预设的N 1个初级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息;以及将目标频响曲线信息对应的一组滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个初级通道的频响曲线信息。
一种可能的实现方式中,上述耳机包括误差麦克风和参考麦克风;上述获取第一组滤波参数的方法包括:通过耳机的误差麦克风采集第一信号,通过耳机的参考麦克风采集第二信号,并且获取耳机的下行信号;然后根据第一信号和第二信号确定初级通道的当前频响曲线信息,并且根据第一信号和下行信号确定次级通道的当前频响曲线信息;以及确定当前频响比值曲线信息,当前频响比值曲线信息是初级通道的当前频响曲线信息与次级通道的当前频响曲线信息之比;然后从预设的N 1个频响比值曲线信息中,确定与当前频响比值曲线信息匹配的目标频响比值曲线信息;进而将目标频响比值曲线信息对应的一组滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个频响比值曲线信息。
一种可能的实现方式中,上述耳机包括误差麦克风和参考麦克风;上述获取第一组滤波参数的方法包括:确定N 1组滤波参数分别对应的误差麦克风和参考麦克风的频 响差值曲线信息;以及将N 1组滤波参数对应的N 1个频响差值曲线信息中,目标频段对应的幅度最小的频响差值曲线确定为目标频响差值曲线,误差麦克风和参考麦克风的频响差值曲线信息是误差麦克风的频响曲线信息和参考麦克风的频响曲线信息之差;进而将目标频响差值曲线信息对应的一组滤波参数确定为第一组滤波参数。
一种可能的实现方式中,上述至少根据第一组滤波参数和第二组滤波参数生成N 2组滤波参数的方法包括:对第一组滤波参数和第二组滤波参数进行插值,生成N 2组滤波参数。
一种可能的实现方式中,上述获取目标ANC降噪强度的方法包括:从终端接收第二指示信息,第二指示信息用于指示耳机利用目标ANC降噪强度对应的第三组滤波参数进行降噪。
一种可能的实现方式中,上述获取目标ANC降噪强度的方法包括:根据当前环境噪声的状态确定目标ANC降噪强度。例如,当前环境比较安静,耳机自适应地根据环境噪声状态选择降噪强度较弱的ANC降噪强度;当前环境比较嘈杂时,耳机自适应地根据环境噪声的状态选择降噪强度较强的ANC降噪强度。
一种可能的实现方式中,在获取第一组滤波参数之前,本申请实施例提供的主动降噪方法还包括:接收第一指令,耳机工作于ANC工作模式,该第一指令用于控制耳机工作于ANC工作模式;或者,检测耳机是否入耳;在检测到耳机已入耳的情况下,耳机工作于ANC工作模式。
本申请实施例提供的主动降噪方法应用在耳机处于ANC工作模式的场景中,可知耳机处于ANC工作模式是确定第一组滤波参数的一种触发条件。
在一种实现方式中,当ANC功能开启时,耳机播放ANC开启的提示音,在播放该入耳提示音的过程中确定第一组滤波参数,即将该入耳提示音作为测试信号,用户根据主观听音感受确定第一组滤波参数。
在另一种实现方式中,当检测到耳机已入耳时,耳机工作于ANC工作模式,并且同时耳机将播放入耳提示音,在播放该入耳提示音的过程中确定第一组滤波参数,即将该入耳提示音作为测试信号,用户根据主观听音感受确定第一组滤波参数。
一种可能的实现方式中,上述获取第一组滤波参数的方法具体包括:在耳机处于ANC工作模式的情况下,接收第二指令,该第二指令用于指示耳机获取第一组滤波参数;其中,该第一组滤波参数与耳机在接收第二指令之前采用的滤波参数不同。
在一种情况下,上述确定出第一组滤波参数之后,耳机基于第一组滤波参数降噪,后续地,在耳机工作的过程中,用户还可以根据实际情况选择重新确定一组滤波参数用于降噪,此时,也可以通过发送第二指令指示耳机获取第一组滤波参数。
一种可能的实现方式中,在获取第一组滤波参数之后,在至少根据第一组滤波参数和第二组滤波参数生成N 2组滤波参数之前,本申请实施例提供的主动降噪方法还包括:接收第三指令,该第三指令用于触发耳机生成N 2组滤波参数。
在一种情况下,上述根据第一组滤波参数和第二组滤波参数生成N 2组滤波参数之后,从N 2组滤波参数中确定第三组滤波参数,耳机基于第三组滤波参数降噪,后续地,在耳机工作的过程中,用户还可以根据实际需求选择重新确定一组滤波参数用于降噪,即耳机重新获取第一组滤波参数。具体的,耳机将该耳机中的N 2组滤波参数恢复至上 述N 1组滤波参数,进而从N 1组滤波参数中重新确定第一组滤波参数,并利用重新获取的第一组滤波参数进行降噪。进一步,可选地,还可以根据重新获取的第一组滤波参数和第二组滤波参数,再生成新的N 2组滤波参数,并从N 2组滤波参数中确定第三组滤波参数,利用第三组滤波参数进行降噪。
一种可能的实现方式中,上述N 1组滤波参数是根据次级通道SP模式的录音信号和初级通道PP模式的录音信号确定的。其中,SP模式的录音信号包括下行信号、鼓膜麦克风的信号以及耳机的误差麦克风的信号;PP模式的录音信号包括鼓膜麦克风的信号、耳机的误差麦克风的信号以及耳机的参考麦克风的信号。
一种可能的实现方式中,本申请实施例提供的主动降噪方法还包括:检测是否存在异常噪声,该异常噪声包括下述至少一种:啸叫噪声、削波噪声或底噪;在检测到存在异常噪声的情况下,更新滤波参数,该滤波参数包括第一组滤波参数或第三组滤波参数;并且通过耳机的参考麦克风和误差麦克风采集声音信号;基于更新后的滤波参数,对参考麦克风采集的声音信号和误差麦克风采集的声音信号进行处理,生成反向噪声信号。
本申请实施例中,上述反向噪声信号用于减弱用户的耳内噪声信号,该耳内噪声信号可以理解为用户佩戴耳机之后,环境噪声被耳机隔离后的残留噪声,残留噪声的信号跟外部环境噪声、耳机、耳机与耳道的贴合度等因素有关;上述耳机生成反向噪声信号之后,耳机播放该反向噪声信号,该反向噪声信号与用户的耳内噪声信号的相位相反,如此,该反向噪声信号能够减弱用户的耳内噪声信号,从而降低耳内的异常噪声。
本申请实施例提供的主动降噪方法,由于耳机能够检测异常噪声,并且对异常噪声进行降噪处理,减弱异常噪声的干扰,提升耳机的稳定性,能够提升用户的听音体验。
一种可能的实现方式中,上述耳机包括半开放式主动降噪耳机。
第二方面,本申请实施例提供一种主动降噪方法,应用于与耳机建立通信连接的终端,耳机处于ANC工作模式,该方法包括:确定第一组滤波参数;并且向耳机发送第一指示信息,第一指示信息用于指示耳机利用第一组滤波参数进行降噪。其中,第一组滤波参数是耳机预存储的N 1组滤波参数中的一组;N 1组滤波参数分别用于在N 1种泄漏状态下进行环境音降噪;N 1种泄漏状态是由耳机与N 1种不同的耳道环境形成的;其中,耳机在当前的佩戴状态下,针对同一环境噪声,耳机应用第一组滤波参数时的降噪效果优于耳机应用N 1组滤波参数中其它滤波参数时的降噪效果;N 1为大于或等于2的正整数。
本申请实施例提供的主动降噪方法可以根据用户佩戴耳机时该用户的耳道环境与耳机形成的泄漏状态确定与当前泄漏状态匹配的一组滤波参数(即第一组滤波参数),并基于该组滤波参数进行环境音降噪,能够满足用户的个性化降噪需求,提升降噪效果。
一种可能的实现方式中,上述确定第一组滤波参数的方法包括:接收耳机的误差麦克风采集的第一信号,并且获取耳机的下行信号;然后根据第一信号和下行信号确定次级通道的当前频响曲线信息;并且从预设的N 1个次级通道的频响曲线信息中,确 定与当前频响曲线信息匹配的目标频响曲线信息;以及将目标频响曲线信息对应的一组滤波参数确定为第一组滤波参数,该N 1组滤波参数对应N 1个次级通道的频响曲线信息。
一种可能的实现方式中,上述确定第一组滤波参数的方法包括:接收耳机的误差麦克风采集的第一信号和耳机的参考麦克风采集第二信号,并且获取耳机的下行信号;然后基于第一信号和第二信号确定误差麦克风的残差信号;再根据误差麦克风的残差信号和下行信号确定次级通道的当前频响曲线信息;然后从预设的N 1个次级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息;进而将目标频响曲线信息对应的滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个次级通道的频响曲线信息。
一种可能的实现方式中,上述确定第一组滤波参数的方法包括:接收耳机的误差麦克风采集的第一信号和耳机的参考麦克风采集的第二信号;然后根据第一信号和第二信号确定初级通道的当前频响曲线信息;并且从预设的N 1个初级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息;以及将目标频响曲线信息对应的滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个初级通道的频响曲线信息。
一种可能的实现方式中,上述确定第一组滤波参数的方法包括:接收耳机的误差麦克风采集的第一信号和耳机的参考麦克风采集的第二信号,并且获取耳机的下行信号;然后根据第一信号和第二信号确定初级通道的当前频响曲线信息,并且根据第一信号和下行信号确定次级通道的当前频响曲线信息;以及确定当前频响比值曲线信息,当前频响比值曲线信息是初级通道的当前频响曲线信息与次级通道的当前频响曲线信息之比;再从预设的N 1个频响比值曲线信息中,确定与当前频响比值曲线信息匹配的目标频响比值曲线信息;进而将目标频响比值曲线信息对应的滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个频响比值曲线信息。
一种可能的实现方式中,上述确定第一组滤波参数的方法包括:确定N 1组滤波参数分别对应的误差麦克风和参考麦克风的频响差值曲线信息;然后将N 1组滤波参数对应的N 1个频响差值曲线信息中,目标频段对应的幅度最小的频响差值曲线确定为目标频响差值曲线,误差麦克风和参考麦克风的频响差值曲线信息是误差麦克风的频响曲线信息和参考麦克风的频响曲线信息之差;进而将目标频响差值曲线信息对应的滤波参数确定为第一组滤波参数。
一种可能的实现方式中,上述确定第一组滤波参数之前,本申请实施例提供的主动降噪方法还包括:接收对终端的第一界面的第一选项的操作,该第一界面是对耳机的工作模式进行设置的界面;响应于对第一选项的操作,向耳机发送第一指令,该第一指令用于控制耳机工作于ANC工作模式。
一种可能的实现方式中,上述接收对终端的第一界面的第一选项的操作之后,本申请实施例提供的主动降噪方法还包括:显示ANC控制列表;该ANC控制列表中至少包括下述选项中的至少一个:第一控制选项、第二控制选项或第三控制选项;其中,第一控制选项用于触发确定第一组滤波参数,第二控制选项用于触发生成N 2组滤波参数,第三控制选项用于触发重新确定第一组滤波参数。
一种可能的实现方式中,上述确定第一组滤波参数的方法包括:接收对ANC控制列表中的第一控制选项的操作,显示第一控件,该第一控件包括N 1个预设位置,该N 1个预设位置对应N 1组滤波参数;并且接收对第一控件中的第一位置的操作;该第一位置为N 1个预设位置中的一个,该第一位置对应的一组滤波参数应用于耳机时的降噪效果优于N 1个预设位置中的其他位置对应的滤波参数应用于耳机时的降噪效果;以及响应于对第一位置的操作,确定第一位置对应的一组滤波参数为第一组滤波参数。
一种可能的实现方式中,本申请实施例提供的主动降噪方法还包括:接收对ANC控制列表中的第三控制选项的操作;并且响应于对第三控制选项的操作,重新确定第一组滤波参数。
一种可能的实现方式中,本申请实施例提供的主动降噪方法还包括:接收对ANC控制列表中的第三控制选项的操作;并且响应于对第三控制选项的操作,向耳机发送第二指令,该第二指令用于指示耳机获取第一组滤波参数;其中,该第一组滤波参数与耳机在接收第二指令之前采用的滤波参数不同。
一种可能的实现方式中,本申请实施例提供的主动降噪方法还包括:接收对ANC控制列表中的第二控制选项的操作;并且响应于对第二控制选项的操作,向耳机发送第三指令,该第三指令用于触发耳机生成N 2组滤波参数,该N 2组滤波参数是根据第一组滤波参数第二组滤波参数生成的,该第二组滤波参数是N 1组滤波参数中的一组,该第二组滤波参数用于在N 1种泄漏状态中泄漏程度最小的状态下进行环境音降噪。
一种可能的实现方式中,上述接收对ANC控制列表中的第二控制选项的操作之后,本申请实施例提供的主动降噪方法还包括:显示第二控件;该第二控件包括N 2个预设位置,该N 2个预设位置对应N 2种ANC降噪强度,该N 2种ANC降噪强度对应N 2组滤波参数;并且接收对第二控件中的第二位置的操作;该第二位置为N 2个预设位置中的一个,该第二位置处的ANC降噪强度所对应的滤波参数应用于耳机时的降噪效果优于N 2个预设位置中的其他位置处的ANC降噪强度所对应的滤波参数应用于耳机时的降噪效果;以及响应于对第二位置的操作,确定第二位置对应的ANC降噪强度为目标ANC降噪强度;进而向耳机发送第二指示信息,该第二指示信息用于指示耳机利用目标ANC降噪强度对应的第三组滤波参数降噪。
第三方面,本申请实施例提供一种耳机,该耳机具有ANC功能,该耳机包括获取模块和处理模块。其中,获取模块用于在耳机处于ANC工作模式的情况下,获取第一组滤波参数;该第一组滤波参数是耳机预存储的N 1组滤波参数中的一组;N 1组滤波参数分别用于在N 1种泄漏状态下进行环境音降噪;N 1种泄漏状态是由耳机与N 1种不同的耳道环境形成的;其中,耳机在当前的佩戴状态下,针对同一环境噪声,耳机应用第一组滤波参数时的降噪效果优于耳机应用N 1组滤波参数中其它滤波参数时的降噪效果;N 1为大于或等于2的正整数。处理模块用于利用第一组滤波参数进行降噪。
一种可能的实现方式中,本申请实施例提供的耳机还包括生成模块;该生成模块用于至少根据第一组滤波参数和第二组滤波参数生成N 2组滤波参数;该N 2组滤波参数分别对应不同的ANC降噪强度;第二组滤波参数是耳机预存储的N 1组滤波参数中的一组;该第二组滤波参数用于在N 1种泄漏状态中泄漏程度最小的状态下进行环境音降噪。
一种可能的实现方式中,本申请实施例提供的耳机还包括确定模块;上述获取模块还用于获取目标ANC降噪强度;确定模块用于根据目标ANC降噪强度从N 2组滤波参数中确定第三组滤波参数;上述处理模块还用于利用第三组滤波参数进行降噪。
一种可能的实现方式中,本申请实施例提供的耳机还包括接收模块;该接收模块用于从终端接收第一指示信息,该第一指示信息用于指示耳机利用第一组滤波参数进行降噪。
一种可能的实现方式中,本申请实施例提供的耳机还包括第一信号采集模块;该第一信号采集模块,用于通过耳机的误差麦克风采集第一信号;上述获取模块还用于获取耳机的下行信号;上述确定模块还用于根据第一信号和下行信号确定次级通道的当前频响曲线信息;并且从预设的N 1个次级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息;以及将目标频响曲线信息对应的一组滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个次级通道的频响曲线信息。
一种可能的实现方式中,本申请实施例提供的耳机还包括第一信号采集模块和第二信号采集模块。该第一信号采集模块用于通过耳机的误差麦克风采集第一信号;第二信号采集模块用于通过耳机的参考麦克风采集第二信号;上述获取模块还用于获取耳机的下行信号;上述确定模块还用于基于第一信号和第二信号确定误差麦克风的残差信号;并且根据误差麦克风的残差信号和下行信号确定次级通道的当前频响曲线信息;从预设的N 1个次级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息;以及将目标频响曲线信息对应的一组滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个次级通道的频响曲线信息。
一种可能的实现方式中,本申请实施例提供的耳机还包括第一信号采集模块和第二信号采集模块。该第一信号采集模块用于通过耳机的误差麦克风采集第一信号;第二信号采集模块用于通过耳机的参考麦克风采集第二信号;上述确定模块还用于根据第一信号和第二信号确定初级通道的当前频响曲线信息;并且从预设的N 1个初级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息;以及将目标频响曲线信息对应的一组滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个初级通道的频响曲线信息。
一种可能的实现方式中,本申请实施例提供的耳机还包括第一信号采集模块和第二信号采集模块。该第一信号采集模块用于通过耳机的误差麦克风采集第一信号;第二信号采集模块用于通过耳机的参考麦克风采集第二信号;上述获取模块还用于获取耳机的下行信号;上述确定模块还用于根据第一信号和第二信号确定初级通道的当前频响曲线信息,并且根据第一信号和下行信号确定次级通道的当前频响曲线信息;以及确定当前频响比值曲线信息,当前频响比值曲线信息是初级通道的当前频响曲线信息与次级通道的当前频响曲线信息之比;进而从预设的N 1个频响比值曲线信息中,确定与当前频响比值曲线信息匹配的目标频响比值曲线信息;并且将目标频响比值曲线信息对应的一组滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个频响比值曲线信息。
一种可能的实现方式中,上述确定模块还用于确定N 1组滤波参数分别对应的误差麦克风和参考麦克风的频响差值曲线信息;并且将N 1组滤波参数对应的N 1个频响差 值曲线信息中,目标频段对应的幅度最小的频响差值曲线确定为目标频响差值曲线,误差麦克风和参考麦克风的频响差值曲线信息是误差麦克风的频响曲线信息和参考麦克风的频响曲线信息之差;以及将目标频响差值曲线信息对应的一组滤波参数确定为第一组滤波参数。
一种可能的实现方式中,上述生成模块具体用于对第一组滤波参数和第二组滤波参数进行插值,生成N 2组滤波参数。
一种可能的实现方式中,上述接收模块还用于从终端接收第二指示信息,该第二指示信息用于指示耳机利用目标ANC降噪强度对应第三组滤波参数进行降噪。
一种可能的实现方式中,上述确定模块还用于根据当前环境噪声的状态确定目标ANC降噪强度。
一种可能的实现方式中,本申请实施例提供的耳机还包括检测模块。上述接收模块还用于接收第一指令,耳机工作于ANC工作模式,该第一指令用于控制耳机工作于ANC工作模式。检测模块用于检测耳机是否入耳,在检测模块检测到耳机已入耳的情况下,耳机工作于ANC工作模式。
一种可能的实现方式中,上述接收模块还用于在耳机处于ANC工作模式的情况下,接收第二指令,该第二指令用于指示耳机获取第一组滤波参数;其中,该第一组滤波参数与耳机在接收第二指令之前采用的滤波参数不同。
一种可能的实现方式中,上述接收模块还用于接收第三指令,该第三指令用于触发耳机生成N 2组滤波参数。
一种可能的实现方式中,上述N 1组滤波参数是根据次级通道SP模式的录音信号和初级通道PP模式的录音信号确定的;其中,SP模式的录音信号包括下行信号、鼓膜麦克风的信号以及耳机的误差麦克风的信号;PP模式的录音信号包括鼓膜麦克风的信号、耳机的误差麦克风的信号以及耳机的参考麦克风的信号。
一种可能的实现方式中,本申请实施例提供的耳机还包括更新模块。上述检测模块还用于检测是否存在异常噪声,异常噪声包括下述至少一种:啸叫噪声、削波噪声或底噪;更新模块用于在检测模块检测到存在异常噪声的情况下,更新滤波参数,滤波参数包括第一组滤波参数或第三组滤波参数。上述第一信号采集模块还用于通过耳机的参考麦克风采集声音信号;第二信号采集模块还用于通过耳机的误差麦克风采集声音信号;上述处理模块还用于基于更新后的滤波参数,对参考麦克风采集的声音信号和误差麦克风采集的声音信号进行处理,生成反向噪声信号。
第四方面,本申请实施例提供一种终端,该终端与耳机建立通信连接,该耳机处于ANC工作模式,该终端包括确定模块和发送模块。其中,确定模块用于确定第一组滤波参数;该第一组滤波参数是耳机预存储的N 1组滤波参数中的一组;N 1组滤波参数分别用于在N 1种泄漏状态下进行环境音降噪;N 1种泄漏状态是由耳机与N 1种不同的耳道环境形成的;其中,耳机在当前的佩戴状态下,针对同一环境噪声,耳机应用第一组滤波参数时的降噪效果优于耳机应用N 1组滤波参数中其它滤波参数时的降噪效果;N 1为大于或等于2的正整数。发送模块用于向耳机发送第一指示信息,该第一指示信息用于指示耳机利用第一组滤波参数进行降噪。
一种可能的实现方式中,本申请实施例提供的终端还包括接收模块和获取模块。 其中,接收模块用于接收耳机的误差麦克风采集的第一信号;获取模块用于获取耳机的下行信号;确定模块具体用于根据第一信号和下行信号确定次级通道的当前频响曲线信息;并且从预设的N 1个次级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息;以及将目标频响曲线信息对应的一组滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个次级通道的频响曲线信息。
一种可能的实现方式中,本申请实施例提供的终端还包括接收模块和获取模块。其中,接收模块用于接收耳机的误差麦克风采集的第一信号和耳机的参考麦克风采集第二信号;获取模块用于获取耳机的下行信号;确定模块具体用于基于第一信号和第二信号确定误差麦克风的残差信号;然后根据误差麦克风的残差信号和下行信号确定次级通道的当前频响曲线信息;并且从预设的N 1个次级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息;以及将目标频响曲线信息对应的滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个次级通道的频响曲线信息。
一种可能的实现方式中,本申请实施例提供的终端还包括接收模块;该接收模块用于接收耳机的误差麦克风采集的第一信号和耳机的参考麦克风采集的第二信号;上述确定模块具体用于根据所述第一信号和所述第二信号确定初级通道的当前频响曲线信息;并且从预设的N 1个初级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;以及将所述目标频响曲线信息对应的滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个初级通道的频响曲线信息。
一种可能的实现方式中,本申请实施例提供的终端还包括接收模块和获取模块。其中,接收模块用于接收耳机的误差麦克风采集的第一信号和耳机的参考麦克风采集的第二信号;获取模块用于获取耳机的下行信号;上述确定模块具体用于根据第一信号和第二信号确定初级通道的当前频响曲线信息,并且根据第一信号和下行信号确定次级通道的当前频响曲线信息;以及确定当前频响比值曲线信息,当前频响比值曲线信息是初级通道的当前频响曲线信息与次级通道的当前频响曲线信息之比;进而从预设的N 1个频响比值曲线信息中,确定与当前频响比值曲线信息匹配的目标频响比值曲线信息;并且将目标频响比值曲线信息对应的滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个频响比值曲线信息。
一种可能的实现方式中,上述确定模块具体用于确定N 1组滤波参数分别对应的误差麦克风和参考麦克风的频响差值曲线信息;并且将N 1组滤波参数对应的N 1个频响差值曲线信息中,目标频段对应的幅度最小的频响差值曲线确定为目标频响差值曲线,误差麦克风和参考麦克风的频响差值曲线信息是误差麦克风的频响曲线信息和所述参考麦克风的频响曲线信息之差;以及将所述目标频响差值曲线信息对应的滤波参数确定为所述第一组滤波参数。
一种可能的实现方式中,上述接收模块还用于接收对所述终端的第一界面的第一选项的操作,该第一界面是对所述耳机的工作模式进行设置的界面;上述发送模块还用于响应于对所述第一选项的操作,向耳机发送第一指令,该第一指令用于控制耳机工作于ANC工作模式。
一种可能的实现方式中,本申请实施例提供的终端还包括显示模块;该显示模块用于显示ANC控制列表;ANC控制列表中至少包括下述选项中的至少一个:第一控 制选项、第二控制选项或第三控制选项。其中,第一控制选项用于触发确定第一组滤波参数,第二控制选项用于触发生成N 2组滤波参数,第三控制选项用于触发重新确定第一组滤波参数。
一种可能的实现方式中,上述接收模块还用于接收对ANC控制列表中的第一控制选项的操作;上述显示模块还用于显示第一控件,该第一控件包括N 1个预设位置,该N 1个预设位置对应N 1组滤波参数;上述接收模块还用于接收对第一控件中的第一位置的操作;该第一位置为N 1个预设位置中的一个,该第一位置对应的一组滤波参数应用于耳机时的降噪效果优于N 1个预设位置中的其他位置对应的滤波参数应用于耳机时的降噪效果;上述确定模块具体用于响应于对第一位置的操作,确定第一位置对应的一组滤波参数为第一组滤波参数。
一种可能的实现方式中,上述接收模块还用于接收对ANC控制列表中的第三控制选项的操作;上述确定模块还用于响应于对第三控制选项的操作,重新确定第一组滤波参数。
一种可能的实现方式中,上述接收模块还用于接收对ANC控制列表中的第三控制选项的操作;上述发送模块还用于响应于对第三控制选项的操作,向耳机发送第二指令,该第二指令用于指示耳机获取第一组滤波参数;其中,该第一组滤波参数与耳机在接收第二指令之前采用的滤波参数不同。
一种可能的实现方式中,上述接收模块还用于接收对ANC控制列表中的第二控制选项的操作;上述发送模块还用于响应于对第二控制选项的操作,向耳机发送第三指令,该第三指令用于触发耳机生成N 2组滤波参数,该N 2组滤波参数是根据第一组滤波参数第二组滤波参数生成的,第二组滤波参数是N 1组滤波参数中的一组;该第二组滤波参数用于在N 1种泄漏状态中泄漏程度最小的状态下进行环境音降噪。
一种可能的实现方式中,上述显示模块还用于显示第二控件;该第二控件包括N 2个预设位置,该N 2个预设位置对应N 2种ANC降噪强度,该N 2种ANC降噪强度对应N 2组滤波参数;上述接收模块还用于接收对第二控件中的第二位置的操作;该第二位置为N 2个预设位置中的一个,该第二位置处的ANC降噪强度所对应的滤波参数应用于耳机时的降噪效果优于N 2个预设位置中的其他位置处的ANC降噪强度所对应的滤波参数应用于耳机时的降噪效果;上述确定模块还用于响应于对第二位置的操作,确定第二位置对应的ANC降噪强度为目标ANC降噪强度;上述发送模块还用于向耳机发送第二指示信息,该第二指示信息用于指示耳机利用目标ANC降噪强度对应的第三组滤波参数进行降噪。
第五方面,本申请实施例提供一种耳机,包括存储器和与该存储器连接的至少一个处理器,存储器用于存储指令,该指令被至少一个处理器读取后,执行第一方面及其可能的实现方式中任意之一所述的方法。
第六方面,本申请实施例提供一种计算机可读存储介质,包括计算机程序,当该计算机程序在计算机上运行时,执行第一方面及其可能的实现方式中任意之一所述的方法。
第七方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行第一方面及其可能的实现方式中任意之一所述的方法。
第八方面,本申请实施例提供一种芯片,包括存储器和处理器。存储器用于存储计算机指令。处理器用于从存储器中调用并运行该计算机指令,以执行第一方面及其可能的实现方式中任意之一所述的方法。
第九方面,本申请实施例提供一种终端,包括存储器和与该存储器连接的至少一个处理器,存储器用于存储指令,该指令被至少一个处理器读取后,执行第二方面及其可能的实现方式中任意之一所述的方法。
第十方面,本申请实施例提供一种计算机可读存储介质,包括计算机程序,当该计算机程序在计算机上运行时,执行第二方面及其可能的实现方式中任意之一所述的方法。
第十一方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行第二方面及其可能的实现方式中任意之一所述的方法。
第十二方面,本申请实施例提供一种芯片,包括存储器和处理器。存储器用于存储计算机指令。处理器用于从存储器中调用并运行该计算机指令,以执行第二方面及其可能的实现方式中任意之一所述的方法。
应当理解的是,本申请实施例的第二方面至第十二方面技术方案及对应的可能的实施方式所取得的有益效果可以参见上述对第一方面和第二方面及其对应的可能的实施方式的技术效果,此处不再赘述。
第十三方面,本申请实施例提供一种主动降噪方法,应用于具有ANC功能的耳机,该方法包括:当耳机处于ANC工作模式时,检测耳机与耳道之间的泄漏状态是否发生变化;在检测到耳机与耳道之间的泄漏状态发生变化的情况下,将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数,并且利用该第二组滤波参数进行降噪。其中,第一组滤波参数和第二组滤波参数分别是耳机预存储的N组滤波参数中的两组不同的滤波参数,N组滤波参数分别用于在N种泄漏状态下进行环境音降噪;该耳机在当前的佩戴状态下,针对同一环境噪声,耳机应用第二组滤波参数时的降噪效果优于耳机应用N组滤波参数中其它滤波参数时的降噪效果。
本申请实施例提供的主动降噪方法,在耳机的ANC功能开启后,在用户使用耳机的过程中,可以根据耳机与耳道之间的泄漏状态的变化,自适应地更新耳机的滤波参数,并基于更新后的滤波参数进行降噪,能够提升降噪效果。
一种可能的实现方式中,当耳机与人耳的密封程度发生变化,且耳机应用第一组滤波参数的降噪效果变差时,耳机与耳道之间的泄漏状态发生变化。应理解,耳机与耳道之间的泄漏状态反映耳机与人耳的密封程度。
本申请实施例中,泄漏状态是由耳机与不同的耳道环境形成的,耳道环境与用户的耳道特征、用户佩戴耳机的姿态有关,不同的耳道特征和不同的佩戴耳机的姿态的组合可形成多种耳道环境,也对应多种泄漏状态。
应理解,上述N种泄漏状态可以表达N种耳机与人耳的贴合度范围,可以表达N种耳机与人耳的密封程度;泄漏程度越小,则耳机与用户的耳道的密封程度较高,声音越不易泄漏。任意一种泄漏状态并非特指一种特定的耳机佩戴状态,而是根据泄漏状态的阻抗特性进行大量统计,得到的典型的或具备可差异化的泄漏场景。
耳机的佩戴状态对应一种耳道环境,从而形成一种泄漏状态,耳机的佩戴状态因 用户的耳道特征和用户佩戴耳机的姿态的变化而不同。耳机当前的佩戴状态对应于一种稳定的耳道环境,即对应于一种稳定的耳道特征和佩戴姿态。上述N组滤波参数应用于耳机时的降噪效果随着耳机的佩戴状态的变化而不同。
一种可能的实现方式中,在耳机无下行信号的情况下,上述检测耳机与耳道之间的泄漏状态是否发生变化的方法可以包括:通过耳机的误差麦克风采集第一信号,并且通过耳机的参考麦克风采集第二信号;根据第一信号和第二信号,逐帧计算长时能量比;在当前帧的长时能量比增大,且当前帧的长时能量比与历史帧的长时能量比的差值大于第一阈值的情况下,确定耳机与耳道之间的泄漏状态发生变化;否则,确定耳机与耳道之间的泄漏状态未发生变化。
应理解,音频帧的长时能量比是体现降噪效果的一种指标,长时能量比变大说明降噪效果变差,长时能量比变小说明降噪效果较好。本申请实施例中,当前帧的长时能量比的增大幅度超过一定阈值(例如上述第一阈值)时,确定耳机与人耳的密封程度发生变化,且耳机应用第一组滤波参数的降噪效果变差,因此,确定耳机与耳道之间的泄漏状态发生了变化。
一种可能的实现方式中,耳机预存储的N组滤波参数依次对应的N种泄漏状态反映耳机与人耳的密封程度从高变低,上述将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数的方法可以包括:将耳机的滤波参数从第一组滤波参数更新为第三组滤波参数,其中,第一组滤波参数在预存储的N组滤波参数中的索引为n,该第三组滤波参数的索引为n-1;确定耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比;若耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比减小,则以第三组滤波参数的索引为起点,逐一减小滤波参数的索引,直至耳机应用当前索引对应的一组滤波参数进行降噪时,当前帧的长时能量比与历史帧的长时能量比的差值小于第二阈值,当前索引对应的一组滤波参数为第二组滤波参数。若耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比增大,则将耳机的滤波参数从第三组滤波参数更新为第四组滤波参数,该第四组滤波参数的索引为n+1;并且确定耳机应用第四组滤波参数进行降噪时,当前帧的长时能量比;若当前帧的长时能量比减小,则以第四组滤波参数的索引为起点,逐一增大滤波参数的索引,直至耳机应用当前索引对应的一组滤波参数进行降噪时,当前帧的长时能量比与历史帧的长时能量比的差值小于第二阈值,当前索引对应的一组滤波参数为第二组滤波参数。
本申请实施例中,在检测到耳机与耳道之间的泄漏状态发生变化的情况下,可以先以减小滤波参数的索引的方式更新滤波参数,将滤波参数的索引从n调整为n-1,进而判断耳机应用索引为n-1的滤波参数进行降噪时的降噪效果,若耳机应用索引为n-1的滤波参数进行降噪时的降噪效果变好,说明减小滤波参数的索引的方式是可行的,进而确定是否继续减小滤波参数的索引;若耳机应用索引n-1的滤波参数进行降噪时的降噪效果变差,说明减小滤波参数的索引的方式不可行,此时,增大滤波参数的索引至n+1,并应用索引为n+1的滤波参数进行降噪,若降噪效果变好,说明增大滤波参数的索引的方式是可行的,进而确定是否继续增大滤波参数的索引,直至耳机应用某一索引对应的滤波参数降噪时,当前帧的长时能量比与历史帧的长时能量比的差值小于第二阈值。
一种可能的实现方式中,耳机预存储的N组滤波参数依次对应的N种泄漏状态反映耳机与人耳的密封程度从高变低,在耳机无下行信号的情况下,上述检测耳机与耳道之间的泄漏状态是否发生变化的方法可以包括:通过耳机的误差麦克风采集第一信号,并且通过耳机的参考麦克风采集第二信号以及获取耳机的扬声器播放的反向噪声信号;并且根据第一信号、第二信号以及反向噪声信号,确定次级通道的当前频响曲线信息;以及从预存储的N组滤波参数对应的N组次级通道的频响曲线信息中,确定与次级通道的当前频响曲线信息匹配的目标频响曲线信息;其中,第一组滤波参数在预存储的N组滤波参数中的索引为n,目标频响曲线信息对应的一组滤波参数的索引为x;在目标频响曲线信息对应的一组滤波参数的索引x与第一组滤波参数的索引n满足|n-x|≥2的情况下,确定耳机与耳道之间的泄漏状态发生变化;否则,确定耳机与耳道之间的泄漏状态未发生变化。
本申请实施例中,若次级通道的目标频响曲线信息对应的一组滤波参数的索引x与第一组滤波参数的索引n满足|n-x|≥2,则表明次级通道的当前频响曲线信息与次级通道的历史频响曲线信息之间的偏差较大,即说明应用第一组滤波参数进行降噪的降噪效果变差,在这种情况下,确定耳机与耳道之间的泄漏状态发生变化。若目标频响曲线信息对应的一组滤波参数的索引x与第一组滤波参数的索引n满足|n-x|<2,则表明次级通道的当前频响曲线信息与次级通道的历史频响曲线信息之间的偏差较小,即说明应用第一组滤波参数进行降噪的降噪效果未变化,在这种情况下,确定耳机与耳道之间的泄漏状态未发生变化。
一种可能的实现方式中,上述根据第一信号、第二信号以及反向噪声信号,确定次级通道的当前频响曲线信息的方法包括:根据第一信号和第二信号,计算耳机的误差麦克风的残差信号;然后将反向噪声信号作为参考信号,对误差麦克风的残差信号进行自适应滤波,得到次级通道的当前频响曲线信息。本申请实施例中,将反向噪声信号作为参考信号,采用卡尔曼滤波器和NLMS滤波器,对该误差麦克风的残差信号进行自适应滤波,对收敛后的滤波器的求幅值,即得到次级通道的当前频响曲线信息。
一种可能的实现方式中,本申请实施例提供的主动降噪方法还包括:通过耳机的耳外麦克风采集第三信号,该耳机的耳外麦克风可以包括通话麦克风或参考麦克风;确定第三信号的能量是否大于第二预设能量阈值。若第三信号的能量大于预设阈值,则表明环境嘈杂,否则,环境比较安静。
一种可能的实现方式中,上述将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数的方法可以包括:在第三信号的能量大于第二预设能量阈值或者第二信号的能量大于第三预设能量阈值的情况下,将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数。
本申请实施例中,上述根据第一信号、第二信号以及反向噪声信号,确定次级通道的频响曲线信息,以检测耳机与耳道之间的泄漏状态是否发生变化的方法适用于噪声较大的环境(即环境嘈杂),不适用于安静的环境。因为在安静的环境下,反向噪声很小,采用过小的反向噪声计算的次级通道的频响曲线信息不准确,从而导致检测结果可能不准确。
一种可能的实现方式中,耳机预存储的N组滤波参数依次对应的N种泄漏状态反 映耳机与人耳的密封程度从高变低,在耳机有下行信号的情况下,上述检测耳机与耳道之间的泄漏状态是否发生变化的方法可以包括:通过耳机的误差麦克风采集第一信号,并且获取耳机的下行信号;并且根据第一信号和下行信号,确定次级通道的当前频响曲线信息;以及从预存储的N组滤波参数对应的N组次级通道的频响曲线信息中,确定与次级通道的当前频响曲线信息匹配的目标频响曲线信息;其中,第一组滤波参数在预存储的N组滤波参数中的索引为n,目标频响曲线信息对应的一组滤波参数的索引为x;在目标频响曲线信息对应的一组滤波参数的索引与第一组滤波参数的索引满足|n-x|≥2的情况下,确定耳机与耳道之间的泄漏状态发生变化;否则,确定耳机与耳道之间的泄漏状态未发生变化。
本申请实施例中,若次级通道的目标频响曲线信息对应的一组滤波参数的索引x与第一组滤波参数的索引n满足|n-x|≥2,则表明次级通道的当前频响曲线信息与次级通道的历史频响曲线信息之间的偏差较大,即说明应用第一组滤波参数进行降噪的降噪效果变差,在这种情况下,确定耳机与耳道之间的泄漏状态发生变化。若目标频响曲线信息对应的一组滤波参数的索引x与第一组滤波参数的索引n满足|n-x|<2,则表明次级通道的当前频响曲线信息与次级通道的历史频响曲线信息之间的偏差较小,即说明应用第一组滤波参数进行降噪的降噪效果未变化,在这种情况下,确定耳机与耳道之间的泄漏状态未发生变化。
一种可能的实现方式中,上述根据第一信号和下行信号,确定次级通道的当前频响曲线信息的方法包括:将下行信号作为参考信号,对第一信号进行自适应滤波,得到次级通道的当前频响曲线信息。本申请实施例中,以下行信号作为参考信号,采用卡尔曼滤波器和NLMS滤波器,对第一信号进行自适应滤波,对收敛后的滤波器的求幅值,即得到次级通道的当前频响曲线信息。
一种可能的实现方式中,上述将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数的方法可以包括:以第一组滤波参数的索引n为起点,将滤波参数的索引从n逐一调整到x,索引x对应的一组滤波参数为第二组滤波参数。
本申请实施例中,对耳机的滤波参数进行更新时,将滤波参数的索从n更新为x,在滤波参数调整的过程中,为了向用户提供较好的听音感受,本申请实施例中,对滤波参数的索引逐一进行调整,直到滤波参数的索引为x,使得降噪效果平缓地过度至最佳效果。
第十四方面,本申请实施例提供一种耳机,该耳机具有ANC功能,该耳机包括检测模块、更新模块以及处理模块。其中,检测模块用于当耳机处于ANC工作模式时,检测耳机与耳道之间的泄漏状态是否发生变化;更新模块用于在检测模块检测到耳机与耳道之间的泄漏状态发生变化的情况下,将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数;处理模块用于利用第二组滤波参数进行降噪。其中,第一组滤波参数和第二组滤波参数分别是耳机预存储的N组滤波参数中的两组不同的滤波参数;N组滤波参数分别用于在N种泄漏状态下进行环境音降噪,该N种泄漏状态是由耳机与N种不同的耳道环境形成的。其中,耳机在当前的佩戴状态下,针对同一环境噪声,耳机应用第二组滤波参数时的降噪效果优于耳机应用N组滤波参数中其它滤波参数时的降噪效果。
一种可能的实现方式中,当耳机与人耳的密封程度发生变化,且耳机应用第一组滤波参数的降噪效果变差时,耳机与耳道之间的泄漏状态发生变化。应理解,耳机与耳道之间的泄漏状态反映耳机与人耳的密封程度。
一种可能的实现方式中,本申请实施例提供的耳机还包括第一信号采集模块和第二信号采集模块。第一信号采集模块用于通过耳机的误差麦克风采集第一信号;第二信号采集模块用于通过耳机的参考麦克风采集第二信号。
上述检测模块具体用于当耳机无下行信号时,根据第一信号和第二信号,逐帧计算长时能量比;在当前帧的长时能量比增大,且当前帧的长时能量比与历史帧的长时能量比的差值大于第一阈值的情况下,确定耳机与耳道之间的泄漏状态发生变化;否则,确定耳机与耳道之间的泄漏状态未发生变化。
一种可能的实现方式中,耳机预存储的N组滤波参数依次对应的N种泄漏状态反映耳机与人耳的密封程度从高变低,上述更新模块具体用于将耳机的滤波参数从第一组滤波参数更新为第三组滤波参数,其中,第一组滤波参数在预存储的N组滤波参数中的索引为n,第三组滤波参数的索引为n-1;确定耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比;在耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比减小的情况下,以第三组滤波参数的索引为起点,逐一减小滤波参数的索引,直至耳机应用当前索引对应的一组滤波参数进行降噪时,当前帧的长时能量比与历史帧的长时能量比的差值小于第二阈值,当前索引对应的一组滤波参数为第二组滤波参数。在耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比增大的情况下,将耳机的滤波参数从第三组滤波参数更新为第四组滤波参数,该第四组滤波参数的索引为n+1;并且确定耳机应用第四组滤波参数进行降噪时,当前帧的长时能量比;若当前帧的长时能量比减小,则以第四组滤波参数的索引为起点,逐一增大滤波参数的索引,直至耳机应用当前索引对应的一组滤波参数进行降噪时,当前帧的长时能量比与历史帧的长时能量比的差值小于第二阈值,当前索引对应的一组滤波参数为第二组滤波参数。
一种可能的实现方式中,本申请实施例提供的耳机还包括第一信号采集模块、第二信号采集模块以及获取模块。其中,第一信号采集模块用于通过耳机的误差麦克风采集获取第一信号;第二信号采集模块,用于通过耳机的参考麦克风采集第二信号;获取模块用于获取耳机的扬声器播放的反向噪声信号。
耳机预存储的N组滤波参数依次对应的N种泄漏状态反映耳机与人耳的密封程度从高变低,上述检测模块具体用于根据第一信号、第二信号以及反向噪声信号,确定次级通道的当前频响曲线信息;并且从预存储的N组滤波参数对应的N组次级通道的频响曲线信息中,确定与次级通道的当前频响曲线信息匹配的目标频响曲线信息。其中,第一组滤波参数在预存储的N组滤波参数中的索引为n,目标频响曲线信息对应的一组滤波参数的索引为x;以及在目标频响曲线信息对应的一组滤波参数的索引x与第一组滤波参数的索引n满足|n-x|≥2的情况下,确定耳机与耳道之间的泄漏状态发生变化;否则,确定耳机与耳道之间的泄漏状态未发生变化。
一种可能的实现方式中,上述检测模块具体用于根据第一信号和第二信号,计算耳机的误差麦克风的残差信号;并且将反向噪声信号作为参考信号,对误差麦克风的 残差信号进行自适应滤波,得到次级通道的当前频响曲线信息。
一种可能的实现方式中,本申请实施例提供的耳机还包括第三信号采集模块和确定模块。第三信号采集模块用于通过耳机的耳外麦克风采集第三信号,该耳机的耳外麦克风可以包括通话麦克风或参考麦克风;确定模块用于确定第三信号的能量是否大于第二预设能量阈值。
一种可能的实现方式中,上述更新模块具体用于在第三信号的能量大于第二预设能量阈值或者第二信号的能量大于第三预设能量阈值的情况下,将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数。
一种可能的实现方式中,本申请实施例提供的耳机还包括第一信号采集模块和获取模块。第一信号采集模块用于通过耳机的误差麦克风采集第一信号;获取模块用于获取耳机的下行信号。
耳机预存储的N组滤波参数依次对应的N种泄漏状态反映耳机与人耳的密封程度从高变低,上述检测模块具体用于当耳机有下行信号时,根据第一信号和下行信号,确定次级通道的当前频响曲线信息;并且从预存储的N组滤波参数对应的N组次级通道的频响曲线信息中,确定与次级通道的当前频响曲线信息匹配的目标频响曲线信息;其中,第一组滤波参数在预存储的N组滤波参数中的索引为n,目标频响曲线信息对应的一组滤波参数的索引为x;以及在目标频响曲线信息对应的一组滤波参数的索引与第一组滤波参数的索引满足|n-x|≥2的情况下,确定耳机与耳道之间的泄漏状态发生变化;否则,确定耳机与耳道之间的泄漏状态未发生变化。
一种可能的实现方式中,上述检测模块具体用于将下行信号作为参考信号,对第一信号进行自适应滤波,得到次级通道的当前频响曲线信息。
一种可能的实现方式中,上述更新模块具体用于以第一组滤波参数的索引n为起点,将滤波参数的索引从n逐一调整到x,索引x对应的一组滤波参数为第二组滤波参数。
第十五方面,本申请实施例提供一种耳机,该耳机包括存储器和与存储器连接的至少一个处理器,存储器用于存储指令,存储器存储的指令被至少一个处理器读取后,执行上述第十三方面及其可能的实现方式中任意之一所述的方法。
第十六方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时上述第十三方面及其可能的实现方式中任意之一所述的方法。
第十七方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行第十三方面及其可能的实现方式中任意之一所述的方法。
第十八方面,本申请实施例提供一种芯片,包括存储器和处理器。存储器用于存储计算机指令。处理器用于从存储器中调用并运行该计算机指令,以执行第十三方面及其可能的实现方式中任意之一所述的方法。
应当理解的是,本申请实施例的第十四方面至第十八方面技术方案及对应的可能的实施方式所取得的有益效果可以参见上述对第十三方面及其对应的可能的实施方式的技术效果,此处不再赘述。
附图说明
图1为本申请实施例提供的一种主动降噪方法的应用场景示意图;
图2为本申请实施例提供的半开放式主动降噪耳机的硬件示意图;
图3为本申请实施例提供的一种手机的硬件示意图;
图4为本申请实施例提供的一种主动降噪方法的处理流程示意图;
图5为本申请实施例提供的一种录音设备的硬件示意图;
图6为本申请实施例提供的一种扬声器到误差麦克风的次级通道建模的流程示意图;
图7为本申请实施例提供的一种扬声器到鼓膜麦克风的次级通道建模的流程示意图;
图8为本申请实施例提供的一种确定滤波参数的流程示意图;
图9为本申请实施例提供的主动降噪方法示意图一;
图10为本申请实施例提供的一种确定第一组滤波参数的方法示意图一;
图11为本申请实施例提供的一种确定第一组滤波参数的方法示意图二;
图12为本申请实施例提供的一种确定第一组滤波参数的方法示意图三;
图13为本申请实施例提供的一种确定第一组滤波参数的方法示意图四;
图14为本申请实施例提供的一种确定第一组滤波参数的方法示意图五;
图15为本申请实施例提供的主动降噪方法示意图二;
图16为本申请实施例提供的主动降噪方法示意图三;
图17为本申请实施例提供的主动降噪方法中的显示效果示意图一;
图18A为本申请实施例提供的主动降噪方法中的显示效果示意图二;
图18B为本申请实施例提供的主动降噪方法中的显示效果示意图三;
图19A为本申请实施例提供的主动降噪方法中的显示效果示意图四;
图19B为本申请实施例提供的主动降噪方法中的显示效果示意图五;
图20为本申请实施例提供的主动降噪方法中的显示效果示意图六;
图21A为本申请实施例提供的主动降噪方法中的显示效果示意图七;
图21B为本申请实施例提供的主动降噪方法中的显示效果示意图八;
图22为本申请实施例提供的主动降噪方法示意图四;
图23A为本申请实施例提供的主动降噪方法中的显示效果示意图九;
图23B为本申请实施例提供的主动降噪方法中的显示效果示意图十;
图24为本申请实施例提供的主动降噪方法示意图五;
图25为本申请实施例提供的半开放式主动降噪耳机的工作原理示意图;
图26为本申请实施例提供的一种啸叫检测方法示意图一;
图27为本申请实施例提供的一种啸叫检测方法示意图二;
图28为本申请实施例提供的一种啸叫检测以及降噪处理的工作原理示意图;
图29为本申请实施例提供的一种削波检测方法示意图;
图30为本申请实施例提供的一种削波检测以及降噪处理的工作原理示意图;
图31为本申请实施例提供的一种底噪检测方法示意图;
图32为本申请实施例提供的一种底噪检测以及降噪处理的工作原理示意图;
图33为本申请实施例提供的一种风噪检测方法示意图;
图34为本申请实施例提供的一种风噪检测以及降噪处理的工作原理示意图;
图35为本申请实施例提供的一种风噪控制状态示意图;
图36本申请实施例提供的一种风噪控制状态对应的滤波参数示意图;
图37为本申请实施例提供的一种主动降噪方法中的显示效果示意图六;
图38为本申请实施例提供的一种主动降噪方法中的显示效果示意图七;
图39为本申请实施例提供的耳机的结构示意图一;
图40为本申请实施例提供的终端的结构示意图;
图41为本申请实施例提供的主动降噪方法示意图六;
图42为本申请实施例提供的主动降噪方法示意图七;
图43为本申请实施例提供的主动降噪方法示意图八;
图44为本申请实施例提供的主动降噪方法示意图九;
图45为本申请实施例提供的耳机的结构示意图二。
具体实施方式
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一组滤波参数、第二组滤波参数以及第三组滤波参数等是用于区别不同的滤波参数,而不是用于描述滤波参数的特定顺序。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个处理单元是指两个或两个以上的处理单元;多个系统是指两个或两个以上的系统。
基于背景技术存在的问题,本申请实施例提供一种主动降噪方法及装置,应用于具有主动降噪(active noise cancellation,ANC)功能的耳机,当耳机处于ANC工作模式时,耳机获取第一组滤波参数,并且利用该第一组滤波参数进行降噪,该第一组滤波参数是耳机预存储的N 1组滤波参数中的一组,该N 1组滤波参数分别用于在N 1种泄漏状态下进行环境音降噪,该N 1种泄漏状态是由耳机与N 1种不同的耳道环境形成的。其中,耳机在当前的佩戴状态下,针对同一环境噪声,耳机应用第一组滤波参数时的降噪效果优于耳机应用N 1组滤波参数中其它滤波参数时的降噪效果,N 1为大于或等于2的正整数。综上,本申请实施例提供的主动降噪方法可以根据用户佩戴耳机时该用户的耳道环境与耳机形成的泄漏状态确定与当前泄漏状态匹配的一组滤波参数,并基于该组滤波参数进行环境音降噪,能够满足用户的个性化降噪需求,提升降噪效果。
可选地,本申请实施例提供的主动降噪方法可以应用于与用户的耳道存在声音泄漏的耳机。应理解,声音泄漏具体指的是用户佩戴耳机后,耳机与用户的耳道无法紧 密贴合,用户的耳道与耳机之间存在缝隙而造成声音泄漏,并且不同的人耳特征、不同穿戴姿态,泄漏会存在差异。例如,本申请实施例提供的主动降噪方法可以应用于半开放式主动降噪(该半开放式主动降噪耳机的出声口没有胶套,使得耳机与耳道之间存在缝隙),在以下实施例中以耳机为半开放式主动降噪耳机为例进行说明。
图1为本申请实施例提供的主动降噪方法的一种应用场景的示意图。在图1中,半开放式主动降噪耳机101和电子设备102之间通过有线传输的方式进行通信,也可以通过无线传输的方式通信,例如半开放式主动降噪耳机101与电子设备102通过蓝牙进行通信,或者通过其他无线网络进行通信。应理解,本申请实施例涉及半开放式主动降噪耳机101与电子设备102之间传输音频数据以及控制信令,例如,电子设备102将音频数据发送至半开放式主动降噪耳机101进行播放,又例如,电子设备102向半开放式主动降噪耳机101发送控制信令,以控制半开放式主动降噪耳机101的工作模式等。
可选地,图1中的电子设备102可以为手机、电脑(例如笔记本电脑、台式电脑)、平板电脑(手持平板电脑、车载平板电脑)等电子设备,该电子设备102还可以为其他终端设备,例如智能音箱、车载音箱等。本申请实施例对电子设备102的具体类型和结构等不作限定。
可选地,本申请实施例提供的半开放式主动降噪耳机可以是有线的,也可以是无线的,不作限定。下面结合半开放式主动降噪耳机在人耳中的佩戴形态介绍半开放式主动降噪耳机的硬件结构,如图2所示,半开放式主动降噪耳机包括扬声器(喇叭)201、微处理器(micro control unit,MCU)202、ANC芯片203、内存204以及多个麦克风,多个麦克风可以包括参考麦克风205、通话麦克风206以及误差麦克风207。
其中,扬声器201用于播放下行信号(音乐或语音),在该半开放式主动降噪耳机中,扬声器201还用于播放反向噪声信号(可以简称为ANTI信号),该反向噪声信号用于减弱用户耳道内的噪声信号,从而达到主动降低噪声的效果。
微处理器(MCU)202用于对滤波参数进行控制,例如从N 1组滤波参数中确定第一组滤波参数等,并且将确定的第一组滤波参数写入ANC芯片203,或者修改内存204中存储的滤波参数。
ANC芯片203用于对环境音降噪,具体的,对参考麦克风205和误差麦克风207采集的信号进行处理,生成反向噪声信号,以减弱用户耳道内的噪声信号。
内存204用于存储多组滤波参数(也可以称为ANC参数),一组滤波参数包括前馈通路对应的滤波参数(也可以称为FF系数)、反馈通路对应的滤波参数(也可以称为FB系数)以及下行补偿通路对应的滤波参数(SPE系数),例如存储本申请实施例中的N 1组滤波参数和N 2组滤波参数。在实施主动降噪方法的过程中,微处理器202从N 1组滤波参数中确定出第一组滤波参数之后,从内存204中读取该第一组滤波参数,并且将第一组滤波参数写入ANC芯片203,从而ANC芯片203基于该第一组滤波参数对相关麦克风采集的音频信号进行处理,生成反向噪声信号。
参考麦克风205用于采集外界环境噪声。
通话麦克风206用于在用户进行通话时采集用户的声音信号。
误差麦克风207用于采集用户耳道内的噪声信号。
可选地,半开放式主动降噪耳机还可以包括其他元件,例如接近光传感器,接近光传感器用于检测该半开放式主动降噪耳机是否在耳。若该半开放式主动降噪耳机是无线耳机,该半开放式主动降噪耳机还可以包括无线通信模块,该无线通信模块可以为无线局域网(wireless local area networks,WLAN)(如Wi-Fi网络)模块或蓝牙(bluetooth,BT)模块。蓝牙模块用于该半开放式主动降噪耳机与其他设备通过蓝牙通信。
可以理解的是,本申请实施例示意的结构并不构成对半开放式主动降噪耳机的具体限定,在本申请另一些实施例中,半开放式主动降噪耳机可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
示例性的,以图1所示的电子设备102为手机为例,图3为本申请实施例提供的一种手机的硬件结构示意图。如图3所示,手机300包括处理器310,存储器(包括外部存储器接口320和内部存储器321),通用串行总线(universal serial bus,USB)接口330,充电管理模块340,电源管理模块341,电池342,天线1,天线2,移动通信模块350,无线通信模块360,音频模块370,扬声器370A,受话器370B,麦克风370C,耳机接口370D,传感器模块380,按键390,马达391,指示器392,摄像头393,显示屏394,以及用户标识模块(subscriber identification module,SIM)卡接口395等。其中,传感器模块380可以包括陀螺仪传感器380A,加速度传感器380B,环境光传感器380C,深度传感器380D,磁传感器,压力传感器,距离传感器,接近光传感器,心率传感器,气压传感器,指纹传感器,温度传感器,触摸传感器,骨传导传感器等。
可以理解的是,本申请实施例示意的结构并不构成对手机300的具体限定。在本申请另一些实施例中,手机300可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器310可以包括一个或多个处理单元,例如:处理器310可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频或音频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是手机300的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器310中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器310中的存储器为高速缓冲存储器。该存储器可以保存处理器310刚用过或循环使用的指令或数据。如果处理器310需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器310的等待时间,因而提高了系统的效率。
在一些实施例中,处理器310可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry  processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器310可以包含多组I2C总线。处理器310可以通过不同的I2C总线接口分别耦合触摸传感器,充电器,闪光灯,摄像头393等。例如:处理器310可以通过I2C接口耦合触摸传感器,使处理器310与触摸传感器3通过I2C总线接口通信,实现手机300的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器310可以包含多组I2S总线。处理器310可以通过I2S总线与音频模块370耦合,实现处理器310与音频模块370之间的通信。在一些实施例中,音频模块370可以通过I2S接口向无线通信模块360传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块370与无线通信模块360可以通过PCM总线接口耦合。在一些实施例中,音频模块370也可以通过PCM接口向无线通信模块360传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器310与无线通信模块360。例如:处理器310通过UART接口与无线通信模块360中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块370可以通过UART接口向无线通信模块360传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器310与显示屏394,摄像头393等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器310和摄像头393通过CSI接口通信,实现手机300的拍摄功能。处理器310和显示屏394通过DSI接口通信,实现手机300的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器310与摄像头393,显示屏394,无线通信模块360,音频模块370,传感器模块380等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对手机300的结构限定。在本申请另一些实施例中,手机300也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块340用于从充电器接收充电输入。电源管理模块341用于连接电池342,充电管理模块340与处理器310。电源管理模块341接收电池342和/或充电管理模块340的输入,为处理器310,内部存储器321,显示屏394,摄像头393,和无线通信模块360等供电。电源管理模块341还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。
手机300的无线通信功能可以通过天线1,天线2,移动通信模块350,无线通信模块360,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。手机300中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块350可以提供应用在手机300上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块350可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块350可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块350还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块350的至少部分功能模块可以被设置于处理器310中。在一些实施例中,移动通信模块350的至少部分功能模块可以与处理器310的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器370A,受话器370B等)输出声音信号,或通过显示屏394显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器310,与移动通信模块350或其他功能模块设置在同一个器件中。
无线通信模块360可以提供应用在手机300上的包括无线局域网(wireless local area networks,WLAN)(如Wi-Fi网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块360可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块360经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器310。无线通信模块360还可以从处理器310接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,手机300的天线1和移动通信模块350耦合,天线2和无线通信模块360耦合,使得手机300可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),新无线(New Radio,NR),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。
手机300通过GPU,显示屏394,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏394和应用处理器。GPU用于执行数学和几何计算,用 于图形渲染。在本申请实施例中,GPU可以用于进行三维模型渲染和虚实叠加。处理器310可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏394用于显示图像,视频等。在本申请实施例中,显示屏394可以用于显示虚叠加后的图像。显示屏394包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机300可以包括1个或N个显示屏394,N为大于1的正整数。
手机300可以通过ISP,摄像头393,视频编解码器,GPU,显示屏394以及应用处理器等实现拍摄功能。
ISP用于处理摄像头393反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头393中。
摄像头393用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,手机300可以包括1个或N个摄像头393,N为大于1的正整数。
数字信号处理器用于处理数字信号,例如处理数字图像信号或数字音频信号,还可以处理其他数字信号。例如,手机300在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频或音频编解码器用于对数字视频或音频压缩或解压缩。手机300可以支持一种或多种音频编解码器,例如,高级音频传输协议(advanced audio distribution profile,A2DP)默认的SBC,动态图像专家组(moving picture experts group,MPEG)的高级音频编码(advanced audio coding,AAC)系列的编码器等。这样,手机300可以播放或录制多种编码格式的音频。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现手机300的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解,动作生成等等。
外部存储器接口320可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机300的存储能力。外部存储卡通过外部存储器接口320与处理器310通信,实现数据存储功能。
内部存储器321可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器321可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储手机300使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器321可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器310通过运行存储在内部存储器321的指令,和/或存储在设置于处理器中的存储器的指令,执行手机300的各种功能应用以及数据处理。
手机300可以通过音频模块370,扬声器370A,受话器370B,麦克风370C,耳机接口370D,以及应用处理器等实现音频功能。例如,音乐播放,录音等。
音频模块370用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块370还可以用于对音频信号编码和解码。
扬声器370A,也称“喇叭”,用于将音频电信号转换为声音信号。手机300可以通过扬声器370A收听音乐,或收听免提通话。
受话器370B,也称“听筒”,用于将音频电信号转换成声音信号。当手机300接听电话或语音信息时,可以通过将受话器370B靠近人耳接听语音。
麦克风370C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风370C发声,将声音信号输入到麦克风370C。手机300可以设置至少一个麦克风370C。在另一些实施例中,手机300可以设置两个麦克风370C,除了采集声音信号,还可以实现降噪功能(该降噪功能的麦克风为反馈麦克风)。在另一些实施例中,手机300还可以设置三个,四个或更多麦克风370C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
陀螺仪传感器380A可以用于确定手机300的运动姿态。在一些实施例中,可以通过陀螺仪传感器380A确定手机300围绕三个轴(即,x,y和z轴)的角速度。
加速度传感器380B可检测手机300的运动方向和运动加速度。当手机300静止时可检测出重力的大小及方向。还可以用于识别手机300的姿态,应用于横竖屏切换,计步器等应用。
环境光传感器380C用于感知环境光亮度。手机300可以根据感知的环境光亮度自适应调节显示屏394亮度。环境光传感器380C也可用于拍照时自动调节白平衡。在一些实施例中,环境光传感器380C还可以与接近光传感器配合,检测手机300是否在口袋里,以防误触。
深度传感器380D用于确定物体上每一个点到手机300的距离。在一些实施例中,深度传感器380D可以采集目标物体的深度数据,生成目标物体的深度图。其中,该深度图中每一个像素表示该像素点对应的物体上的点到手机300的距离。
指示器392可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
按键390包括开机键,音量键等。按键390可以是机械按键。也可以是触摸式按键。马达391可以产生振动提示。指示器392可以是指示灯,可以用于指示充电状态, 电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口395用于连接SIM卡。SIM卡可以通过插入SIM卡接口395,或从SIM卡接口395拔出,实现和手机300的接触和分离。
在理解上述半开放式主动降噪耳机的硬件结构的基础上,下面对本申请实施例提供的一种主动降噪的方法及装置中涉及的一些概念做解释说明。
1、滤波参数的介绍
本申请实施例中,一组滤波参数包括前馈通路对应的滤波参数、反馈通路对应的滤波参数以及下行补偿通路对应的滤波参数。上述ANC芯片203基于滤波参数分别对前馈通路、反馈通路以及下行补偿通路的声音信号进行处理,以实现主动降噪。示例性的,结合图4所述的处理流程图分别对前馈通路、反馈通路以及下行补偿通路进行简单的介绍。
前馈通路:指的是对参考麦克风采集的声音信号进行处理的通路,前馈通路对应的滤波参数与前馈通路中的信号处理方法有关,例如前馈通路中包括增益处理、双二阶滤波处理、限幅处理等,则该前馈通路对应的滤波参数可以包括前馈通路的增益、前馈通路中的双二阶滤波器的参数、限幅器的参数等。
反馈通路:指的是对误差麦克风采集的声音信号进行处理的通路,同理,反馈通路对应的滤波参数也该反馈通路中的信号处理方法有关,例如该反馈通路对应的滤波参数可以包括反馈通路的增益、反馈通路中的双二阶滤波器的参数、限幅器的参数等。
下行补偿通路:指的是对下行信号(用户播放的音乐等)进行处理的通路,下行补偿通路对应的滤波参数可以包括下行补偿通路的增益、下行补偿滤波器的参数等。
结合图4,需要说明的是,通过反馈通路对误差麦克风采集的信号进行处理的过程中,将通过下行补偿通路对下行信号进行处理后的信号作为反馈通路的一种输入信号,从而通过反馈通路对误差麦克风采集的信号和处理后的下行信号进行处理,得到反馈通路的反向噪声信号;并且通过前馈通路对参考麦克风采集的声音信号进行处理得到前馈通路的反向噪声信号;进而将前馈通路的方向噪声信号和反馈通路的反向噪声信号求和,得到反向噪声信号。
2、泄漏状态
本申请实施例中,泄漏状态是由耳机与不同的耳道环境形成的,耳道环境与用户的耳道特征(指的是耳道的生理特征,例如耳道的宽窄、形状等)以及用户佩戴耳机的姿态有关。例如,不同的耳道环境可以包括:耳机在同一用户的耳道的不同位置形成的耳道环境、耳机在不同用户的耳道的同一位置形成的耳道环境或这两种情况的组合,本申请实施例不作限定。
应理解,根据用户耳道的大小,可以将耳道分为小耳道、中耳道、大耳道等等。当某一用户佩戴半开放式主动降噪耳机时,对于小耳道的用户,耳机与耳道的密封程度较好,耳机播放的声音泄漏较少,即耳机播放的声音泄漏程度较小;对于大耳道的用户,耳机与耳道的密封程度较差(耳机与耳道之间具有缝隙),耳机播放的声音泄漏较多,声音泄漏的程度比较大。当然,耳机播放的声音泄漏的程度还与用户佩戴耳机的姿态有关,例如耳机位于耳道的不同位置,泄漏程度可能不同。综上可知,泄漏状态可以反映耳机与用户的耳道的密封程度。泄漏程度越小,则耳机与用户的耳道的 密封程度越好,声音越不易泄漏。
3、对本申请实施例中的异常噪声类型进行介绍。
啸叫:是单频声音信号的幅度或能量由小突然增大的现象,半开放式主动降噪耳机发生啸叫可能是耳机在受到挤压、或者用户快速改变耳机的佩戴姿态等动作而导致,将啸叫时发出的声音信号称为啸叫噪声,啸叫会引起用户不适,并且干扰下行信号的播放,严重影响音频的播放效果。
削波:削波是低频信号溢出产生噼啪杂音的现象,将产生的噼啪声称为削波噪声。通常,在环境中突发低频大噪声时,将发生削波,例如车辆大颠簸、飞机着陆过程中会时产生低频大噪声。
底噪:即本底噪声,底噪也可以称为背景噪声,底噪是由于设备的硬件(例如耳机中的电路或其他元器件)性能限制而导致的噪声,例如电视声中除节目声音外的沙沙声等。在嘈杂的环境中,底噪一般是无法被用户感知(听到)到的,当环境安静时,用户可以感知底噪。过强的本底噪声,不仅会使人烦躁,还会淹没声音中较弱的细节部分。
风噪:是环境中有风时,而产生的呼呼声,风噪影响用户正常使用耳机。并且由于风噪的方向的随机性比较大,风噪对用户双耳的影响是不同的,即左耳和右耳在风噪的影响下,听感不一致。
以上啸叫噪声、削波噪声、底噪以及风噪对用户的听音感受带来比较严重的影响,均是异常噪声。
应理解,对于在半开放式主动降噪耳机的应用,本申请实施例提供的主动降噪方法包括三个阶段,具体如下:
第一阶段:N 1组滤波参数的设计过程。
第二阶段:针对特定用户,确定适合该用户的一组滤波参数的过程。
第三阶段:为用户确定一组滤波参数后,在利用该组滤波参数降噪的过程中,进行异常噪声检测、更新滤波参数的过程。或者,为用户确定一组滤波参数之后,在用户使用耳机的过程中,耳机的佩戴姿势发生改变而更新滤波参数的过程。
以下实施例分别对上述三个阶段涉及的内容做详细描述。
第一阶段:N 1组滤波参数的设计过程。
本申请实施例中,上述前馈通路、反馈通路以及下行补偿通路的滤波器可以为FIR滤波器,也可以为IIR滤波器。以下实施例中,以上述前馈通路、反馈通路以及下行补偿通路的滤波器为FIR滤波器为例说明生成N 1组滤波参数的方法。
需要说明的是,生成N 1组滤波参数的过程由录音设备完成,如图5所示,该录音设备500包括半开放式主动降噪耳机501、鼓膜麦克风502、ANC电路板503和计算设备504。其中,该半开放式主动降噪耳机501的硬件结构与上述图2所示的半开放式主动降噪耳机的结构相同,鼓膜麦克风502是一种微小的可置于耳道的鼓膜处的麦克风。半开放式主动降噪耳机501的参考麦克风、误差麦克风、扬声器分别与ANC电路板503连接,且鼓膜麦克风502也与ANC电路板503连接,该ANC电路板503通过集成芯片数字音频传输接口(IIS)与计算设备504连接,如此,通过ANC电路板503将上述参考麦克风、误差麦克风、扬声器以及鼓膜麦克风的信号发送至计算设 备504,完成录音,进而由计算设备504对录取的信号进行处理,生成N 1组滤波参数,后续地,将该N 1组滤波参数预存在半开放式主动降噪耳机的内存中。
应理解,上述N 1组滤波参数是基于上述录音设备,在N 1种耳道环境下录取的信号进行处理得到。具体的,N 1组滤波参数是根据次级通道SP模式的录音信号和初级通道PP模式的录音信号确定的。其中,SP模式的录音信号包括下行信号、鼓膜麦克风的信号以及半开放式主动降噪耳机的误差麦克风的信号;PP模式的录音信号包括鼓膜麦克风的信号、半开放式主动降噪耳机的误差麦克风的信号以及参考麦克风的信号。
对于1种耳道环境,生成一组滤波参数的过程包括步骤601至步骤609。
步骤601、有下行信号时,获取扬声器的下行信号、误差麦克风的信号以及鼓膜麦克风的信号。
步骤602、无下行信号时,获取参考麦克风的信号、误差麦克风的信号以及鼓膜麦克风的信号。
上述步骤601采集的信号可以用于进行次级通道建模,上述步骤601中有下行信号的录音过程简称为次级通道(SP)模式,上述步骤602采集的信号可以用于进行初级通道建模,将步骤602中无下行信号的录音过程简称为初级通道(PP)模式。
步骤603、根据步骤601获取的下行信号、误差麦克风的信号以及鼓膜麦克风的信号进行次级通道建模,得到下行补偿通路对应的滤波参数。
应理解,本申请实施例中,次级通道建模包括扬声器到误差麦克风的次级通道建模和扬声器到鼓膜麦克风的次级通道建模。
步骤604、结合扬声器到误差麦克的次级通道模型和扬声器到鼓膜麦克风的次级通道模型,以及PP模式下获取的信号,确定前馈通路对应的滤波参数和反馈通路对应的滤波参数。
图6为扬声器到误差麦克风的次级通道建模的流程示意图,结合图6,扬声器到误差麦克风的次级通道建模的过程包括步骤6031a至步骤6031d。
步骤6031a、通过第一滤波器对下行信号进行滤波。
需要说明的是,初始化时,该第一滤波器为FIR滤波器,该第一滤波器的参数可以为预设的一组参数,也可以全部设置为0,或者随机生成的一组参数,本申请实施例不作限定。
步骤6031b、将SP模式下获取的误差麦克风的信号与滤波后的下行信号的取反信号进行叠加,得到误差麦克风的残差信号。
步骤6031c、对该误差麦克风的残差信号进行分帧处理,并进行傅里叶变换;对上述下行信号进行分帧处理,并进行傅里叶变换。
步骤6031d、将上述傅里叶变换后的下行信号作为参考信号,将傅里叶变换后的残差信号作为误差,通过归一化最小均方(NLMS)算法处理,并将处理结果进行反傅里叶变换,该反傅里叶变换后的结果即为第一滤波器的参数。
本申请实施例中,采用步骤6031d得到的第一滤波器的参数更新上述步骤6031a中初始化的第一滤波器的参数,并且重复执行步骤6031a至步骤6031d,最终将收敛(指误差麦克风的残差信号收敛)的第一滤波器的模型即为扬声器到误差麦克风的次级通道的模型。
本申请实施例中,将收敛的一组滤波器的参数作为下行补偿通路对应的滤波参数。
图7为扬声器到鼓膜麦克风的次级通道建模的流程示意图,结合图7,扬声器到鼓膜麦克风的次级通道建模的过程包括步骤6032a至步骤6032d。
步骤6032a、通过第二滤波器对下行信号进行滤波。
需要说明的是,初始化时,该第二滤波器为FIR滤波器,该第二滤波器的参数可以为预设的一组参数,也可以全部设置为0,或者随机生成的一组参数,本申请实施例不作限定。
步骤6021b、将SP模式下获取的鼓膜麦克风的信号与滤波后的下行信号的取反信号进行叠加,得到鼓膜麦克风的残差信号。
步骤6031c、对该鼓膜麦克风的残差信号进行分帧处理,并进行傅里叶变换;对上述下行信号进行分帧处理,并进行傅里叶变换。
步骤6031d、将上述傅里叶变换后的下行信号作为参考信号,将傅里叶变换后的残差信号作为误差,通过归一化最小均方(NLMS)算法处理,并将处理结果进行反傅里叶变换,该反傅里叶变换后的结果即为第二滤波器的参数。
本申请实施例中,采用步骤6032d得到的第二滤波器的参数更新上述步骤6032a中初始化的第二滤波器的参数,并且重复执行步骤6032a至步骤6032d,最终将收敛(指鼓膜麦克风的残差信号收敛)的第二滤波器的模型即为扬声器到鼓膜麦克风的次级通道的模型。
图8为确定前馈通路对应的滤波参数和反馈通路对应的滤波参数的流程示意图,结合图8,确定前馈通路对应的滤波参数和反馈通路对应的滤波参数具体包括步骤6041a至步骤6041i。
步骤6041a、通过前馈通路的滤波器对PP模式下获取的参考麦克风的信号进行滤波,得到前馈通路的反向噪声信号(记为AntiFF信号)。
同理,当初次执行步骤6041a时,该前馈通路的滤波器的参数是一组初始化的参数,例如该前馈通路的滤波器的参数可以为预设的一组参数,或者可以将该前馈通路的滤波器的参数全部设置为0,或者随机生成的一组参数,本申请实施例不作限定。
步骤6041b、通过反馈通路的滤波器对误差麦克风的残差信号进行处理,得到反馈通路的反向噪声信号(记为AntiFB信号)。
需要说明的是,步骤6041b中的误差麦克风的残差信号是上一时刻的反向噪声信号(记为Anti信号)经扬声器到误差麦克风的次级通道模型处理的处理结果取反再与PP模式下获取的误差麦克风的信号之和。其中,上一时刻的Anti信号是上一时刻的AntiFF信号与上一时刻的上一时刻的AntiFB信号之和。
步骤6041c、步骤6041a中的AntiFF信号与步骤6041b中的AntiFB信号叠加(即求和)得到反向噪声信号(即Anti信号),该Anti信号经扬声器到鼓膜麦克风的次级通道模型处理的处理结果取反再与PP模式下的鼓膜麦克风的信号叠加,得到鼓膜麦克风的残差信号。
步骤6041d、PP模式下参考麦克风的信号经扬声器到鼓膜麦克风的次级通道模型处理。
步骤6041e、对步骤6041d的处理结果进行分帧处理,并进行傅里叶变换;对鼓 膜麦克风的残差信号进行分帧处理,并进行傅里叶变换。
步骤6041f、将步骤6041e中的傅里叶变换后的信号(指对步骤6041d的处理结果进行分帧并进行傅里叶变换的信号)作为参考信号,将步骤6041e中的傅里叶变换后的鼓膜麦克风的残差信号作为误差,通过归一化最小均方(NLMS)算法处理,并将处理结果进行反傅里叶变换,该反傅里叶变换后的结果即为前馈通路的滤波器的参数。
步骤6041g、上述误差麦克风的残差信号经扬声器到误差麦克风的次级通道模型处理。
步骤6041h、对步骤6041g的处理结果进行分帧处理,并进行傅里叶变换;对鼓膜麦克风的残差信号进行分帧处理,并进行傅里叶变换。
步骤6041i、将步骤6041h中的傅里叶变换后的信号(指对步骤6041g的处理结果进行分帧并进行傅里叶变换的信号)作为参考信号,将步骤6041h中的傅里叶变换后的鼓膜麦克风的残差信号作为误差,通过归一化最小均方(NLMS)算法处理,并将处理结果进行反傅里叶变换,该反傅里叶变换后的结果即为反馈通路的滤波器的参数。
本申请实施例中,采用步骤6041f得到的前馈通路的滤波器的参数更新初始化的前馈通路的滤波器的参数,采用步骤6041i得到的反馈通路的滤波器的参数更新初始化的反馈通路的滤波器的参数;并且重复执行步骤6041a至步骤6041i,最终将收敛的滤波器的参数(前馈通路的滤波器的参数和反馈通路的滤波器的参数)作为前馈通路对应的滤波参数和反馈通路对应的滤波参数。
综上,通过上述滤波参数生成方法对N 1种不同耳道环境对应的录音信号进行处理得到N 1组滤波参数,并且将该N 1组滤波参数存储在半开放式主动降噪耳机的内存中。应理解,该N 1组滤波参数用于在N 1种泄漏状态下进行环境音降噪,且具有普遍适用性,满足不同人的个性化需求。
当用户佩戴半开放式主动降噪耳机,并且该半开放式主动降噪耳机处于ANC工作模式时,该N 1组滤波参数作为备选的滤波参数以供选择。
第二阶段:针对特定用户,确定适合该用户的一组滤波参数的过程。
如图9所示,本申请实施例提供一种主动降噪方法,该方法应用于具有ANC功能的耳机(例如图1所示的半开放式主动降噪耳机),该主动降噪方法包括步骤901至步骤902。
步骤901、当耳机处于ANC工作模式时,耳机获取第一组滤波参数,该第一组滤波参数是耳机预存储的N 1组滤波参数中的一组,该N 1组滤波参数分别用于在N 1种泄漏状态下进行环境音降噪。
上述N 1种泄漏状态是由耳机与N 1种不同的耳道环境形成的,其中,耳机在当前的佩戴状态下,针对同一环境噪声,耳机应用第一组滤波参数时的降噪效果优于耳机应用N 1组滤波参数中其它滤波参数时的降噪效果,N 1为大于或等于2的正整数。
本申请实施例中,泄漏状态是由耳机与不同的耳道环境形成的,耳道环境与用户的耳道特征、用户佩戴耳机的姿态有关,不同的耳道特征和不同的佩戴耳机的姿态的组合可形成多种耳道环境,也对应多种泄漏状态。
应理解,上述N 1种泄漏状态可以表达N 1种耳机与人耳的贴合度范围,可以表达N 1种耳机与人耳的密封程度;任意一种泄漏状态并非特指一种特定的耳机佩戴状态, 而是根据泄漏状态的阻抗特性进行大量统计,得到的典型的或具备可差异化的泄漏场景。
耳机的佩戴状态对应一种耳道环境,从而形成一种泄漏状态,耳机的佩戴状态因用户的耳道特征和用户佩戴耳机的姿态的变化而不同。耳机当前的佩戴状态对应于一种稳定的耳道环境,即对应于一种稳定的耳道特征和佩戴姿态。上述N 1组滤波参数应用于耳机时的降噪效果随着耳机的佩戴状态的变化而不同,上述第一组滤波参数是耳机在当前的佩戴状态下,应用N 1组滤波参数对同一环境音降噪时,降噪效果最优的一组滤波参数。
本申请实施例中,环境噪声是外部环境在用户耳道形成的噪声,环境噪声包括不同场景的背景噪声,例如高铁场景、办公室场景、飞机飞行场景等,本申请实施例不作限定。
根据上述实施例的描述可知,一组滤波参数包括前馈通路对应的滤波参数(FF系数)、反馈通路对应的滤波参数(FB系数)以及下行补偿通路对应的滤波参数(SPE系数)。
本申请实施例中,上述第一组滤波参数可以是用户基于终端进行主观测试确定,或者由终端确定或者由耳机执行参数匹配算法来确定。基于此,上述耳机获取第一组滤波参数包括耳机从终端获取第一组滤波参数或耳机确定第一组滤波参数,具体细节将在下述实施例中详述。
步骤902、耳机利用第一组滤波参数进行降噪。
本申请实施例中,结合图3,利用第一组滤波参数进行降噪具体包括:利用第一组滤波参数对耳机的参考麦克风采集的声音信号和耳机的误差麦克风采集的声音信号进行处理,生成反向噪声信号,该反向噪声信号可以减弱耳道内的部分环境噪声信号,从而减弱用户耳道内的噪声信号,实现对环境音降噪。
本申请实施例提供的主动降噪方法可以根据用户佩戴耳机时该用户的耳道环境与耳机形成的泄漏状态确定与当前泄漏状态(也可以理解为当前佩戴状态)匹配的一组滤波参数(即上述第一组滤波参数),并基于该组滤波参数进行环境音降噪,能够满足用户的个性化降噪需求,提升降噪效果。
在一种实现方式中,当上述第一组滤波参数是从终端获取时,由终端从N 1组滤波参数中确定第一组滤波参数,并向耳机发送指示信息,以指示该第一组滤波参数。
在另一种实现方式中,当上述第一组滤波参数由耳机(图1所示的半开放式主动降噪耳机)确定时,耳机执行匹配算法确定第一组滤波参数。具体包括下述步骤1001至步骤1004,或者步骤1101至步骤1105,或者步骤1201至步骤1204,或者步骤1301至步骤1304,或者步骤1401至步骤1403。
如图10所示,耳机从N 1组滤波参数中确定第一组滤波参数的方法包括步骤1001至步骤1004。
步骤1001、通过耳机的误差麦克风采集第一信号,并且获取耳机的下行信号。
步骤1002、根据第一信号和下行信号确定次级通道的当前频响曲线信息。
本申请实施例中,次级通道的频响是经傅里叶变换后的第一信号的频谱(即幅值)与经傅里叶变换后的下行信号的频谱的比值,次级通道的当前频响曲线信息是描述经 傅里叶变换后的第一信号的频谱与经傅里叶变换后的下行信号的频谱之间的比值的变化趋势的曲线。
在一种实现方式中,上述下行信号可以是测试音频信号(例如在线播放定制音乐信号),在频率范围为100赫兹(Hz)-500Hz内,进行测试得到次级通道的频响曲线,当然该频率范围也可以是其他的频率范围,具体根据实际需求确定,本申请实施例不作限定。
步骤1003、从预设的多组次级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息。
本申请实施例中,上述预设的多组次级通道的频响曲线信息是离线测试的不同用户(具体指的是具有不同耳道特征的用户,例如大耳道、中耳道或小耳道)的次级通道的频响曲线信息,且测试频率范围也是100Hz-500Hz。
可选地,上述预设的多组次级通道的频响曲线信息的数量可以根据实际情况确定,本申请实施例不作限定,例如,上述预设的多组次级通道的频响曲线信息的数量为9,该9组次级通道的频响曲线是能够体现不同耳道特性的频响曲线。
步骤1004、将目标频响曲线信息对应的一组滤波参数确定为第一组滤波参数。
上述N 1组滤波参数对应N 1个次级通道的频响曲线信息。
如图11所示,耳机从N 1组滤波参数中确定第一组滤波参数的方法包括步骤1101至步骤1105。
步骤1101、通过耳机的误差麦克风采集第一信号,并且通过耳机的参考麦克风采集第二信号,以及获取耳机的下行信号。
步骤1102、基于第一信号和第二信号确定误差麦克风的残差信号。
具体的,分别对第一信号和第二信号进行短时傅里叶变换,然后将傅里叶变换后的第二信号作为参考信号,将傅里叶变换后的第一信号作为目标信号,采用卡尔曼滤波和归一化最小均方(normalized least mean square,NLMS)滤波,得到误差麦克风的残差信号。应理解,该误差麦克风的残差信号是该残差信号的频谱(即幅值)。
步骤1103、根据误差麦克风的残差信号和下行信号确定次级通道的当前频响曲线信息。
应理解,此时,次级通道的当前频响是误差麦克风的残差信号的频谱与经傅里叶变换后的下行信号的频谱的比值,该次级通道的当前频响曲线是描述误差麦克风的残差信号的频谱与经傅里叶变换后的下行信号的频谱之间的比值的变化趋势的曲线。
可选地,可以对该次级通道的当前频响曲线进行时间线性递归平滑,以去除频响曲线上的异常点或噪声点。
步骤1104、从预设的多组次级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息。
步骤1105、将目标频响曲线信息对应的一组滤波参数确定为第一组滤波参数。
该N 1组滤波参数对应N 1个次级通道的频响曲线信息。
本申请实施例中,由于外界环境噪声的状态和佩戴者(用户)的声音信号会影响次级通道的频响曲线的准确性,因此,为了提升次级通道的频响曲线的准确性,采用自适应滤波算法,滤除环境噪声和佩戴者的声音信号之后,再计算次级通道的频响曲 线信息,以提高次级通道的频响曲线的准确度。
可选地,上述确定第一组滤波参数采用的下行信号可以为ANC功能开启时的提示音,即将ANC功能开启时的提示音作为测试信号,无需再单独测试,可以提高耳机的工作效率。
如图12所示,耳机从N 1组滤波参数中确定第一组滤波参数的方法包括步骤1201至步骤1204。
步骤1201、通过耳机的误差麦克风采集第一信号,并且通过耳机的参考麦克风采集第二信号。
步骤1202、根据第一信号和第二信号确定初级通道的当前频响曲线信息。
本申请实施例中,初级通道的频响是经傅里叶变换后的第一信号频谱(即幅值)与第二信号经傅里叶变换后的频谱的比值,次级通道的当前频响曲线信息是描述经傅里叶变换后的第一信号的频谱与经傅里叶变换后的下行信号的频谱之间的比值的变化趋势的曲线。
步骤1203、从预设的多组初级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息。
上述预设的多组初级通道的频响曲线信息是离线测试的不同用户(具体指的是具有不同耳道特征的用户,例如大耳道、中耳道或小耳道)的初级通道的频响曲线信息。
可选地,可以在目标频段内,将多组初级通道的频响曲线信息与当前频响曲线信息进行匹配,确定目标频响曲线信息。例如,目标频段为1000Hz-2000Hz,则将多组初级通道的频响曲线信息的1000Hz-2000Hz频段的信息与当前频响曲线的1000Hz-2000Hz频段的信息进行匹配,确定目标频响曲线信息。当然该目标频段也可以是其他的频段,具体根据实际需求确定,本申请实施例不作限定。
步骤1204、将目标频响曲线信息对应的一组滤波参数确定为第一组滤波参数。
上述N 1组滤波参数对应N 1个初级通道的频响曲线信息。
可选地,本申请实施例中,还可以采用自适应滤波算法确定当前初级通道的频响曲线信息,进一步确定初级通道的目标频响曲线信息。采用自适应滤波算法确定当前初级通道的频响曲线信息的方法包括:分别对第一信号和第二信号进行短时傅里叶变换,然后将傅里叶变换后的第二信号作为参考信号,将傅里叶变换后的第一信号作为目标信号,采用卡尔曼滤波或NLMS滤波使得误差麦克风的残差信号最小,最终收敛后的卡尔曼滤波或NLMS滤波器的幅频曲线即为初级通道的频响曲线。
如图13所示,耳机从N 1组滤波参数中确定第一组滤波参数的方法包括步骤1301至步骤1304。
步骤1301、通过耳机的误差麦克风采集第一信号,通过耳机的参考麦克风采集第二信号,并且获取耳机的下行信号。
步骤1302、根据第一信号和第二信号确定初级通道的当前频响曲线信息,并且根据第一信号和下行信号确定次级通道的当前频响曲线信息,以及确定当前频响比值曲线信息。
其中,当前频响比值曲线信息是初级通道的当前频响曲线信息与次级通道的当前频响曲线信息之比。
步骤1303、从预设的多组频响比值曲线信息中,确定与当前频响比值曲线信息匹配的目标频响比值曲线信息。
步骤1304、将目标频响比值曲线信息对应的一组滤波参数确定为第一组滤波参数。
该N 1组滤波参数对应N 1个频响比值曲线信息。
如图14所示,耳机从从N 1组滤波参数中确定第一组滤波参数的方法包括步骤1401至步骤1403。
步骤1401、获取N 1组滤波参数分别对应的误差麦克风和参考麦克风的频响差值曲线信息。
本申请实施例中,以一组滤波参数为例,获取一组滤波参数对应的误差麦克风和参考麦克风的频响差值曲线信息的方法可以包括:将半开放式主动降噪耳机的滤波参数设置为该组滤波参数,通过半开放式主动降噪耳机的误差麦克风采集第一信号,并且通过半开放式主动降噪耳机的参考麦克风采集第二信号;根据第一信号和第二信号,确定误差麦克风的频响曲线信息和参考麦克风的频响曲线信息,并且确定误差麦克风和参考麦克风的频响差值曲线信息。该误差麦克风和参考麦克风的频响差值曲线信息是误差麦克风的频响曲线信息与参考麦克风的频响曲线信息之差。
步骤1402、将N 1组滤波参数对应的N 1个频响差值曲线信息中,目标频段对应的幅度最小的频响差值曲线确定为目标频响差值曲线。
步骤1403、将目标频响差值曲线信息对应的一组滤波参数确定为第一组滤波参数。
可选地,结合图9,如图15所示,本申请实施例提供的主动降噪方法还包括步骤903。
步骤903、耳机至少根据第一组滤波参数和第二组滤波参数生成N 2组滤波参数,该N 2组滤波参数分别对应不同的ANC降噪强度。
上述第二组滤波参数是耳机预存储的N 1组滤波参数中的一组;第二组滤波参数用于在N 1种泄漏状态中泄漏程度最小的状态下进行环境音降噪。
可以理解的是,上述N 1组滤波参数用于在N 1种泄漏状态中进行环境音降噪,可选地,该N 1种泄漏状态对应的泄漏程度依次增大,上述第二组滤波参数是泄漏程度最小的一种泄漏状态对应的一组滤波参数。
本申请实施例中,上述步骤903可以通过步骤9031实现。
步骤9031、耳机对第一组滤波参数和第二组滤波参数进行插值,生成N 2组滤波参数。
本申请实施例中,假设一组滤波参数包含K个参数,上述生成N 2组滤波参数时,将第一组滤波参数作为N 2组滤波参数中的第N 2组滤波参数,记为
Figure PCTCN2021084775-appb-000001
Figure PCTCN2021084775-appb-000002
将第二组滤波参数作为N 2组滤波参数的第1组滤波参数,记为P 1,1,P 1,2,……,P 1,K,采用线性插值的方法,对第1组滤波参数和第N 2组滤波参数进行线性插值,插入N-2组新的滤波参数。应理解,第一组滤波参数、插值得到的N-2组滤波参数以及第二组滤波参数组成该N 2组滤波参数。
具体的,按照下述公式确定第i组滤波参数,i的取值为2,3,……,N 2-1。
P i,1=P 1,1+(i-1)×Δ1,其中,
Figure PCTCN2021084775-appb-000003
P i,2=P 1,2+(i-1)×Δ2,其中,
Figure PCTCN2021084775-appb-000004
……
P i,K=P 1,K+(i-1)×ΔK,其中,
Figure PCTCN2021084775-appb-000005
应理解,上述Δ1,Δ2,……,ΔK分别为一组滤波参数中的K个参数的步长因子。
综上,i分别取2,3,……,N 2-1,可以插值得到N 2组滤波参数。
需要说明的是,本申请实施例不限制步骤902和步骤903的执行顺序,即可以先执行步骤902后执行步骤903,也可以先执行步骤903后执行步骤902,也可以同时执行步骤902和步骤903。
可选地,如图15所示,在上述步骤903之后,本申请实施例提供的主动降噪方法还包括步骤904至步骤906。
步骤904、耳机获取目标ANC降噪强度。
可选地,本申请实施例中,该目标ANC降噪强度可以是用户基于终端进行主观测试确定、或者由耳机确定、或者由终端确定。当目标ANC降噪强度由耳机确定时,耳机根据当前环境噪声的状态确定目标ANC降噪强度。例如,当前环境比较安静,耳机自适应地根据环境噪声状态选择降噪强度较弱的ANC降噪强度;当前环境比较嘈杂时,耳机自适应地根据环境噪声的状态选择降噪强度较强的ANC降噪强度。
步骤905、耳机根据目标ANC降噪强度从N 2组滤波参数中确定第三组滤波参数。
本申请实施例中,ANC降噪强度与N 2组滤波参数具有对应关系,该N 2组滤波参数对应的降噪强度不同,降噪效果不同。基于ANC降噪强度与N 2组滤波参数的对应关系,从N 2组滤波参数中确定目标ANC降噪强度对应的第三组滤波参数。
步骤906、耳机利用第三组滤波参数进行降噪。
应理解,基于步骤904和步骤905,以第三组滤波参数代替上述第一组滤波参数,即采用第三组滤波参数对耳机的参考麦克风采集的声音信号和耳机的误差麦克风采集的声音信号进行处理,生成反向噪声信号,该反向噪声信号可以减弱耳道内的部分环境噪声信号,实现对环境音降噪。
综上,本申请实施例提供的主动降噪方法中,在上述确定出第一组滤波参数之后,基于该第一组滤波参数和第二组滤波参数生成与当前用户适配的N 2组滤波参数,并且从该N 2组滤波参数中进一步确定与目标ANC降噪强度对应的第三组滤波参数,从而采用第三组滤波参数进行降噪,如此,能够根据环境噪声的状态选择合适的ANC降噪强度,降噪效果更加符合用户的需求。
下面从终端与耳机交互的角度介绍上述第二阶段(针对特定用户,确定适合该用户的一组滤波参数的过程)的内容。具体的,如图16所述,本申请实施例提供的主动降噪方法包括步骤1601至步骤1604。
步骤1601、终端确定第一组滤波参数。
该第一组滤波参数是耳机预存储的N 1组滤波参数中的一组,该N 1组滤波参数分别用于在N 1种泄漏状态下进行环境音降噪,该N 1种泄漏状态是由耳机与N 1种不同的耳道环境形成的。其中,耳机在当前的佩戴状态下,针对同一环境噪声,耳机应用所述第一组滤波参数时的降噪效果优于耳机应用N 1组滤波参数中其它滤波参数时的降噪效果,N 1为大于或等于2的正整数。
步骤1602、终端向耳机发送第一指示信息,该第一指示信息用于指示耳机利用第 一组滤波参数进行降噪。
步骤1603、耳机从终端接收第一指示信息。
本申请实施例中,耳机接收到终端发送的第一指示信息之后,从耳机存储的N 1组滤波参数中确定该第一指示信息指示的第一组滤波参数。
步骤1604、耳机利用第一组滤波参数进行降噪。
本申请实施例提供的主动降噪方法可以根据用户佩戴耳机时该用户的耳道环境与耳机形成的泄漏状态确定与当前泄漏状态匹配的一组滤波参数(即第一组滤波参数),并基于该组滤波参数进行环境音降噪,能够满足用户的个性化降噪需求,提升降噪效果。
在一种实现方式中,上述步骤1601(即终端确定第一组滤波参数)可以通过终端执行匹配算法实现,具体包括下述步骤16011a至步骤16011e,或者步骤16012a至步骤16012e,或者步骤16013a至步骤16013e,或者步骤16014a至步骤16014d,或者步骤16015a至步骤16015d。
可选地,终端确定第一组滤波参数的方法包括步骤16011a至步骤16011e。
步骤16011a、终端接收耳机的误差麦克风采集的第一信号和耳机的参考麦克风采集第二信号,并且获取耳机的下行信号。
步骤16011b、终端基于第一信号和第二信号确定误差麦克风的残差信号。
步骤16011c、终端根据误差麦克风的残差信号和下行信号确定次级通道的当前频响曲线信息。
步骤16011d、终端从预设的N 1个次级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息。
步骤16011e、终端将目标频响曲线信息对应的滤波参数确定为第一组滤波参数,该N 1组滤波参数对应N 1个次级通道的频响曲线信息。
可选地,终端确定第一组滤波参数的方法包括步骤16012a至步骤16012e。
步骤16012a、终端接收耳机的误差麦克风采集的第一信号和耳机的参考麦克风采集第二信号,并且获取耳机的下行信号。
步骤16012b、终端基于第一信号和第二信号确定误差麦克风的残差信号。
步骤16012c、终端根据误差麦克风的残差信号和下行信号确定次级通道的当前频响曲线信息。
步骤16012d、终端从预设的N 1个次级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息;
步骤16012e、终端将目标频响曲线信息对应的滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个次级通道的频响曲线信息。
可选地,终端确定第一组滤波参数的方法包括步骤16013a至步骤16013e。
步骤16013a、终端接收耳机的误差麦克风采集的第一信号和耳机的参考麦克风采集第二信号,并且获取耳机的下行信号。
步骤16013b、终端基于第一信号和第二信号确定误差麦克风的残差信号。
步骤16013c、终端根据误差麦克风的残差信号和下行信号确定次级通道的当前频响曲线信息。
步骤16013d、终端从预设的N 1个次级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息。
步骤16013e、终端将目标频响曲线信息对应的滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个次级通道的频响曲线信息。
可选地,终端确定第一组滤波参数的方法包括步骤16014a至步骤16014d。
步骤16014a、终端接收耳机的误差麦克风采集的第一信号和耳机的参考麦克风采集的第二信号。
步骤16014b、终端根据第一信号和第二信号确定初级通道的当前频响曲线信息。
步骤16014c、终端从预设的N 1个初级通道的频响曲线信息中,确定与当前频响曲线信息匹配的目标频响曲线信息。
步骤16014d、终端将目标频响曲线信息对应的滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个初级通道的频响曲线信息。
可选地,终端确定第一组滤波参数的方法包括步骤16015a至步骤16015d。
步骤16015a、终端接收耳机的误差麦克风采集的第一信号和耳机的参考麦克风采集的第二信号,并且获取耳机的下行信号。
步骤16015b、终端根据第一信号和第二信号确定初级通道的当前频响曲线信息,并且根据第一信号和下行信号确定次级通道的当前频响曲线信息;以及确定当前频响比值曲线信息。
当前频响比值曲线信息是初级通道的当前频响曲线信息与次级通道的当前频响曲线信息之比。
步骤16015c、终端从预设的N 1个频响比值曲线信息中,确定与当前频响比值曲线信息匹配的目标频响比值曲线信息。
步骤16015d、终端将目标频响比值曲线信息对应的滤波参数确定为第一组滤波参数,N 1组滤波参数对应N 1个频响比值曲线信息。
应理解,本申请实施例提供的主动降噪方法应用在耳机处于ANC工作模式的场景中,可知耳机处于ANC工作模式是确定第一组滤波参数的一种触发条件。具体的,使得耳机工作于ANC工作模式的方法包括下述方式一或方式二。
上述方式一包括步骤A1至步骤A3。
步骤A1、终端接收对终端的第一界面的第一选项的操作,该第一界面是对耳机的工作模式进行设置的界面。
步骤A2、终端响应于对第一选项的操作,向耳机发送第一指令,该第一指令用于控制耳机工作于ANC工作模式。
在本申请实施例的一种应用场景中,终端上安装有耳机对应的应用(App),用户打开该应用并与耳机(左耳机和/或右耳机)建立通信连接之后,用户在终端显示的第一界面上进行相应的操作,以控制耳机处于不同的工作模式,例如通用模式或ANC模式,应理解,此处的通用模式是不开启降噪功能的模式。
可选地,上述第一操作可以为触屏操作或者按键操作等,本发明实施例不作具体限定。示例性的,上述触屏操作为用户对终端的触控屏的按压操作、长按操作、滑动操作、点击操作、悬浮操作(用户在触控屏附近的操作)等。按键操作对应于用户对 终端的电源键、音量键、Home键等按键的单击操作、双击操作、长按操作、组合按键操作等操作。
图17所示的界面1701为上述第一界面的一种示例,该第一界面中包含设置耳机的工作模式的不同选项,通过选择不同的选项,用户设置耳机的工作模式。应理解,上述第一选项对应于ANC工作模式。例如,第一界面1701中包括“通用模式”选项1702和“ANC模式”选项1703,该“ANC模式”选项1703即为第一选项。当用户在该第一界面1701中选择“ANC模式”选项1703时,例如,用户点击“ANC模式”选项1703,可以控制耳机工作于ANC工作模式。
步骤A3、耳机接收第一指令,耳机工作于ANC工作模式。
可选地,在另一种实现方式中,上述第一指令也可以是用户在耳机上进行操作指令,例如,耳机上具有开启ANC功能的按键或按钮,用户佩戴耳机之后,用户按下开启ANC功能的按键(相当于第一指令),耳机进入ANC工作模式。
上述方式二包括步骤B1至步骤B2。
步骤B1、检测耳机是否入耳。
本申请实施例中,采用入耳检测技术检测耳机是否入耳,例如,结合上述实施例中对耳机的结构的描述可知,耳机上包括接近光传感器,可以根据接近光传感器采集信号检测耳机是否入耳。
步骤B2、在检测到耳机已入耳的情况下,耳机工作于ANC工作模式。
本申请实施例中,在一种应用场景中,当耳机检测到该耳机已入耳,耳机可以自动开启ANC功能,从而耳机工作于ANC工作模式。可选地,当检测到耳机已入耳时,耳机播放入耳提示音,在该提示音结束的预设时间段之后(表明耳机入耳稳定),耳机工作于ANC工作模式。
综上,终端执行确定第一组滤波参数的步骤,或者耳机执行获取第一组滤波参数的步骤。
可选地,上述确定(或者获取)第一组滤波参数的另一种触发条件是:在耳机已处于ANC工作模式时,用户根据实际需求在终端或耳机上进行辅助操作,从而触发终端确定第一组滤波参数或者耳机获取第一组滤波参数。
在一种实现方式中,上述方式一中,当ANC功能开启时,耳机播放ANC开启的提示音,在播放该入耳提示音的过程中确定第一组滤波参数,即将该入耳提示音作为测试信号,用户根据主观听音感受确定第一组滤波参数。
在另一种实现方式中,当检测到耳机已入耳时,耳机工作于ANC工作模式,并且同时耳机将播放入耳提示音,在播放该入耳提示音的过程中确定第一组滤波参数,即将该入耳提示音作为测试信号,用户根据主观听音感受确定第一组滤波参数。
可选地,终端接收对终端的第一界面的第一选项的操作之后,本申请实施例提供的主动降噪方法还包括:显示ANC控制列表。该ANC控制列表中至少包括下述选项中的至少一个:第一控制选项、第二控制选项或第三控制选项;其中,第一控制选项用于触发确定第一组滤波参数,第二控制选项用于触发生成N 2组滤波参数,第三控制选项用于触发重新确定第一组滤波参数。
在一种实现方式中,图18A为上述ANC控制列表的一种显示效果示意图,图18A 中的(a)所示的界面为第一界面1801,第一选项为第一界面中的“ANC模式”选项1801a。用户点击图18A中的(a)所示的第一界面1801中的“ANC模式”选项1801a之后,终端显示图18A中的(b)所示的界面1802。可见,在界面1802中,在“ANC模式”选项的下方显示ANC控制列表1802a,该ANC控制列表1802a中的第一控制选项为“最佳档位匹配”选项,第二控制选项为“适配参数生成”选项,第三控制选项为“参数重新匹配”选项。如此,用户可以在ANC控制列表中根据需求选择ANC控制方式。当然,该ANC控制列表中还可以包括其他用于对ANC的控制方式进行设置的选项,具体根据实际需求确定,本申请实施例不作限定。
在另一种实现方式中,图18B为上述ANC控制列表的另一种显示效果示意图,图18B中的(a)所示的界面为第一界面1803,第一选项为第一界面1803中的“ANC模式”选项1803a。用户点击图18B中的(a)所示的第一界面1803中的“ANC模式”选项1803a之后,终端显示图18B中的(b)所示的界面1804,该界面1804中包括ANC控制列表1804a,该ANC控制列表1804a中包含“最佳档位匹配”选项、“适配参数生成”选项、“参数重新匹配”选项。
本申请实施例中,上述步骤1601(即终端确定第一组滤波参数)可以包括步骤1601a至步骤1601c。
步骤1601a、终端接收对ANC控制列表中的第一控制选项的操作,显示第一控件,该第一控件包括N 1个预设位置,该N 1个预设位置对应N 1组滤波参数。
步骤1601b、终端接收对第一控件中的第一位置的操作,该第一位置为N 1个预设位置中的一个。
本申请实施例中,第一位置对应的一组滤波参数应用于耳机时的降噪效果优于N 1个预设位置中的其他位置对应的滤波参数应用于耳机时的降噪效果。
步骤1601c、终端响应于对第一位置的操作,确定第一位置对应的一组滤波参数为第一组滤波参数。
在一种实现方式中,图19A为上述第一控件的一种显示效果示意图,在用户选择图17中的“ANC模式”1703之后,终端显示图19A中的(a)所示的界面1901(也即图18A中的(b)),该界面1901中包含ANC控制列表,进一步的,用户选择界面1901中的第一控制选项,如“最佳档位匹配”选项1901a之后,终端显示图19A中的(b)所示的界面1902,该该界面1902中,ANC控制列表的下方显示有第一控件1902a。可选地,该第一控件1902a可以为圆盘形状(第一控件1902a也可以称为档位盘),该第一控件1902a中包含档位调节按钮和N 1个档位,进而用户在第一控件1902a中进行操作,确定第一组滤波参数。
在另一种实现方式中,图19B为上述第一控件的另一种显示效果示意图,在用户选择图17中的“ANC模式”1703之后,终端显示图19B中的(a)所示的界面1903(也即图18B中的(b)),该界面1903中包含ANC控制列表,进一步的,用户选择界面1903中的第一控制选项,如“最佳档位匹配”选项1903a之后,终端显示图19B中的(b)所示的界面1904,该界面1904包含第一控件1904a。同理,该第一控件1904a可以为圆盘形状,该第一控件1904a中包含档位调节按钮和N 1个档位,进而用户在第一控件1904a中进行操作,确定第一组滤波参数。
可选地,上述用户选择“最佳档位匹配”选项之后,耳机或者终端执行匹配算法确定第一组滤波参数,并且在显示的第一控件中呈现该第一组滤波参数对应的档位,具体的,第一控件中的档位调节按钮所对应的位置为当前的第一组滤波参数对应的档位。参考图19A中的(b)和图19B中的(b)。
可选地,上述N 1个档位分布在第一控件中,该第一控件可以为圆盘形,则N 1个档位呈圆盘形排布在第一控件中;第一控件也可以是条形,则N 1个档位呈条形排布在第一控件中。当然,上述第一控件也可以是其他形状的控件,本申请实施例不作限定。
本申请实施例中,用户在上述第一控件中通过滑动档位调节按钮使得档位调节按钮遍历N 1个档位,即遍历N 1个预设位置。对于不同的档位,对应的降噪效果不同。若上述档位调节按钮调节至第一位置时,用户感受耳机播放的音频的效果最好,用户不再调节档位调节按钮的位置,从而将用户主观感受到的降噪效果最佳的这个位置对应的滤波参数确定为第一组滤波参数。
本申请实施例中,用户对第一控件的第一位置进行操作,确定第一组滤波参数。结合图19B的显示方式,如图20中的(a)所示,在一种实现方式中,当用户佩戴耳机听音频时,上述对第一位置的操作可以是用户将档位调节按钮2001滑动至第一位置处且停留时长大于预设时长(例如10秒)的操作。例如,用户将档位调节按钮2003滑动至第一位置,用户通过耳机听当前播放的音频,且该用户感受到当前音频的音效较好(满足该用户的需求),则用户不再滑动档位调节按钮2001,且该档位调节按钮2001在第一位置处停留时长超过10秒,此时,终端检测到这一操作,并响应于对第一位置的操作,确定第一位置对应的一组滤波参数为第一组滤波参数。
结合图19B的显示方式,如图20中的(b)所示,在另一种实现方式中,上述第一控件所在的界面中还包括选择框2002,当用户佩戴耳机听音频时,上述对第一位置的操作可以是用户将档位调节按钮2003滑动至第一位置之后,用户选中选择框2002中的“确定”按钮的操作。例如,用户将档位调节按钮2001滑动至第一位置,用户通过耳机听当前播放的音频,且该用户感受到当前音频的音效较好(满足该用户的需求),则用户不再滑动档位调节按钮2001,并且用户点击选择框2002中的确定按钮,选择当前档位为最佳档位,此时,终端检测到这一操作,并响应于对第一位置的操作,确定第一位置对应的一组滤波参数为第一组滤波参数。
可选地,结合上述ANC控制列表,上述获取第一组滤波参数具体包括步骤C1至步骤C3。
步骤C1、终端接收对ANC控制列表中的第三控制选项的操作。
步骤C2、终端响应于对第三控制选项的操作,向耳机发送第二指令,该第二指令用于指示耳机获取第一组滤波参数。
应理解,根据第二指令的指示获取的第一组滤波参数与耳机在接收第二指令之前采用的滤波参数不同。
本申请实施例中,在一种情况下,上述确定出第一组滤波参数之后,耳机基于第一组滤波参数降噪,后续地,在耳机工作的过程中,用户还可以根据实际情况(例如使用该第一组滤波参数的降噪效果不能满足用户的需求)选择重新确定一组滤波参数用于降噪,此时,也可以通过发送第二指令指示耳机获取第一组滤波参数。在另一种 情况下,也可以在耳机的其他工作阶段,用户还可以根据实际需求选择重新确定第一组滤波参数,本申请实施例不作限定。
结合上述图18A中的(b)或图18B中的(b)所示的界面,该界面中ANC控制列表中的“参数重新匹配”选项即为上述第三控制选项,若用户点击“参数重新匹配”选项,终端向耳机发送第二指令,以指示耳机获取第一组滤波参数。
步骤C3、耳机接收第二指令,耳机获取第一组滤波参数。
可选地,在一种方式中,耳机获取第一组滤波参数的方法是耳机执行匹配算法从N 1组滤波参数中确定第一组滤波参数。在另一种方式中,终端响应于对上述第三控制选项的操作,显示包括第一控件的界面,从而通过在该第一控件上进行操作重新确定第一组滤波参数。
参考图21A,当用户点击图21A中的(a)所示的界面2101中的“参数重新匹配”选项2101a之后,终端显示上述图21A中的(b)所示的界面2102,该界面2102中,在ANC控制列表的下方显示有第一控件2102a,进而用户在第一控件2102a中进行操作以重新确定第一组滤波参数。
参考图21B,当用户点击图21B中的(a)所示的界面2103中的“参数重新匹配”选项2103a之后,终端显示上述界面图21B中的(b)所示的界面2104,该界面2104中包含第一控件2104a,进而用户在第一控件2104a中进行操作以重新确定第一组滤波参数。
可选地,上述用户选择“参数重新匹配”选项之后,耳机或者终端执行匹配算法确定第一组滤波参数,并且在显示的第一控件中呈现该第一组滤波参数对应的档位,具体的,第一控件中的档位调节按钮所对应的位置为当前的第一组滤波参数对应的档位。参考图21A中的(b)和图21B中的(b)。
本申请实施例中,耳机获取第一组滤波参数的具体细节可以参考上述方法实施例的相关描述,此处不再赘述。
可选地,本申请实施例提供的主动降噪方法还包括步骤D1至D2。
步骤D1、终端接收对ANC控制列表中的第三控制选项的操作。
步骤D2、终端响应于对第三控制选项的操作,终端重新确定第一组滤波参数。
对于步骤D2的详细描述可参考对步骤1601及相关内容的描述,此处不再赘述。
可选地,结合图16,如图22所示,本申请实施例提供的主动降噪方法还包括步骤1605至步骤16010。
步骤1605、耳机至少根据第一组滤波参数和第二组滤波参数生成N 2组滤波参数。
本申请实施例中,上述N 2组滤波参数分别对应不同的ANC降噪强度,上述第二组滤波参数是耳机预存储的N 1组滤波参数中的一组;第二组滤波参数用于在N 1种泄漏状态中泄漏程度最小的状态下进行环境音降噪。
对于步骤1605的详细描述可参考上述实施例中对于步骤903(包括步骤9031)的描述,此处不再赘述。
可选地,本申请实施例中,用户也可以在终端上进行操作以控制耳机生成N 2组滤波参数,即在确定第一组滤波参数之后,本申请实施例提供的主动降噪方法还包括步骤E1至步骤E3。
步骤E1、终端接收对终端的ANC控制列表的第二控制选项的操作。
步骤E2、终端响应于对第二控制选项的操作,向耳机发送第三指令,该第三指令用于触发耳机生成N 2组滤波参数。
示例性的,结合上述图18A中的(b)或图18B中的(b)所示的界面,该界面中的“适配参数生成”选项即为第二控制选项,若用户点击“适配参数生成”选项,终端向耳机发送第三指令,以触发耳机生成N 2组滤波参数。
步骤E3、耳机接收第三指令。
本申请实施例中,耳机接收第三指令后,耳机根据第一组滤波参数和第二组滤波参数生成N 2组滤波参数。该N 2组滤波参数对应不同的ANC降噪强度(例如N 2组滤波参数对应N 2个ANC降噪强度),该N 2组滤波参数是适配当前用户的耳道环境的N 2组滤波参数,且耳机采用N 2组滤波参数进行降噪时的降噪强度依次增强。
步骤1606、终端确定目标ANC降噪强度。
在一种实现方式中,终端可以根据当前环境噪声的状态确定目标ANC降噪强度。例如,当前环境比较安静,终端自适应地根据环境噪声状态选择降噪强度较弱的ANC降噪强度;当前环境比较嘈杂时,终端自适应地根据环境噪声的状态选择降噪强度较强的ANC降噪强度。
在另一种实现方式中,在终端接收对终端的ANC控制列表的第二控制选项的操作之后,用户可以与终端交互确定该目标ANC降噪强度,具体方法包括步骤1606a至步骤1606c。
步骤1606a、终端显示第二控件,该第二控件包括N 2个预设位置,该N 2个预设位置对应N 2种ANC降噪强度,该N 2种ANC降噪强度对应N 2组滤波参数。
示例性的,在一种实现方式中,参考图23A,用户点击图23A中的(a)所示的界面2301中的“适配参数生成”选项2301a之后,终端显示图23A中的(b)所示的界面2302,该界面中2302中,在ANC控制列表的下方显示有第二控件2302a(档位盘),该第二控件2302a中包含档位调节按钮和N 2个档位,该N 2个档位对应N 2个预设位置,且该N 2个预设位置对应N 2组滤波参数。需要说明的是,在图23A中的(b)中所示意的第一控件中N 2个档位的降噪强度依次增强,采用N 2组滤波参数进行降噪后的环境噪声依次减弱。
在另一种实现方式中,参考图23B,用户点击图23B中的(a)所示的界面2303中的“适配参数生成”选项2303a之后,终端显示图23B中的(b)所示的界面2304,该界面中2304中包括第二控件2304a(档位盘),该第二控件2304a中包含档位调节按钮和N 2个档位,该N 2个档位对应N 2个预设位置,且该N 2个预设位置对应N 2组滤波参数。
步骤1606b、终端接收对第二控件中的第二位置的操作,该第二位置为N 2个预设位置中的一个。
本申请实施例中,上述N 2种ANC降噪强度对应N 2组滤波参数,该N 2组滤波参数是根据第一组滤波参数第二组滤波参数生成的。上述第二位置处的ANC降噪强度所对应的滤波参数应用于耳机时的降噪效果优于N 2个预设位置中的其他位置处的ANC降噪强度所对应的滤波参数应用于耳机时的降噪效果。
步骤1606c、终端响应于对第二位置的操作,确定第二位置对应的ANC降噪强度为目标ANC降噪强度。
本申请实施例中,该第二控件与上述第一控件类似,用户在第二控件中通过滑动档位调节按钮使得档位调节按钮遍历N 2个档位,即遍历N 2个预设位置,以确定目标ANC降噪强度。用户对第二控件中的第二位置进行操作确定目标ANC降噪强度的过程与上述用户对第一控件中的第一位置进行操作确定第一组滤波参数的过程类似,具体可参考上述图20以及上述实施例的内容,此处不再赘述。
可选地,当耳机或终端根据环境噪声状态确定目标ANC降噪强度时,在上述显示的第二控件中呈现该目标ANC降噪强度对应的档位,具体的,第二控件中的档位调节按钮所对应的位置为目标ANC降噪强度对应的档位,参考图23A中的(b)和图23B中的(b)。
步骤1607、终端向耳机发送第二指示信息,该第二指示信息用于指示耳机利用目标ANC降噪强度对应的第三组滤波参数进行降噪。
步骤1608、耳机从终端接收第二指示信息。
步骤1609、耳机根据目标ANC降噪强度从N 2组滤波参数中确定第三组滤波参数。
本申请实施例中,耳机接收到第二指示信息之后,耳机将N 2组滤波参数中该第二指示信息指示的滤波参数确定为第三组滤波参数。
步骤16010、耳机利用第三组滤波参数进行降噪。
可选地,本申请实施例提供的主动降噪方法可以分别应用于左耳对应的耳机(以下简称为左耳机)和右耳对应的耳机(以下简称为右耳机),实现左耳降噪和右耳降噪。或者,采用同一组滤波参数,分别进行左耳降噪和右耳降噪,本申请实施例不作限定。
在一种情况下,上述根据第一组滤波参数和第二组滤波参数生成N 2组滤波参数之后,从N 2组滤波参数中确定第三组滤波参数,耳机基于第三组滤波参数降噪,后续地,在耳机工作的过程中,用户还可以根据实际需求选择重新确定一组滤波参数用于降噪,即耳机重新获取第一组滤波参数。参考图18A或图18B,用户选择“参数重新匹配”选项,耳机将该耳机中的N 2组滤波参数恢复至上述N 1组滤波参数,进而从N 1组滤波参数中重新确定第一组滤波参数,并利用第一组滤波参数进行降噪。进一步,可选地,还可以根据重新确定的第一组滤波参数和第二组滤波参数,再生成新的N 2组滤波参数,并从N 2组滤波参数中确定第三组滤波参数,利用第三组滤波参数进行降噪。
需要说明的是,本申请实施例中,耳机也可以向终端发送信息。例如,当耳机执行匹配算法确定出第一组滤波参数或第三组滤波参数之后,耳机向终端发送指示信息以指示该第一组滤波参数或第三组滤波参数,进而终端根据指示信息在第一控件中呈现第一组滤波参数对应的档位或在第二控件中呈现第三组滤波参数对应的档位(即目标ANC强度对应的档位)。
综上,本申请实施例提供的主动降噪方法中,在上述确定出第一组滤波参数之后,基于该第一组滤波参数和第二组滤波参数生成与当前用户适配的N 2组滤波参数,并且从该N 2组滤波参数中进一步确定与目标ANC降噪强度对应的第三组滤波参数,从而采用第三组滤波参数进行降噪,由于用户可以根据环境噪声的状态选择合适的ANC 降噪强度,因此降噪效果更加符合用户的需求。
第三阶段:异常噪声检测、更新滤波参数的过程。
可选地,本申请实施例中,上述为用户确定出第一组滤波参数或第三组滤波参数之后,在用户继续使用耳机的过程中,用户所处的环境可能会发生变化而在用户耳道内产生异常噪声,将严重影响用户的听音感受。基于此,本申请实施例提供的主动降噪方法还包括对异常噪声的检测和处理。
如图24所示,本申请实施例提供的主动降噪方法还包括步骤2401至步骤2404。
步骤2401、检测是否存在异常噪声,异常噪声包括下述至少一种:啸叫噪声、削波噪声或底噪。
本申请实施例中,用户使用耳机时,用户开启该耳机的主动降噪功能(即开启该耳机的ANC功能),或者将该耳机的工作模式切换到ANC工作模式,如此,该可以在耳机的使用过程中实时检测是否存在啸叫噪声、削波噪声或者底噪中的至少一种异常噪声,并进行降噪处理。
可选地,上述异常噪声还可以包括风噪等其他噪声,需要说明的是,对于不同的噪声类型,异常噪声的检测方法不同,具体将在下述实施例中进行详细描述。
步骤2402、在检测到存在异常噪声的情况下,更新耳机的滤波参数。
应理解,耳机的滤波参数可以为上述第一组滤波参数或第三组滤波参数。当耳机当前的滤波参数是第一组滤波参数时,更新第一组滤波参数,当耳机当前的滤波参数是第三组滤波参数时,更新第三组滤波参数。
需要说明的是,对于不同类型的异常噪声(例如啸叫噪声、削波噪声、底噪以及风噪)可能更新的是滤波参数中的不同参数,具体将在下述实施例中详细介绍。
步骤2403、通过参考麦克风和误差麦克风采集的声音信号。
步骤2404、基于更新后的滤波参数,对耳机的参考麦克风采集的声音信号和误差麦克风采集的声音信号进行处理,生成反向噪声信号。
本申请实施例中,上述反向噪声信号用于减弱用户的耳内噪声信号,该耳内噪声信号可以理解为用户佩戴耳机之后,环境噪声被耳机隔离后的残留噪声,残留噪声的信号跟外部环境噪声、耳机、耳机与耳道的贴合度等因素有关;上述耳机生成反向噪声信号之后,耳机播放该反向噪声信号,该反向噪声信号与用户的耳内噪声信号的相位相反,如此,该反向噪声信号能够减弱用户的耳内噪声信号,从而降低耳内的异常噪声。
结合图25所示的耳机的工作原理示意图,上述进行异常噪声检测的步骤2401和更新滤波参数的步骤2402是由该耳机的微处理器执行,在检测到存在异常噪声的情况下,由ANC芯片执行降噪处理(步骤2404)。应理解,本申请实施例中,ANC芯片的降噪处理包括对前馈通路的信号(即参考麦克风采集的声音信号)的处理、对反馈通路的信号(即误差麦克风采集的信号)的处理以及下行补偿通路的信号(即下行音频)的处理。
本申请实施例提供的主动降噪方法,由于耳机能够检测异常噪声,并且对异常噪声进行降噪处理,减弱异常噪声的干扰,提升耳机的稳定性,能够提升用户的听音体验。
下面分别从啸叫噪声、削波噪声、底噪以及风噪的角度详细介绍异常噪声检测过程和噪声信号处理过程。
对于啸叫噪声,如图26所示,检测是否存在啸叫噪声的方法具体包括步骤2601至步骤2602。
步骤2601、通过耳机的误差麦克风采集第一信号。
本申请实施例中,上述采集到第一信号之后,采用16KHz的频率对第一信号进行下采样,进而根据第一信号进行啸叫噪声检测。
步骤2602、在第一信号的能量峰值大于第一阈值的情况下,确定存在啸叫噪声;在第一信号的能量峰值小于或等于第一阈值的情况下,确定不存在啸叫噪声。
其中,第一信号的能量峰值为第一信号的峰值频率所对应的能量值。
本申请实施例中,通过误差麦克风采集到第一信号之后,在设定的啸叫检测频率范围(例如500Hz-7000Hz)内,采用最小均方算法(least mean square,LMS)确定该第一信号的峰值频率。若该第一信号的峰值频率在上述啸叫检测频率范围内,则采用格策尔算法计算第一信号的能量峰值,即第一信号的峰值频率所对应的能量,从而基于该第一信号的能量峰值确定是否存在啸叫噪声。
本申请实施例中,将误差麦克风的信号(即上述第一信号)记为err,首先对该第一信号进行高通滤波:err hp=H hp*err,其中,H hp为高通滤波器的传递函数(具体根据实际情况确定),err hp为滤波后的第一信号。该高通滤波器的低频截止频率取决于啸叫最低频率,例如600Hz。
其次,对上述滤波后的第一信号采用LMS算法确定第一信号的峰值频率,具体的使得系数误差函数e(n)最小:
e(n)=err hp(n)+h 1(n)*err hp(n-1)+err hp(n-2)
其中,
Figure PCTCN2021084775-appb-000006
n为当前帧的第n个样点数据,n≤L,L为当前帧包含的样点数据的数量。
通过LMS算法,对当前帧的每个样点依次迭代,迭代到L个样点后得到的频率w m即为当前帧收敛的峰值频率,也就是第一信号的峰值频率。应理解,将当前帧的峰值频率保存下来作为下一帧的初始频率,对下一帧继续更新可以得到下一帧的峰值频率,依此类推。
若该第一信号的峰值频率在上述啸叫检测频率范围内,则采用格策尔算法计算第一信号的能量峰值,即第一信号的峰值频率所对应的能量,从而基于该第一信号的能量峰值确定是否存在啸叫噪声。
具体的,将第一信号的峰值能量记为
Figure PCTCN2021084775-appb-000007
则通过下述公式确定
Figure PCTCN2021084775-appb-000008
s(n)=err hp(n)-h 1(L)*s(n-1)-s(n-2)
Figure PCTCN2021084775-appb-000009
其中,n为当前帧的第n个样点数据,n≤L,L为当前帧包含的样点数据的数量。
通过格策尔算法,对当前帧的每个样点依次迭代,得到s(L),s(L-1),进而计算得到第一信号的峰值能量
Figure PCTCN2021084775-appb-000010
或者,如图27所示,检测是否存在啸叫噪声的方法具体包括步骤2701至步骤2702。
步骤2701、获取反向噪声信号。
同理,采用16KHz的频率对反向噪声信号进行下采样,进而根据反向噪声信号进行啸叫噪声检测。
步骤2702、在反向噪声信号的能量峰值大于第二阈值的情况下,确定存在啸叫噪声;在反向噪声信号的能量峰值小于或等于第二阈值的情况下,确定不存在啸叫噪声。
其中,反向噪声的能量峰值为反向噪声信号的峰值频率所对应的能量值。
应理解,上述反向噪声信号的峰值频率和能量峰值的确定方法与上述第一信号的峰值频率和能量峰值的确定方法类似,具体参考上述步骤2602的相关描述,此处不再赘述。
图28为啸叫检测以及降噪处理的工作原理示意图,参考图28以理解本申请描述的主动降噪方法。
在检测到存在啸叫噪声的情况下,上述更新滤波参数的方法具体包括步骤24021a至步骤24021c。
步骤24021a、根据误差麦克风采集的第一信号和参考麦克风采集的第二信号,确定啸叫噪声的类型。
可选地,也可以根据反向噪声信号和第二信号,确定啸叫噪声的类型。本申请实施例中,啸叫噪声包括由反馈通路导致的啸叫噪声和由前馈通路导致的啸叫噪声,为了便于描述,将由反馈通路导致的啸叫噪声称为第一啸叫噪声,将由前馈通路导致的啸叫噪声称为第二啸叫噪声,啸叫噪声的类型即包括第一啸叫噪声和第二啸叫噪声。
本申请实施例中,将误差麦克风采集的第一信号的峰值频率记为第一频率,当第一信号误差信号在第一频率的能量与第二信号在第一频率的能量的比值小于预设阈值时,确定啸叫噪声的类型为第一啸叫噪声;当第一信号误差信号在第一频率的能量与第二信号在第一频率的能量的比值大于或等于预设阈值时,确定啸叫噪声的类型为第二啸叫噪声。
步骤24021b、当啸叫噪声为第一啸叫噪声时,降低滤波参数中的反馈通路的增益,第一啸叫噪声是反馈通路导致的啸叫噪声。
可以理解的是,当啸叫噪声由反馈通路导致时,更新滤波参数指的是降低反馈通路的增益,例如将反馈通路的增益更新为0,或者根据实际需求降低反馈通路的增益,本申请实施例不作限定。
步骤24021c、当啸叫噪声为第二啸叫噪声时,降低滤波参数中的前馈通路的增益,第二啸叫噪声是前馈通路导致的啸叫干扰。
可以理解的是,当啸叫噪声由前馈通路导致时,更新滤波参数指的是降低前馈通路的增益,例如将前馈通路的增益更新为0,或者根据实际需求降低前馈通路的增益,本申请实施例不作限定。
或者,在检测到存在啸叫噪声的情况下,上述更新滤波参数的方法具体包括步骤24022。
步骤24022、降低滤波参数中的前馈通路的增益和反馈通路的增益。
本申请实施例中,在一种便捷的实施方式中,在检测到存在啸叫噪声的情况下,无需确定啸叫噪声是由反馈通路还是由前馈通路导致,而是并行地降低前馈通路的增 益和反馈通路的增益。
可选地,可以按照相同的幅度(或倍数)降低前馈通路的增益和反馈通路的增益,例如前馈通路的增益降低至原增益的0.8倍,反馈通路的增益也降低至原增益的0.8倍。当然,可以按照不同的幅度(或倍数)降低前馈通路的增益和反馈通路的增益,例如前馈通路的增益降低至原增益的0.8倍,反馈通路的增益也降低至原增益的0.6倍。具体根据实际需求确定,本申请实施例不作限定。
在一种实现方式中,在检测到存在啸叫噪声的情况下,也可以不更新前馈通路的增益和反馈通路的增益,而是更新(降低)ANTI信号的增益(即前馈通路的输出信号与反馈通路的输出信号之和),例如将ANTI信号的增益更新为0。
基于降低后的前馈通路的增益和/或反馈通路的增益,对前馈通路的信号(即参考麦克风采集的声音信号)和/或反馈通路的信号(即误差麦克风采集的声音信号)进行处理,生成反向噪声信号,减弱耳道内的啸叫噪声,能够减弱异常噪声的干扰,提升耳机的稳定性,进而提升用户的听音体验。
对于削波噪声,如图29所示,检测是否存在削波噪声的方法具体包括步骤2901至步骤2902。
步骤2901、通过耳机的误差麦克风采集第一信号,或者通过耳机的参考麦克风采集第二信号。
同理,上述采集到第一信号或第二信号之后,采用16KHz的频率对第一信号或第二信号进行下采样。
步骤2902、在预设时间段内第一目标帧的数量大于预设数量或者第二目标帧的数量大于预设数量的情况下,确定存在削波噪声;在预设时间段内第一目标帧的数量小于或等于预设数量或者第二目标帧的数量小于或等于预设数量的情况下,确定存在削波噪声。
其中,第一目标帧为第一信号包含的信号帧中能量大于第三阈值的信号帧,第二目标帧为第二信号包含的信号帧中能量大于第四阈值的信号帧。
需要说明的是,本申请实施例中的削波噪声指的是低频削波噪声,上述耳机采集到第一信号或第二信号之后,对第一信号或第二信号进行低通滤波,滤除第一信号或第二信号中的高频杂散信号,提高第一信号和第二信号的准确度,从而也提高检测是否存在削波噪声的准确性。
可选地,上述预设时间段可以为100毫秒,200毫米、500毫秒等,该预设时间段的时长可以根据实际情况进行调整,本申请实施例不作限定。
可选地,上述第一目标帧也可以是第一信号包含的信号帧中信号的最大值大于某一预设阈值的信号帧,第二目标帧可以是第二信号包含的信号帧中信号的最大值大于某一预设阈值的信号帧。
图30为削波检测以及降噪处理的工作原理示意图,参考图30以理解本申请描述的主动降噪方法。
在检测到存在削波噪声的情况下,上述更新滤波参数的方法具体包括步骤24023a至步骤24023b。
步骤24023a、确定当前滤波参数对应的索引,该索引为当前滤波参数在第一滤波 参数集中的索引。
应理解,当前滤波参数对应的索引指的是当前滤波参数在预设的多组滤波参数中的索引,该多组滤波参数可以为上述N 1组滤波参数或N 2组滤波参数,该N 1组滤波参数组成第一滤波参数集,N 2组滤波参数组成第二滤波参数集。
步骤24023b、采用第三滤波参数集中该索引对应的滤波参数,更新滤波参数中的前馈通路对应的滤波参数和/或反馈通路对应的滤波参数。
其中,第三滤波参数集中包括多组前馈通路对应的滤波参数和/或多组反馈通路对应的滤波参数。
示例性的,上述实施例中,若当前滤波参数是第一滤波参数集包含的9组滤波参数中的第3组滤波参数,则该滤波参数的索引为3,如此,利用第三滤波参数集中的第三组滤波参数中的前馈通路对应的滤波参数和/或反馈通路对应的滤波参数中的部分或者全部的参数替换当前滤波参数中的前馈通路对应的滤波参数和/或反馈通路对应的滤波参数。
对于底噪,如图31所示,检测是否存在底噪的方法具体包括步骤3101至步骤3103。
步骤3101、通过耳机的参考麦克风采集第二信号。
同理,上述采集到第二信号之后,采用16KHz的频率对第二信号进行下采样。
步骤3102、对第二信号进行底噪跟踪,得到环境噪声信号。
本申请实施例中,将第二信号作为底噪跟踪(noise floor tracking,NFT)算法的输入,从而输出环境噪声信号的声压级。关于NFT算法的详细介绍可参考现有技术,此处不再详述。
步骤3103、在环境噪声信号的声压级小于或等于第五阈值的情况下,确定存在底噪;在环境噪声的声压级大于第五阈值的情况下,确定不存在底噪。
应理解,环境噪声信号的声压级小于或等于第五阈值,说明环境较为安静,结和上述实施例的描述可知,环境安静时,用户能够感知到底噪,也就是说,环境足够安静时,底噪可以被检测到。因此,本申请实施例中,在环境噪声信号的声压级小于或等于第五阈值的情况下,确定存在底噪,并且需要降低底噪。
图32为底噪检测以及降噪处理的工作原理示意图,参考图32以理解本申请描述的主动降噪方法。
在检测到存在底噪的情况下,上述更新滤波参数的方法具体包括步骤24024。
步骤24024、降低滤波参数中的前馈通路的增益和反馈通路的增益。
本申请实施例中,前馈通路的增益和反馈通路的增益分别与环境噪声信号具有线性关系,前馈通路的增益和反馈通路的增益分别随环境噪声信号的声压级的平滑变化而变化,具体为环境噪声信号的声压级越小,前馈通路的增益和反馈通路的增益越小。上述确定出环境噪声信号之后,根据前馈通路的增益和反馈通路的增益分别与环境噪声信号具有线性关系,确定前馈通路的增益和反馈通路的增益。
对于风噪,如图33所示,检测是否存在风噪的方法具体包括步骤3301至步骤3302。
步骤3301、通过耳机的参考麦克风采集第二信号,并且通过耳机的通话麦克风采集第三信号。
本申请实施例中,上述采集到第二信号和第三信号之后,采用16KHz的频率对第 二信号和第三信号进行下采样。
步骤3302、在第二信号和第三信号之间的相关性小于第六阈值的情况下,确定存在风噪干扰;在第二信号和第三信号之间的相关性大于或等于第六阈值的情况下,确定不存在风噪干扰。
本申请实施例中,对第二信号和第三信号分别进行傅里叶变换,再通过相关性函数(现有的相关性计算方法)计算第二信号和第三信号的相关性,进而基于相关性的大小确定是否存在风噪。应理解,风噪检测的结果为无风或有风。
图34为风噪检测以及降噪处理的工作原理示意图,参考图34以理解本申请描述的主动降噪方法。
在检测到存在风噪的情况下,上述更新滤波参数的方法具体包括步骤24025a至步骤24025c。
步骤24025a、分析第二信号的能量,确定风噪干扰的等级。
本申请实施例的一种实现方式中,风噪干扰的等级可以包括小风或大风。
可选地,可以设置两个预设阈值,例如第一预设阈值和第二预设阈值,第一预设阈值小于第二预设阈值,当第二信号的能量小于或等于第一预设阈值时,确定无风,当第二信号的能量大于第一预设阈值且小于第二预设阈值时,风噪干扰的等级为小风,当第二信号的能量大于或等于第二预设阈值时,风噪干扰的等级为大风。
步骤24025b、对风噪干扰的等级进行监测,确定对应的风噪控制状态。
通过步骤24025a确定出风噪干扰等级之后,对风噪干扰的等级的变化情况进行监测,确定风噪控制状态。可选地,风噪控制状态可以包括下述(11种)中一种:无风状态、无风进小风状态、小风进大风状态、大风进小风状态、大风进小风再进大风状态、小风进无风状态、小风进无风再进小风状态、小风保持状态、大风保持状态、大风到小风回退状态或小风到无风回退状态。
如表1所示,将上述10种风噪控制状态分别编号以便于在根据风噪控制状态更新滤波参数。
表1
状态编号 状态
0 无风状态
1 无风进小风状态
2 小风进大风状态
3 大风进小风状态
4 大风进小风再进大风状态
5 小风进无风状态
6 小风进无风再进小风状态
7 小风保持状态
8 大风保持状态
9 大风到小风回退状态
10 小风到无风回退状态
上述11风噪控制状态也可以通过图35进行示意。
步骤24025c、采用第四滤波参数集中风噪控制状态对应的滤波参数,更新滤波参数中的前馈通路对应的滤波参数。
其中,第四滤波参数集中包括多种风噪控制状态分别对应的前馈通路对应的滤波参数。
该前馈通路对应的滤波参数可以为该前馈通路中的低频搁架滤波器的参数,包括低频搁架滤波器的中心频率和增益。
结合上述11种风噪控制转态,在进行降噪过程中(也可以称为风噪控制过程),为了保证风噪控制平滑过渡,上述前馈通路对应的滤波参数随时间平滑变化。例如,在设定的时间段内,采用一组滤波参数进行风噪控制,在另一设定的时间段内,采用另一组滤波参数进行风噪控制。
以前馈通路对应的滤波参数是低频搁架滤波器的参数为例,结合图36,本申请实施例提供了一种低频搁架滤波器的参数设计方案,参考图35和图36,能够确定上述11种不同的风噪控制状态分别对应的滤波参数。例如,参考图36,对于小风变大风的状态,在50毫秒内采用参数平滑过渡的方式进行风噪控制,比如,在该500毫秒内,依次采用中心频率和增益为(712Hz,-11.2dB)、(1024Hz,-12.4dB)、(1544Hz,-14.4dB)、(2272Hz,-17.2dB)以及(3000Hz,-20dB)作为低频搁架滤波器的参数处理前馈通路的信号。又例如,对于大风保持的状态,在30秒内,在全频段,以增益为-140dB的参数处理前馈通路的信号。又例如,对于无风状态,将低频搁架滤波器更新为直通滤波器。
应理解,在预设的风噪控制时间段内(例如上述500毫秒),每一组中心频率和增益对应的控制时长可以进行设置,具体根据实际情况确定,本申请实施例不作限定。
以上述步骤2045b确定出的风噪控制状态为上述表1中的状态2(小风进大风状态)为例,将50毫秒,(712Hz,-11.2dB)、(1024Hz,-12.4dB)、(1544Hz,-14.4dB)、(2272Hz,-17.2dB)作为更新后的前馈通路对应的滤波参数。
以上述步骤2045b确定出的风噪控制状态为上述表1中的状态4(大风进小风再进大风状态)为例,将20秒,(3000Hz,-20dB)、(2636Hz,-18.6dB)、(2272Hz,-17.2dB)、(1908Hz,-15.8dB)、(1544Hz,-14.4dB)、(1180Hz,-13dB)、(1024Hz,-12.4dB)、(868Hz,-11.8dB)、(712Hz,-11.2dB)、(556Hz,-10.6dB)以及500毫秒内,依次采用中心频率和增益为(712Hz,-11.2dB)、(1024Hz,-12.4dB)、(1544Hz,-14.4dB)、(2272Hz,-17.2dB)、(3000Hz,-20dB)作为更新后的前馈通路对应的滤波参数。具体的,首先在前20秒内依次采用(3000Hz,-20dB)、(2636Hz,-18.6dB)、(2272Hz,-17.2dB)、(1908Hz,-15.8dB)、(1544Hz,-14.4dB)、(1180Hz,-13dB)、(1024Hz,-12.4dB)、(868Hz,-11.8dB)、(712Hz,-11.2dB)、(556Hz,-10.6dB)对前馈通路的信号进行处理;然后在上述20秒到期后,在后续的500毫秒内依次采用 (712Hz,-11.2dB)、(1024Hz,-12.4dB)、(1544Hz,-14.4dB)、(2272Hz,-17.2dB)、(3000Hz,-20dB)对前馈通路的信号进行处理。
同理,结合图36可以确定出不同的风噪控制状态分别对应的滤波参数,本申请实施例不再一一列举。
本申请实施例中,耳机包括左耳对应的耳机和右耳对应的耳机,在以下实施例中,将左耳对应的耳机简称为左耳机,将右耳对应的耳机称为右耳机)。用户使用耳机时,用户可以佩戴一个耳机(左耳机或右耳机),也可以佩戴两个耳机(左耳机和右耳机)。应理解,左耳机和右耳机的硬件结构类似,均具有相应的麦克风、ANC芯片以及微处理器等,在降噪过程中,左耳机和右耳机分别执行主动降噪方法。
当用户的左耳和右耳分别佩戴了耳机时,由于风噪具有随机性,因此左耳机和右耳机的风噪特征有差异,使得左耳和右耳的风噪等级可能不同,导致左耳和右耳的听感不一致,影响用户体验。基于此,本申请实施例提供的主动降噪方法还包括:对用户的左耳和右耳同步进行风噪控制。具体的,按照上述步骤24025a至步骤24025b分别确定左耳对应的风噪控制状态和右耳对应的风噪控制状态,然后对左耳对应的风噪控制状态和右耳对应的风噪控制状态进行同步,从而根据同步后的风噪控制状态更新滤波参数,左耳机基于该滤波参数进行降噪处理,并且右耳机也基于该滤波参数进行降噪处理。
可选地,上述对左耳对应的风噪控制状态和右耳对应的风噪控制状态进行同步的方法具体包括:按照风噪控制状态的优先级,将左耳对应的风噪控制状态和右耳对应的风噪控制状态中,低优先级的风噪控制状态调整为高优先级的风噪控制状态。
本申请实施例中,左耳机和右耳机可以通过蓝牙互相通信,在左耳机检测到风噪控制状态和右耳机检测到风噪控制状态发生变化的情况,左耳机和右耳机分别通知对方各自的风噪控制状态,进而根据上述优先级策略进行风噪控制状态同步。可选地,在如下表2所示的6种风噪控制状态下,需要对左耳和右耳的风噪控制状态进行同步,即左耳机或右耳机对应的风噪控制状态为表2中的任一种时,需要将各自的风噪控制状态发送至对方,以进行同步。
表2
状态编号 状态
1 无风进小风
2 小风进大风
3 大风进小风
4 大风进小风再进大风
5 小风进无风
6 小风进无风再进小风
结合表2,在一种实现方式中,上述6种风噪控制状态的优先级从高到低依次为:2、4、3、6、1、5。当一只耳机进入高优先级的风噪控制状态,则另一只耳机将同步进入该风噪控制状态,例如,左耳机对应的风噪控制状态(状态编号)为4,该左耳机将该风噪控制状态4发送至右耳机,若右耳机对应的风噪控制状态为1,那么该右耳机需要将其对应的风噪控制状态更改为4,即与右耳机对应的风噪控制状态保持同 步。
需要说明的是,对于上述风噪控制状态3(大风进小风)和风噪控制状态4(大风进小风再进大风),该风噪控制状态3的优先级也可以与风噪控制状态4的优先级相同,例如,若左耳先进入风噪控制状态3,右耳后进入风噪控制状态4,由于风噪控制状态3的优先级与风噪控制状态4的优先级相同,因此左耳和右耳保持各自的风噪状态,无需进行同步。同理,对于上述风噪控制状态1(无风进小风)和风噪控制状态6(小风进无风再进小风),该风噪控制状态1的优先级可以与风噪控制状态6的优先级相同。
结合上述实施例的描述可知,终端上安装有耳机对应的应用(App),用户打开该应用并与耳机(左耳机和/或右耳机)建立通信连接之后,用户可以在终端上进行相应的操作,以控制耳机工作于不同的工作模式,例如使得耳机工作于ANC工作模式。
可选地,在一种实现方式中,耳机工作于ANC工作模式时,还可以进一步在ANC工作模式下选择不同的降噪模式。例如,用户可以根据该用户当前所处的环境特征,开启上述啸叫噪声、削波噪声、底噪或风噪中的一种或几种控制模式。例如,用户当前处于风较大的山坡,该用户可以开启风噪控制模式,以检测风噪并进行降噪。
示例性的,结合上述图17,当用户开启耳机的ANC功能之后,终端还可以显示ANC工作模式下的设置界面,在该设置界面中至少包括上述实施例中的ANC控制方式设置的选项和降噪模式设置的选项,参考图37中的(a)所示的界面3701。可选地,当用户选择ANC控制方式设置的选项时,终端显示上述实施例中的图18A中的(b)或图18B中(b)所示的界面。可选地,当用户选择降噪模式设置的选项时,终端显示图37中的(b)所示的界面3702,该界面3702中包括不同的噪声控制模式的选项,例如界面3702中包括“啸叫控制模式”选项3702a,“削波控制模式”选项3702b,“底噪控制模式”选项3702c以及“风噪控制模式”选项3702d,当用户在该界面3702中选择“风噪控制模式”选项3702d,例如,用户点击“风噪控制模式”选项3702d,则耳机将进行风噪检测以及降噪处理。当然,用户可以根据实际需求同时开启一种控制模式或多种控制模式。
可选地,本申请实施例提供的主动降噪方法还包括:终端显示噪声检测结果,该噪声检测结果包括下述至少一种:啸叫噪声、削波噪声、底噪或风噪。
本申请实施例中,耳机检测出异常噪声之后,耳机向终端发送指示信息,以指示异常噪声的类型,进而终端显示噪声检测结果。
可选地,在一种实现方式中,当开启耳机的ANC工作模式之后,终端还可以显示ANC工作模式下的设置列表,在该设置列表中至少包括上述实施例中的ANC控制方式设置的选项和ANC降噪模式设置的选项,还可以包括噪声检测结果的查看选项。例如,如图38所示,用户开启ANC工作模式之后,终端显示如图38中的(a)所示的界面3801,在该界面3801中的“ANC模式”选项的下方显示有“降噪模式设置”选项和“噪声检测结果”选项。当用户选择“噪声检测结果”选项时,终端显示图38中的(b)所示的界面3802,该界面3802中显示当前检测到的噪声的类型,例如,检测到当前噪声类型是啸叫噪声。
可选地,本申请实施例提供的主动降噪方法还包括:终端显示滤波参数对应的索 引,该索引为当前滤波参数在预设的滤波参数集中的索引。
本申请实施例中,滤波参数的索引可以通过不同的档位体现,例如,滤波参数包括N 1个档位,每一个档位对应不同的滤波参数。可选地,滤波参数的档位在终端上以圆盘形态显示,也可以以条状形态显示,当然还可以通过其他形态显示,本申请实施例不作限定。
耳机检测到存在异常噪声,进而在初始化的一组滤波参数的基础上更新滤波参数,并通过终端的显示屏显示更新后的滤波参数的索引(即档位),从而用户可以直观地获知当前降噪情况(例如图20)。
相应地,本申请实施例提供一种耳机,如图39所示,该耳机包括获取模块3901和处理模块3902。其中,该获取模块3901用于在耳机处于ANC工作模式的情况下,获取第一组滤波参数;该第一组滤波参数是耳机预存储的N 1组滤波参数中的一组,例如获取模块3901用于执行上述方法实施例中的步骤901。该处理模块3902用于利用第一组滤波参数进行降噪,例如处理模块3902用于执行上述方法实施例中的步骤902。
可选地,本申请实施例提供过的耳机还包括生成模块3903、确定模块3904、接收模块3905、第一信号采集模块3906、第二信号采集模块3907、检测模块3908以及更新模块3909。其中,生成模块3903用于执行上述方法实施例中的步骤903(包括步骤9031)和步骤1605。确定模块3904用于执行上述方法实施例中的步骤905、步骤1002至步骤1004,或者步骤1102至步骤1105,或者步骤1202至步骤1204,或者步骤1302至步骤1304,或者步骤1402至步骤1403以及步骤1609。接收模块3905用于执行上述实施例中的步骤1603和步骤1608。第一信号采集模块3906用于执行上述方法实施例中的步骤1001、步骤1101、步骤1201、步骤1301以及步骤2403等。第二信号采集模块3907用于执行上述方法实施例中的步骤1101、步骤1201、步骤1301以及步骤2403等。检测模块3908用于更新第一组滤波参数,例如检测模块3908用于执行上述方法实施例中的步骤2401。更新模块3909用于执行上述方法实施例中的步骤2402。
上述各个模块还可以执行上述方法实施例中的其他相关动作,例如获取模块3901还用于执行步骤904、步骤1401,处理模块3902还用于执行步骤步骤906、步骤1604、步骤16010以及步骤2404,具体参见上述实施例的描述,此处不再赘述。
同理,图39所描述的装置实施例仅仅是示意性的,例如,上述单元(或模块)的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。在本申请各个实施例中的各功能单元可以集成在一个模块中,也可以是各个模块单独物理存在,也可以两个或两个以上单元集成在一个模块中。图39中上述各个模块既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。例如,采用软件实现时,上述获取模块3901、处理模块3902、生成模块3903、确定模块3904、检测模块3908以及更新模块3909可以是由耳机的处理器读取存储器中存储的程序代码后,生成的软件功能模块来实现。上述各个模块也可以由耳机的不同硬件分别实现,例如获取模块3901、生成模块3903、确定模块3904、检测模块3908以及更新模块3909由耳机的微处理器(例如图2中的微处理器202)中的一部分处理资源(例如多核处理器中的一个核或两个核)实现,而处理模块3902由耳机的ANC芯片(例如图2中的ANC芯 片203)来完成。参考图2,上述第一信号采集模块3906由耳机的误差麦克风实现、第二信号采集模块3907由耳机的参考麦克风实现,接收模块3905由耳机的网络接口等实现。显然上述功能模块也可以采用软件硬件相结合的方式来实现,例如,检测模块3908、更新模块3909是由处理器读取存储器中存储的程序代码后,生成的软件功能模块。
上述耳机包含的模块实现上述功能的更多细节请参考前面各个方法实施例中的描述,在这里不再重复。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。
本申请实施例还提供一种终端,如图40所示,该终端包括确定模块4001和发送模块4002。该确定模块4001用于确定第一组滤波参数;该第一组滤波参数是耳机预存储的N 1组滤波参数中的一组,例如确定模块4001用于执行上述方法实施例中的步骤1601,具体包括步骤16011b至步骤16011e、步骤16012b至步骤16012e、步骤16013b至步骤16013e、步骤16014b至步骤16014d或步骤16015b至步骤16015d。发送模块4002用于向耳机发送第一指示信息,该第一指示信息用于指示耳机利用第一组滤波参数进行降噪,例如,发送模块4002用于执行上述方法实施例中的步骤1602等。
可选地,本申请实施例提供的终端还包括接收模块4003、获取模块4004以及显示模块4005。该接收模块4003用于执行上述方法实施例中的步骤16011a、步骤16012a、步骤16013a、步骤16014a、步骤16015a、步骤1601b以及步骤1606b等。上述获取模块4004用于执行上述方法实施例中的步骤16011a、步骤16012a、步骤16013a以及步骤16015a等。上述显示模块4005用于执行上述方法实施例中的步骤1601a以及步骤1606a等。
上述各个模块还可以执行上述方法实施例中的其他相关动作,例如确定模块4001还用于执行步骤1601c、步骤1606、步骤1606c等,发送模块还用于执行步骤1607,具体参见上述实施例的描述,此处不再赘述。
同理,图40所描述的装置实施例仅仅是示意性的,例如,上述单元(或模块)的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。在本申请各个实施例中的各功能单元可以集成在一个模块中,也可以是各个模块单独物理存在,也可以两个或两个以上单元集成在一个模块中。图40中上述各个模块既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。例如,采用软件实现时,上述确定模块4001和获取模块4004可以是由终端的处理器读取存储器中存储的程序代码后,生成的软件功能模块来实现。上述各个模块也可以由终端的不同硬件分别实现,例如确定模块4001由终端的处理器中的一部分处理资源(例如多核处理器中的一个核或两个核)实现,或者采用现场可编程门阵列(field-programmable gate array,FPGA)、或协处理器等可编程器件来完成。上述发送模块4002和接收模块4003由终端的网络接口等实现。显示模块4005由终端的显示屏实现。
上述终端的模块实现上述功能的更多细节请参考前面各个方法实施例中的描述,在这里不再重复。
结合上述对耳机的滤波参数和耳机与耳道之间的泄漏状态的介绍,需要说明的是,本申请实施例中,耳机上预存储了N组滤波参数,该N组滤波参数分别用于在N种泄漏状态下进行环境音降噪,该N组滤波参数应用于耳机时的降噪效果随着耳机与耳道之间的泄漏状态的变化而不同。
可选地,可以对N种不同耳道环境对应的录音信号进行处理,生成N组滤波参数,并且将该N组滤波参数存储在半开放式主动降噪耳机的内存中。应理解,该N组滤波参数用于在N种泄漏状态下进行环境音降噪,且具有普遍适用性,满足不同人的个性化需求。对于N组滤波参数的生成方法可以参考上述实施例中的相关描述,此处不作详细描述。
当用户佩戴半开放式主动降噪耳机,并且该半开放式主动降噪耳机处于ANC工作模式时,该N组滤波参数作为备选的滤波参数以供选择。
应理解,用户使用主动降噪耳机的过程中的一种场景是:开启了ANC功能的耳机在线运行的过程中,耳机的佩戴状态发生了变化而导致耳机与耳道之间的泄漏状态发生了变化,耳机当前应用的一组滤波参数不再是最优的一组滤波参数,即耳机应用当前一组滤波参数进行降噪时的降噪效果变差,影响用户的听音感受。例如,耳机在线运行过程中,耳机未离耳,用户觉得当前佩戴姿势不舒服,用户手动调整耳机,或者受其他的外界因素的影响使得耳机与用户耳道的密封程度(或贴合度)发生变化,例如密封程度变低或者密封程度变高。
基于此,本申请实施例提供一种主动降噪方法,应用于具有ANC功能的耳机,如图41所示,该主动降噪方法包括步骤4101至步骤4103。
步骤4101、当耳机处于ANC工作模式时,检测耳机与耳道之间的泄漏状态是否发生变化。
本申请实施例中,泄漏状态是由耳机与不同的耳道环境形成的,耳道环境与用户的耳道特征、用户佩戴耳机的姿态有关,不同的耳道特征和不同的佩戴耳机的姿态的组合可形成多种耳道环境,也对应多种泄漏状态。
应理解,上述N种泄漏状态可以表达N种耳机与人耳的贴合度范围,可以表达N种耳机与人耳的密封程度;任意一种泄漏状态并非特指一种特定的耳机佩戴状态,而是根据泄漏状态的阻抗特性进行大量统计,得到的典型的或具备可差异化的泄漏场景。
耳机的佩戴状态对应一种耳道环境,从而形成一种泄漏状态,耳机的佩戴状态因用户的耳道特征和用户佩戴耳机的姿态的变化而不同。耳机当前的佩戴状态对应于一种稳定的耳道环境,即对应于一种稳定的耳道特征和佩戴姿态。上述N组滤波参数应用于耳机时的降噪效果随着耳机的佩戴状态的变化而不同。
应理解,本申请实施例中,当耳机与人耳的密封程度发生变化,且耳机应用第一组滤波参数的降噪效果变差时,耳机与耳道之间的泄漏状态发生变化。
可选地,本申请实施例中,检测耳机与耳道之间的泄漏状态是否发生变化的频段(以下简称为检测频段)可以根据实际情况进行设定,例如检测频段可以为100Hz-1kHz、125Hz-500Hz等中低频段,或者其他频段,本申请实施例对此不作限定。
步骤4102、在检测到耳机与耳道之间的泄漏状态发生变化的情况下,将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数。
其中,第一组滤波参数和第二组滤波参数分别是耳机预存储的N组滤波参数中的两组不同的滤波参数,该N组滤波参数分别用于在N种泄漏状态下进行环境音降噪,N种泄漏状态是由耳机与N种不同的耳道环境形成的。
应注意,耳机在当前的佩戴状态下,针对同一环境噪声,耳机应用第二组滤波参数时的降噪效果优于耳机应用N组滤波参数中其它滤波参数时的降噪效果。
本申请实施例中,环境噪声是外部环境在用户耳道形成的噪声,环境噪声包括不同场景的背景噪声,例如高铁场景、办公室场景、飞机飞行场景等,本申请实施例不作限定。
上述第一组滤波参数是耳机与耳道之间的泄漏状态未发生变化时,耳机应用的一组滤波参数。可选地,第一组滤波参数可以是耳机的ANC功能开启后,确定的一组初始滤波参数,例如在播放ANC开启的提示音的过程中,以该提示音作为测试音频为用户适配的一组最佳的滤波参数,或者通过其他方式设置的一组初始滤波参数;第一组滤波参数也可以是实施本申请实施例提供的主动降噪方法,在耳机在线运行的过程中,上一次更新的一组滤波参数,本申请实施例不作具体限定。
步骤4103、利用第二组滤波参数进行降噪。
本申请实施例中,结合图4,利用第二组滤波参数进行降噪具体包括:利用第二组滤波参数对耳机的参考麦克风采集的声音信号和耳机的误差麦克风采集的声音信号进行处理,生成反向噪声信号,该反向噪声信号可以减弱耳道内的部分环境噪声信号,从而减弱用户耳道内的噪声信号,实现对环境音降噪。
可选地,本申请实施例中,上述将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数,耳机应用第二组滤波参数进行降噪的过程中,可以继续执行上述步骤4101,检测耳机与耳道之间的泄漏状态是否发生变化,在耳机与耳道之间的泄漏状态再次发生变化的情况下,继续更新耳机的滤波参数。
本申请实施例提供的主动降噪方法,在耳机的ANC功能开启后,在用户使用耳机的过程中,可以根据耳机与耳道之间的泄漏状态的变化,自适应地更新耳机的滤波参数,并基于更新后的滤波参数进行降噪,能够提升降噪效果。
本申请实施例提供的主动降噪方法可以应用在耳机无下行信号的场景,也可以应用在耳机有下行信号的场景中。
可选地,本申请实施例中,确定耳机是否有下行信号的方法可以包括:在耳机运行的过程中,获取耳机的下行信号,若耳机的下行信号的能量小于第一预设能量阈值,则确定耳机无下行信号;若耳机的下行信号的能量大于或等于第一预设能量阈值,则确定耳机有下行信号。
在一种实现方式中,下行信号的能量可以为下行信号的帧能量,上述获取耳机的下行信号之后,对该下行信号进行滤波处理,得到检测频段内的下行信号,然后计算下行信号的帧能量,当下行信号的帧能量小于第一预设能量阈值时,确定无下行信号。
在另一种实现方式中,下行信号的能量可以是幅度谱总能量,上述获取耳机的下行信号之后,对下行信号做短时傅里叶变换,并计算检测频段内的下行信号的幅度谱总能量,当下行信号的幅度谱总能量小于第一预设能量阈值,则确定耳机无下行信号。
需要说明的是,当下行信号的能量按照不同的方式定义时,不同的定义方式对应 的上述第一预设能量阈值可能不同,第一预设能量阈值可以根据实际需求设定,本申请实施例不作限定。
结合图41,如图42所示,对于耳机无下行信号的场景,上述步骤4101(即检测耳机的与耳道之间泄漏状态是否发生变化)可以通过步骤41011a至步骤41011c。
步骤41011a、通过耳机的误差麦克风采集第一信号,并且通过耳机的参考麦克风采集第二信号。
步骤41011b、根据第一信号和第二信号,逐帧计算长时能量比。
可选地,上述第一信号或第二信号的采样频率是16kHz的频率,每一帧信号的时长可以预先设定,例如设置为5毫秒(ms)或者20ms,具体根据实际情况设定,本申请实施例不作限定。
本申请实施例中,音频帧的长时能量比是体现降噪效果的一种指标,长时能量比变大说明降噪效果变差,长时能量比变小说明降噪效果较好。
以计算当前帧的长时能量比为例,在一种实现方式中,当前帧的长时能量比可以通过下述A1-A2实现。
A1、计算第一信号和第二信号的当前帧的平均能量比。
本申请实施例中,采用下述公式(1)计算第一信号和第二信号的当前帧的平均能量比。
Figure PCTCN2021084775-appb-000011
其中,R(m)为第一信号和第二信号的当前帧的平均能量比,P err(m)为第一信号的当前帧的平均能量,P ref(m)为第二信号的当前帧的平均能量,当前帧为第m帧。
A2、根据第一信号和第二信号的当前帧的平均能量比,确定当前帧的长时能量比。
本申请实施例中,当前帧的长时能量比是当前帧和历史帧(本申请实施例中的历史帧指的是当前帧的前一帧)的能量比的平滑结果。在一种实现方式中,当前帧的长时能量比可以是当前帧的能量比和历史帧的长时能量比的平滑结果,具体采用下述公式(2)计算当前帧的长时能量比。
R smooth(m)=η*R(m)+(1-η)*R smooth(m-1)      (2)
其中,R smooth(m)为当前帧的长时能量比,R(m)为当前帧的平均能量比,R smooth(m-1)为历史帧的长时能量比,η为平滑因子,历史帧为第m-1帧。
可选地,上述A1-A2中,检测频段可以为100Hz-1kHz,通过误差麦克风采集第一信号,通过参考麦克风采集第二信号之后,可以采用带通滤波器对第一信号和第二信号进行滤波处理,得到上述检测频段内的第一信号和第二信号。
以计算当前帧的长时能量为例,在一种实现方式中,当前帧的长时能量比也可以通过下述B1-B3实现。
B1、对第一信号和第二信号进行短时傅里叶变换。
具体的,对第一信号和第二信号短时傅里叶变换,得到第一信号和第二信号的频谱。可选地,上述短时傅里叶变换的阶数可以为256,若第一信号或第二信号的信号帧包含的样点不足256个样点,对第一信号或第二信号进行拼帧处理,将信号帧的样点数拼成256个样点,即0Hz-16kHz的频段对应256个频点。
B2、分别计算每一个频点处,第一信号和第二信号的当前帧的长时平稳能量(或称为平滑能量)。
示例性的,在频点w i处,第一信号的当前帧的长时平稳能量可以采用下述公式(3)计算。
P err(m,w i)=a*P err(m,w i)+b*P err(m-1,w i).................................(3)
其中,P err(m,w i)为频点处w i,第一信号的当前帧的长时平稳能量,P err(m-1,w i)为频点处w i,第一信号的历史帧的长时平稳能量,a和b为平滑系数。
在频点w i处,第二信号的当前帧的长时平稳能量可以采用下述公式(4)计算。
P ref(m,w i)=a*P ref(m,w i)+b*P ref(m-1,w i)……………………….(4)
其中,P ref(m,w i)为频点w i处,第二信号的当前帧的长时平稳能量,P ref(m-1,w i)为频点w i处,第二信号的历史帧的长时平稳能量,a和b为平滑系数。
B3、根据第一信号的当前帧的长时平稳能量与第二信号的当前帧的长时平稳能量,确定当前帧的长时能量比。
首先,基于公式(5)计算每一个频点处,第一信号和第二信号帧的当前帧的长时平稳能量比。
Figure PCTCN2021084775-appb-000012
其中,R(m,w i)为频点w i处,第一信号和第二信号帧的当前帧的长时平稳能量比。
然后,计算当前帧的所有频点的长时平稳能量比的平均帧,该长时平稳能量比的平均值即为当前帧的长时能量比,具体参考下述公式(6)。
Figure PCTCN2021084775-appb-000013
其中,R smooth(m)为当前帧的长时能量比,K为当前帧对应的频点的总数量。
可选地,上述B1-B3中,检测频段可以为100Hz-1kHz,上述对第一信号和第二信号进行短时傅里叶变换之后,选择检测频段内的变换结果用于计算当前帧的长时能量比。在一种实现方式中,将检测频段100Hz-1kHz中的频点之间的间隔设置为62.5Hz,该检测频段内包含15个频点,即K=15。
步骤41011c、在当前帧的长时能量比增大,且当前帧的长时能量比与历史帧的长时能量比的差值大于第一阈值的情况下,确定耳机与耳道之间的泄漏状态发生变化;否则,确定耳机与耳道之间的泄漏状态未发生变化。
基于步骤41011b,得到当前帧的长时能量比R smooth(m),采用当前帧的长时能量比与历史帧的长时能量比的差值R smooth(m)-R smooth(m-1)来衡量当前帧的长时能量比的变化幅度,若R smooth(m)-R smooth(m-1)>0,则当前帧的长时能量比增大,耳机的降噪效果变差;若R smooth(m)-R smooth(m-1)<0,则当前帧的长时能量比减小,耳机的降噪效果变好。
本申请实施例中,当前帧的长时能量比增大的幅度大于第一预设阈值,即R smooth(m)-R smooth(m-1)>Δ1(Δ1为第一阈值,Δ1大于0),说明耳机与耳道之间的泄漏状态发生了变化,并且由于耳机与耳道之间的泄漏状态发生变化导致耳机的降噪效果 比较差,此时,需要更新耳机的滤波参数,以提升耳机的降噪效果。
应理解,耳机与耳道之间的泄漏状态发生变化时,耳机与人耳的密封程度可能变高,或者耳机的密封程度可能变低,即耳机的密封程度变高或者变低都可能影响耳机的降噪效果,导致耳机应用当前的一组滤波参数(例如上述第一组滤波参数)进行降噪时的降噪效果变差。
本申请实施例中,当前帧的长时能量比增大的幅度小于或等于第一预设阈值,即R smooth(m)-R smooth(m-1)≤Δ1(Δ1为第一阈值,Δ1大于0),说明耳机与耳道之间的泄漏状态未发生变化,而且耳机的降噪效果未变差,此时,无需更新耳机的滤波参数,即耳机继续应用当前的一组滤波参数进行降噪。
可选地,耳机预存储的N组滤波参数依次对应的N种泄漏状态反映耳机与人耳的密封程度从高变低,或者耳机预存储的N组滤波参数依次对应的N种泄漏状态反映耳机与人耳的密封程度从低变高,本申请实施例不作限定。
需要说明的是,在本申请实施例中,以耳机预存储的N组滤波参数依次对应的N种泄漏状态反映耳机与人耳的密封程度从高变低为例对更新滤波参数的过程进行示例性说明。
基于上述步骤41011a至步骤41011c所述的检测耳机与耳道之间的泄漏状态是否发生变化的实现方式,上述步骤4102(将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数)可以通过步骤41021a至步骤41021c实现,或者通过步骤41021a至步骤41021b,以及步骤41021d至步骤41021f实现。
步骤41021a、将耳机的滤波参数从第一组滤波参数更新为第三组滤波参数。
其中,第一组滤波参数在预存储的N组滤波参数中的索引为n,第三组滤波参数的索引为n-1。
当R smooth(m)-R smooth(m-1)>Δ1时,可知耳机与耳道之间的泄漏状态发生变化,此时,无法获知耳机与人耳的密封程度变高还是变低。应理解,若耳机与人耳的密封程度变高,对耳机的滤波参数进行更新时,应将减小滤波参数的索引,例如,将耳机的滤波参数的索引减小为n-1。若耳机与人耳的密封程度变低,对耳机的滤波参数进行更新时,应将增大滤波参数的索引,例如,将耳机的滤波参数的索引增大为n+1。
可见,在耳机与耳道之间的泄漏状态发生变化的情况下,对耳机的滤波参数进行更新的方向可以是:减小滤波参数的索引或者增大滤波参数的索引。
需要说明的是,在耳机与耳道之间的泄漏状态发生变化的情况下,步骤41021a中是以减小滤波参数的索引的方式更新滤波参数。具体的,将耳机的滤波参数从第一组滤波参数(索引为n)更新为第三组滤波参数(索引为n-1),并检测耳机应用第三组滤波参数时的降噪效果,进一步的,根据耳机应用第三组滤波参数时的降噪效果确定本次更新滤波参数的方向是否合适,即减小滤波参数的索引的方式是否合适。
步骤41021b、确定耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比。
应理解,当前帧的长时能量比用于衡量耳机的降噪效果,若耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比仍继续增大,即R smooth(m)-R smooth(m-1)>0,则说明降噪效果变差,若耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比减小,即R smooth(m)-R smooth(m-1)<0,则说明降噪效果变好。
步骤41021c、若耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比减小, 则以第三组滤波参数的索引为起点,逐一减小滤波参数的索引,直至耳机应用当前索引对应的一组滤波参数进行降噪时,当前帧的长时能量比与历史帧的长时能量比的差值小于第二阈值,该当前索引对应的一组滤波参数为第二组滤波参数。
本申请实施例中,耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比减小,即R smooth(m)-R smooth(m-1)<0,表明耳机的降噪效果变好,如此,说明上述步骤41021a中更新耳机的滤波参数的方向是合适的,即减小滤波参数的索引的方式是可行的。
本申请实施例中,将第一组滤波参数更新为第三组滤波参数之后,虽然耳机应用第三组滤波参数时的降噪效果变好,但该第三组滤波参数可能还不是最佳的滤波参数,基于此,在本申请实施例中,将耳机的滤波参数从第一组滤波参数更新为第三组滤波参数之后,耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比的减小幅度大于第二阈值时,以该第三组滤波参数的索引为起点,继续逐一减小滤波参数的索引,直至耳机应用某一索引对应的一组滤波参数进行降噪时,当前帧的长时能量比与历史帧的长时能量比的差值小于第二阈值,并将该组滤波参数确定为第二组滤波参数,后续地,耳机应用第二组滤波参数进行降噪。
综上,示例性的,耳机应用第一组滤波参数降噪时,若R smooth(m)-R smooth(m-1)>Δ1,将耳机的滤波参数的索引从n调整为n-1;耳机应用索引为n-1的滤波参数进行降噪时,若R smooth(m)-R smooth(m-1)<0且|R smooth(m)-R smooth(m-1)|>Δ2(Δ2为第二阈值,Δ2大于0),则将耳机的滤波参数的索引从n-1调整为n-2;耳机应用索引为n-2的滤波参数进行降噪时,若R smooth(m)-R smooth(m-1)<0且|R smooth(m)-R smooth(m-1)|≤Δ2,此时停止调整滤波参数的索引,确定索引为n-2的滤波参数为适合当前耳机与耳道之间的泄漏状态的一组滤波参数,即第二组滤波参数。
步骤41021d、若耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比增大,则将耳机的滤波参数从第三组滤波参数更新为第四组滤波参数。
其中,第四组滤波参数的索引为n+1。
本申请实施例中,耳机应用第三组滤波参数进行降噪时,当前帧的长时能量比增大,即R smooth(m)-R smooth(m-1)>0,表明耳机的降噪效果变差,如此,说明上述步骤41021a中更新耳机的滤波参数的方向是不合适的,即减小滤波参数的索引的方式是不可行的。此时,应增大耳机的滤波参数的索引,具体的,将耳机的滤波参数的从上述的n-1增大至n+1,即步骤41021d是按照增大滤波参数的索引的方向更新滤波参数。
步骤41021e、确定耳机应用第四组滤波参数进行降噪时,当前帧的长时能量比。
步骤41021f、若当前帧的长时能量比减小,则以第四组滤波参数的索引为起点,逐一增大滤波参数的索引,直至耳机应用当前索引对应的一组滤波参数进行降噪时,当前帧的长时能量比与历史帧的长时能量比的差值小于第二阈值,该当前索引对应的一组滤波参数为第二组滤波参数。
本申请实施例中,耳机应用第四组滤波参数进行降噪时,当前帧的长时能量比减小,即R smooth(m)-R smooth(m-1)<0,表明耳机的降噪效果变好,如此,说明上述步骤41021d中更新耳机的滤波参数的方向是合适的,即增大滤波参数的索引的方式是可行的。
同理,将第三组滤波参数更新为第四组滤波参数之后,虽然耳机应用第四组滤波参数时的降噪效果变好,但该第四组滤波参数可能还不是最佳的滤波参数,基于此,在本申请实施例中,将耳机的滤波参数从第三组滤波参数更新为第四组滤波参数之后, 耳机应用第四组滤波参数进行降噪时,当前帧的长时能量比的减小幅度大于第二阈值时,以该第四组滤波参数的索引为起点,继续逐一增大滤波参数的索引,直至耳机应用某一索引对应的一组滤波参数进行降噪时,当前帧的长时能量比与历史帧的长时能量比的差值小于第二阈值,并将该组滤波参数确定为第二组滤波参数,后续地,耳机应用第二组滤波参数进行降噪。
综上,示例性的,耳机应用第一组滤波参数降噪时,若R smooth(m)-R smooth(m-1)>Δ1,将耳机的滤波参数的索引从n调整为n-1;耳机应用索引为n-1的滤波参数进行降噪时,若R smooth(m)-R smooth(m-1)>0,则将耳机的滤波参数的索引从n-1调整为n+1;耳机应用索引为n+1的滤波参数进行降噪时,若R smooth(m)-R smooth(m-1)<0且|R smooth(m)-R smooth(m-1)|>Δ2(Δ2为第二阈值,Δ2大于0),则将耳机的滤波参数的索引从n+1调整为n+2;耳机应用索引为n+2的滤波参数进行降噪时,若R smooth(m)-R smooth(m-1)<0且|R smooth(m)-R smooth(m-1)|≤Δ2,此时停止调整滤波参数的索引,确定索引为n+2的滤波参数为适合当前耳机与耳道之间的泄漏状态的一组滤波参数,即第二组滤波参数。
基于步骤41021a至步骤41021d的描述,可选地,当耳机应用第一组滤波参数时的降噪效果变差时,也可以先以增大滤波参数的索引的方式更新滤波参数,例如先将耳机的滤波参数的索引从n调整n+1,进而判断耳机应用索引为n+1的滤波参数进行降噪时的降噪效果,若耳机应用索引为n+1的滤波参数进行降噪时的降噪效果变好,说明增大滤波参数的索引的方式是可行的,进而确定是否继续增大滤波参数的索引;若耳机应用索引n+1的滤波参数进行降噪时的降噪效果变差,说明增大滤波参数的索引的方式不可行,此时,减小滤波参数的索引至n-1,并应用索引为n-1的滤波参数进行降噪,若降噪效果变好,说明减小滤波参数的索引的方式是可行的,进而确定是否继续减小滤波参数的索引。对于这一种实现方式的细节内容的描述,可以参考上述步骤41021a至步骤41021d的相关描述,此处不再赘述。
应理解,当耳机预存储的N组滤波参数依次对应的N种泄漏状态反映耳机与人耳的密封程度从低变高时,将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数的过程与上述步骤41021a至步骤41021f是相反的过程,基于对步骤41021a至步骤41021f的描述可以明确当耳机预存储的N组滤波参数依次对应的N种泄漏状态反映耳机与人耳的密封程度从低变高时,将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数的过程,本申请实施例不再详细描述。
结合图41,如图43所示,当耳机预存储的N组滤波参数依次对应的N种泄漏状态反映耳机与人耳的密封程度从高变低时,对于耳机无下行信号,且当前环境比较嘈杂的场景,上述步骤4101可以通过步骤41012a至步骤41012d。
步骤41012a、通过耳机的误差麦克风采集第一信号,并且通过耳机的参考麦克风采集第二信号以及获取耳机的扬声器播放的反向噪声信号。
步骤41012b、根据第一信号、第二信号以及反向噪声信号,确定次级通道的当前频响曲线信息。
可选地,上述根据第一信号、第二信号以及反向噪声信号,确定次级通道的当前频响曲线信息的方法具体可以包括:根据第一信号和第二信号,计算耳机的误差麦克 风的残差信号;然后将反向噪声信号作为参考信号,对误差麦克风的残差信号进行自适应滤波,得到次级通道的当前频响曲线信息。
本申请实施例中,分别对第一信号、第二信号以及反向噪声信号进行短时傅里叶变换,选取目标降噪频段的变换结果用于计算次级通道的当前频响曲线信息,可选地,该目标降噪频段可以为100Hz-1kHz。
根据上述目标降噪频段内的第一信号和第二信号,可以采用下述公式(7)计算耳机的各个频点处的误差麦克风的残差信号,该误差麦克风的残差信号是误差麦克风的信号(即第一信号)中去除由于泄漏状态发生变化而带来的环境噪声信号。
X res(w i)=X err(w i)-X ref(w i)*M PP(w i)………………….(7)
其中,X res(w i)为频点w i处,误差麦克风的残差信号的频谱(即幅值),X err(w i)为频点w i处,第一信号的频谱,X ref(w i)为频点w i处,第二信号的频谱,M PP(w i)为频点w i处多种离线设计的初级通道的频响曲线信息(即初级通道的传递函数)的取值的平均值。X ref(w i)*M PP(w i)即为由于泄漏状态发生变化而带来的环境噪声信号。
可选地,上述步骤41012a至步骤41012c中,检测频段可以为100Hz-1kHz,上述对第一信号、第二信号以及反向噪声信号进行短时傅里叶变换之后,选择检测频段内的变换结果用于计算次级通道的当前频响曲线信息。在一种实现方式中,将检测频段100Hz-1kHz中的频点之间的间隔设置为62.5Hz,该检测频段内包含15个频点,即K=15。
上述得到误差麦克风的残差信号之后,将反向噪声信号作为参考信号,采用卡尔曼滤波器和归一化最小均方(normalized least mean square,NLMS)滤波器,对该误差麦克风的残差信号进行自适应滤波,对收敛后的滤波器的求幅值,即得到次级通道的当前频响曲线信息。
步骤41012c、从预存储的N组滤波参数对应的N组次级通道的频响曲线信息中,确定与次级通道的当前频响曲线信息匹配的目标频响曲线信息。
其中,上述第一组滤波参数在预存储的N组滤波参数中的索引为n,目标频响曲线信息对应的一组滤波参数的索引为x。
步骤41012d、在目标频响曲线信息对应的一组滤波参数的索引x与第一组滤波参数的索引n满足|n-x|≥2的情况下,确定耳机与耳道之间的泄漏状态发生变化;否则,确定耳机与耳道之间的泄漏状态未发生变化。
本申请实施例中,若目标频响曲线信息对应的一组滤波参数的索引x与第一组滤波参数的索引n满足|n-x|≥2,则表明次级通道的当前频响曲线信息与次级通道的历史频响曲线信息之间的偏差较大,即说明应用第一组滤波参数进行降噪的降噪效果变差,在这种情况下,确定耳机与耳道之间的泄漏状态发生变化。若目标频响曲线信息对应的一组滤波参数的索引x与第一组滤波参数的索引n满足|n-x|<2,则表明次级通道的当前频响曲线信息与次级通道的历史频响曲线信息之间的偏差较小,即说明应用第一组滤波参数进行降噪的降噪效果未变化,在这种情况下,确定耳机与耳道之间的泄漏状态未发生变化。
基于上述步骤41012a至步骤41012d所述的检测耳机与耳道之间的泄漏状态是否发生变化的实现方式,上述步骤4102可以通过步骤41022a实现。
步骤41022a、以第一组滤波参数的索引n为起点,将滤波参数的索引从n逐一调 整到x,索引x对应的一组滤波参数为第二组滤波参数。
对耳机的滤波参数进行更新时,将滤波参数的索从n更新为x,在滤波参数调整的过程中,为了向用户提供较好的听音感受,本申请实施例中,对滤波参数的索引逐一进行调整,直到滤波参数的索引为x,使得降噪效果平缓地过度至最佳效果。
需要说明的是,上述步骤41012a至步骤41012c以及步骤41022a的主动降噪方法适用于噪声较大的环境(即环境嘈杂),不适用于安静的环境。在安静的环境下,反向噪声很小,结合上述步骤41012b,采用过小的反向噪声计算的次级通道的频响曲线信息不准确。
可选地,本申请实施例中,可以采用下述方法确定环境是否嘈杂:通过耳机的耳外麦克风采集第三信号,耳机的耳外麦克风可以包括通话麦克风或参考麦克风;确定第三信号的能量是否大于第二预设能量阈值。若第三信号的能量大于预设阈值,则表明环境嘈杂,否则,环境比较安静。可选地,该第三信号的能量可以是第三信号的长时平稳能量,该长时平稳能量是第三信号经短时傅里叶变换后,检测频段内各个频点的长时平稳能量的平均值。
可选地,耳机的耳外麦克风也可以为除上述通话麦克风和参考麦克风之外的其他的能够采集环境噪声的耳外麦克风,本申请实施例不作限定。
相应地,上述将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数的方法具体包括:在第三信号的能量大于第二预设能量阈值或者第二信号的能量大于第三预设能量阈值的情况下,将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数。
结合图41,如图44所示,对于耳机有下行信号的场景,上述步骤4101可以通过步骤41013a至步骤41013d。
步骤41013a、通过耳机的误差麦克风采集第一信号,并且获取下行信号。
步骤41013b、根据第一信号和下行信号,确定次级通道的当前频响曲线信息。
可选的,上述根据第一信号和下行信号,确定次级通道的当前频响曲线信息的方法具体可以包括:将下行信号作为参考信号,对第一信号进行自适应滤波,得到次级通道的当前频响曲线信息。
与上述实施例中的步骤41012b类似的是,以下行信号作为参考信号,采用卡尔曼滤波器和NLMS滤波器,对第一信号进行自适应滤波,对收敛后的滤波器的求幅值,即得到次级通道的当前频响曲线信息。
步骤41013c、从预存储的N组滤波参数对应的N组次级通道的频响曲线信息中,确定与次级通道的当前频响曲线信息匹配的目标频响曲线信息。
其中,目标频响曲线信息对应的一组滤波参数的索引为x,上述第一组滤波参数在预存储的N组滤波参数中的索引为n。
步骤41013d、在目标频响曲线信息对应的一组滤波参数的索引与第一组滤波参数的索引满足|n-x|≥2的情况下,确定耳机与耳道之间的泄漏状态发生变化;否则,确定耳机与耳道之间的泄漏状态未发生变化。
可选地,上述步骤41013a至步骤41013c中,检测频段可以为125Hz-500Hz,上述对第一信号、第二信号以及反向噪声信号进行短时傅里叶变换之后,选择检测频段内的变换结果用于计算次级通道的当前频响曲线信息。在一种实现方式中,将检测频 段125Hz-500Hz中的频点之间的间隔设置为62.5Hz,该检测频段内包含7个频点,即K=7。
基于上述步骤41013a至步骤41013d所述的检测耳机与耳道之间的泄漏状态是否发生变化的实现方式,上述步骤4102可以通过步骤41023a实现。
步骤41023a、以第一组滤波参数的索引n为起点,将滤波参数的索引从n逐一调整到x,索引x对应的一组滤波参数为第二组滤波参数。
需要说明的是,本申请实施例中,在耳机有下行信号的情况下,更新耳机的滤波参数的方法与耳机无下行信号时更新耳机的滤波参数的方法类似,因此,对于步骤41023a的详细描述,可以参考上述实施例中对于步骤41022a的描述,此处不再赘述。
相应地,本申请实施例提供一种耳机,图45示出上述实施例中所涉及的耳机的一种可能的结构示意图。如图45所示,该耳机包括检测模块4501、更新模块4502以及处理模块4503。
检测模块4501用于当耳机处于ANC工作模式时,检测耳机与耳道之间的泄漏状态是否发生变化,例如执行上述方法实施例中的步骤4101(包括步骤41011b至步骤41011c,或步骤41012b至步骤41012d,或步骤41013b至步骤41013d)。
更新模块4502用于在检测模块检测到耳机与耳道之间的泄漏状态发生变化的情况下,将耳机的滤波参数从第一组滤波参数更新为第二组滤波参数,例如执行上述方法实施例中的步骤4102,该步骤4102可以包括步骤41021a至步骤41021f,或者,41022a,或者步骤41023a。
处理模块4503用于利用第二组滤波参数进行降噪,例如执行上述方法实施例中的步骤4103。
可选地,本申请实施例提供的耳机还包括第一信号采集模块4504和第二信号采集模块4505。第一信号采集模块4504用于通过耳机的误差麦克风采集第一信号,例如执行上述方法实施例中的步骤41011a、步骤41012a以及步骤41013a中采集第一信号的动作。第二信号采集模块4505用于通过耳机的参考麦克风采集第二信号,例如执行上述方法实施例中的步骤41011a和步骤41012a中采集第二信号的动作。
可选地,本申请实施例提供的耳机还包括获取模块4506该获取模块4506用于获取耳机的扬声器播放的反向噪声信号,例如执行上述方法实施例中的步骤41012a中采集反向噪声信号的动作;或者获取模块4506用于获取耳机的下行信号,例如执行上述方法实施例中的步骤41013a中采集下行信号的动作。
可选地,本申请实施例提供的耳机还包括第三信号采集模块4507和确定模块4508,第三信号采集模块4507用于通过耳机的通话麦克风采集第三信号。该确定模块4508用于确定第三信号的能量是否大于第二预设能量阈值,以确定环境是否嘈杂。
上述耳机的各个模块还可以用于执行上述方法实施例中的其他动作,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
图45所描述的耳机的结构仅仅是示意性的,例如,上述耳机的各个单元或模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。在本申请各个实 施例中的各功能单元或模块可以集成在一个模块中,也可以是各个模块单独物理存在,也可以两个或两个以上单元或模块集成在一个模块中。图45中上述各个模块既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。例如,采用软件实现时,上述检测模块4501、更新模块4502、处理模块4503、获取模块4506以及确定模块4508可以是由耳机的处理器读取存储器中存储的程序代码后,生成的软件功能模块来实现。上述各个模块也可以由耳机的不同硬件分别实现,例如检测模块4501、更新模块4502、获取模块4506以及确定模块4508由耳机的微处理器(例如图2中的微处理器202)中的一部分处理资源(例如多核处理器中的一个核或两个核)实现,而处理模块4502由耳机的ANC芯片(例如图2中的ANC芯片203)来完成。参考图2,上述第一信号采集模块4504由耳机的误差麦克风实现,第二信号采集模块4505由耳机的参考麦克风实现,第三信号采集模块4507有耳机的通话麦克风或者参考麦克风实现。显然上述功能模块也可以采用软件硬件相结合的方式来实现,例如,检测模块4501、更新模块4502以及确定模块4508是由处理器读取存储器中存储的程序代码后,生成的软件功能模块。
上述耳机包含的模块实现上述功能的更多细节请参考前面各个方法实施例中的描述,在这里不再重复。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机指令时,全部或部分地产生按照本申请实施例中的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))方式或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如,软盘、磁盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state drives,SSD))等。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (65)

  1. 一种主动降噪方法,其特征在于,应用于具有主动降噪ANC功能的耳机,所述方法包括:
    当所述耳机处于ANC工作模式时,
    获取第一组滤波参数;所述第一组滤波参数是所述耳机预存储的N 1组滤波参数中的一组;所述N 1组滤波参数分别用于在N 1种泄漏状态下进行环境音降噪;所述N 1种泄漏状态是由所述耳机与N 1种不同的耳道环境形成的;其中,所述耳机在当前的佩戴状态下,针对同一环境噪声,所述耳机应用所述第一组滤波参数时的降噪效果优于所述耳机应用所述N 1组滤波参数中其它滤波参数时的降噪效果;N 1为大于或等于2的正整数;
    利用所述第一组滤波参数进行降噪。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    至少根据所述第一组滤波参数和第二组滤波参数生成N 2组滤波参数;所述N 2组滤波参数分别对应不同的ANC降噪强度;所述第二组滤波参数是所述耳机预存储的N 1组滤波参数中的一组;所述第二组滤波参数用于在所述N 1种泄漏状态中泄漏程度最小的状态下进行环境音降噪。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    获取目标ANC降噪强度;
    根据目标ANC降噪强度从所述N 2组滤波参数中确定第三组滤波参数;
    利用所述第三组滤波参数进行降噪。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述获取第一组滤波参数,包括:
    从终端接收第一指示信息,所述第一指示信息用于指示所述耳机利用所述第一组滤波参数进行降噪。
  5. 根据权利要求1至3任一项所述的方法,其特征在于,所述耳机包括误差麦克风;所述获取第一组滤波参数,包括:
    通过所述耳机的误差麦克风采集第一信号,并且获取所述耳机的下行信号;
    根据所述第一信号和所述下行信号确定次级通道的当前频响曲线信息;
    从预设的N 1个次级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;
    将所述目标频响曲线信息对应的一组滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个次级通道的频响曲线信息。
  6. 根据权利要求1至3任一项所述的方法,其特征在于,所述耳机包括误差麦克风和参考麦克风;所述获取第一组滤波参数,包括:
    通过所述耳机的误差麦克风采集第一信号,并且通过所述耳机的参考麦克风采集第二信号,以及获取所述耳机的下行信号;
    基于所述第一信号和所述第二信号确定所述误差麦克风的残差信号;
    根据所述误差麦克风的残差信号和所述下行信号确定次级通道的当前频响曲线信息;
    从预设的N 1个次级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;
    将所述目标频响曲线信息对应的一组滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个次级通道的频响曲线信息。
  7. 根据权利要求1至3任一项所述的方法,其特征在于,所述耳机包括误差麦克风和参考麦克风;所述获取第一组滤波参数,包括:
    通过所述耳机的误差麦克风采集第一信号,并且通过所述耳机的参考麦克风采集第二信号;
    根据所述第一信号和所述第二信号确定初级通道的当前频响曲线信息;
    从预设的N 1个初级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;
    将所述目标频响曲线信息对应的一组滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个初级通道的频响曲线信息。
  8. 根据权利要求1至3任一项所述的方法,其特征在于,所述耳机包括误差麦克风和参考麦克风;所述获取第一组滤波参数,包括:
    通过所述耳机的误差麦克风采集第一信号,通过所述耳机的参考麦克风采集第二信号,并且获取所述耳机的下行信号;
    根据所述第一信号和所述第二信号确定初级通道的当前频响曲线信息,并且根据所述第一信号和所述下行信号确定次级通道的当前频响曲线信息;以及确定当前频响比值曲线信息,所述当前频响比值曲线信息是所述初级通道的当前频响曲线信息与所述次级通道的当前频响曲线信息之比;
    从预设的N 1个频响比值曲线信息中,确定与所述当前频响比值曲线信息匹配的目标频响比值曲线信息;
    将所述目标频响比值曲线信息对应的一组滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个频响比值曲线信息。
  9. 根据权利要求1至3任一项所述的方法,其特征在于,所述耳机包括误差麦克风和参考麦克风;所述获取第一组滤波参数,包括:
    确定所述N 1组滤波参数分别对应的误差麦克风和参考麦克风的频响差值曲线信息;
    将所述N 1组滤波参数对应的N 1个频响差值曲线信息中,目标频段对应的幅度最小的频响差值曲线确定为目标频响差值曲线,所述误差麦克风和所述参考麦克风的频响差值曲线信息是所述误差麦克风的频响曲线信息和所述参考麦克风的频响曲线信息之差;
    将所述目标频响差值曲线信息对应的一组滤波参数确定为所述第一组滤波参数。
  10. 根据权利要求1至9任一项所述的方法,其特征在于,至少根据所述第一组滤波参数和所述第二组滤波参数生成N 2组滤波参数,包括:
    对所述第一组滤波参数和所述第二组滤波参数进行插值,生成所述N 2组滤波参数。
  11. 根据权利要求1至10任一项所述的方法,其特征在于,所获取目标ANC降噪强度,包括:
    从所述终端接收第二指示信息,所述第二指示信息用于指示所述耳机利用所述目标ANC降噪强度对应的第三组滤波参数进行降噪。
  12. 根据权利要求1至10任一项所述的方法,其特征在于,所述获取目标ANC降噪强度,包括:
    根据当前环境噪声的状态确定所述目标ANC降噪强度。
  13. 根据权利要求1至12任一项所述的方法,其特征在于,在获取第一组滤波参数之前,所述方法还包括:
    接收第一指令,所述耳机工作于ANC工作模式,所述第一指令用于控制所述耳机工作于ANC工作模式;或者,
    检测所述耳机是否入耳;
    在检测到所述耳机已入耳的情况下,所述耳机工作于ANC工作模式。
  14. 根据权利要求1至13任一项所述的方法,其特征在于,所述获取第一组滤波参数包括:
    接收第二指令,所述第二指令用于指示所述耳机获取所述第一组滤波参数;其中,所述第一组滤波参数与所述耳机在接收所述第二指令之前采用的滤波参数不同。
  15. 根据权利要求1至14任一项所述的方法,其特征在于,在获取第一组滤波参数之后,至少根据所述第一组滤波参数和所述第二组滤波参数生成N 2组滤波参数之前,所述方法还包括:
    接收第三指令,所述第三指令用于触发所述耳机生成所述N 2组滤波参数。
  16. 根据权利要求1至15任一项所述的方法,其特征在于,
    所述N 1组滤波参数是根据次级通道SP模式的录音信号和初级通道PP模式的录音信号确定的;其中,所述SP模式的录音信号包括下行信号、鼓膜麦克风的信号以及所述耳机的误差麦克风的信号;所述PP模式的录音信号包括鼓膜麦克风的信号、所述耳机的误差麦克风的信号以及所述耳机的参考麦克风的信号。
  17. 根据权利要求1至16任一项所述的方法,其特征在于,所述方法还包括:
    检测是否存在异常噪声,所述异常噪声包括下述至少一种:啸叫噪声、削波噪声或底噪;
    在检测到存在异常噪声的情况下,更新滤波参数,所述滤波参数包括所述第一组滤波参数或所述第三组滤波参数;
    通过所述耳机的参考麦克风和误差麦克风采集声音信号;
    基于更新后的滤波参数,对所述参考麦克风采集的声音信号和所述误差麦克风采集的声音信号进行处理,生成反向噪声信号。
  18. 根据权利要求1至17任一项所述的方法,其特征在于,
    所述耳机包括半开放式主动降噪耳机。
  19. 一种主动降噪方法,其特征在于,应用于与耳机建立通信连接的终端,所述耳机处于ANC工作模式,所述方法包括:
    确定第一组滤波参数;所述第一组滤波参数是所述耳机预存储的N 1组滤波参数中的一组;所述N 1组滤波参数分别用于在N 1种泄漏状态下进行环境音降噪;所述N 1种泄漏状态是由所述耳机与N 1种不同的耳道环境形成的;其中,所述耳机在当前的佩 戴状态下,针对同一环境噪声,所述耳机应用所述第一组滤波参数时的降噪效果优于所述耳机应用所述N 1组滤波参数中其它滤波参数时的降噪效果;N 1为大于或等于2的正整数;
    向所述耳机发送第一指示信息,所述第一指示信息用于指示所述耳机利用所述第一组滤波参数进行降噪。
  20. 根据权利要求19所述的方法,其特征在于,所述确定第一组滤波参数,包括:
    接收所述耳机的误差麦克风采集的第一信号,并且获取所述耳机的下行信号;
    根据所述第一信号和所述下行信号确定次级通道的当前频响曲线信息;
    从预设的N 1个次级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;
    将所述目标频响曲线信息对应的一组滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个次级通道的频响曲线信息。
  21. 根据权利要求19所述的方法,其特征在于,所述确定第一组滤波参数,包括:
    接收所述耳机的误差麦克风采集的第一信号和所述耳机的参考麦克风采集第二信号,并且获取所述耳机的下行信号;
    基于所述第一信号和所述第二信号确定所述误差麦克风的残差信号;
    根据所述误差麦克风的残差信号和所述下行信号确定次级通道的当前频响曲线信息;
    从预设的N 1个次级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;
    将所述目标频响曲线信息对应的滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个次级通道的频响曲线信息。
  22. 根据权利要求19所述的方法,其特征在于,所述确定第一组滤波参数,包括:
    接收所述耳机的误差麦克风采集的第一信号和所述耳机的参考麦克风采集的第二信号;
    根据所述第一信号和所述第二信号确定初级通道的当前频响曲线信息;
    从预设的N 1个初级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;
    将所述目标频响曲线信息对应的滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个初级通道的频响曲线信息。
  23. 根据权利要求19所述的方法,其特征在于,所述确定第一组滤波参数,包括:
    接收所述耳机的误差麦克风采集的第一信号和所述耳机的参考麦克风采集的第二信号,并且获取所述耳机的下行信号;
    根据所述第一信号和所述第二信号确定初级通道的当前频响曲线信息,并且根据所述第一信号和所述下行信号确定次级通道的当前频响曲线信息;以及确定当前频响比值曲线信息,所述当前频响比值曲线信息是所述初级通道的当前频响曲线信息与所述次级通道的当前频响曲线信息之比;
    从预设的N 1个频响比值曲线信息中,确定与所述当前频响比值曲线信息匹配的目标频响比值曲线信息;
    将所述目标频响比值曲线信息对应的滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个频响比值曲线信息。
  24. 根据权利要求19所述的方法,其特征在于,所述确定第一组滤波参数,包括:
    确定所述N 1组滤波参数分别对应的误差麦克风和参考麦克风的频响差值曲线信息;
    将所述N 1组滤波参数对应的N 1个频响差值曲线信息中,目标频段对应的幅度最小的频响差值曲线确定为目标频响差值曲线,所述误差麦克风和所述参考麦克风的频响差值曲线信息是所述误差麦克风的频响曲线信息和所述参考麦克风的频响曲线信息之差;
    将所述目标频响差值曲线信息对应的滤波参数确定为所述第一组滤波参数。
  25. 根据权利要求19至24任一项所述的方法,其特征在于,所述确定第一组滤波参数之前,所述方法还包括:
    接收对所述终端的第一界面的第一选项的操作,所述第一界面是对所述耳机的工作模式进行设置的界面;
    响应于对所述第一选项的操作,向所述耳机发送第一指令,所述第一指令用于控制所述耳机工作于ANC工作模式。
  26. 根据权利要求25所述的方法,其特征在于,接收对所述终端的第一界面的第一选项的操作之后,所述方法还包括:
    显示ANC控制列表;所述ANC控制列表中至少包括下述选项中的至少一个:第一控制选项、第二控制选项或第三控制选项;其中,所述第一控制选项用于触发确定所述第一组滤波参数,所述第二控制选项用于触发生成N 2组滤波参数,所述第三控制选项用于触发重新确定第一组滤波参数。
  27. 根据权利要求26所述的方法,其特征在于,所述确定第一组滤波参数,包括:
    接收对所述ANC控制列表中的第一控制选项的操作,显示第一控件,所述第一控件包括N 1个预设位置,所述N 1个预设位置对应所述N 1组滤波参数;
    接收对所述第一控件中的第一位置的操作;所述第一位置为所述N 1个预设位置中的一个,所述第一位置对应的一组滤波参数应用于所述耳机时的降噪效果优于所述N 1个预设位置中的其他位置对应的滤波参数应用于耳机时的降噪效果;
    响应于对所述第一位置的操作,确定所述第一位置对应的一组滤波参数为所述第一组滤波参数。
  28. 根据权利要求26或27所述的方法,其特征在于,所述方法还包括:
    接收对所述ANC控制列表中的第三控制选项的操作;
    响应于对所述第三控制选项的操作,重新确定第一组滤波参数。
  29. 根据权利要求26或27所述的方法,其特征在于,所述方法还包括:
    接收对所述ANC控制列表中的第三控制选项的操作;
    响应于对所述第三控制选项的操作,向所述耳机发送第二指令,所述第二指令用于指示所述耳机获取所述第一组滤波参数;其中,所述第一组滤波参数与所述耳机在接收所述第二指令之前采用的滤波参数不同。
  30. 根据权利要求26至29任一项所述的方法,其特征在于,所述方法还包括:
    接收对所述ANC控制列表中的第二控制选项的操作;
    响应于对所述第二控制选项的操作,向所述耳机发送第三指令,所述第三指令用于触发所述耳机生成N 2组滤波参数,所述N 2组滤波参数是根据所述第一组滤波参数第二组滤波参数生成的,所述第二组滤波参数是所述N 1组滤波参数中的一组;所述第二组滤波参数用于在所述N 1种泄漏状态中泄漏程度最小的状态下进行环境音降噪。
  31. 根据权利要求30所述的方法,其特征在于,接收对所述ANC控制列表中的第二控制选项的操作之后,所述方法还包括:
    显示第二控件;所述第二控件包括N 2个预设位置,所述N 2个预设位置对应N 2种ANC降噪强度,所述N 2种ANC降噪强度对应N 2组滤波参数;
    接收对所述第二控件中的第二位置的操作;所述第二位置为所述N 2个预设位置中的一个,所述第二位置处的ANC降噪强度所对应的滤波参数应用于所述耳机时的降噪效果优于所述N 2个预设位置中的其他位置处的ANC降噪强度所对应的滤波参数应用于所述耳机时的降噪效果;
    响应于对所述第二位置的操作,确定所述第二位置对应的ANC降噪强度为目标ANC降噪强度;
    向所述耳机发送第二指示信息,所述第二指示信息用于指示所述耳机利用所述目标ANC降噪强度对应的第三组滤波参数进行降噪。
  32. 一种耳机,其特征在于,所述耳机具有主动降噪ANC功能,所述耳机包括获取模块和处理模块:
    所述获取模块,用于在所述耳机处于ANC工作模式的情况下,获取第一组滤波参数;所述第一组滤波参数是所述耳机预存储的N 1组滤波参数中的一组;所述N 1组滤波参数分别用于在N 1种泄漏状态下进行环境音降噪;所述N 1种泄漏状态是由所述耳机与N 1种不同的耳道环境形成的;其中,所述耳机在当前的佩戴状态下,针对同一环境噪声,所述耳机应用所述第一组滤波参数时的降噪效果优于所述耳机应用所述N 1组滤波参数中其它滤波参数时的降噪效果;N 1为大于或等于2的正整数;
    所述处理模块,用于利用所述第一组滤波参数进行降噪。
  33. 根据权利要求32所述的耳机,其特征在于,所述耳机还包括生成模块;
    所述生成模块,用于至少根据所述第一组滤波参数和第二组滤波参数生成N 2组滤波参数;所述N 2组滤波参数分别对应不同的ANC降噪强度;所述第二组滤波参数是所述耳机预存储的N 1组滤波参数中的一组;所述第二组滤波参数用于在所述N 1种泄漏状态中泄漏程度最小的状态下进行环境音降噪。
  34. 根据权利要求33所述的耳机,其特征在于,所述耳机还包括确定模块;
    所述获取模块,还用于获取目标ANC降噪强度;
    所述确定模块,用于根据目标ANC降噪强度从所述N 2组滤波参数中确定第三组滤波参数;
    所述处理模块,还用于利用所述第三组滤波参数进行降噪。
  35. 根据权利要求32至34任一项所述的耳机,其特征在于,所述耳机还包括接收模块;
    所述接收模块,用于从终端接收第一指示信息,所述第一指示信息用于指示所述 耳机利用所述第一组滤波参数进行降噪。
  36. 根据权利要求32至34任一项所述的耳机,其特征在于,所述耳机还包括第一信号采集模块;
    所述第一信号采集模块,用于通过所述耳机的误差麦克风采集第一信号;
    所述获取模块,还用于获取所述耳机的下行信号;
    所述确定模块,还用于根据所述第一信号和所述下行信号确定次级通道的当前频响曲线信息;并且从预设的N 1个次级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;以及将所述目标频响曲线信息对应的一组滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个次级通道的频响曲线信息。
  37. 根据权利要求32至34任一项所述的耳机,其特征在于,所述耳机还包括第一信号采集模块和第二信号采集模块;
    所述第一信号采集模块,用于通过所述耳机的误差麦克风采集第一信号;
    所述第二信号采集模块,用于通过所述耳机的参考麦克风采集第二信号;
    所述获取模块,还用于获取所述耳机的下行信号;
    所述确定模块,还用于基于所述第一信号和所述第二信号确定所述误差麦克风的残差信号;并且根据所述误差麦克风的残差信号和所述下行信号确定次级通道的当前频响曲线信息;从预设的N 1个次级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;以及将所述目标频响曲线信息对应的一组滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个次级通道的频响曲线信息。
  38. 根据权利要求32至34任一项所述的耳机,其特征在于,所述耳机还包括第一信号采集模块和第二信号采集模块;
    所述第一信号采集模块,用于通过所述耳机的误差麦克风采集第一信号;
    所述第二信号采集模块,用于通过所述耳机的参考麦克风采集第二信号;
    所述确定模块,还用于根据所述第一信号和所述第二信号确定初级通道的当前频响曲线信息;并且从预设的N 1个初级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;以及将所述目标频响曲线信息对应的一组滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个初级通道的频响曲线信息。
  39. 根据权利要求32至34任一项所述的耳机,其特征在于,所述耳机还包括第一信号采集模块和第二信号采集模块;
    所述第一信号采集模块,用于通过所述耳机的误差麦克风采集第一信号;
    所述第二信号采集模块,用于通过所述耳机的参考麦克风采集第二信号;
    所述获取模块,还用于获取所述耳机的下行信号;
    所述确定模块,还用于根据所述第一信号和所述第二信号确定初级通道的当前频响曲线信息,并且根据所述第一信号和所述下行信号确定次级通道的当前频响曲线信息;以及确定当前频响比值曲线信息,所述当前频响比值曲线信息是所述初级通道的当前频响曲线信息与所述次级通道的当前频响曲线信息之比;进而从预设的N 1个频响比值曲线信息中,确定与所述当前频响比值曲线信息匹配的目标频响比值曲线信息;并且将所述目标频响比值曲线信息对应的一组滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个频响比值曲线信息。
  40. 根据权利要求32至34任一项所述的耳机,其特征在于,
    所述确定模块,还用于确定所述N 1组滤波参数分别对应的误差麦克风和参考麦克风的频响差值曲线信息;并且将所述N 1组滤波参数对应的N 1个频响差值曲线信息中,目标频段对应的幅度最小的频响差值曲线确定为目标频响差值曲线,所述误差麦克风和所述参考麦克风的频响差值曲线信息是所述误差麦克风的频响曲线信息和所述参考麦克风的频响曲线信息之差;以及将所述目标频响差值曲线信息对应的一组滤波参数确定为所述第一组滤波参数。
  41. 根据权利要求32至40任一项所述的耳机,其特征在于,
    所述生成模块,具体用于对所述第一组滤波参数和所述第二组滤波参数进行插值,生成所述N 2组滤波参数。
  42. 根据权利要求32至41任一项所述的耳机,其特征在于,
    所述接收模块,还用于从所述终端接收第二指示信息,所述第二指示信息用于指示所述耳机利用所述目标ANC降噪强度对应第三组滤波参数进行降噪。
  43. 根据权利要求32至41任一项所述的耳机,其特征在于,
    所述确定模块,还用于根据当前环境噪声的状态确定所述目标ANC降噪强度。
  44. 根据权利要求32至43任一项所述的耳机,其特征在于,所述耳机还包括检测模块;
    所述接收模块,还用于接收第一指令,所述耳机工作于ANC工作模式,所述第一指令用于控制所述耳机工作于ANC工作模式;
    所述检测模块,用于检测所述耳机是否入耳;在所述检测模块检测到所述耳机已入耳的情况下,所述耳机工作于ANC工作模式。
  45. 根据权利要求32至44任一项所述的耳机,其特征在于,
    所述接收模块,用于接收第二指令,所述第二指令用于指示所述耳机获取所述第一组滤波参数;其中,所述第一组滤波参数与所述耳机在接收所述第二指令之前采用的滤波参数不同。
  46. 根据权利要求32至45任一项所述的耳机,其特征在于,
    所述接收模块,还用于接收第三指令,所述第三指令用于触发所述耳机生成所述N 2组滤波参数。
  47. 根据权利要求32至46任一项所述的耳机,其特征在于,
    所述N 1组滤波参数是根据次级通道SP模式的录音信号和初级通道PP模式的录音信号确定的;其中,所述SP模式的录音信号包括下行信号、鼓膜麦克风的信号以及所述耳机的误差麦克风的信号;所述PP模式的录音信号包括鼓膜麦克风的信号、所述耳机的误差麦克风的信号以及所述耳机的参考麦克风的信号。
  48. 根据权利要求32至47任一项所述的耳机,其特征在于,所述耳机还包括更新模块;
    所述检测模块,还用于检测是否存在异常噪声,所述异常噪声包括下述至少一种:啸叫噪声、削波噪声或底噪;
    所述更新模块,用于在所述检测模块检测到存在异常噪声的情况下,更新滤波参数,所述滤波参数包括所述第一组滤波参数或所述第三组滤波参数;
    所述第一信号采集模块,还用于通过所述耳机的参考麦克风采集声音信号;
    所述第二信号采集模块,还用于通过所述耳机的误差麦克风采集声音信号;
    所述处理模块,还用于基于更新后的滤波参数,对所述参考麦克风采集的声音信号和所述误差麦克风采集的声音信号进行处理,生成反向噪声信号。
  49. 一种终端,其特征在于,所述终端与耳机建立通信连接,所述耳机处于ANC工作模式,所述终端包括确定模块和发送模块;
    所述确定模块,用于确定第一组滤波参数;所述第一组滤波参数是所述耳机预存储的N 1组滤波参数中的一组;所述N 1组滤波参数分别用于在N 1种泄漏状态下进行环境音降噪;所述N 1种泄漏状态是由所述耳机与N 1种不同的耳道环境形成的;其中,所述耳机在当前的佩戴状态下,针对同一环境噪声,所述耳机应用所述第一组滤波参数时的降噪效果优于所述耳机应用所述N 1组滤波参数中其它滤波参数时的降噪效果;N 1为大于或等于2的正整数;
    所述发送模块,用于向所述耳机发送第一指示信息,所述第一指示信息用于指示所述耳机利用所述第一组滤波参数进行降噪。
  50. 根据权利要求49所述的终端,其特征在于,所述终端还包括接收模块和获取模块;
    所述接收模块,用于接收所述耳机的误差麦克风采集的第一信号;
    所述获取模块,用于获取所述耳机的下行信号;
    所述确定模块,具体用于根据所述第一信号和所述下行信号确定次级通道的当前频响曲线信息;并且从预设的N 1个次级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;以及将所述目标频响曲线信息对应的一组滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个次级通道的频响曲线信息。
  51. 根据权利要求49所述的终端,其特征在于,所述终端还包括接收模块和获取模块;
    所述接收模块,用于接收所述耳机的误差麦克风采集的第一信号和所述耳机的参考麦克风采集第二信号;
    所述获取模块,用于获取所述耳机的下行信号;
    所述确定模块,具体用于基于所述第一信号和所述第二信号确定所述误差麦克风的残差信号;根据所述误差麦克风的残差信号和所述下行信号确定次级通道的当前频响曲线信息;并且从预设的N 1个次级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;以及将所述目标频响曲线信息对应的滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个次级通道的频响曲线信息。
  52. 根据权利要求49所述的终端,其特征在于,所述终端还包括接收模块;
    所述接收模块,用于接收所述耳机的误差麦克风采集的第一信号和所述耳机的参考麦克风采集的第二信号;
    所述确定模块,具体用于根据所述第一信号和所述第二信号确定初级通道的当前频响曲线信息;并且从预设的N 1个初级通道的频响曲线信息中,确定与所述当前频响曲线信息匹配的目标频响曲线信息;以及将所述目标频响曲线信息对应的滤波参数确 定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个初级通道的频响曲线信息。
  53. 根据权利要求49所述的终端,其特征在于,所述终端还包括接收模块和获取模块;
    所述接收模块,用于接收所述耳机的误差麦克风采集的第一信号和所述耳机的参考麦克风采集的第二信号;
    所述获取模块,用于获取所述耳机的下行信号;
    所述确定模块,具体用于根据所述第一信号和所述第二信号确定初级通道的当前频响曲线信息,并且根据所述第一信号和所述下行信号确定次级通道的当前频响曲线信息;以及确定当前频响比值曲线信息,所述当前频响比值曲线信息是所述初级通道的当前频响曲线信息与所述次级通道的当前频响曲线信息之比;进而从预设的N 1个频响比值曲线信息中,确定与所述当前频响比值曲线信息匹配的目标频响比值曲线信息;并且将所述目标频响比值曲线信息对应的滤波参数确定为所述第一组滤波参数,所述N 1组滤波参数对应N 1个频响比值曲线信息。
  54. 根据权利要求49所述的终端,其特征在于,
    所述确定模块,具体用于确定所述N 1组滤波参数分别对应的误差麦克风和参考麦克风的频响差值曲线信息;并且将所述N 1组滤波参数对应的N 1个频响差值曲线信息中,目标频段对应的幅度最小的频响差值曲线确定为目标频响差值曲线,所述误差麦克风和所述参考麦克风的频响差值曲线信息是所述误差麦克风的频响曲线信息和所述参考麦克风的频响曲线信息之差;以及将所述目标频响差值曲线信息对应的滤波参数确定为所述第一组滤波参数。
  55. 根据权利要求49至54任一项所述的终端,其特征在于,
    所述接收模块,还用于接收对所述终端的第一界面的第一选项的操作,所述第一界面是对所述耳机的工作模式进行设置的界面;
    所述发送模块,还用于响应于对所述第一选项的操作,向所述耳机发送第一指令,所述第一指令用于控制所述耳机工作于ANC工作模式。
  56. 根据权利要求55所述的终端,其特征在于,所述终端还包括显示模块;
    所述显示模块,用于显示ANC控制列表;所述ANC控制列表中至少包括下述选项中的至少一个:第一控制选项、第二控制选项或第三控制选项;其中,所述第一控制选项用于触发确定所述第一组滤波参数,所述第二控制选项用于触发生成N 2组滤波参数,所述第三控制选项用于触发重新确定第一组滤波参数。
  57. 根据权利要求56所述的终端,其特征在于,
    所述接收模块,还用于接收对所述ANC控制列表中的第一控制选项的操作;
    所述显示模块,还用于显示第一控件,所述第一控件包括N 1个预设位置,所述N 1个预设位置对应所述N 1组滤波参数;
    所述接收模块,还用于接收对所述第一控件中的第一位置的操作;所述第一位置为所述N 1个预设位置中的一个,所述第一位置对应的一组滤波参数应用于所述耳机时的降噪效果优于所述N 1个预设位置中的其他位置对应的滤波参数应用于耳机时的降噪效果;
    所述确定模块,具体用于响应于对所述第一位置的操作,确定所述第一位置对应 的一组滤波参数为所述第一组滤波参数。
  58. 根据权利要求56或57所述的终端,其特征在于,
    所述接收模块,还用于接收对所述ANC控制列表中的第三控制选项的操作;
    所述确定模块,还用于响应于对所述第三控制选项的操作,重新确定第一组滤波参数。
  59. 根据权利要求56或27所述的终端,其特征在于,
    所述接收模块,还用于接收对所述ANC控制列表中的第三控制选项的操作;
    所述发送模块,还用于响应于对所述第三控制选项的操作,向所述耳机发送第二指令,所述第二指令用于指示所述耳机获取所述第一组滤波参数;其中,所述第一组滤波参数与所述耳机在接收所述第二指令之前采用的滤波参数不同。
  60. 根据权利要求56至59任一项所述的终端,其特征在于,
    所述接收模块,还用于接收对所述ANC控制列表中的第二控制选项的操作;
    所述发送模块,还用于响应于对所述第二控制选项的操作,向所述耳机发送第三指令,所述第三指令用于触发所述耳机生成N 2组滤波参数,所述N 2组滤波参数是根据所述第一组滤波参数第二组滤波参数生成的,所述第二组滤波参数是所述N 1组滤波参数中的一组;所述第二组滤波参数用于在所述N 1种泄漏状态中泄漏程度最小的状态下进行环境音降噪。
  61. 根据权利要求60所述的终端,其特征在于,
    所述显示模块,还用于显示第二控件;所述第二控件包括N 2个预设位置,所述N 2个预设位置对应N 2种ANC降噪强度,所述N 2种ANC降噪强度对应N 2组滤波参数;
    所述接收模块,还用于接收对所述第二控件中的第二位置的操作;所述第二位置为所述N 2个预设位置中的一个,所述第二位置处的ANC降噪强度所对应的滤波参数应用于所述耳机时的降噪效果优于所述N 2个预设位置中的其他位置处的ANC降噪强度所对应的滤波参数应用于所述耳机时的降噪效果;
    所述确定模块,还用于响应于对所述第二位置的操作,确定所述第二位置对应的ANC降噪强度为目标ANC降噪强度;
    所述发送模块,还用于向所述耳机发送第二指示信息,所述第二指示信息用于指示所述耳机利用所述目标ANC降噪强度对应的第三组滤波参数进行降噪。
  62. 一种耳机,其特征在于,包括存储器和与所述存储器连接的至少一个处理器,所述存储器用于存储指令,所述指令被至少一个处理器读取后,执行如权利要求1至18任一项所述的方法。
  63. 一种计算机可读存储介质,其特征在于,包括计算机程序,当所述计算机程序在计算机上运行时,执行如权利要求1至18任一项所述的方法。
  64. 一种终端,其特征在于,包括存储器和与所述存储器连接的至少一个处理器,所述存储器用于存储指令,所述指令被至少一个处理器读取后,执行如权利要求19至31任一项所述的方法。
  65. 一种计算机可读存储介质,其特征在于,包括计算机程序,当所述计算机程序在计算机上运行时,执行如权利要求19至31任一项所述的方法。
PCT/CN2021/084775 2020-05-14 2021-03-31 一种主动降噪方法及装置 WO2021227696A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2022568881A JP2023525138A (ja) 2020-05-14 2021-03-31 アクティブノイズキャンセリング方法および装置
KR1020227043382A KR20230009487A (ko) 2020-05-14 2021-03-31 능동 잡음 제거 방법 및 장치
US17/986,549 US20230080298A1 (en) 2020-05-14 2022-11-14 Active Noise Cancellation Method and Apparatus

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202010407692 2020-05-14
CN202010407692.7 2020-05-14
CN202011120314.7 2020-10-19
CN202011120314.7A CN113676804B (zh) 2020-05-14 2020-10-19 一种主动降噪方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/986,549 Continuation US20230080298A1 (en) 2020-05-14 2022-11-14 Active Noise Cancellation Method and Apparatus

Publications (1)

Publication Number Publication Date
WO2021227696A1 true WO2021227696A1 (zh) 2021-11-18

Family

ID=78526319

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2021/084774 WO2021227695A1 (zh) 2020-05-14 2021-03-31 一种主动降噪方法及装置
PCT/CN2021/084775 WO2021227696A1 (zh) 2020-05-14 2021-03-31 一种主动降噪方法及装置

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/084774 WO2021227695A1 (zh) 2020-05-14 2021-03-31 一种主动降噪方法及装置

Country Status (4)

Country Link
US (1) US20230080298A1 (zh)
JP (1) JP2023525138A (zh)
KR (1) KR20230009487A (zh)
WO (2) WO2021227695A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023160286A1 (zh) * 2022-02-28 2023-08-31 荣耀终端有限公司 降噪参数适配方法和装置
EP4369736A4 (en) * 2022-09-21 2024-05-15 Shenzhen Goodix Tech Co Ltd ACTIVE NOISE CANCELLING PROCESS AND ACTIVE NOISE CANCELLING HEARING PIECE

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040300B (zh) * 2021-11-29 2023-02-28 歌尔科技有限公司 耳机主动降噪方法、装置、耳机及计算机可读存储介质
CN115580806B (zh) * 2022-11-25 2023-03-10 杭州兆华电子股份有限公司 基于滤波器的权重自动计算的耳机降噪方法及降噪耳机

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104246870A (zh) * 2012-04-26 2014-12-24 美国思睿逻辑有限公司 在耳用扬声器通道中的适应性噪音消除(anc)的协调控制
US20150243271A1 (en) * 2014-02-22 2015-08-27 Apple Inc. Active noise control with compensation for acoustic leak in personal listening devices
CN105376668A (zh) * 2015-11-24 2016-03-02 广东欧珀移动通信有限公司 一种耳机降噪方法及装置
US20170099538A1 (en) * 2014-04-08 2017-04-06 Doppler Labs, Inc. Active acoustic filter with automatic selection of filter parameters based on ambient sound
US20170270905A1 (en) * 2006-11-14 2017-09-21 Sony Corporation Noise reducing device, noise reducing method, noise reducing program, and noise reducing audio outputting device
CN108495227A (zh) * 2018-05-25 2018-09-04 会听声学科技(北京)有限公司 主动降噪方法、主动降噪系统和耳机
CN110809211A (zh) * 2020-01-08 2020-02-18 恒玄科技(北京)有限公司 对耳机主动降噪的方法、主动降噪系统以及耳机
CN110933554A (zh) * 2019-12-13 2020-03-27 恒玄科技(上海)股份有限公司 主动降噪方法、系统以及耳机
CN110996215A (zh) * 2020-02-26 2020-04-10 恒玄科技(北京)有限公司 确定耳机降噪参数的方法、装置以及计算机可读介质
CN111083591A (zh) * 2019-12-13 2020-04-28 恒玄科技(北京)有限公司 一种降噪耳机的配置方法、装置及降噪耳机
CN111107461A (zh) * 2019-12-13 2020-05-05 恒玄科技(北京)有限公司 一种降噪耳机的配置方法、装置及智能终端、降噪耳机
CN111836147A (zh) * 2019-04-16 2020-10-27 华为技术有限公司 一种降噪的装置和方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DK2237573T3 (da) * 2009-04-02 2021-05-03 Oticon As Adaptiv feedbackundertrykkelsesfremgangsmåde og anordning dertil
US9462376B2 (en) * 2013-04-16 2016-10-04 Cirrus Logic, Inc. Systems and methods for hybrid adaptive noise cancellation
US9747887B2 (en) * 2016-01-12 2017-08-29 Bose Corporation Systems and methods of active noise reduction in headphones
CN111010646B (zh) * 2020-03-11 2020-06-26 恒玄科技(北京)有限公司 一种对耳机透传的方法、系统以及耳机

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170270905A1 (en) * 2006-11-14 2017-09-21 Sony Corporation Noise reducing device, noise reducing method, noise reducing program, and noise reducing audio outputting device
CN104246870A (zh) * 2012-04-26 2014-12-24 美国思睿逻辑有限公司 在耳用扬声器通道中的适应性噪音消除(anc)的协调控制
US20150243271A1 (en) * 2014-02-22 2015-08-27 Apple Inc. Active noise control with compensation for acoustic leak in personal listening devices
US20170099538A1 (en) * 2014-04-08 2017-04-06 Doppler Labs, Inc. Active acoustic filter with automatic selection of filter parameters based on ambient sound
CN105376668A (zh) * 2015-11-24 2016-03-02 广东欧珀移动通信有限公司 一种耳机降噪方法及装置
CN108495227A (zh) * 2018-05-25 2018-09-04 会听声学科技(北京)有限公司 主动降噪方法、主动降噪系统和耳机
CN111836147A (zh) * 2019-04-16 2020-10-27 华为技术有限公司 一种降噪的装置和方法
CN110933554A (zh) * 2019-12-13 2020-03-27 恒玄科技(上海)股份有限公司 主动降噪方法、系统以及耳机
CN111083591A (zh) * 2019-12-13 2020-04-28 恒玄科技(北京)有限公司 一种降噪耳机的配置方法、装置及降噪耳机
CN111107461A (zh) * 2019-12-13 2020-05-05 恒玄科技(北京)有限公司 一种降噪耳机的配置方法、装置及智能终端、降噪耳机
CN110809211A (zh) * 2020-01-08 2020-02-18 恒玄科技(北京)有限公司 对耳机主动降噪的方法、主动降噪系统以及耳机
CN110996215A (zh) * 2020-02-26 2020-04-10 恒玄科技(北京)有限公司 确定耳机降噪参数的方法、装置以及计算机可读介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SHOTA SUZUKI ; SHIGEKI MIYABE ; NORIYOSHI KAMADO ; HIROSHI SARUWATARI ; KIYOHIRO SHIKANO ; TOSHIYUKI NOMURA: "Audio object individual operation and its application to earphone leakage noise reduction", PROCEEDINGS OF THE 4TH INTERNATIONAL SYMPOSIUM ON COMMUNICATIONS, CONTROL AND SIGNAL PROCESSING, 3 March 2010 (2010-03-03), Piscataway, NJ, USA , pages 1 - 5, XP031675654, ISBN: 978-1-4244-6285-8 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023160286A1 (zh) * 2022-02-28 2023-08-31 荣耀终端有限公司 降噪参数适配方法和装置
EP4369736A4 (en) * 2022-09-21 2024-05-15 Shenzhen Goodix Tech Co Ltd ACTIVE NOISE CANCELLING PROCESS AND ACTIVE NOISE CANCELLING HEARING PIECE

Also Published As

Publication number Publication date
KR20230009487A (ko) 2023-01-17
WO2021227695A1 (zh) 2021-11-18
JP2023525138A (ja) 2023-06-14
US20230080298A1 (en) 2023-03-16

Similar Documents

Publication Publication Date Title
CN113676804B (zh) 一种主动降噪方法及装置
WO2021227696A1 (zh) 一种主动降噪方法及装置
US10405081B2 (en) Intelligent wireless headset system
US20230134787A1 (en) Headset Noise Processing Method, Apparatus, and Headset
US20230164475A1 (en) Mode Control Method and Apparatus, and Terminal Device
US20150230033A1 (en) Hearing Assistance System
WO2016167878A1 (en) Hearing assistance systems configured to enhance wearer&#39;s ability to communicate with other individuals
CN113496708B (zh) 拾音方法、装置和电子设备
CN114157945B (zh) 一种数据处理方法及相关装置
US20230091607A1 (en) Psychoacoustics-based audio encoding method and apparatus
CN113852899A (zh) 包括助听器和处理设备的听力系统
CN115145527A (zh) 一种调节音量的方法、系统及电子设备
US20230162718A1 (en) Echo filtering method, electronic device, and computer-readable storage medium
CN114120950B (zh) 一种人声屏蔽方法和电子设备
WO2023274180A1 (zh) 一种提升扬声器的音质的方法及装置
CN113129916A (zh) 一种音频采集方法、系统及相关装置
CN114390406B (zh) 一种控制扬声器振膜位移的方法及装置
WO2024027259A1 (zh) 信号处理方法及装置、设备控制方法及装置
CN117093182B (zh) 一种音频播放方法、电子设备和计算机可读存储介质
CN116233696B (zh) 气流杂音抑制方法、音频模组、发声设备和存储介质
WO2024046416A1 (zh) 一种音量调节方法、电子设备及系统
WO2023185698A1 (zh) 一种佩戴检测方法及相关装置
WO2023020420A1 (zh) 音量显示方法、电子设备及存储介质
WO2023197997A1 (zh) 穿戴设备、拾音方法及装置
CN115206278A (zh) 一种声音降噪的方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21805110

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022568881

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20227043382

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21805110

Country of ref document: EP

Kind code of ref document: A1