Acoustic coupling cavity based headphone audio leakage suppression method and system

CN122602025APending Publication Date: 2026-08-18DONGGUAN SHANGYUAN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610832976.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-10
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

1)无法适应动态变化的漏音频谱:耳机播放的音频内容的频谱分布实时变化,漏音能量集中的频段也随之改变

Benefits of technology

1)本发明通过实时获取声学状态参数,如漏音麦克风采集的漏射声波或基于电信号推演的泄漏频谱,并结合频谱分析与闭环控制,动态调谐亥姆霍兹共振器的谐振频率至当前漏音能量集中的目标频段。相比现有固定谐振频率或固定泄声孔结构,本发明能够根据播放内容、佩戴状态、环境噪声等因素实时调整抑制频段,在全频段范围内保持稳定的漏音抑制效果,克服了传统方案“频段固定、适应性差”的缺陷。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122602025A_ABST
    Figure CN122602025A_ABST
Patent Text Reader

Abstract

The application discloses an earphone audio leakage suppression method and system based on an acoustic coupling cavity, which is applied to an earphone. The earphone comprises a shell, a sound generating unit arranged in the shell, a gas guide hole for connecting an internal cavity and an external environment, and a tunable Helmholtz resonator arranged at the gas guide hole. The method comprises the following steps: acquiring an acoustic state parameter representing a current audio leakage degree of the earphone; performing frequency spectrum analysis on the acoustic state parameter to determine a target suppression frequency band which needs to be subjected to leakage sound suppression at present; generating and outputting a regulation signal to the tunable Helmholtz resonator, so that the resonance frequency of the tunable Helmholtz resonator is matched with the target suppression frequency band, and the sound impedance of the gas guide hole at the target suppression frequency band is greater than the sound impedance at other frequency bands. According to the application, the leakage sound spectrum is acquired in real time, and the Helmholtz resonator is dynamically tuned, so that high sound impedance is formed at the target frequency band of the gas guide hole, wide-band adaptive audio leakage suppression is realized, and the influence on near-field listening is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of headphone technology, and in particular to a headphone audio leakage suppression method and system based on an acoustic coupling cavity. Background Technology

[0002] Audio leakage in headphones is a common problem affecting user privacy and the user experience in public places. To suppress leakage, various solutions have been proposed, such as dipole sound cancellation, fixed vent structures, directional sound transmission, and active noise cancellation. In recent years, Helmholtz resonators have been introduced into headphone housing design due to their ability to absorb sound energy at specific frequencies, used to passively filter out leakage components.

[0003] However, existing headphone acoustic solutions based on Helmholtz resonators all employ a fixed resonant frequency design. This means that the resonator's cavity volume and aperture area cannot be changed after manufacturing, and its resonant frequency is fixed within a narrow bandwidth, such as 100-300Hz, to enhance low-frequency response. This static acoustic structure has the following fundamental drawbacks: 1) Inability to adapt to dynamically changing leakage frequency spectrum: The frequency distribution of the audio content played by the headphones changes in real time, and the frequency band where leakage energy is concentrated also changes accordingly. A Helmholtz resonator with a fixed resonant frequency can only function in the factory-set frequency band. When leakage energy shifts to other frequency bands, the suppression effect drops sharply.

[0004] 2) Lack of proactive sensing of sound leakage: Existing solutions do not include real-time detection of actual sound leakage pressure or spectrum. Their suppression behavior is "open-loop" and preset, and cannot adaptively adjust according to the current usage environment such as ambient noise, tightness of wearing, and playback volume.

[0005] 3) Lack of control strategy: Even with mechanically adjustable resonator structures, current technology does not provide a method for calculating the target resonant frequency and the closed-loop drive adjustment mechanism. A technological gap exists between "variable structures" and "intelligent control."

[0006] Therefore, there is an urgent need for an audio leakage suppression method that can sense the leakage status in real time, dynamically calculate the optimal suppression frequency band, and automatically tune the resonator parameters to overcome the lack of adaptability of fixed-parameter acoustic structures. Summary of the Invention

[0007] To address at least one of the aforementioned technical problems, this invention provides a method and system for suppressing headphone audio leakage based on an acoustic coupling cavity.

[0008] In a first aspect, the present invention provides a method for suppressing audio leakage in headphones based on an acoustic coupling cavity, which is applied to headphones. The headphones include a housing, a sound-generating unit disposed in the housing, an air vent connecting the internal cavity to the external environment, and a tunable Helmholtz resonator disposed at the air vent. The method includes the following steps: Obtain acoustic state parameters that characterize the current audio leakage level of the headphones; Perform spectral analysis on acoustic state parameters to determine the target suppression frequency band for which leakage suppression is currently required; Generate and output a control signal to a tunable Helmholtz resonator to adjust the resonant frequency of the tunable Helmholtz resonator to match the target suppression frequency band; The tunable Helmholtz resonator is configured to tune its resonant frequency to the target suppression frequency band in response to a control signal, so that the acoustic impedance of the air vent at the target suppression frequency band is greater than that at other frequency bands.

[0009] Preferably, obtaining the acoustic state parameters characterizing the current audio leakage level of the headphones includes: At least one leakage detection microphone is provided on the outside of the earphone shell. The microphone of the leakage detection microphone faces the outside of the shell, and the spatial distance between it and the sound outlet of the earphone exceeds a preset distance threshold. The leakage sound detection microphone is used to collect the leakage sound wave signal radiated from the headphones to the external environment; The leaky acoustic wave signal is subjected to analog-to-digital conversion and time-frequency transformation to extract the power spectral density distribution of the signal within a preset frequency band, and the power spectral density distribution is used as an acoustic state parameter.

[0010] Preferably, obtaining the acoustic state parameters characterizing the current audio leakage level of the headphones further includes: The electrical signals at both ends of the voice coil of the sound-generating unit are monitored in real time, and the real-time electroacoustic conversion power of the sound-generating unit is calculated based on the electrical signals; the electrical signals include driving voltage or driving current. The real-time electroacoustic conversion power is input to a pre-generated electroacoustic transfer function model, which characterizes the mapping relationship between the sound pressure level inside the coupling cavity of the earphone and the external leakage sound pressure level. Based on the electroacoustic transfer function model, the estimated sound pressure level and spectral distribution of the current headphones leaking to the external environment are derived and used as acoustic state parameters.

[0011] Preferably, the step of performing spectral analysis on the acoustic state parameters to determine the target suppression frequency band for which leakage suppression is currently required includes: Time-frequency analysis of acoustic state parameters is performed to obtain the power spectral density function of the leaked sound signal. ; Within the preset frequency search range, candidate frequency points are scanned according to the preset frequency resolution. And calculate the cost function value corresponding to each candidate frequency point:

[0012] In the formula, The power spectral density at the candidate frequency point. The power spectral density at frequency point gradient value at, The target suppression frequency band determined in the previous moment. , , These are preset weighting coefficients; Choose the cost function The candidate frequency point with the largest value is taken as the target suppression frequency band at the current moment.

[0013] Preferably, determining the target suppression frequency band for which leakage suppression is currently required further includes: Obtain the historical target suppression frequency band sequence from several past moments and the spectral envelope features of the audio content being played at the current moment; The historical target suppression frequency band sequence and spectral envelope features are input into a pre-trained time series prediction model, which outputs the predicted leakage main frequency band for the next time step. Adjust the weighting coefficients in the cost function based on the predicted main frequency band of leakage. The value of is determined based on the adjusted cost function to determine the target suppression frequency band at the current moment.

[0014] Preferably, the method further includes: After tuning the tunable Helmholtz resonator to the target suppression frequency band, the near-field sound pressure signal at the user's ear canal is collected, and the actual sound pressure level value of the near-field sound pressure signal in the target suppression frequency band is extracted. Obtain the near-field reference sound pressure level value in the target suppression frequency band when the tunable Helmholtz resonator is not activated, under the same test conditions, and calculate the attenuation based on the actual sound pressure level value and the reference sound pressure level value. The relationship between the attenuation amount and the preset comfort threshold is compared. If the attenuation amount exceeds the preset comfort threshold, a compensation signal is generated and superimposed on the driving signal of the sound unit. The compensation signal has a frequency of the target suppression frequency band, an amplitude of the difference between the attenuation and the preset comfort threshold, and a phase that is the same as the phase of the driving signal of the sound unit in the target suppression frequency band.

[0015] Secondly, the present invention also provides an earphone audio leakage suppression system based on an acoustic coupling cavity, comprising: The detection module is used to acquire acoustic state parameters that characterize the current audio leakage level of the headphones; The frequency band determination module is used to perform spectral analysis of acoustic state parameters to determine the target suppression frequency band for which leakage noise suppression is currently required. The control module is used to generate and output modulation signals to the tunable Helmholtz resonator to adjust the resonant frequency of the tunable Helmholtz resonator to match the target suppression frequency band. The tunable Helmholtz resonator is configured to tune its resonant frequency to the target suppression frequency band in response to a control signal, so that the acoustic impedance of the air vent at the target suppression frequency band is greater than that at other frequency bands.

[0016] Preferably, the frequency band determination module includes: The spectrum analysis unit is used to calculate the power spectral density of acoustic state parameters; Peak detection unit, used to identify local peak frequency bands in power spectral density; The threshold comparison unit is used to compare the power value of the local peak frequency band with the preset threshold and select the frequency band that meets the conditions as the target suppression frequency band.

[0017] Thirdly, the present invention also provides an electronic device including a processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein when the processor executes the computer instructions, the electronic device performs the method as described in the first aspect above and any possible implementation thereof.

[0018] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor of an electronic device, cause the processor to perform a method as described in the first aspect above and any possible implementation thereof.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows: 1) This invention acquires acoustic state parameters in real time, such as leaky sound waves collected by a leaky microphone or leakage spectrum derived from electrical signals, and combines spectrum analysis and closed-loop control to dynamically tune the resonant frequency of the Helmholtz resonator to the target frequency band where the current leakage energy is concentrated. Compared with existing fixed resonant frequencies or fixed vent structures, this invention can adjust the suppression frequency band in real time according to factors such as playback content, wearing status, and environmental noise, maintaining a stable leakage suppression effect across the entire frequency range, overcoming the shortcomings of traditional solutions that are "fixed frequency band and poor adaptability".

[0020] 2) This invention employs a target frequency band selection method based on a cost function, simultaneously considering current leakage energy, energy change trends, and historical frequency band offset penalties. This mechanism not only prioritizes suppressing the frequency point with the strongest current leakage but also predicts frequency bands where leakage energy rises rapidly and suppresses frequent frequency band jumps, ensuring the continuity and stability of resonator tuning and avoiding auditory abruptness or suppression failure caused by drastic fluctuations in the target frequency band. Furthermore, a time-series prediction model is introduced, utilizing historical target frequency band sequences and current audio spectrum envelope features to predict the dominant leakage frequency band at the next moment and adjust the cost function weights accordingly. This prediction mechanism allows the resonator to complete tuning before a significant increase in leakage energy, making it particularly suitable for scenarios with rapid frequency band switching in music or speech content.

[0021] 3) This invention uses a near-field microphone to monitor the sound pressure level in the user's ear canal in real time, calculates the near-field attenuation introduced by the resonator, and automatically generates a compensation signal that is superimposed on the driver signal of the sound unit when the attenuation exceeds a comfort threshold. This compensation mechanism effectively offsets the negative impact of sound leakage suppression on the user's listening experience, resolving the contradiction of existing dipole or acoustic short-circuit solutions that "suppress sound leakage while sacrificing near-field volume." Simultaneously, the amplitude of the compensation signal is precisely set to the difference between the attenuation and the threshold, avoiding over-compensation or under-compensation, achieving an optimal balance between sound leakage suppression and sound quality protection.

[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the background art, the accompanying drawings used in the embodiments of the present invention or the background art will be described below.

[0024] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the specification, serve to illustrate the technical solutions of this disclosure.

[0025] Figure 1 A flowchart illustrating a headphone audio leakage suppression method based on an acoustic coupling cavity, provided in an embodiment of the present invention; Figure 2 A schematic diagram of an earphone audio leakage suppression system based on an acoustic coupling cavity is provided in an embodiment of the present invention; Figure 3 for Figure 2 A schematic diagram of the sub-unit of the mid-frequency band determination module. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0028] This invention provides a method for suppressing audio leakage in headphones based on an acoustic coupling cavity, which is applied to headphones. The headphones include a housing, a sound-generating unit disposed within the housing, an air vent connecting the internal cavity to the external environment, and a tunable Helmholtz resonator disposed at the air vent.

[0029] Please see Figure 1 , Figure 1 This is a flowchart illustrating a headphone audio leakage suppression method based on an acoustic coupling cavity, provided as an embodiment of the present invention. Figure 1 As shown, the method includes: S10. Obtain acoustic state parameters that characterize the current audio leakage level of the headphones; S20. Perform spectral analysis on the acoustic state parameters to determine the target suppression frequency band for which leakage suppression is currently required; S30. Generate and output a control signal to the tunable Helmholtz resonator to adjust the resonant frequency of the tunable Helmholtz resonator to match the target suppression frequency band. The tunable Helmholtz resonator is configured to tune its resonant frequency to the target suppression frequency band in response to a control signal, so that the acoustic impedance of the air vent at the target suppression frequency band is greater than that at other frequency bands.

[0030] When headphones are working, the sound waves generated by the driver unit not only enter the ear through the sound outlet, but also radiate outward through vents on the shell (such as pressure relief vents used to balance internal air pressure and improve low-frequency response), creating what is known as "audio leakage." Traditional fixed-parameter passive noise cancellation structures can only suppress a specific frequency band. However, in actual use, the tightness of the headphones, ambient noise, and the spectral distribution of the playback content all dynamically change, causing the significant frequency band of leakage to drift. If a fixed resonator is used, either the suppression effect is insufficient, or the original acoustic performance of the headphones is excessively sacrificed.

[0031] To address this problem, this invention acoustically couples the air vent to a Helmholtz resonator with a dynamically tunable resonant frequency. The Helmholtz resonator is essentially an acoustic system consisting of a cavity and a narrow neck. Near the resonant frequency, the air column in its neck vibrates violently, exhibiting extremely high acoustic impedance to sound waves propagating through this structure, effectively forming an "acoustic valve" at the air vent. When the resonant frequency matches the frequency of the leaking sound wave, the valve is almost closed, making it difficult for the sound wave to leak out. Conversely, at other frequencies, the valve is open, and the air vent can still perform its original functions of pressure balancing or low-frequency enhancement. To achieve adaptive suppression, this invention further introduces an active sensing and control mechanism. By monitoring acoustic parameters characterizing the degree of leakage in real time and performing spectral analysis on these parameters, the target frequency band where the current leakage energy is most concentrated and most in need of suppression is identified. Subsequently, the control system generates a control signal to drive the tunable Helmholtz resonator to change its geometric parameters, precisely aligning its resonant frequency with the target frequency band. At this point, the acoustic impedance of the vent at the target frequency band is significantly increased, and the leaked sound waves are effectively reflected or dissipated; while sound waves in other frequency bands can still pass through normally, thus achieving "on-demand, precise" suppression of audio leakage.

[0032] Specifically, the implementation process of this embodiment can be as follows: 1) A miniature silicon microphone is integrated on the outer side of the earphone shell near the vent hole as a leakage detection sensor. When the earphone plays audio, this microphone collects the sound signal leaking into the external space in real time, serving as the raw acoustic state parameter characterizing the degree of audio leakage. To avoid interference from ambient noise, adaptive filtering can be performed simultaneously with reference to the electrical signal inside the earphone (such as the digital audio stream before the amplifier) ​​to extract the leakage component actually originating from the earphone itself.

[0033] 2) The acquired leakage acoustic signal is converted from analog to digital and then fed into a digital signal processor (DSP) to perform a Fast Fourier Transform (FFT) to obtain the real-time leakage spectrum. Subsequently, peak detection and energy distribution analysis are performed on the spectrum to identify the dominant leakage frequency band with the highest and most persistent energy amplitude. For example, if the analysis reveals that the energy in the 250 Hz–350 Hz range is significantly higher than other frequency bands, this range is set as the current target suppression frequency band. To prevent acoustic artifacts caused by frequent resonator switching, a certain hysteresis threshold or time averaging window can be set; the target is only updated when the leakage frequency band remains stable for a certain period of time.

[0034] 3) Based on the determined center frequency of the target suppression band, the DSP calculates the required geometric parameters of the tunable Helmholtz resonator using a table or a preset formula. For example, the resonator in this embodiment employs a variable cavity volume design. A micro stepper motor drives a piston to change the effective volume inside the cavity, thereby continuously adjusting the resonant frequency. The DSP outputs a corresponding pulse signal to the motor driver, which moves the piston to a designated position, aligning the resonant frequency of the resonator with the center frequency of the target band. At this point, the acoustic impedance at the vent for that frequency band reaches its maximum, effectively blocking leaking sound waves.

[0035] 4) After suppression, the detection microphone continues to monitor the leakage signal. If the remaining leakage is still higher than the set threshold, it indicates that the suppression effect is insufficient, and the resonant frequency can be fine-tuned (e.g., due to resonator parameter drift caused by temperature changes). If the main leakage frequency band changes, repeat steps two and three above to rematch the new frequency band. The entire control loop operates in a millisecond-level cycle to achieve adaptive and continuous suppression of audio leakage.

[0036] Therefore, this embodiment achieves adaptive enhancement of the acoustic impedance of the target frequency band by sensing the leakage frequency band of the headphones in real time and dynamically tuning the Helmholtz resonator. It can accurately suppress audio leakage under dynamic changes, protect user privacy, and at the same time, it does not affect the original sound quality of the headphones and the acoustic function of the vent, significantly improving the user experience of open-back headphones in complex environments.

[0037] In one embodiment, step S10, obtaining acoustic state parameters characterizing the current audio leakage level of the headphones, includes: At least one leakage detection microphone is provided on the outside of the earphone shell. The microphone of the leakage detection microphone faces the outside of the shell, and the spatial distance between it and the sound outlet of the earphone exceeds a preset distance threshold. The leakage sound detection microphone is used to collect the leakage sound wave signal radiated from the headphones to the external environment; The leaky acoustic wave signal is subjected to analog-to-digital conversion and time-frequency transformation to extract the power spectral density distribution of the signal within a preset frequency band, and the power spectral density distribution is used as an acoustic state parameter.

[0038] First, at least one dedicated leakage detection microphone is installed at a suitable location on the outside of the earphone shell. The microphone's pickup port is strictly facing outwards from the shell, i.e., away from the ear when the earphone is worn, thus specifically designed to pick up sound waves leaking from inside the earphone without being directly interfered with by sounds within the ear canal. To ensure that the measurement is of actual leaked sound waves rather than those directly emitted from the earphone's sound outlet, the spatial distance between the leakage detection microphone and the earphone's sound outlet is controlled above a preset threshold, for example, no less than five millimeters. This spatial isolation effectively avoids near-field interference from the main sound beam of the sound outlet, allowing the signal collected by the microphone to more accurately reflect the sound leakage radiated from the earphone's vents and shell gaps to the surrounding environment.

[0039] When the headphones are in operation, the leakage detection microphone continuously collects the leaked sound wave signal radiated from the headphones to the external environment. This microphone is typically a small silicon microphone with high sensitivity and low background noise, and is used in conjunction with a preamplifier circuit to convert the weak sound pressure signal into an electrical signal. The collected raw analog signal is then sent to an analog-to-digital converter (ADC) to convert it into a digital signal with a sufficiently high sampling frequency and quantization accuracy, ensuring the accuracy of subsequent frequency domain analysis. After obtaining the digitized leakage signal, the system performs time-frequency transformation processing on it. Specifically, a frame-by-frame windowed short-time Fourier transform method can be used to convert the time-domain signal to the frequency domain frame by frame. Based on this, the power spectral density distribution of each frame of the signal is calculated within a preset frequency band. The preset frequency band typically covers the most sensitive audio region for the human ear and the common leakage frequency band of headphones, such as 20 Hz to 5 kHz. The power spectral density distribution reflects the proportion of energy of different frequency components in the leakage signal. Finally, the calculated power spectral density distribution is used as an acoustic state parameter characterizing the current audio leakage level of the headphones for subsequent steps. This parameter not only contains the overall intensity information of the leaking sound wave, but more importantly, it provides a fine structure of how the leaking energy changes with frequency, laying the foundation for accurately identifying the "target suppression frequency band".

[0040] Through the above implementation, the system can acquire real leaked sound waves from outside the headphones with high spatial resolution, effectively filtering out interference from direct waves from the sound hole and reflected waves from the wearer's ear canal. Combining analog-to-digital conversion and short-time Fourier transform, the power spectral density distribution of the leaked signal can be obtained in real time. This parameter comprehensively and accurately reflects the energy distribution characteristics of the current audio leak at different frequency bands, providing a reliable data foundation for subsequent dynamic tuning of the Helmholtz resonator, thereby significantly improving the targeting and response speed of sound leakage suppression.

[0041] In one embodiment, step S10, obtaining acoustic state parameters characterizing the current audio leakage level of the headphones, further includes: The electrical signals at both ends of the voice coil of the sound-generating unit are monitored in real time, and the real-time electroacoustic conversion power of the sound-generating unit is calculated based on the electrical signals; the electrical signals include driving voltage or driving current. The real-time electroacoustic conversion power is input to a pre-generated electroacoustic transfer function model, which characterizes the mapping relationship between the sound pressure level inside the coupling cavity of the earphone and the external leakage sound pressure level. Based on the electroacoustic transfer function model, the estimated sound pressure level and spectral distribution of the current headphones leaking to the external environment are derived and used as acoustic state parameters.

[0042] In another embodiment of the invention, an indirect measurement method without an additional microphone is employed. This method utilizes the electrical signal of the headphone's own sound unit to infer leakage, making it suitable for scenarios with high requirements for hardware cost and structural compactness.

[0043] Specifically, the system monitors the electrical signals across the voice coil of the sound-generating unit in real time. These signals include at least one of the driving voltage and driving current. In practice, a high-impedance voltage detection circuit can be connected in parallel between the headphone amplifier output and the sound-generating unit, while a precision sampling resistor is connected in series to acquire the current signal flowing through the voice coil. The instantaneous values ​​of voltage and current are continuously acquired and sent to a digital signal processor via an analog-to-digital converter. Based on the acquired instantaneous voltage and current values, the system calculates the real-time electroacoustic conversion power of the sound-generating unit. This electroacoustic conversion power is not a simple product of voltage and current, but rather the average active power obtained by multiplying the voltage and current signals and then passing them through a low-pass filter. It reflects the actual power by which the sound-generating unit converts electrical energy into acoustic energy per unit time. Because the headphone's sound-generating unit typically exhibits strong inductance in the low-frequency range, there is a phase difference between the voltage and current. Therefore, instantaneous multiplication and averaging are required to accurately calculate the active power and avoid interference from reactive components. This electroacoustic conversion power serves as an indicator of the excitation intensity driving the sound field inside the headphones.

[0044] Furthermore, the system inputs the real-time calculated electroacoustic conversion power into a pre-generated electroacoustic transfer function model. This model is established by using standard acoustic testing equipment (such as an artificial ear and a near-field scanning system) during the headphone design finalization stage to simultaneously measure the sound pressure level inside the headphone coupling cavity (i.e., the sealed space formed between the ear and the headphone shell after wearing) and the leakage sound pressure level in multiple directions outside the headphone. By changing test signals of different frequencies and intensities, a large amount of corresponding input electrical power and output leakage sound field data are recorded. Then, a system identification method (such as least squares fitting or neural network training) is used to establish the mapping relationship between the two. This electroacoustic transfer function model essentially describes the complex conversion law between the internal sound pressure level and the external leakage sound pressure level of the headphone under a specific structure. Finally, the current electroacoustic conversion power is substituted into the model as input, and after calculation, the model derives the estimated sound pressure level and corresponding spectral distribution of the current headphone leakage to the external environment. These two parameters together constitute the acoustic state parameters in this embodiment. The estimated sound pressure level reflects the overall intensity of the leaking sound wave, while the spectral distribution refines the distribution of leaked energy at different frequencies. Since the model already includes the acoustic characteristics of structures such as the earphone shell, vent, and resonator, the system can obtain the frequency domain characteristics of the leak relatively accurately even without an external microphone.

[0045] To further improve the accuracy of the estimation, the system can also adaptively update the model during headphone use using user feedback or briefly activated calibration modes. For example, when a significant change in headphone wearing status is detected (such as from a tight fit to a loose fit), a weak broadband detection signal is played, and online correction is performed using a small number of reference sensors built into the headphone.

[0046] Through the above implementation, this invention can indirectly obtain the acoustic state parameters of headphone audio leakage using only the existing electrical signals of the sound-generating unit, without the need to add a leakage detection microphone outside the housing. This method significantly reduces the hardware cost and structural design complexity of the headphones, while avoiding the problems of external microphones being affected by wind noise, touch noise, or ambient noise. Based on a pre-generated electroacoustic transfer function model, the system can deduce the leakage sound pressure level and spectral distribution in real time and stably, providing reliable data for subsequent leakage suppression control, and is especially suitable for wireless headphone products that are sensitive to integration and cost.

[0047] In one embodiment, step S20, performing spectral analysis on the acoustic state parameters to determine the target suppression frequency band for which leakage suppression is currently required, includes: Time-frequency analysis of acoustic state parameters is performed to obtain the power spectral density function of the leaked sound signal. ; Within the preset frequency search range, candidate frequency points are scanned according to the preset frequency resolution. And calculate the cost function value corresponding to each candidate frequency point:

[0048] In the formula, The power spectral density at the candidate frequency point. The power spectral density at frequency point gradient value at, The target suppression frequency band determined in the previous moment. , , These are preset weighting coefficients; Choose the cost function The candidate frequency point with the largest value is taken as the target suppression frequency band at the current moment.

[0049] In the above formula model, This represents the intensity of energy leakage at the current frequency. The more severe the leakage in a frequency band, the more it needs to be suppressed; this is a fundamental principle. This represents the gradient (rate of change) of the power spectral density at that frequency. A positive and large gradient indicates that leakage energy is rising sharply in the vicinity of that frequency band, which may soon become the new dominant leakage frequency band. Introducing a gradient can give the system a certain "predictive" capability, suppressing the rising edge in advance and avoiding a sudden deterioration in leakage before a response is made. This indicates a penalty applied to values ​​that deviate from the target suppression frequency band of the previous time step. This enforcement aims to make the newly selected frequency band as close as possible to the previous one. This allows for smooth changes in the resonant frequency, preventing frequent and large-amplitude tuning caused by instantaneous fluctuations. The weighted sum of these three factors achieves a compromise between energy priority, trend guidance, and timing smoothing. , , The value of can be chosen to achieve a balance between response speed and stability, for example, 0.5, 0.3 and 0.2 respectively.

[0050] Specifically, the calculation process can be as follows: 1) Obtain the power spectral density function of the leaked sound signal from step S10. Its frequency range covers common leakage frequency bands (such as 20Hz~5kHz).

[0051] 2) Generate a sequence of candidate frequency points within the search range using a set frequency resolution (e.g., 5 Hz or 1 / 3 octave band). ; 3) For each calculate (Can be read directly from the spectrum); Calculate the gradient That is, the power difference between adjacent frequency points divided by the frequency difference; 4) Read the data saved from the previous iteration. (The initial value can be set to the preset default frequency band, such as 500Hz); 5) Substitute the weighting coefficients to calculate the cost of each candidate point. ; 6) Find The largest As the target suppression frequency band at the current moment, and update Used for the next frame.

[0052] By employing this cost function optimization method, the system can stably and continuously track the dominant frequency band of leaked energy, avoiding erroneous switching caused by transient noise or spectral glitches. Simultaneously, the introduction of the gradient term endows the resonator with certain feedforward characteristics. When leaked energy begins to accumulate rapidly in a certain frequency band but has not yet reached its peak, the system can tune to that band in advance for suppression, resulting in a more timely suppression response. The final achieved sound leakage suppression process is smooth and natural, without the additional sound coloration caused by frequent resonator jumps, significantly improving the user's listening experience and the system's engineering usability.

[0053] In one embodiment, determining the target suppression frequency band for which leakage suppression is currently required further includes: Obtain the historical target suppression frequency band sequence from several past moments and the spectral envelope features of the audio content being played at the current moment; The historical target suppression frequency band sequence and spectral envelope features are input into a pre-trained time series prediction model, which outputs the predicted leakage main frequency band for the next time step. Adjust the weighting coefficients in the cost function based on the predicted main frequency band of leakage. The value of is determined based on the adjusted cost function to determine the target suppression frequency band at the current moment.

[0054] During operation, the system continuously records the target suppression frequency bands determined over several past moments (e.g., the last ten control cycles), forming a historical target suppression frequency band sequence. Simultaneously, it extracts the spectral envelope features of the currently playing content from the audio playback chain within the headphones. Specifically, before the digital audio signal is sent to the power amplifier, a frame of data is read from the audio buffer, subjected to a Fast Fourier Transform, and the energy envelope of each frequency band is extracted, with particular attention paid to the mid-to-low frequency region, which is sensitive to human hearing and prone to leakage. This spectral envelope feature reflects the energy distribution trend of the current music or speech content at different frequencies, because the leaky dominant frequency band is often highly correlated with the high-energy frequency band of the played content.

[0055] The aforementioned historical target suppression frequency band sequence is concatenated with the spectral envelope features of the currently played content to form a multi-dimensional feature vector, which is then input into a pre-trained temporal prediction model. This model can employ a Long Short-Term Memory (LSTM) network or a Gated Recurrent Unit (GRU) for supervised training during the headphone design phase, utilizing extensive data from real-world usage scenarios (including leakage frequency band changes under different wearing conditions, audio content, and head movements). The model's task is to learn the dynamic evolution of the leakage dominant frequency band and, based on current and past information, output the most likely leakage dominant frequency band for the next moment. For example, when playing music with gradually decreasing low frequencies and a downward trend in historical frequency bands, the model predicts that the leakage dominant frequency band will also shift to an even lower frequency.

[0056] In the original cost function, the weight coefficients This controls the maintenance strength (i.e., frequency smoothing term) of the "target suppression frequency band of the previous moment". This embodiment dynamically adjusts the frequency smoothing term based on the predicted trend of the main leakage frequency band. The value can be determined. The specific judgment logic is as follows: If the deviation between the predicted leakage frequency band and the current target frequency band exceeds a preset threshold (indicating that the leakage frequency band is about to drift significantly), the system will automatically reduce... The value of is chosen to reduce the dependence on historical frequency bands, making the cost function focus more on the current power spectral density and gradient term, thereby speeding up the response and tuning the resonator to the predicted frequency band in advance.

[0057] If the predicted main frequency band of leakage is basically consistent with the current target frequency band (indicating that the leakage frequency band is stable), then increase The value of is chosen to strengthen the smoothing constraint, avoid frequent adjustments of the resonator due to random noise or short-term fluctuations, and maintain the stable operation of the system. The adjustment can be a continuous proportional adjustment or a segmented step adjustment; the specific values ​​are determined through experimentation.

[0058] Finally, the adjusted Substituting the values ​​into the cost function expression, along with the original power spectral density and gradient terms, the corrected cost function values ​​are calculated for all candidate frequency points. The candidate frequency point that maximizes the cost function is selected as the final target suppression frequency band at the current moment. This frequency band is then used in step S30 to generate a control signal to drive the tunable Helmholtz resonator.

[0059] By introducing a time-series prediction model and dynamically adjusting smoothing weights, this embodiment significantly improves the foresight and adaptability of the sound leakage suppression system. When the spectrum of the played content changes rapidly or the wearing status changes, the system can predict the direction of movement of the main leakage frequency band in advance, actively reduce historical dependence, and achieve faster frequency band tracking; while in steady-state scenarios, it enhances smoothness and suppresses unnecessary jitter. This "prediction + adaptive weighting" mechanism makes the tuning behavior of the resonator more intelligent and natural, avoiding hysteresis effects and reducing acoustic artifacts, thus further optimizing the overall sound leakage suppression effect and listening experience.

[0060] In one embodiment, the method further includes: After tuning the tunable Helmholtz resonator to the target suppression frequency band, the near-field sound pressure signal at the user's ear canal is collected, and the actual sound pressure level value of the near-field sound pressure signal in the target suppression frequency band is extracted. Obtain the near-field reference sound pressure level value in the target suppression frequency band when the tunable Helmholtz resonator is not activated, under the same test conditions, and calculate the attenuation based on the actual sound pressure level value and the reference sound pressure level value. The relationship between the attenuation amount and the preset comfort threshold is compared. If the attenuation amount exceeds the preset comfort threshold, a compensation signal is generated and superimposed on the driving signal of the sound unit. The compensation signal has a frequency of the target suppression frequency band, an amplitude of the difference between the attenuation and the preset comfort threshold, and a phase that is the same as the phase of the driving signal of the sound unit in the target suppression frequency band.

[0061] In this embodiment, after completing the frequency band matching of the tunable Helmholtz resonator, the present invention further introduces a feedback compensation mechanism to address the problem of excessive sound leakage suppression affecting the normal listening experience of headphones. Because the resonator increases the acoustic impedance of the vent in the target suppression frequency band, it may weaken the sound pressure level that should exist in the user's ear canal, resulting in the "missing" or insufficient loudness of that frequency band. This embodiment restores the original frequency response perceived by the user through active compensation, achieving the dual goals of "externally suppressing sound leakage and internally preserving the listening experience." Specifically, this embodiment is implemented through the following steps: 1) Acquiring near-field sound pressure levels in the ear canal: A miniature near-field microphone is pre-integrated into the earphone shell facing the ear canal opening (i.e., near the sound outlet or the front of the earbud). Once the tunable Helmholtz resonator is successfully tuned to the current target suppression frequency band, the system triggers the near-field microphone to begin acquiring near-field sound pressure levels in the user's ear canal. Because the microphone is close to the ear canal entrance, the acquired signal is very close to the sound actually received by the eardrum, accurately reflecting the audio content heard by the user. The acquired analog signal is converted from analog to digital and then sent to a digital signal processor to extract the actual sound pressure level value within the target suppression frequency band, which is recorded as the actual near-field sound pressure level.

[0062] 2) Calculate attenuation and determine compensation requirements: The system needs to obtain a reference value, which is the near-field sound pressure level within the same target suppression frequency band measured under the same test conditions (same headphones, same wearing state, same playback content) when the resonator is not activated (i.e., no sound leakage suppression is performed, and the vent is in its natural state). This reference value can be pre-determined and stored in the headphones' non-volatile memory during the headphone's factory calibration stage, or it can be obtained in real time by briefly turning off the resonator function during the initial use.

[0063] Subtracting the actual sound pressure level from the reference sound pressure level yields the sound pressure attenuation in that frequency band after the resonator is activated. This attenuation represents the loudness sacrificed within the ear canal to suppress sound leakage. The system presets a comfort threshold, which is an upper limit of permissible attenuation (e.g., decibels) calibrated based on human auditory perception experiments. If the calculated attenuation is less than or equal to the comfort threshold, the user will hardly perceive any difference, and no compensation is required. If the attenuation exceeds the comfort threshold, active compensation is necessary.

[0064] 3) Generating and Superimposing Compensation Signal: When compensation is determined to be needed, the system generates an additional compensation signal. This compensation signal has the following characteristics: the frequency is set to the current target suppression frequency band (usually based on the center frequency of this band); the amplitude is set to the difference between the attenuation and the preset comfort threshold (i.e., the part exceeding the comfort level; for example, if the attenuation is 5.5 dB and the comfort threshold is 3 dB, then the compensation amplitude is 2.5 dB); the phase is set to be consistent with the phase of the current driving signal of the sound unit in the target suppression frequency band, to ensure that the superimposed signal is in phase and to avoid phase cancellation that would render the compensation ineffective or generate new acoustic interference.

[0065] The compensation signal, generated by a digital signal processor, is superimposed on the original audio drive signal via an adder. The resulting composite signal is then sent to a power amplifier to drive the speaker unit. This allows the speaker unit to output additional sound energy in the target suppression frequency band to compensate for the sound pressure loss in the ear canal caused by the resonator. Because the frequency and phase of the compensation signal are precisely matched, the total sound pressure level ultimately received in the user's ear canal will rise back to a level close to the baseline. Simultaneously, because the resonator is still functioning, leaking sound waves from outside the headphones are effectively suppressed.

[0066] 4) Closed-loop continuous adjustment: The system can repeat the above process at a certain cycle (e.g., several times per second) to dynamically monitor changes in attenuation. When the target suppression frequency band switches due to changes in playback content or wearing status, the frequency and amplitude of the compensation signal will also be adaptively adjusted to ensure that sound leakage can be effectively suppressed in various usage scenarios without making users feel that the sound is "muffled" or "missing frequency bands".

[0067] Through the compensation mechanism in this embodiment, the present invention effectively suppresses external sound leakage while actively repairing the local frequency band dips that may occur within the ear canal due to the introduction of the resonator. The compensation signal precisely supplements only the portion where the attenuation exceeds the comfort threshold, rather than completely offsetting the entire influence of the resonator, thereby avoiding overcompensation that would reduce the sound leakage suppression effect. Ultimately, it achieves the ideal acoustic state of "quiet externally and natural internally": bystanders can hardly hear any sound leakage, while the user's perceived audio integrity, loudness balance, and listening comfort are highly consistent with those when the suppression function is not enabled, significantly improving the user experience and product market competitiveness.

[0068] See Figure 2 In one embodiment, the present invention also provides an earphone audio leakage suppression system based on an acoustic coupling cavity, comprising: Detection module 10 is used to acquire acoustic state parameters that characterize the current audio leakage level of the headphones; The frequency band determination module 20 is used to perform spectral analysis of acoustic state parameters to determine the target suppression frequency band for which leakage suppression is currently required; The control module 30 is used to generate and output a modulation signal to the tunable Helmholtz resonator to adjust the resonant frequency of the tunable Helmholtz resonator to match the target suppression frequency band. The tunable Helmholtz resonator is configured to tune its resonant frequency to the target suppression frequency band in response to a control signal, so that the acoustic impedance of the air vent at the target suppression frequency band is greater than that at other frequency bands.

[0069] See Figure 3 In one embodiment, the frequency band determination module 20 includes: The spectrum analysis unit 201 is used to calculate the power spectral density of acoustic state parameters; Peak detection unit 202 is used to identify local peak frequency bands in the power spectral density; The threshold comparison unit 203 is used to compare the power value of the local peak frequency band with the preset threshold and select the frequency band that meets the conditions as the target suppression frequency band.

[0070] It is understood that the system provided in this embodiment has functions or includes modules that can be used to execute the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0071] The present invention also provides an electronic device including a processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein when the processor executes the computer instructions, the electronic device performs a method as described in any of the above possible implementations.

[0072] The present invention also provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor of an electronic device, cause the processor to perform a method as described in any of the above possible implementations.

[0073] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0074] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will also readily understand that the various embodiments of the present invention have different focuses, and for the sake of convenience and brevity, the same or similar parts may not be repeated in different embodiments. Therefore, parts not described or not described in detail in one embodiment can be referred to in other embodiments.

Claims

1. A method for suppressing headphone audio leakage based on an acoustic coupling cavity, characterized in that, Applied to headphones, the headphones include a housing, a sound-generating unit disposed within the housing, a vent connecting the internal cavity to the external environment, and a tunable Helmholtz resonator disposed at the vent. The method includes the following steps: Obtain acoustic state parameters that characterize the current audio leakage level of the headphones; Perform spectral analysis on acoustic state parameters to determine the target suppression frequency band for which leakage suppression is currently required; Generate and output a control signal to a tunable Helmholtz resonator to adjust the resonant frequency of the tunable Helmholtz resonator to match the target suppression frequency band; The tunable Helmholtz resonator is configured to tune its resonant frequency to the target suppression frequency band in response to a control signal, so that the acoustic impedance of the air vent at the target suppression frequency band is greater than that at other frequency bands.

2. The headphone audio leakage suppression method based on an acoustic coupling cavity according to claim 1, characterized in that, The acquisition of acoustic state parameters characterizing the current audio leakage level of the headphones includes: At least one leakage detection microphone is provided on the outside of the earphone shell. The microphone of the leakage detection microphone faces the outside of the shell, and the spatial distance between it and the sound outlet of the earphone exceeds a preset distance threshold. The leakage sound detection microphone is used to collect the leakage sound wave signal radiated from the headphones to the external environment; The leaky acoustic wave signal is subjected to analog-to-digital conversion and time-frequency transformation to extract the power spectral density distribution of the signal within a preset frequency band, and the power spectral density distribution is used as an acoustic state parameter.

3. The headphone audio leakage suppression method based on an acoustic coupling cavity according to claim 1, characterized in that, The acquisition of acoustic state parameters characterizing the current audio leakage level of the headphones also includes: The electrical signals at both ends of the voice coil of the sound-generating unit are monitored in real time, and the real-time electroacoustic conversion power of the sound-generating unit is calculated based on the electrical signals; the electrical signals include driving voltage or driving current. The real-time electroacoustic conversion power is input to a pre-generated electroacoustic transfer function model, which characterizes the mapping relationship between the sound pressure level inside the coupling cavity of the earphone and the external leakage sound pressure level. Based on the electroacoustic transfer function model, the estimated sound pressure level and spectral distribution of the current headphones leaking to the external environment are derived and used as acoustic state parameters.

4. The headphone audio leakage suppression method based on an acoustic coupling cavity according to claim 1, characterized in that, The step of performing spectral analysis on acoustic state parameters to determine the target suppression frequency band for which leakage suppression is currently required includes: Time-frequency analysis of acoustic state parameters is performed to obtain the power spectral density function of the leaked sound signal. ; Within the preset frequency search range, candidate frequency points are scanned according to the preset frequency resolution. And calculate the cost function value corresponding to each candidate frequency point: ; In the formula, The power spectral density at the candidate frequency point. The power spectral density at frequency point gradient value at, The target suppression frequency band determined in the previous moment. , , These are preset weighting coefficients; Choose the cost function The candidate frequency point with the largest value is taken as the target suppression frequency band at the current moment.

5. The headphone audio leakage suppression method based on an acoustic coupling cavity according to claim 4, characterized in that, The determination of the target suppression frequency band for which leakage suppression is currently required also includes: Obtain the historical target suppression frequency band sequence from several past moments and the spectral envelope features of the audio content being played at the current moment; The historical target suppression frequency band sequence and spectral envelope features are input into a pre-trained time series prediction model, which outputs the predicted leakage main frequency band for the next time step. Adjust the weighting coefficients in the cost function based on the predicted main frequency band of leakage. The value of is determined based on the adjusted cost function to determine the target suppression frequency band at the current moment.

6. The headphone audio leakage suppression method based on an acoustic coupling cavity according to claim 1, characterized in that, The method further includes: After tuning the tunable Helmholtz resonator to the target suppression frequency band, the near-field sound pressure signal at the user's ear canal is collected, and the actual sound pressure level value of the near-field sound pressure signal in the target suppression frequency band is extracted. Obtain the near-field reference sound pressure level value in the target suppression frequency band when the tunable Helmholtz resonator is not activated, under the same test conditions, and calculate the attenuation based on the actual sound pressure level value and the reference sound pressure level value. The relationship between the attenuation amount and the preset comfort threshold is compared. If the attenuation amount exceeds the preset comfort threshold, a compensation signal is generated and superimposed on the driving signal of the sound unit. The compensation signal has a frequency of the target suppression frequency band, an amplitude of the difference between the attenuation and the preset comfort threshold, and a phase that is the same as the phase of the driving signal of the sound unit in the target suppression frequency band.

7. A headphone audio leakage suppression system based on an acoustic coupling cavity, characterized in that, include: The detection module is used to acquire acoustic state parameters that characterize the current audio leakage level of the headphones; The frequency band determination module is used to perform spectral analysis of acoustic state parameters to determine the target suppression frequency band for which leakage noise suppression is currently required. The control module is used to generate and output modulation signals to the tunable Helmholtz resonator to adjust the resonant frequency of the tunable Helmholtz resonator to match the target suppression frequency band. The tunable Helmholtz resonator is configured to tune its resonant frequency to the target suppression frequency band in response to a control signal, so that the acoustic impedance of the air vent at the target suppression frequency band is greater than that at other frequency bands.

8. The headphone audio leakage suppression system based on an acoustic coupling cavity according to claim 7, characterized in that, The frequency band determination module includes: The spectrum analysis unit is used to calculate the power spectral density of acoustic state parameters; Peak detection unit, used to identify local peak frequency bands in power spectral density; The threshold comparison unit is used to compare the power value of the local peak frequency band with the preset threshold and select the frequency band that meets the conditions as the target suppression frequency band.

9. An electronic device, characterized in that, include: The electronic device includes a processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein when the processor executes the computer instructions, the electronic device performs the headphone audio leakage suppression method based on an acoustic coupling cavity as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor of an electronic device, cause the processor to perform the headphone audio leakage suppression method based on an acoustic coupling cavity as described in any one of claims 1 to 6.