Active noise reduction method, electronic equipment, storage medium and program product
By acquiring and processing noise data from active noise-cancelling headphones, calculating the compensation transfer function and injecting it into the filter, the problem of inconsistent reference points of feedforward and feedback noise reduction is solved, superimposed noise reduction is achieved at the human eardrum, and the overall noise reduction effect is improved.
Patent Information
- Application Number
- CN202510896287.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-10
AI Technical Summary
In existing active noise reduction technologies, the reference points of feedforward noise reduction and feedback noise reduction are inconsistent, resulting in poor noise reduction effects.
By obtaining the noise time domain data collected by the feedforward microphone and the feedback microphone and the speaker output data, the acoustic coupling data is determined, the compensation transfer function is calculated, and it is injected into the feedforward and feedback filters to achieve compensation of the feedback noise reduction reference point so that it is consistent with the feedforward noise reduction reference point, thereby superimposing noise reduction at the human eardrum.
The active noise reduction effect has been improved, allowing the feedforward and feedback noise reduction to be superimposed directly on the human eardrum. The overall noise reduction amount is equal to the sum of the feedforward and feedback noise reduction amounts separately, optimizing the active noise reduction performance.
Smart Images

Figure CN120766646A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of sound pickup device control, and in particular to an active noise reduction method, electronic device, storage medium, and program product. Background Art
[0002] Active noise-cancelling headphones include a feedforward microphone and a feedback microphone. The feedforward microphone is located on the outside of the headphones, and the feedback microphone is located on the inside of the headphones. The feedforward microphone collects ambient noise and eliminates it at the eardrum through feedforward noise reduction. The feedback microphone detects noise in the ear canal and eliminates it at the location of the feedback microphone through feedback noise reduction.
[0003] In related technologies, feedforward noise reduction and feedback noise reduction are directly superimposed for active noise reduction. However, the reference point of feedforward noise reduction is the eardrum of the human ear, while the reference point of feedback noise reduction is the location of the feedback microphone. The two reference points are inconsistent, resulting in poor active noise reduction effect. Summary of the Invention
[0004] The embodiments of the present application provide an active noise reduction method, an electronic device, a storage medium, and a program product to improve the active noise reduction effect.
[0005] In a first aspect, an embodiment of the present application provides an active noise reduction method, comprising:
[0006] Acquire time domain data of ambient noise collected by the feedforward microphone, time domain data of ear canal noise collected by the feedback microphone, and time domain data of the speaker output by the speaker; determine acoustic coupling data based on the time domain data of ambient noise, the time domain data of ear canal noise, and the time domain data of the speaker; the acoustic coupling data is used to represent the coupling condition between the earphone and the ear canal; determine the compensation transfer function based on the acoustic coupling data; inject the compensation transfer function into the feedforward filter and the feedback filter to obtain a compensated feedforward filter and a compensated feedback filter; based on the compensated feedforward filter and the compensated feedback filter, process the time domain data of ambient noise and the time domain data of ear canal noise to obtain an inverted sound wave; the inverted sound wave is used for active noise reduction.
[0007] In a second aspect, an embodiment of the present application provides an active noise reduction device, comprising:
[0008] An acquisition module is used to acquire time domain data of ambient noise collected by a feedforward microphone, time domain data of ear canal noise collected by a feedback microphone, and time domain data of a speaker output by a speaker;
[0009] an acoustic coupling determination module, configured to determine acoustic coupling data based on the ambient noise time domain data, the ear canal noise time domain data, and the speaker time domain data; the acoustic coupling data is used to represent the coupling between the earphone and the ear canal;
[0010] A compensation transfer function determination module, configured to determine a compensation transfer function based on acoustic coupling data;
[0011] a compensation module, used for injecting the compensation transfer function into the feedforward filter and the feedback filter to obtain a compensated feedforward filter and a compensated feedback filter;
[0012] The noise reduction module is used to process the time domain data of ambient noise and ear canal noise based on the compensated feedforward filter and the compensated feedback filter to obtain an inverted sound wave; the inverted sound wave is used for active noise reduction.
[0013] In a third aspect, an embodiment of the present application provides an electronic device comprising: a memory, a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes the first aspect above and / or various possible implementations of the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementation methods of the first aspect.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0016] The active noise reduction method, electronic device, storage medium and program product provided in the embodiments of the present application determine acoustic coupling data based on ambient noise time domain data, ear canal noise time domain data and speaker time domain data; the acoustic coupling data is used to represent the coupling status of the earphone and the ear canal, and a compensation transfer function is determined according to the acoustic coupling data, and the compensation transfer function is injected into the feedforward filter and the feedback filter to obtain a compensated feedforward filter and a compensated feedback filter, and the compensated feedforward filter and the compensated feedback filter are used to process the ambient noise time domain data and the ear canal noise time domain data to obtain an inverted sound wave; the compensation transfer function is used to compensate so that the reference noise reduction point of the feedback microphone is compensated from the feedback microphone to the human eardrum, and after compensation, the reference point of the feedback noise reduction is consistent with the reference point of the feedforward noise reduction, so that the feedforward noise reduction and the feedback noise reduction can be directly superimposed on the human eardrum, thereby optimizing the active noise reduction and improving the active noise reduction effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] Figure 1 A schematic diagram of a scenario for the active noise reduction method provided in this application;
[0019] Figure 2 A schematic diagram of an active noise reduction system in related art;
[0020] Figure 3 A schematic diagram of the active noise reduction system provided for this application;
[0021] Figure 4 Schematic diagram of compensation according to leakage status provided by this application;
[0022] Figure 5 Schematic diagram of compensation based on ear canal morphology provided by this application;
[0023] Figure 6 A schematic diagram of the calibration preset leakage state and the corresponding leakage compensation transfer function provided by this application;
[0024] Figure 7 A schematic diagram of the calibration preset ear canal morphology and the corresponding ear canal compensation transfer function provided in this application;
[0025] Figure 8 A schematic diagram of the structure of the active noise reduction device provided in this application;
[0026] Figure 9 This is a schematic diagram of the structure of the electronic device provided in this application.
[0027] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0028] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0029] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0030] Figure 1 Schematic diagram of the process of the active noise reduction method provided in this application Figure 1 The active noise reduction method can be applied to an electronic device, the electronic device can be a controller of an active noise reduction headset, and the active noise reduction headset can be an open-type active noise reduction headset or a non-open-type active noise reduction headset; Figure 1 As shown, active noise reduction methods include:
[0031] S101: Acquire time domain data of ambient noise collected by a feedforward microphone, time domain data of ear canal noise collected by a feedback microphone, and time domain data of a speaker output by a speaker.
[0032] Among them, the active noise-canceling headphones include a feedforward microphone, a feedback microphone and a speaker; the feedforward microphone is located on the outside of the active noise-canceling headphones and is used to collect external environmental noise, and the feedback microphone is located on the inside of the active noise-canceling headphones, close to the ear canal, and is used to collect residual noise in the ear canal; the speaker is located on the inside of the active noise-canceling headphones and is used to output audio; the feedforward microphone collects time domain data of environmental noise in real time, and the feedback microphone collects time domain data of ear canal noise in real time.
[0033] Specifically, the controller obtains time domain data of ambient noise collected by the feedforward microphone, obtains ear canal noise collected by the feedback microphone, and obtains time domain data of the speaker output by the speaker.
[0034] S102: Determine acoustic coupling data based on the ambient noise time domain data, the ear canal noise time domain data, and the speaker time domain data; the acoustic coupling data is used to represent the coupling condition between the earphone and the ear canal.
[0035] The acoustic coupling data includes at least one of leakage status and ear canal morphology. If there is significant sound leakage (strong leakage) when the earphones are currently in use, the coupling between the earphones and the ear canal is poor, resulting in higher noise. If there is less sound leakage (weak leakage), the coupling between the earphones and the ear canal is good, resulting in lower noise. If the user's ear canal morphology results in poor coupling between the earphones and the ear canal, the noise is higher. If the user's ear canal morphology results in good coupling between the earphones and the ear canal, the noise is lower.
[0036] In some embodiments, the acoustic coupling data includes leakage status and / or ear canal morphology; determining the acoustic coupling data based on the ambient noise time domain data, the ear canal noise time domain data and the speaker time domain data includes: determining the leakage status based on the ambient noise time domain data and the ear canal noise time domain data; and / or determining the ear canal morphology based on the ambient noise time domain data, the ear canal noise time domain data and the speaker time domain data.
[0037] Specifically, based on the ambient noise time domain data and the ear canal noise time domain data, the leakage state is determined, including: performing fast Fourier transform on the ambient noise time domain data and the ear canal noise time domain data respectively to obtain ambient noise frequency domain data and the ear canal noise frequency domain data; determining the ambient noise energy and the ear canal noise energy within a preset frequency band based on the ambient noise frequency domain data and the ear canal noise frequency domain data; taking the difference between the ambient noise energy and the ear canal noise energy as the energy difference; and selecting the leakage state from the preset leakage state based on the energy difference; the preset leakage states include but are not limited to: sealed state, semi-open state, and fully open state.
[0038] Among them, the preset frequency band can be set according to actual conditions, and the embodiments of the present application do not limit this.
[0039] Optionally, after obtaining the energy difference, the historical energy difference determined at the previous moment is obtained. If the change between the energy difference and the historical energy difference belongs to a preset change range, it is determined that the leakage situation at the current moment and the previous moment has changed significantly. Based on the currently determined energy difference, the leakage state is determined, that is, the acoustic coupling data includes the leakage state, so as to facilitate subsequent compensation based on the leakage state.
[0040] For example, the preset frequency band is 100Hz-600Hz; according to the time domain data of the ambient noise and the time domain data of the ear canal noise, the energy difference within the frequency band 100Hz-600Hz is determined. ; Get the historical energy difference of the previous moment , determine the amount of change: ,when , it is determined that the leakage situation at the current moment has changed significantly from that at the previous moment, and the leakage state is determined based on the energy difference determined at the current moment; wherein, It can be 2dB.
[0041] Specifically, the ear canal morphology is determined based on the ambient noise time domain data, the ear canal noise time domain data and the speaker time domain data, including: using the ambient noise time domain data to filter the ear canal noise time domain data to obtain ear canal noise reduction time domain data; determining the ear canal acoustic frequency response signal based on the ear canal noise reduction time domain data and the speaker time domain data; performing feature extraction based on the ear canal acoustic frequency response signal to obtain the ear canal length, ear canal curvature and ear canal surface characteristics; and determining the ear canal morphology from the preset ear canal morphologies based on the ear canal length, ear canal curvature and ear canal surface characteristics.
[0042] Among them, the ear canal shape is determined in the preset ear canal shape according to the ear canal length, ear canal curvature and ear canal surface features, which can be, obtaining the preset ear canal length, preset ear canal curvature and preset ear canal surface features of the preset ear canal shape, determining the similarity between the preset ear canal length, preset ear canal curvature and preset ear canal surface features of the preset ear canal shape and the ear canal length, ear canal curvature and ear canal surface features, respectively, determining the matching degree of the preset ear canal shape according to the determined similarity, and taking the preset ear canal shape with the highest matching degree as the ear canal shape; illustratively, the preset ear canal shape may include but is not limited to: standard ear canal, narrow ear canal, wide ear canal.
[0043] S103: Determine a compensation transfer function according to the acoustic coupling data.
[0044] Optionally, the acoustic coupling data includes a leakage state, and among the preset leakage compensation transfer functions, a target preset leakage compensation transfer function corresponding to the leakage state is determined, and the target preset leakage compensation transfer function is used as the compensation transfer function.
[0045] Optionally, the acoustic coupling data includes ear canal morphology, and among the preset ear canal compensation transfer functions, a target preset ear canal compensation transfer function corresponding to the ear canal morphology is determined, and the target preset ear canal compensation transfer function is used as the compensation transfer function.
[0046] Optionally, the acoustic coupling data includes leakage state and ear canal morphology. Among the preset leakage compensation transfer functions, a target preset leakage compensation transfer function corresponding to the leakage state is determined. Among the preset ear canal compensation transfer functions, a target preset ear canal compensation transfer function corresponding to the ear canal morphology is determined. Based on the target preset leakage compensation transfer function and the target preset ear canal compensation transfer function, a compensation transfer function is determined.
[0047] The preset leakage compensation transfer function and the preset ear canal compensation transfer function are both obtained by pre-calibration.
[0048] S104 , injecting the compensation transfer function into the feedforward filter and the feedback filter to obtain a compensated feedforward filter and a compensated feedback filter.
[0049] Compensation transfer functions include: Passive noise reduction compensation transfer function and the speaker compensation transfer function , passive noise reduction compensation transfer function , used to compensate for the transfer function of ambient noise to the feedback microphone, the speaker compensation transfer function , which is used to compensate the transfer function from the loudspeaker to the feedback microphone. Through compensation, the reference point of feedback noise reduction is compensated from the feedback microphone to the eardrum of the human ear. After compensation, the reference point of feedback noise reduction is consistent with the reference point of feedforward noise reduction, so that feedforward noise reduction and feedback noise reduction can be directly superimposed on the eardrum of the human ear, so that when feedforward noise reduction and feedback noise reduction are used at the same time, the overall noise reduction amount is equal to the sum of the individual noise reduction amounts of feedforward and feedback.
[0050] It should be noted that in the relevant technology, the reference point of feedforward noise reduction is the human eardrum, and the reference point of feedback noise reduction is the feedback microphone. Usually, there is a certain distance between the feedback microphone and the human eardrum, especially the feedback microphone of open-back headphones is farther away from the human eardrum. The reference points of feedforward noise reduction and feedback noise reduction are inconsistent, resulting in the feedforward noise reduction and feedback noise reduction amounts cannot be directly superimposed at the human eardrum; resulting in that when feedforward noise reduction and feedback noise reduction are used at the same time, the overall noise reduction amount is less than the sum of the individual noise reduction amounts of feedforward and feedback.
[0051] Specifically, the passive noise reduction compensation transfer function and the speaker compensation transfer function Inject the feedforward filter to get the compensated feedforward filter, and convert the speaker compensation transfer function Inject the feedback filter to obtain the compensated feedback filter.
[0052] In some embodiments, the compensation transfer function includes: a passive noise reduction compensation transfer function and a speaker compensation transfer function; a feedforward filter determined based on a first transfer function from ambient noise to a feedback microphone and a second transfer function from the speaker to the feedback microphone; and a feedback filter determined based on the second transfer function.
[0053] The compensation transfer function is injected into the feedforward filter and the feedback filter to obtain a compensated feedforward filter and a compensated feedback filter, including: using the passive noise reduction compensation transfer function to compensate the first transfer function to obtain a compensated first transfer function; using the loudspeaker compensation transfer function to compensate the second transfer function to obtain a compensated second transfer function; determining the compensated feedforward filter based on the compensated first transfer function and the compensated second transfer function; and determining the compensated feedback filter based on the compensated second transfer function.
[0054] Among them, the first transfer function is the transfer function from ambient noise to the feedback microphone, and the first transfer function is recorded as ; The second transfer function is the transfer function from the speaker to the feedback microphone, and the second transfer function is recorded as .
[0055] Specifically, the passive noise reduction compensation transfer function is used to compensate the first transfer function, and the compensated first transfer function is obtained, which can be expressed as: ; wherein, is the first transfer function, is the compensated first transfer function, is the passive noise reduction compensation transfer function; it can be understood that after compensation by the passive noise reduction compensation transfer function, the transfer function of the ambient noise to the eardrum can be obtained .
[0056] The second transfer function is compensated by using the loudspeaker compensation transfer function to obtain the compensated second transfer function, which can be expressed as: ; wherein, is the second transfer function, is the compensated second transfer function, is the loudspeaker compensation transfer function; it can be understood that after compensation by the loudspeaker compensation transfer function, the transfer function of the loudspeaker to the eardrum can be obtained .
[0057] The compensated feedforward filter is determined according to the compensated first transfer function and the compensated second transfer function; the compensated feedback filter is determined based on the compensated second transfer function.
[0058] Exemplarily, Figure 2 is a schematic diagram of an active noise reduction system in the related art, Figure 3 is a schematic diagram of an active noise reduction system provided by the embodiments of the present application; by comparison, the embodiments of the present application introduce the passive noise reduction compensation transfer function and the loudspeaker compensation transfer function ; the first transfer function is compensated by using the passive noise reduction compensation transfer function , and the second transfer function is compensated by using the loudspeaker compensation transfer function , which realizes compensation of the reference point of feedback noise reduction from the feedback microphone to the eardrum of the human ear; it should be noted that the earphone does not contain an ear canal microphone, Figure 3 the ear canal microphone is shown, in order to represent that after compensation, the reference point of feedback noise reduction is compensated from the feedback microphone to the eardrum of the human ear, which is equivalent to moving the feedback microphone to the eardrum of the human ear, that is, after compensation, the feedback microphone can be considered as the ear canal microphone.
[0059] S105, based on the compensated feedforward filter and the compensated feedback filter, processing the ambient noise time domain data and the ear canal noise time domain data to obtain a reversed sound wave; the reversed sound wave is used for active noise reduction.
[0060] Specifically, the time domain data of ambient noise is filtered according to the compensated feedforward filter to obtain a feedforward inverse sound wave, and the time domain data of ear canal noise is processed according to the compensated feedback filter to obtain a feedback inverse sound wave. After mixing the feedforward inverse sound wave and the feedback inverse sound wave, an inverse sound wave is obtained, and the inverse sound wave drives the speaker to achieve active noise reduction.
[0061] Optionally, the active noise reduction method may further include: determining a compensated feedforward noise reduction amount based on the compensated first transfer function and the compensated second transfer function, determining a compensated feedback noise reduction amount based on the compensated second transfer function, and adding the compensated feedforward noise reduction amount and the compensated feedback noise reduction amount to obtain a total compensated noise reduction amount.
[0062] For example, it should be noted that before the compensation transfer function is used for compensation, the feedforward noise reduction amount is expressed by formula (3), the feedback noise reduction amount is expressed by formula (4), and the total noise reduction amount is expressed by formula (5).
[0063] Formula (3): ;in, is the amount of feedforward noise reduction, is the transfer function corresponding to the feedforward filter, is the transfer function from ambient noise to the eardrum. is the second transfer function, is the transfer function of the ambient noise to the feedforward microphone.
[0064] Formula (4): ;in, is the amount of feedback noise reduction, is the transfer function corresponding to the feedback filter, is the second transfer function.
[0065] Formula (5): ;in, is the total noise reduction amount, is the amount of feedforward noise reduction, is the amount of feedback noise reduction.
[0066] The amount of feedforward noise reduction after compensation is expressed by formula (6), the amount of feedback noise reduction after compensation is expressed by formula (7), and the total noise reduction after compensation is expressed by formula (8).
[0067] Formula (6): ;in, is the amount of feedforward noise reduction after compensation, is the transfer function corresponding to the compensated feedforward filter, is the first transfer function after compensation, is the second transfer function after compensation, is the transfer function of the ambient noise to the feedforward microphone.
[0068] Formula (7): ;in, is the amount of feedback noise reduction after compensation, is the transfer function corresponding to the compensated feedback filter, is the second transfer function after compensation.
[0069] Formula (8): ;in, is the total noise reduction after compensation, is the amount of feedforward noise reduction after compensation, is the amount of feedback noise reduction after compensation.
[0070] Comparison shows that the total noise reduction after compensation is greater than before compensation. Compensation shifts the feedback microphone's noise reduction reference point to the eardrum, aligning it with the feedforward noise reduction reference point. This allows the feedforward noise reduction effect to be combined with the feedback noise reduction effect, optimizing the active noise reduction performance. Furthermore, the active noise reduction performance detected by the feedback microphone will be consistent with the actual active noise reduction effect perceived by the human ear, allowing real-time monitoring of the overall noise reduction performance through both the feedforward and feedback microphones.
[0071] In the above-mentioned active noise reduction method, acoustic coupling data is determined based on the time domain data of ambient noise, the time domain data of ear canal noise and the time domain data of the speaker; the acoustic coupling data is used to represent the coupling situation of the earphone and the ear canal, and the compensation transfer function is determined according to the acoustic coupling data, and the compensation transfer function is injected into the feedforward filter and the feedback filter to obtain a compensated feedforward filter and a compensated feedback filter, and the compensated feedforward filter and the compensated feedback filter are used to process the time domain data of ambient noise and the time domain data of ear canal noise to obtain an inverted sound wave; the compensation transfer function is used for compensation, so that the reference noise reduction point of the feedback microphone is compensated from the feedback microphone to the human eardrum, and after compensation, the reference point of the feedback noise reduction is consistent with the reference point of the feedforward noise reduction, and then the feedforward noise reduction and the feedback noise reduction can be directly superimposed on the human eardrum, thereby optimizing the active noise reduction and improving the active noise reduction effect.
[0072] In some embodiments, the acoustic coupling data comprises a leakage state and / or an ear canal morphology; the compensation transfer function is determined according to the acoustic coupling data, comprising: when the acoustic coupling data comprises the leakage state and the ear canal morphology, determining a target leakage compensation transfer function in preset leakage compensation transfer functions based on the leakage state, determining a target ear canal compensation transfer function in preset ear canal compensation transfer functions based on the ear canal morphology, and determining the compensation transfer function according to the target leakage compensation transfer function and the target ear canal compensation transfer function; when the acoustic coupling data comprises the leakage state or the ear canal morphology, determining a target leakage compensation transfer function in preset leakage compensation transfer functions based on the leakage state, and taking the target leakage compensation transfer function as the compensation transfer function; or determining a target ear canal compensation transfer function in preset ear canal compensation transfer functions based on the ear canal morphology, and taking the target ear canal compensation transfer function as the compensation transfer function.
[0073] Specifically, when the acoustic coupling data comprises the leakage state and the ear canal morphology, for the leakage state, N preset leakage states are obtained, a difference value between each of the N preset leakage states and the leakage state is determined, a preset leakage state corresponding to the smallest difference value is determined, and a preset leakage compensation transfer function corresponding to the preset leakage state is taken as the target leakage compensation transfer function.
[0074] For the ear canal morphology, N preset ear canal morphologies are obtained, a similarity between each of the N preset ear canal morphologies and the ear canal morphology is determined, a preset ear canal morphology corresponding to the smallest similarity is determined, and a preset ear canal compensation transfer function corresponding to the preset ear canal morphology is taken as the target ear canal compensation transfer function.
[0075] Optionally, for the ear canal morphology, if there are at least two smallest similarities, indicating that the ear canal morphology is between at least two preset ear canal morphologies, preset ear canal compensation transfer functions corresponding to the at least two preset ear canal morphologies are obtained, and linear interpolation is performed on the at least two preset ear canal compensation transfer functions to obtain the target ear canal compensation transfer function.
[0076] The preset leakage weight and the preset ear canal weight are used to perform weighted summation on the target leakage compensation transfer function and the target ear canal compensation transfer function to obtain the compensation transfer function; wherein the preset leakage weight and the preset ear canal weight can be set according to actual requirements, and embodiments of the present application do not limit this.
[0077] Specifically, when the acoustic coupling data comprises the leakage state and the ear canal morphology, for the leakage state, N preset leakage states are obtained, a difference value between each of the N preset leakage states and the leakage state is determined, a preset leakage state corresponding to the smallest difference value is determined, and a preset leakage compensation transfer function corresponding to the preset leakage state is taken as the compensation transfer function.
[0078] When the acoustic coupling data only includes the ear canal morphology, N preset ear canal morphologies are obtained, the similarities between the N preset ear canal morphologies and the ear canal morphologies are determined respectively, the preset ear canal morphology corresponding to the minimum similarity is determined, and the preset ear canal compensation transfer function corresponding to the preset ear canal morphology is used as the compensation transfer function.
[0079] For example, Figure 4 As shown, when the earphones are in active noise reduction mode, the current leakage state is determined based on the time domain data of ambient noise and the time domain data of ear canal noise; the historical leakage state at the previous moment is obtained, and the change is determined according to the current leakage state and the historical leakage state, and it is judged whether the change belongs to the preset change range. If not, return to the step: when the earphones are in active noise reduction mode, the current leakage state is determined based on the time domain data of ambient noise and the time domain data of ear canal noise, and continue to execute; if so, determine the target leakage compensation transfer function corresponding to the current leakage state in the preset leakage compensation transfer function; inject the target leakage compensation transfer function into the feedforward filter and the feedback filter to obtain the compensated feedforward filter and the compensated feedback filter, and use the compensated feedforward filter and the compensated feedback filter to perform active noise reduction.
[0080] For example, Figure 5 As shown, when the earphones are in active noise reduction mode, the ear canal morphology is determined based on the ambient noise time domain data, the ear canal noise time domain data and the speaker time domain data; in the preset ear canal compensation transfer function, the target ear canal compensation transfer function corresponding to the ear canal morphology is determined; the target ear canal compensation transfer function is injected into the feedforward filter and the feedback filter to obtain the compensated feedforward filter and the compensated feedback filter, and the compensated feedforward filter and the compensated feedback filter are used to perform active noise reduction.
[0081] In some embodiments, the active noise reduction method further includes: in a current leakage state calibration cycle, obtaining first ambient noise time domain data collected by the feedforward microphone, first ear canal noise time domain data collected by the feedback microphone, first speaker time domain data of the speaker, and first eardrum noise time domain data collected by the ear canal microphone; determining a first valid frame based on the first ambient noise time domain data, the first ear canal noise time domain data, the first speaker time domain data, and the first eardrum noise time domain data; when the first valid frame meets a preset condition, determining a first calibration transfer function from the ambient noise to the feedback microphone, a second calibration transfer function from the speaker to the feedback microphone, a third calibration transfer function from the ambient noise to the eardrum, and a fourth calibration transfer function from the speaker to the eardrum according to the first valid frame; determining a preset leakage state based on the first valid frame; determining a preset passive noise reduction leakage compensation transfer function based on the first calibration transfer function and the third calibration transfer function, and determining a preset speaker leakage compensation transfer function based on the second calibration transfer function and the fourth calibration transfer function; and determining a preset leakage compensation transfer function corresponding to the preset leakage state based on the preset passive noise reduction leakage compensation transfer function and the preset speaker leakage compensation transfer function.
[0082] Among them, this embodiment is a pre-executed calibration process, which is used to determine a preset leakage state and a preset leakage compensation transfer function corresponding to the preset leakage state; the ear canal microphone is used to collect noise time domain data at the eardrum during the calibration process. It should be noted that the ear canal microphone is set during calibration, and the earphones do not include an ear canal microphone.
[0083] Specifically, during the calibration process, a preset leakage compensation transfer function corresponding to a preset leakage state is periodically determined, and different leakage state calibration periods may correspond to different preset leakage states.
[0084] In the current leakage state calibration cycle, the first ambient noise time domain data collected by the feedforward microphone, the first ear canal noise time domain data collected by the feedback microphone, the first speaker time domain data of the speaker, and the first eardrum noise time domain data collected by the ear canal microphone are obtained.
[0085] Fast Fourier transform is performed on the first ambient noise time domain data, the first ear canal noise time domain data, the first speaker time domain data and the first eardrum noise time domain data to obtain a first ambient noise frequency domain signal, a first ear canal noise frequency domain signal, a first speaker frequency domain signal and a first eardrum noise frequency domain signal; and a first valid frame is determined from the first ambient noise frequency domain signal, the first ear canal noise frequency domain signal, the first speaker frequency domain signal and the first eardrum noise frequency domain signal.
[0086] Determining the first valid frame is a multi-dimensional comprehensive decision-making process. For example, the first ambient noise frequency domain signal includes multiple ambient noise frequency domain frames. For each ambient noise frequency domain frame, a time domain stationarity test is performed on the ambient noise frequency domain frame. If the time domain stationarity test is passed, a spectrum stability test is performed on the ambient noise frequency domain frame. If the spectrum stability test is passed, a channel correlation test is performed on the ambient noise frequency domain frame. If the channel correlation test is passed, a signal integrity test is performed on the ambient noise frequency domain frame. If the signal integrity test is passed, an energy rationality test is performed on the ambient noise frequency domain frame. If the energy rationality test is passed, it is determined that the ambient noise frequency domain frame is the first valid frame.
[0087] For each ear canal noise frequency domain frame included in the first ear canal noise frequency domain signal, each speaker frequency domain frame included in the first speaker frequency domain signal, and each eardrum frequency domain frame included in the first eardrum noise frequency domain signal, a determination is made in accordance with the above-mentioned method of determining whether the ambient noise frequency domain frame is the first valid frame, so as to determine the first valid frame in the first ambient noise frequency domain signal, the first ear canal noise frequency domain signal, the first speaker frequency domain signal, and the first eardrum noise frequency domain signal.
[0088] The proportion of the first valid frames is determined based on the number of first valid frames and the number of all frequency domain frames; all frequency domain frames include: multiple ambient noise frequency domain frames included in the first ambient noise frequency domain signal, ear canal noise frequency domain frames included in the first ear canal noise frequency domain signal, speaker frequency domain frames included in the first speaker frequency domain signal, and eardrum frequency domain frames included in the first eardrum noise frequency domain signal.
[0089] If the proportion of the first valid frame is greater than a preset ratio, it is determined that the first valid frame meets the preset condition; illustratively, the preset ratio may be 2 / 3.
[0090] According to the first valid frame, a first calibration transfer function from ambient noise to the feedback microphone, a second calibration transfer function from the speaker to the feedback microphone, a third calibration transfer function from ambient noise to the eardrum, and a fourth calibration transfer function from the speaker to the eardrum are determined.
[0091] Among them, the first calibration transfer function can be expressed as: , the second calibration transfer function can be expressed as: , the third calibration transfer function can be expressed as: , the fourth calibration transfer function can be expressed as: .
[0092] Based on the first environmental noise time domain data and the first ear canal noise time domain data corresponding to the first valid frame, a calibrated energy difference is determined, and the calibrated energy difference is used as a preset leakage state.
[0093] The specific process of determining the preset leakage state based on the first ambient noise time domain data and the first ear canal noise time domain data corresponding to the first valid frame can refer to the description of determining the leakage state based on the ambient noise time domain data and the ear canal noise time domain data in the above embodiment.
[0094] The difference between the third calibration transfer function and the first calibration transfer function is determined to obtain a preset passive noise reduction leakage compensation transfer function, which can be expressed as: Determine the difference between the fourth calibration transfer function and the second calibration transfer function to obtain a preset speaker leakage compensation transfer function, which can be expressed as: .
[0095] Preset leakage compensation transfer function corresponding to the preset leakage state, including preset passive noise reduction leakage compensation transfer function and preset speaker leakage compensation transfer function .
[0096] It should be noted that in the active noise reduction application scenario after calibration, the compensation transfer function is determined according to the acoustic coupling data. When the acoustic coupling data includes a leakage state, the compensation transfer function includes: The passive noise reduction leakage compensation transfer function determined in the , and the preset loudspeaker leakage compensation transfer function The loudspeaker leakage compensation transfer function determined in .
[0097] Optionally, when the proportion of the first valid frame is not greater than a preset ratio, it is determined that the first valid frame does not meet the preset condition, and the next leakage state calibration cycle is waited. In other words, when there are fewer first valid frames in the leakage state calibration cycle, it indicates that there may be interference in the first ambient noise time domain data, the first ear canal noise time domain data, the first speaker time domain data, and the first eardrum noise time domain data. Calibration using the time domain data of the current leakage state calibration cycle will result in poor quality of the preset leakage state and preset leakage compensation transfer function. The proportion of the first valid frame can avoid transient noise interference, improve the quality of the preset leakage state and preset leakage compensation transfer function obtained by calibration, and improve the robustness of active noise reduction based on the calibrated preset leakage state and preset leakage compensation transfer function.
[0098] For example, Figure 6 As shown, calibrating the preset leakage state and the corresponding leakage compensation transfer function includes:
[0099] In the current leakage state calibration cycle, first ambient noise time domain data collected by the feedforward microphone, first ear canal noise time domain data collected by the feedback microphone, first speaker time domain data of the speaker, and first eardrum noise time domain data collected by the ear canal microphone are obtained;
[0100] Performing a fast Fourier transform on the first ambient noise time domain data, the first ear canal noise time domain data, the first speaker time domain data, and the first eardrum noise time domain data, and determining a first valid frame based on the obtained frequency domain data;
[0101] Determine whether the proportion of the first valid frame in all frequency domain frames is greater than 2 / 3; if not, wait for the next leakage state calibration cycle; if so, determine the preset leakage state based on the first valid frame;
[0102] determining a first calibration transfer function, a second calibration transfer function, a third calibration transfer function, and a fourth calibration transfer function based on the first valid frame;
[0103] According to the first calibration transfer function and the third calibration transfer function, a preset passive noise reduction leakage compensation transfer function corresponding to the preset leakage state is determined; according to the second calibration transfer function and the fourth calibration transfer function, a preset loudspeaker leakage compensation transfer function corresponding to the preset leakage state is determined.
[0104] In the above embodiment, the robustness of active noise reduction is achieved by pre-calibrating the preset leakage state and the preset leakage compensation transfer function, so that during use, the compensation transfer function can be quickly determined based on the preset leakage state, thereby improving the response efficiency of active noise reduction.
[0105] In some embodiments, the active noise reduction method further includes: in the current ear canal morphology calibration cycle, obtaining second ambient noise time domain data collected by the feedforward microphone, second ear canal noise time domain data collected by the feedback microphone, second speaker time domain data of the speaker, and second eardrum noise time domain data collected by the ear canal microphone; determining a second valid frame based on the second ambient noise time domain data, the second ear canal noise time domain data, the second speaker time domain data, and the second eardrum noise time domain data; when the second valid frame meets the preset conditions, determining a fifth calibration transfer function from the ambient noise to the feedback microphone, a sixth calibration transfer function from the speaker to the feedback microphone, a seventh calibration transfer function from the ambient noise to the eardrum, and an eighth calibration transfer function from the speaker to the eardrum according to the second valid frame; determining a preset ear canal morphology according to the second valid frame; determining a preset passive noise reduction ear canal compensation transfer function according to the fifth calibration transfer function and the seventh calibration transfer function, and determining a preset speaker ear canal compensation transfer function according to the sixth calibration transfer function and the eighth calibration transfer function; determining a preset ear canal compensation transfer function corresponding to the preset ear canal morphology according to the preset passive noise reduction ear canal compensation transfer function and the preset speaker ear canal compensation transfer function.
[0106] Among them, this embodiment is a pre-executed calibration process for determining a preset ear canal morphology and a preset ear canal compensation transfer function corresponding to the preset ear canal morphology.
[0107] It should be noted that, in the calibration process, the preset ear canal morphology can be kept unchanged when determining the preset leakage state and the preset leakage compensation transfer function corresponding to the preset leakage state, such as keeping the preset ear canal morphology as a standard ear canal morphology; the leakage condition can be periodically changed to calibrate different preset leakage states and preset leakage compensation transfer functions corresponding to different preset leakage states; the preset leakage state can be kept unchanged when determining the preset ear canal morphology and the preset ear canal compensation transfer function corresponding to the preset ear canal morphology, such as keeping the preset leakage state as a standard leakage state; and the ear canal condition can be periodically changed to calibrate different preset ear canal morphologies and preset ear canal compensation transfer functions corresponding to different preset ear canal morphologies.
[0108] Specifically, in the calibration process, the preset ear canal compensation transfer function corresponding to the preset ear canal morphology is periodically determined, and different ear canal morphology calibration periods can correspond to different preset ear canal morphologies.
[0109] In the current ear canal morphology calibration period, the second ambient noise time domain data collected by the feedforward microphone, the second ear canal noise time domain data collected by the feedback microphone, the second loudspeaker time domain data of the loudspeaker, and the second eardrum noise time domain data collected by the ear canal microphone are obtained.
[0110] The second ambient noise time domain data, the second ear canal noise time domain data, the second loudspeaker time domain data, and the second eardrum noise time domain data are respectively subjected to fast Fourier transform to obtain a second ambient noise frequency domain signal, a second ear canal noise frequency domain signal, a second loudspeaker frequency domain signal, and a second eardrum noise frequency domain signal; and a second effective frame is determined in the second ambient noise frequency domain signal, the second ear canal noise frequency domain signal, the second loudspeaker frequency domain signal, and the second eardrum noise frequency domain signal.
[0111] The specific process of determining the second effective frame in the second ambient noise frequency domain signal, the second ear canal noise frequency domain signal, the second loudspeaker frequency domain signal, and the second eardrum noise frequency domain signal, and determining whether the second effective frame satisfies the preset condition can refer to the above-mentioned embodiments of determining the first effective frame in the first ambient noise frequency domain signal, the first ear canal noise frequency domain signal, the first loudspeaker frequency domain signal, and the first eardrum noise frequency domain signal, and determining whether the first effective frame satisfies the preset condition.
[0112] The specific process of determining the preset ear canal morphology according to the second ambient noise frequency domain signal, the second ear canal noise frequency domain signal, and the second loudspeaker frequency domain signal corresponding to the second effective frame can refer to the above-mentioned embodiments of determining the ear canal morphology based on the ambient noise time domain data, the ear canal noise time domain data, and the loudspeaker time domain data.
[0113] determine a fifth calibration transfer function of ambient noise to the feedback microphone, a sixth calibration transfer function of the loudspeaker to the feedback microphone, a seventh calibration transfer function of ambient noise to the eardrum, and an eighth calibration transfer function of the loudspeaker to the eardrum according to the second valid frame.
[0114] The fifth calibration transfer function can be expressed as: The sixth calibration transfer function can be expressed as: The seventh calibration transfer function can be expressed as: The eighth calibration transfer function can be expressed as: .
[0115] A difference between the fifth calibration transfer function and the seventh calibration transfer function is determined to obtain a preset passive noise reduction ear canal compensation transfer function, which can be expressed as: A difference between the sixth calibration transfer function and the eighth calibration transfer function is determined to obtain a preset loudspeaker ear canal compensation transfer function, which can be expressed as: .
[0116] The preset ear canal compensation transfer function corresponding to the preset ear canal state includes a preset passive noise reduction compensation transfer function and a preset loudspeaker ear canal compensation transfer function .
[0117] It should be noted that in the active noise reduction application scenario after calibration, the compensation transfer function is determined according to the acoustic coupling data. When the acoustic coupling data includes the ear canal shape, the compensation transfer function includes the passive noise reduction ear canal compensation transfer function determined in the preset passive noise reduction ear canal compensation transfer function and the loudspeaker ear canal compensation transfer function determined in the preset loudspeaker ear canal compensation transfer function .
[0118] Optionally, when the proportion of the second valid frame is not greater than a preset proportion, it is determined that the second valid frame does not satisfy the preset condition, and the next leakage state calibration period is waited. Through the proportion of the second valid frame, transient noise interference can be avoided, the quality of the preset ear canal shape and the preset ear canal compensation transfer function obtained by calibration is improved, and the robustness of active noise reduction based on the preset ear canal shape and the preset ear canal compensation transfer function obtained by calibration is improved.
[0119] Exemplarily, as shown in Figure 7 , calibrating the preset ear canal shape and the corresponding ear canal compensation transfer function includes:
[0120] In the current ear canal morphology calibration cycle, second ambient noise time domain data collected by the feedforward microphone, second ear canal noise time domain data collected by the feedback microphone, second speaker time domain data of the speaker, and second eardrum noise time domain data collected by the ear canal microphone are obtained;
[0121] Performing a fast Fourier transform on the second ambient noise time domain data, the second ear canal noise time domain data, the second speaker time domain data, and the second eardrum noise time domain data, and determining a second valid frame based on the obtained frequency domain data;
[0122] Determine whether the proportion of the second valid frame in all frequency domain frames is greater than 2 / 3; if not, wait for the next ear canal morphology calibration cycle; if so, determine the ear canal morphology based on the second valid frame;
[0123] determining a fifth calibrated transfer function, a sixth calibrated transfer function, a seventh calibrated transfer function, and an eighth calibrated transfer function based on the second valid frame;
[0124] According to the fifth calibration transfer function and the seventh calibration transfer function, the preset passive noise reduction ear canal compensation transfer function corresponding to the preset ear canal morphology is determined; according to the sixth calibration transfer function and the eighth calibration transfer function, the preset speaker ear canal compensation transfer function corresponding to the preset ear canal morphology is determined.
[0125] In the above embodiment, active noise reduction is performed through a pre-calibrated preset ear canal morphology and a preset ear canal compensation transfer function, so that during use, the compensation transfer function can be quickly determined based on the preset ear canal morphology, thereby improving the response efficiency of active noise reduction.
[0126] In the above-mentioned active noise reduction method, acoustic coupling data is determined based on the time domain data of ambient noise, the time domain data of ear canal noise and the time domain data of the speaker; the acoustic coupling data is used to represent the coupling situation of the earphone and the ear canal, and the compensation transfer function is determined according to the acoustic coupling data, and the compensation transfer function is injected into the feedforward filter and the feedback filter to obtain a compensated feedforward filter and a compensated feedback filter, and the compensated feedforward filter and the compensated feedback filter are used to process the time domain data of ambient noise and the time domain data of ear canal noise to obtain an inverted sound wave; the compensation transfer function is used for compensation, so that the reference noise reduction point of the feedback microphone is compensated from the feedback microphone to the human eardrum, and after compensation, the reference point of the feedback noise reduction is consistent with the reference point of the feedforward noise reduction, and then the feedforward noise reduction and the feedback noise reduction can be directly superimposed on the human eardrum, thereby optimizing the active noise reduction and improving the active noise reduction effect.
[0127] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0128] Figure 8 This is a schematic diagram of the structure of the active noise reduction device provided in this application, such as Figure 8 As shown, the active noise reduction device 80 provided in this embodiment includes:
[0129] An acquisition module 810 is configured to acquire time domain data of ambient noise collected by a feedforward microphone, time domain data of ear canal noise collected by a feedback microphone, and time domain data of a speaker output by a speaker;
[0130] Acoustic coupling determination module 820, configured to determine acoustic coupling data based on the ambient noise time domain data, the ear canal noise time domain data, and the speaker time domain data; the acoustic coupling data is used to indicate the coupling between the earphone and the ear canal;
[0131] a compensation transfer function determination module 830 , configured to determine a compensation transfer function based on acoustic coupling data;
[0132] A compensation module 840 is configured to inject the compensation transfer function into the feedforward filter and the feedback filter to obtain a compensated feedforward filter and a compensated feedback filter;
[0133] The noise reduction module 850 is used to process the time domain data of the ambient noise and the time domain data of the ear canal noise based on the compensated feedforward filter and the compensated feedback filter to obtain an inverted sound wave; the inverted sound wave is used for active noise reduction.
[0134] In one possible implementation, the acoustic coupling data includes leakage status and / or ear canal morphology; the acoustic coupling determination module 820 is used to determine the leakage status based on the ambient noise time domain data and the ear canal noise time domain data; and / or determine the ear canal morphology based on the ambient noise time domain data, the ear canal noise time domain data and the speaker time domain data.
[0135] In one possible implementation, the acoustic coupling data includes a leakage state and / or an ear canal morphology; the compensation transfer function determining module 830 is configured to, when the acoustic coupling data includes the leakage state and the ear canal morphology, determine a target leakage compensation transfer function from preset leakage compensation transfer functions based on the leakage state, determine a target ear canal compensation transfer function from preset ear canal compensation transfer functions based on the ear canal morphology, and determine the compensation transfer function based on the target leakage compensation transfer function and the target ear canal compensation transfer function;
[0136] When the acoustic coupling data includes leakage state or ear canal morphology, based on the leakage state, the target leakage compensation transfer function is determined in the preset leakage compensation transfer function, and the target leakage compensation transfer function is used as the compensation transfer function; or based on the ear canal morphology, the target ear canal compensation transfer function is determined in the preset ear canal compensation transfer function, and the target ear canal compensation transfer function is used as the compensation transfer function.
[0137] In one possible implementation, the compensation transfer function includes: a passive noise reduction compensation transfer function and a loudspeaker compensation transfer function; a feedforward filter, determined based on a first transfer function from ambient noise to a feedback microphone, and a second transfer function from a loudspeaker to a feedback microphone; a feedback filter determined based on the second transfer function; a compensation module 840, configured to compensate the first transfer function using the passive noise reduction compensation transfer function to obtain a compensated first transfer function; compensate the second transfer function using the loudspeaker compensation transfer function to obtain a compensated second transfer function; determine a compensated feedforward filter based on the compensated first transfer function and the compensated second transfer function; and determine a compensated feedback filter based on the compensated second transfer function.
[0138] In one possible implementation, the active noise reduction device further includes: a calibration module, configured to obtain, during a current leakage state calibration cycle, first ambient noise time domain data collected by the feedforward microphone, first ear canal noise time domain data collected by the feedback microphone, first speaker time domain data of the speaker, and first eardrum noise time domain data collected by the ear canal microphone; determine a first valid frame based on the first ambient noise time domain data, the first ear canal noise time domain data, the first speaker time domain data, and the first eardrum noise time domain data; determine a preset leakage state based on the first valid frame when the first valid frame meets a preset condition; determine a first calibration transfer function from ambient noise to the feedback microphone, a second calibration transfer function from the speaker to the feedback microphone, a third calibration transfer function from ambient noise to the eardrum, and a fourth calibration transfer function from the speaker to the eardrum; determine a preset passive noise reduction leakage compensation transfer function based on the first calibration transfer function and the third calibration transfer function, determine a preset speaker leakage compensation transfer function based on the second calibration transfer function and the fourth calibration transfer function; and determine a preset leakage compensation transfer function corresponding to the preset leakage state based on the preset passive noise reduction leakage compensation transfer function and the preset speaker leakage compensation transfer function.
[0139] In a possible implementation, the calibration module is further used to obtain, during the current ear canal morphology calibration cycle, the second ambient noise time domain data collected by the feedforward microphone, the second ear canal noise time domain data collected by the feedback microphone, the second speaker time domain data of the speaker, and the second eardrum noise time domain data collected by the ear canal microphone; determine a second valid frame based on the second ambient noise time domain data, the second ear canal noise time domain data, the second speaker time domain data, and the second eardrum noise time domain data; determine a preset ear canal morphology according to the second valid frame when the second valid frame meets a preset condition; determine a preset ear canal morphology according to the second valid frame The fifth calibration transfer function from ambient noise to the feedback microphone, the sixth calibration transfer function from the speaker to the feedback microphone, the seventh calibration transfer function from the ambient noise to the eardrum, and the eighth calibration transfer function from the speaker to the eardrum; based on the fifth calibration transfer function and the seventh calibration transfer function, determine the preset passive noise reduction ear canal compensation transfer function, based on the sixth calibration transfer function and the eighth calibration transfer function, determine the preset speaker ear canal compensation transfer function; based on the preset passive noise reduction ear canal compensation transfer function and the preset speaker ear canal compensation transfer function, determine the preset ear canal compensation transfer function corresponding to the preset ear canal morphology.
[0140] The active noise reduction device provided in this embodiment can execute the active noise reduction method provided in the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0141] Figure 9 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 9As shown, the electronic device 90 provided in this embodiment includes: at least one processor 901 and a memory 902. Optionally, the device 90 further includes a communication component 903. The processor 901, the memory 902 and the communication component 903 are connected via a bus.
[0142] During the specific implementation process, at least one processor 901 executes the computer-executable instructions stored in the memory 902, so that the at least one processor 901 performs the above method.
[0143] The specific implementation process of the processor 901 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0144] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0145] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.
[0146] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0147] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0148] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0149] The readable storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0150] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0151] The division of units is merely a logical functional division; actual implementations may employ alternative divisions, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, any direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units, either through an interface, electrical, mechanical, or other means.
[0152] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0153] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0154] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0155] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0156] Finally, it should be noted that those skilled in the art will readily identify other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The present invention is not limited to the precise structure described above and illustrated in the accompanying drawings, and various modifications and variations may be made without departing from the scope thereof. The scope of the present invention is limited solely by the appended claims.
Claims
1. An active noise reduction method, characterized in that: include: Acquire time domain data of ambient noise collected by a feedforward microphone, time domain data of ear canal noise collected by a feedback microphone, and time domain data of a speaker output by a speaker; determining acoustic coupling data based on the ambient noise time domain data, the ear canal noise time domain data, and the speaker time domain data; The acoustic coupling data is used to represent the coupling condition between the earphone and the ear canal; determining a compensation transfer function based on the acoustic coupling data; Injecting the compensation transfer function into a feedforward filter and a feedback filter to obtain a compensated feedforward filter and a compensated feedback filter; Based on the compensated feedforward filter and the compensated feedback filter, the ambient noise time domain data and the ear canal noise time domain data are processed to obtain an inverted sound wave; the inverted sound wave is used for active noise reduction.
2. The method according to claim 1, characterized in that The acoustic coupling data includes leakage state and / or ear canal morphology; The determining of acoustic coupling data based on the ambient noise time domain data, the ear canal noise time domain data, and the speaker time domain data includes: determining a leakage state based on the ambient noise time domain data and the ear canal noise time domain data; and / or, The ear canal morphology is determined based on the ambient noise time domain data, the ear canal noise time domain data, and the speaker time domain data.
3. The method according to claim 2, characterized in that Determining a compensation transfer function according to the acoustic coupling data includes: When the acoustic coupling data includes the leakage state and the ear canal morphology, determining a target leakage compensation transfer function from preset leakage compensation transfer functions based on the leakage state, determining a target ear canal compensation transfer function from preset ear canal compensation transfer functions based on the ear canal morphology, and determining a compensation transfer function according to the target leakage compensation transfer function and the target ear canal compensation transfer function; When the acoustic coupling data includes the leakage state or the ear canal morphology, based on the leakage state, a target leakage compensation transfer function is determined in the preset leakage compensation transfer function, and the target leakage compensation transfer function is used as the compensation transfer function; or, based on the ear canal morphology, a target ear canal compensation transfer function is determined in the preset ear canal compensation transfer function, and the target ear canal compensation transfer function is used as the compensation transfer function.
4. The method according to claim 1, wherein The compensation transfer function includes: a passive noise reduction compensation transfer function and a loudspeaker compensation transfer function; The feedforward filter is determined based on a first transfer function from ambient noise to the feedback microphone and a second transfer function from the speaker to the feedback microphone; the feedback filter is determined based on the second transfer function; The step of injecting the compensation transfer function into a feedforward filter and a feedback filter to obtain a compensated feedforward filter and a compensated feedback filter comprises: compensating the first transfer function using the passive noise reduction compensation transfer function to obtain a compensated first transfer function; compensating the second transfer function using the loudspeaker compensation transfer function to obtain a compensated second transfer function; determining a compensated feedforward filter based on the compensated first transfer function and the compensated second transfer function; A post-compensated feedback filter is determined based on the post-compensated second transfer function.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In the current leakage state calibration cycle, first ambient noise time domain data collected by the feedforward microphone, first ear canal noise time domain data collected by the feedback microphone, first speaker time domain data of the speaker, and first eardrum noise time domain data collected by the ear canal microphone are obtained; Determining a first valid frame based on first ambient noise time domain data, first ear canal noise time domain data, first speaker time domain data, and first eardrum noise time domain data; When the first valid frame meets a preset condition, determining a preset leakage state based on the first valid frame; Determining, based on the first valid frame, a first calibration transfer function from ambient noise to a feedback microphone, a second calibration transfer function from a loudspeaker to a feedback microphone, a third calibration transfer function from ambient noise to an eardrum, and a fourth calibration transfer function from the loudspeaker to an eardrum; determining a preset passive noise reduction leakage compensation transfer function based on the first calibration transfer function and the third calibration transfer function, and determining a preset loudspeaker leakage compensation transfer function based on the second calibration transfer function and the fourth calibration transfer function; A preset leakage compensation transfer function corresponding to the preset leakage state is determined according to the preset passive noise reduction leakage compensation transfer function and the preset loudspeaker leakage compensation transfer function.
6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In the current ear canal morphology calibration cycle, second ambient noise time domain data collected by the feedforward microphone, second ear canal noise time domain data collected by the feedback microphone, second speaker time domain data of the speaker, and second eardrum noise time domain data collected by the ear canal microphone are obtained; Determining a second valid frame based on the second environmental noise time domain data, the second ear canal noise time domain data, the second speaker time domain data, and the second eardrum noise time domain data; When the second valid frame meets a preset condition, determining a preset ear canal morphology according to the second valid frame; Determining, according to the second valid frame, a fifth calibration transfer function from the ambient noise to the feedback microphone, a sixth calibration transfer function from the loudspeaker to the feedback microphone, a seventh calibration transfer function from the ambient noise to the eardrum, and an eighth calibration transfer function from the loudspeaker to the eardrum; determining a preset passive noise reduction ear canal compensation transfer function based on the fifth calibration transfer function and the seventh calibration transfer function, and determining a preset loudspeaker ear canal compensation transfer function based on the sixth calibration transfer function and the eighth calibration transfer function; According to the preset passive noise reduction ear canal compensation transfer function and the preset loudspeaker ear canal compensation transfer function, a preset ear canal compensation transfer function corresponding to the preset ear canal morphology is determined.
7. An active noise reduction device, characterized in that: The device comprises: An acquisition module is used to acquire time domain data of ambient noise collected by a feedforward microphone, time domain data of ear canal noise collected by a feedback microphone, and time domain data of a speaker output by a speaker; an acoustic coupling determination module, configured to determine acoustic coupling data based on the ambient noise time domain data, the ear canal noise time domain data, and the speaker time domain data; the acoustic coupling data being used to represent a coupling condition between the earphone and the ear canal; a compensation transfer function determination module, configured to determine a compensation transfer function according to the acoustic coupling data; A compensation module, configured to inject the compensation transfer function into a feedforward filter and a feedback filter to obtain a compensated feedforward filter and a compensated feedback filter; The noise reduction module is used to process the ambient noise time domain data and the ear canal noise time domain data based on the compensated feedforward filter and the compensated feedback filter to obtain an inverted sound wave; the inverted sound wave is used for active noise reduction.
8. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, characterized in that The method comprises computer-executable instructions, which implement the method according to any one of claims 1 to 6 when the computer-executable instructions are executed by a processor.
Citation Information
Patent Citations
Active noise reduction method and active noise reduction system for earphone, and earphone
CN110809211A
Active noise reduction method and system and earphone
CN110933554A
Active noise reduction method and device for compensating earphone leakage and earphone
CN113891205A
Noise reduction control method and device, noise reduction earphone and storage medium
CN114786085A
Active noise reduction method and device for earphone and active noise reduction earphone
CN115250396A