Detection method, apparatus, earphone and computer-readable storage medium

By using feedback and feedforward microphones to collect audio signals in headphones and calculating energy and cross-correlation information, the problem of users being unable to accurately detect headphone sound leakage is solved, achieving accurate detection and improved user experience.

CN115412824BActive Publication Date: 2026-05-05GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2021-05-27
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In existing technologies, users cannot accurately detect sound leakage when headphones are worn, relying mainly on subjective judgment, which leads to inaccurate detection.

Method used

By setting up feedback and feedforward microphones in the headphones, audio signals inside the ear canal and outside the headphones are collected. The energy information and mutual correlation information of the internal and external signals are calculated. Combined with reference information, the sound leakage status of the headphones under wearing conditions is accurately detected.

Benefits of technology

It achieves accurate detection of headphone sound leakage while the headphones are in use, saving hardware costs, is unaffected by external environmental interference, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115412824B_ABST
    Figure CN115412824B_ABST
Patent Text Reader

Abstract

This application relates to a detection method, apparatus, earphone, and storage medium. The method includes: playing detection audio; acquiring an internal detection signal corresponding to the detection audio via a feedback microphone, and acquiring an external detection signal corresponding to the detection audio via a feedforward microphone; determining energy information corresponding to the internal detection signal, and determining cross-correlation information between the external detection signal and the detection audio; and determining the sound leakage status of the earphone based on reference energy information, the energy information, the reference cross-correlation information, and the cross-correlation information. This method can accurately detect the sound leakage status of the earphone.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a detection method, apparatus, earphone, and computer-readable storage medium. Background Technology

[0002] With the development of headphone technology, active noise cancellation (ANC) technology and noise-canceling headphones have emerged. ANC technology can cancel out most noise, thus achieving a noise reduction effect. For in-ear headphones, using the most appropriately sized ear tips will yield the best sound quality and excellent noise reduction experience. Therefore, choosing the right ear tips that are both comfortable and fit snugly is crucial.

[0003] However, in most cases, users can only rely on their subjective feelings to judge whether there is sound leakage in the headphones under the current wearing condition, and cannot accurately detect the leakage of the sound signal played by the headphones. Summary of the Invention

[0004] This application provides a detection method, apparatus, earphone, and computer-readable storage medium that can accurately detect the sound leakage status of the earphone in the current wearing state.

[0005] A detection method, applied to headphones, includes:

[0006] Play the detection audio;

[0007] The internal detection signal corresponding to the detection audio is obtained through the feedback microphone, and the external detection signal corresponding to the detection audio is obtained through the feedforward microphone.

[0008] Determine the energy information corresponding to the internal detection signal, and determine the mutual information between the external detection signal and the detection audio;

[0009] The sound leakage status of the headphones is determined based on the reference energy information, the energy information, the reference mutual related information, and the mutual related information.

[0010] A detection device, applied to headphones, includes:

[0011] The playback module is used to play the detected audio.

[0012] The acquisition module is used to acquire the internal detection signal corresponding to the detection audio through the feedback microphone and to acquire the external detection signal corresponding to the detection audio through the feedforward microphone.

[0013] The information determination module is used to determine the energy information corresponding to the internal detection signal, and to determine the mutual information between the external detection signal and the detection audio.

[0014] The sound leakage determination module is used to determine the sound leakage status of the headphones based on reference energy information, the energy information, reference mutual related information, and the mutual related information.

[0015] An earphone includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the following steps:

[0016] Play the detection audio;

[0017] The internal detection signal corresponding to the detection audio is obtained through the feedback microphone, and the external detection signal corresponding to the detection audio is obtained through the feedforward microphone.

[0018] Determine the energy information corresponding to the internal detection signal, and determine the mutual information between the external detection signal and the detection audio;

[0019] The sound leakage status of the headphones is determined based on the reference energy information, the energy information, the reference mutual related information, and the mutual related information.

[0020] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0021] Play the detection audio;

[0022] The internal detection signal corresponding to the detection audio is obtained through the feedback microphone, and the external detection signal corresponding to the detection audio is obtained through the feedforward microphone.

[0023] Determine the energy information corresponding to the internal detection signal, and determine the mutual information between the external detection signal and the detection audio;

[0024] The sound leakage status of the headphones is determined based on the reference energy information, the energy information, the reference mutual related information, and the mutual related information.

[0025] The aforementioned detection method, apparatus, earphone, and computer-readable storage medium play detection audio through the earphone while it is being worn. The earphone's feedback microphone collects audio signals from inside the ear canal, and its feedforward microphone collects external audio signals, resulting in different audio signals collected by different microphones under the same conditions. When the earphone is not being worn, the detection audio is played, and the feedforward microphone collects external audio signals, allowing for the calculation of the cross-correlation between the two types of external audio signals collected by the same microphone in both the worn and unworn states. By determining the energy information corresponding to the audio signal inside the ear canal and combining this information with reference energy information, internal energy information, reference cross-correlation information, and external cross-correlation information, the sound leakage status of the earphone while worn can be accurately detected. Furthermore, using the audio signals collected by the feedback and feedforward microphones to calculate the sound leakage status of the earphone eliminates the need for additional hardware, saving hardware costs. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a diagram illustrating the application environment of the detection method in one embodiment;

[0028] Figure 2 Here is a flowchart of a detection method in one embodiment;

[0029] Figure 3 This is a temporal diagram of audio detection in one embodiment;

[0030] Figure 4 Here is a spectrogram of the detected audio in one embodiment;

[0031] Figure 5 This is a circuit block diagram of the headphones in one embodiment;

[0032] Figure 6 This is a flowchart of the steps for determining the cross-correlation information between an external detection signal and a detection audio in one embodiment;

[0033] Figure 7 This is a schematic diagram of a test fixture in one embodiment;

[0034] Figure 8 This is a flowchart of the steps for obtaining reference mutual information in one embodiment;

[0035] Figure 9 This is a schematic diagram of a bandpass filter a filtering a signal in one embodiment;

[0036] Figure 10 This is a schematic diagram of bandpass filter b filtering a signal in one embodiment;

[0037] Figure 11 This is a schematic diagram of the frequency response curves before and after calibration in one embodiment;

[0038] Figure 12 This is a schematic diagram of different sizes of ear caps in one embodiment;

[0039] Figure 13 This is a framework diagram of a detection method in one embodiment;

[0040] Figure 14 This is a structural block diagram of the detection device in one embodiment;

[0041] Figure 15 This is a schematic diagram of the internal structure of the headphones in one embodiment. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0043] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, a first energy value may be referred to as a second energy value, and similarly, a second energy value may be referred to as a first energy value. Both the first energy value and the second energy value are energy values, but they are not the same energy value.

[0044] Figure 1 This is a schematic diagram illustrating the application environment of the detection method in one embodiment. For example... Figure 1As shown, the application environment includes headphones 102 and a terminal 104. Headphones 102 and terminal 104 are connected. When a user wears headphones 102, the sound leakage status of the headphones can be detected. Specifically, headphones 102 play a detection audio, the feedback microphone of headphones 102 acquires the internal detection signal corresponding to the detection audio, and the feedforward microphone of headphones 102 acquires the external detection signal corresponding to the detection audio. Headphones 102 determines the energy information corresponding to the internal detection signal and the cross-correlation information between the external detection signal and the detection audio. Headphones 102 determines the sound leakage status of the headphones based on the reference energy information, the energy information, the reference cross-correlation information, and the cross-correlation information. Headphones 102 can be, but are not limited to, over-ear headphones, on-ear headphones, in-ear headphones, etc. Terminal 104 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.

[0045] Figure 2 This is a flowchart of a detection method applied to headphones in one embodiment. The detection method in this embodiment is designed to run on... Figure 1 Let's take the headphones as an example to describe this. Figure 2 As shown, the detection method includes:

[0046] Step 202: Play the detection audio.

[0047] The detection audio refers to the audio played when detecting sound leakage in the headphones. The duration of the detection audio can be set as needed, for example, it can be 3-5 seconds. The detection audio can be pre-stored in the headphone chip's memory. In response to a detection command, the headphones retrieve the detection audio from the headphone chip's memory and play it.

[0048] The detected audio frequency band falls within a preset frequency range, which can include ultra-low frequencies and mid-low frequencies. The preset frequency band can be set as needed. For example, the mid-low frequency range can be 100Hz-1kHz, and the ultra-low frequency range can be below 20Hz.

[0049] In one embodiment, the detection audio can be composed of a mixture of detection information from different frequency bands. Specifically, the detection audio can be composed of a mixture of an ultra-low frequency (UHF) single-frequency signal and a mid-to-low frequency (MHF) source signal. The source signal, located in the 100Hz-1kHz range, is acquired and high-pass filtered. The high-pass filtered source signal is then mixed with the 10Hz UHF single-frequency signal to obtain the detection audio. The time-domain plot of this detection audio is shown below. Figure 3 As shown, the horizontal axis of this time-domain graph represents time, and the vertical axis represents the signal amplitude of the detected audio signal. The spectrum of the detected audio is shown below. Figure 4As shown, the horizontal axis of this spectrum graph represents the frequency of the audio signal being detected, and the vertical axis represents the amplitude of the audio signal being detected.

[0050] Traditional techniques detect the amplitude of a single-frequency signal and compare it with a set threshold to determine the sound leakage of that signal. However, single-frequency signals are more susceptible to interference from environmental noise or the user's own speech, leading to inaccurate detection and abnormal headphone fit results. In contrast, this application uses a wider detection frequency band within a preset range, making the results less susceptible to environmental interference. This allows for accurate detection of sound leakage in the audio signal collected by the headphones, thus accurately determining the headphone fit and improving the user experience.

[0051] Step 204: Obtain the internal detection signal corresponding to the detection audio through the feedback microphone, and obtain the external detection signal corresponding to the detection audio through the feedforward microphone.

[0052] The headphones can be in-ear headphones, on-ear headphones, over-ear headphones, etc., but are not limited to these. When the headphones are in-ear headphones, in-ear headphones also include ear tips. It is understood that the headphones mentioned above can be wireless headphones or wired headphones, such as in-ear wired headphones, on-ear wired headphones, over-ear wired headphones, in-ear wireless headphones, on-ear wireless headphones, over-ear wireless headphones, etc., but are not limited to these.

[0053] The headphones are in-ear headphones, including a feedback microphone and a feedforward microphone, and have an ear cap structure that fits snugly in the ear canal. The feedback microphone is used to detect audio signals inside the ear canal, while the feedforward microphone is used to detect audio signals from outside the headphones. The feedback microphone is also called the internal microphone, and the feedforward microphone is also called the external microphone.

[0054] Understandably, when a user wears in-ear noise-canceling headphones, the ear tips fit snugly against the ear canal. The detected audio can be played into the ear canal through the headphone's speaker, and the audio signal in the ear canal can be collected by the feedback microphone, while the audio signal from outside the headphones can be collected by the feedforward microphone.

[0055] In other embodiments, when a user wears over-ear noise-canceling headphones, the headphones have an earcup structure that covers the auricle. The detected audio can be played into the earcup through the headphone's speaker, and the audio signal inside the earcup can be collected through a feedback microphone, while the audio signal outside the earcup can be collected through a feedforward microphone.

[0056] The internal detection signal is the audio signal inside the user's ear canal collected by the headphone's feedback microphone. It can also be the audio signal inside the user's ear canal collected by the feedback microphone when the headphone is being worn and playing detection audio. The external detection signal is the audio signal outside the headphone collected by the feedforward microphone. It can also be the audio signal outside the headphone collected by the feedforward microphone when the headphone is being worn and playing detection audio.

[0057] Specifically, when the headphones play detection audio through the speaker, the headphone's feedback microphone collects the audio signal from the user's ear canal to obtain an internal detection signal. Furthermore, the headphone's feedforward microphone collects the audio signal from outside the headphone to obtain an external detection signal.

[0058] In one embodiment, acquiring the internal detection signal corresponding to the detection audio via a feedback microphone and acquiring the external detection signal corresponding to the detection audio via a feedforward microphone includes:

[0059] When worn, the internal detection signal corresponding to the detection audio is acquired through the feedback microphone, and the external detection signal corresponding to the detection audio is acquired through the feedforward microphone.

[0060] Specifically, when the headphones are worn by the user, the detection audio can be played into the ear canal through the headphones' speakers. The headphones' feedback microphone collects the audio signal in the user's ear canal to obtain an internal detection signal. Furthermore, while the detection audio is being played in this wearing state, the headphones' feedforward microphone collects the audio signal outside the headphones to obtain an external detection signal.

[0061] like Figure 5 The diagram shown is a circuit block diagram of an earphone in one embodiment. The feedback microphone can be an internal microphone, and the feedforward microphone can be an external microphone. The earphone includes an earphone housing, a speaker, an internal microphone, an external microphone, a digital signal processor, a storage circuit, and a power supply circuit. The speaker is used to play fit detection audio signals, music signals, and active noise cancellation (ANC) anti-phase noise signals. The internal and external microphones are used for signal acquisition for ANC (Active Noise Cancellation) and earphone fit detection algorithms. The audio signal processing chip circuit is used to run the ANC algorithm and the earphone fit detection algorithm. The storage circuit is used to store the PCM (Pulse Code Modulation) audio data of the fit detection audio source. The power supply circuit can power other hardware components, and the power source is the battery built into the earphone. The speaker can be a loudspeaker.

[0062] In this embodiment, the user actively triggers the headphone fit detection function through a control application on the terminal that detects the headphone fit. At this time, the headphones play the detection audio pre-stored on the headphone end, and the audio signals are collected in real time by the internal and external microphones and sent to the DSP (Digital Signal Processor) module to complete the fit detection calculation. The fit detection result is then transmitted to the terminal's control application via Bluetooth for display. Alternatively, other processors can be used instead of this digital signal processor.

[0063] Step 206: Determine the energy information corresponding to the internal detection signal, and determine the mutual information between the external detection signal and the detection audio.

[0064] Energy information refers to information related to the energy of the internal detection signal, which may include at least one of the following: the sum of signal amplitude values ​​at each frequency point, the sum of the squares of signal amplitude values ​​at each frequency point, or the integral of the squares of signal amplitude values ​​at each frequency point. Cross-correlation information is used to characterize the degree of cross-correlation between the external detection signal and the detected audio.

[0065] Specifically, the headphone's digital signal processor can calculate the energy information corresponding to the internal detection signal, and the digital signal processor can calculate the cross-correlation information between the external detection signal and the detection audio based on the external detection signal and the detection audio, thereby obtaining the external cross-correlation information.

[0066] In one embodiment, the headphone's digital signal processor can acquire the signal amplitude corresponding to each frequency point in the internal detection signal, and calculate the energy information based on the signal amplitude corresponding to each frequency point. Signal amplitude refers to the magnitude of the signal, which can be the instantaneous amplitude of the signal at a certain moment, or the peak amplitude of the signal. Peak amplitude refers to the square root of the energy of the entire signal.

[0067] In one embodiment, the headphone's digital signal processor can acquire the signal amplitude corresponding to each frequency point in the external detection signal and the signal amplitude corresponding to each frequency point in the detection audio, and calculate external cross-correlation information based on the signal amplitudes corresponding to the external detection signal and the signal amplitudes corresponding to the detection audio.

[0068] Step 208: Determine the sound leakage status of the headphones based on the reference energy information, energy information, reference mutual related information, and mutual related information.

[0069] The reference energy information refers to the energy information corresponding to the internal reference detection signal. The internal reference detection signal is the audio signal corresponding to the detection audio acquired by the headphone's feedback microphone in an anechoic environment, or it can be the audio signal obtained by the headphone's feedback microphone acquiring the played detection audio in a standard wearing state within an anechoic environment.

[0070] Reference cross-correlation information is used to characterize the degree of cross-correlation between the first reference detection signal and the second reference detection signal.

[0071] The first reference detection signal is the audio signal obtained by the feedforward microphone in a noise-canceling environment, which is picked up by the detection audio being played. Alternatively, it can be the audio signal obtained by the feedforward microphone of headphones in a noise-canceling environment and in a standard wearing state. The second reference detection signal is the corresponding audio signal obtained by the feedforward microphone in a noise-canceling environment, which is picked up by the detection audio being played. Alternatively, it can be the corresponding audio signal obtained by the feedforward microphone of headphones in a noise-canceling environment and in an unworn state.

[0072] Reference energy information and reference mutual information can be pre-stored in the headset or in a terminal device that communicates with the headset.

[0073] Reference energy information and reference mutual information can be pre-stored in the headphone's memory, and read from the memory when testing; alternatively, reference energy information and reference mutual information can be stored in a terminal device connected to the headphone, and obtained from the terminal device when the headphone performs testing.

[0074] The headphone's digital signal processor acquires reference energy information and reference cross-correlation information. Based on the reference energy information, energy information, reference cross-correlation information, and cross-correlation information, it calculates the fit of the headphone when it is worn, and determines the sound leakage status of the headphone when it is worn based on the fit.

[0075] In one embodiment, the digital signal processor can determine the weights corresponding to the reference energy information, energy information, reference cross-correlation information, and cross-correlation information, respectively. It then performs a weighted sum of the reference energy information, energy information, reference cross-correlation information, cross-correlation information, and their respective weights to obtain the fit of the headphones when worn. This fit characterizes the sound leakage of the headphones when worn. A higher fit results in less sound leakage, while a lower fit results in more sound leakage.

[0076] In one embodiment, the digital signal processor can determine the energy correlation between reference energy information and energy information, and the cross-correlation correlation between reference mutual related information and mutual related information, and calculate the fit of the headphones when worn based on the energy correlation and cross-correlation correlation. The energy correlation can be characterized by the ratio or difference between reference energy information and energy information, and the cross-correlation correlation can be characterized by the ratio or difference between reference mutual related information and mutual related information.

[0077] In this embodiment, the headphones play detection audio. An internal detection signal corresponding to the detection audio is acquired through a feedback microphone, and an external detection signal corresponding to the detection audio is acquired through a feedforward microphone. This allows for simultaneous acquisition of signals from both inside the ear canal and outside the headphones using different microphones. By determining the cross-correlation between the acquired external detection signal and the detection audio, the degree of cross-correlation between the detected external signal and the original detection audio can be determined. Combining reference energy information, internal energy information, reference cross-correlation information, and external cross-correlation information, the sound leakage status of the headphones while they are being worn can be accurately detected. Furthermore, using the audio signals acquired by the feedback and feedforward microphones to calculate the sound leakage status of the headphones eliminates the need for additional hardware, saving hardware costs.

[0078] In one embodiment, a detection method is provided, applied to headphones, comprising:

[0079] Play the detection audio; acquire the internal detection signal corresponding to the detection audio through the feedback microphone; determine the energy information corresponding to the internal detection signal; acquire reference energy information; and determine the sound leakage status of the headphones based on the reference energy information and the energy information.

[0080] The ratio or difference between the reference energy information and the actual energy information can be determined, and this ratio or difference can be used as the headphone's fit. The headphone's fit characterizes its sound leakage.

[0081] In one embodiment, an energy weight can be obtained, and the sound leakage status of the headphones can be determined based on the energy weight, reference energy information, and energy information. The ratio between the reference energy information and the energy information can be calculated, and the product of this ratio and the energy weight is used as the headphone fit. The headphone fit characterizes the sound leakage status of the headphones.

[0082] In one embodiment, acquiring the internal detection signal corresponding to the detection audio via a feedback microphone includes: acquiring the internal detection signal corresponding to the detection audio via a feedback microphone while in a wearing state.

[0083] In this embodiment, the internal detection signal corresponding to the detected audio is acquired through a feedback microphone to determine the energy information corresponding to the internal detection signal. Based on the determined energy information and reference energy information, the sound leakage status of the headphones can be accurately determined with minimal computation. Furthermore, the sound leakage status of the headphones can be detected based on the signal collected by the feedback microphone, eliminating the need for additional hardware and saving hardware costs.

[0084] In one embodiment, a detection method is provided, applied to headphones, comprising:

[0085] Play the detection audio; acquire the external detection signal corresponding to the detection audio through the feedforward microphone; determine the cross-correlation between the external detection signal and the detection audio; acquire the reference cross-correlation, and determine the sound leakage status of the headphones based on the reference cross-correlation and the cross-correlation.

[0086] The ratio or difference between the reference cross-correlation information and the cross-correlation information can be determined, and this ratio or difference can be used as the headphone fit. The headphone fit characterizes the sound leakage of the headphone.

[0087] In one embodiment, cross-correlation weights can be obtained, and the sound leakage status of the headphones can be determined based on the cross-correlation weights, reference cross-correlation information, and cross-correlation information. The ratio between the reference cross-correlation information and the cross-correlation information can be calculated, and the difference between a preset coefficient and this ratio can be calculated. The product of this difference and the cross-correlation weights is used as the headphone fit. The headphone fit characterizes the sound leakage status of the headphones.

[0088] In one embodiment, acquiring the external detection signal corresponding to the detection audio via a feedforward microphone includes: acquiring the external detection signal corresponding to the detection audio via a feedforward microphone while in a wearing state.

[0089] In this embodiment, an external detection signal corresponding to the detection audio is acquired through a feedforward microphone. The cross-correlation between the acquired external detection signal and the detection audio is determined, revealing the degree of cross-correlation between the detected external signal and the original detection audio. Based on the cross-correlation information and a reference cross-correlation information, the sound leakage status of the headphones while worn can be accurately detected with minimal computation. Furthermore, the sound leakage status of the headphones can be detected based solely on the signal acquired by the feedforward microphone, eliminating the need for additional hardware and saving hardware costs.

[0090] In one embodiment, a detection method is provided, applied to headphones, comprising:

[0091] Play detection audio; when worn, acquire the internal detection signal corresponding to the detection audio through the headphone's feedback microphone, and acquire the first external detection signal corresponding to the detection audio through the headphone's feedforward microphone; when not worn, acquire the second external detection signal corresponding to the detection audio through the feedforward microphone; determine the internal energy information corresponding to the internal audio signal, and determine the external cross-correlation information between the first and second external audio signals; acquire reference energy information and reference cross-correlation information, and determine the sound leakage status of the headphone when worn based on the reference energy information, internal energy information, reference cross-correlation information, and external cross-correlation information.

[0092] The first external detection signal is the audio signal from outside the headphones, collected by the feedforward microphone when the headphones are being worn and playing the detection audio. The second external detection signal is the audio signal from outside the headphones, collected by the feedforward microphone when the headphones are not being worn and playing the detection audio.

[0093] External cross-correlation information is used to characterize the degree of cross-correlation between the first external detection signal and the second external detection signal.

[0094] Specifically, when the headphones are not being worn, detection audio is played through the speaker, and the headphones acquire external audio signals through the feedforward microphone to obtain a second external detection signal.

[0095] Specifically, the headphone's digital signal processor can calculate the energy information corresponding to the internal detection signal, i.e., the internal energy information. The headphone's digital signal processor can also calculate the cross-correlation information between the first and second external detection signals based on the first and second external detection signals, thus obtaining the external cross-correlation information.

[0096] In one embodiment, the headphone's digital signal processor can acquire the signal amplitude corresponding to each frequency point in the first external detection signal and the signal amplitude corresponding to each frequency point in the second external detection signal, and calculate external cross-correlation information based on the signal amplitudes corresponding to the first external detection signal and the signal amplitudes corresponding to the second external detection signal.

[0097] In one embodiment, when not wearing a mask, acquiring a second external detection signal corresponding to the detected audio via a feedforward microphone includes:

[0098] When not wearing a device, the system acquires the playback detection audio through a feedforward microphone to obtain the corresponding audio signal; the audio signal acquired by the feedforward microphone is then subjected to a second filtering process to obtain the second external detection signal.

[0099] The second filtering process is used to separate mid-to-low frequency signals from the audio signal being detected. In the unworn state, the mid-to-low frequency signals separated from the audio signal acquired by the feedforward microphone serve as the second external detection signal. Specifically, the second filtering process includes one of the following: high-pass filtering, low-pass filtering, band-pass filtering, and band-stop filtering. High-pass filtering utilizes the frequency characteristics of the filter to allow high-frequency signals to pass while blocking low-frequency signals. Band-stop filtering blocks signals within a certain frequency range while allowing signals within other frequency ranges to pass. Band-pass filtering allows signals within a certain frequency range while blocking signals within other frequency ranges. Band-pass and band-stop filtering are complementary.

[0100] Specifically, the detection audio is a mixed signal composed of an ultra-low frequency single-frequency signal and a mid-low frequency signal. When the headphones are not worn, the detection audio is played through the speaker. The headphone's feedforward microphone collects the audio signal from outside the headphones. The headphone's digital signal processor performs a second filtering process on the audio signal to separate the ultra-low frequency signal, thus obtaining the second external detection signal.

[0101] In one embodiment, the digital signal processor can determine the weights corresponding to reference energy information, internal energy information, reference cross-correlation information, and external cross-correlation information, respectively. It then performs a weighted sum of these weights to obtain the fit of the headphones when worn. This fit characterizes the sound leakage of the headphones when worn. A higher fit results in less sound leakage, while a lower fit results in more sound leakage.

[0102] In one embodiment, the digital signal processor can determine the energy correlation between reference energy information and internal energy information, as well as the cross-correlation correlation between reference cross-correlation information and external cross-correlation information, and calculate the fit of the headphones when worn based on the energy correlation and cross-correlation correlation. The energy correlation can be characterized by the ratio or difference between the reference energy information and internal energy information, and the cross-correlation correlation can be characterized by the ratio or difference between the reference cross-correlation information and external cross-correlation information.

[0103] In this embodiment, when the headphones are worn, detection audio is played. The feedback microphone of the headphones collects audio signals from inside the ear canal, while the feedforward microphone collects external audio signals, resulting in different audio signals collected by different microphones under the same conditions. When the headphones are not worn, detection audio is played, and the feedforward microphone collects external audio signals, allowing for the calculation of the cross-correlation between the two types of external audio signals collected by the same microphone in the worn and unworn states. By determining the energy information corresponding to the audio signal inside the ear canal and combining it with reference energy information, internal energy information, reference cross-correlation information, and external cross-correlation information, the sound leakage status of the headphones when worn can be accurately detected. Furthermore, using the audio signals collected by the feedback and feedforward microphones to calculate the sound leakage status of the headphones eliminates the need for additional hardware, saving hardware costs.

[0104] In one embodiment, determining the energy information corresponding to the internal detection signal includes:

[0105] The internal detection signal is divided into multiple signal segments; for each signal segment, the segment energy value is determined according to the signal amplitude corresponding to each frequency point in the corresponding signal segment; based on the segment energy value corresponding to each signal segment, the energy information corresponding to the internal detection signal is determined.

[0106] Here, segment energy value refers to the energy value corresponding to a signal segment.

[0107] Specifically, the headphone's digital signal processor can divide the internally detected signal into multiple signal segments, where "multiple" refers to at least two. Furthermore, the digital signal processor can acquire a window function, which is used to divide the internally detected signal into multiple signal segments, each segment representing an audio signal at a different time point.

[0108] For each of multiple signal segments, the digital signal processor (DSP) acquires the signal amplitude at each frequency point within the segment and calculates the segment energy value based on the signal amplitude at each frequency point. Following the same processing method, the DSP can calculate the segment energy value for each signal segment.

[0109] A digital signal processor can sum the energy values ​​of each segment to obtain the energy value corresponding to the internal detection signal, and use this energy value as energy information.

[0110] In one embodiment, the digital signal processor can obtain the weights corresponding to the energy of each segment, sum the products of the energy values ​​of each segment and their corresponding weights to obtain the energy value corresponding to the internal detection signal, and use the energy value as energy information.

[0111] In one embodiment, the digital signal processor (DSP) can smooth the energy values ​​of each segment to obtain smoothed energy values ​​for each segment. The DSP can then sum the smoothed energy values ​​of each segment to obtain the total energy value. Alternatively, the DSP can calculate the total energy value by summing the products of the smoothed energy values ​​and their corresponding weights for each segment, corresponding to the respective weights.

[0112] For example, in the energy calculation method, let w(n) be a window function and N be the window length. The window length can be set according to requirements. Then the expression for a rectangular window is as follows:

[0113]

[0114] Define the segment energy X of the internal detection signal at time n. n :

[0115]

[0116] For the obtained Xn Smoothing is performed, that is:

[0117] X n (M)=α*X n (m-1)+(1-α)*X n (m), 0 < α < 1

[0118] Among them, X n (m) represents the energy of the current segment before smoothing, X n (M) represents the energy of the current segment after smoothing. X n (m-1) represents the energy of the previous segment, X n (m) represents the energy of the current segment, α represents the weight of the energy of the previous segment, and (1-α) represents the weight of the energy of the current segment.

[0119] In this embodiment, the internal detection signal is divided into multiple signal segments. For each signal segment, the segment energy value in the time domain is accurately calculated based on the signal amplitude corresponding to each frequency point in the corresponding signal segment. Based on the segment energy value corresponding to each signal segment, the energy information corresponding to the internal detection signal can be accurately calculated, thereby accurately determining the energy information of the internal detection signal in the time domain.

[0120] In one embodiment, such as Figure 6 As shown, the cross-correlation information between the external detection signal and the detection audio is determined, including:

[0121] Step 602: Determine the first energy value and the first average amplitude of the external detection signal based on the signal amplitude corresponding to each frequency point in the external detection signal.

[0122] Specifically, the headphone's digital signal processor can acquire the signal amplitude corresponding to each frequency point in the external detection signal, and sum the signal amplitudes corresponding to each frequency point to obtain a first energy value. Alternatively, it can perform a weighted summation of the signal amplitudes corresponding to each frequency point to obtain the first energy value.

[0123] The headphone's digital signal processor can determine the number of frequency points in the external detection signal, and use the ratio of the sum of the signal amplitudes corresponding to each frequency point to the number of frequency points as the first average amplitude of the external detection signal. Alternatively, the ratio of the first energy value obtained by weighted summation of the signal amplitudes of each frequency point to the number of frequency points can be used as the first average amplitude.

[0124] In one embodiment, determining the first energy value corresponding to the external detection signal based on the signal amplitude corresponding to each frequency point in the external detection signal includes: dividing the external detection signal into multiple external signal segments; for each of the multiple external signal segments, determining the external segment energy value corresponding to the corresponding external signal segment based on the signal amplitude corresponding to each frequency point in the corresponding external signal segment; and determining the first energy value corresponding to the external detection signal based on the external segment energy value corresponding to each external signal segment. The specific processing method is similar to the process of determining the energy information corresponding to the internal detection signal described above, and will not be repeated here.

[0125] Step 604: Determine the second energy value and the second amplitude mean of the detected audio based on the signal amplitude corresponding to each frequency point in the detected audio.

[0126] Specifically, the headphone's digital signal processor can acquire the signal amplitude corresponding to each frequency point in the detected audio, and sum the signal amplitudes corresponding to each frequency point to obtain a second energy value. Alternatively, it can perform a weighted summation of the signal amplitudes corresponding to each frequency point to obtain the second energy value.

[0127] The headphone's digital signal processor can determine the number of frequency points in the detected audio, and use the ratio of the sum of the signal amplitudes corresponding to each frequency point to the number of frequency points as the second amplitude mean for the detected audio. Alternatively, the ratio of the second energy value obtained by weighted summation of the signal amplitudes of each frequency point to the number of frequency points can be used as the second amplitude mean.

[0128] In one embodiment, determining the second energy value corresponding to the detected audio based on the signal amplitude corresponding to each frequency point in the detected audio includes: dividing the detected audio into multiple signal segments; for each signal segment, determining the segment energy value corresponding to the corresponding signal segment based on the signal amplitude corresponding to each frequency point in the corresponding signal segment; and determining the second energy value corresponding to the detected audio based on the segment energy value corresponding to each signal segment. The specific processing method is similar to the process of determining the energy information corresponding to the internal detection signal described above, and will not be repeated here.

[0129] Step 606: Based on the first energy value, the first amplitude average, the second energy value, and the second amplitude average, determine the cross-correlation information between the external detection signal and the detection audio.

[0130] Specifically, the headphone's digital signal processor calculates the cross-correlation value between the external detection signal and the detected audio based on a first energy value, a first average amplitude value, a second energy value, and a second average amplitude value. This cross-correlation value can be used to characterize the cross-correlation information between the external detection signal and the detected audio.

[0131] In this embodiment, the first energy value and the first amplitude mean of the external detection signal, and the second energy value and the second amplitude mean of the detection audio are calculated. The energy value and the amplitude mean can be used as conditions for calculating the correlation between the external detection signal and the detection audio, which fully considers various influencing factors and makes the calculation of the cross-correlation between the two more accurate.

[0132] In one embodiment, determining the cross-correlation between the external detection signal and the detection audio based on a first energy value, a first average amplitude, a second energy value, and a second average amplitude includes:

[0133] Based on the first energy value, the first amplitude mean, the second energy value, and the second amplitude mean, calculate the expected value between the external detection signal and the detection audio; calculate the first squared value of the difference between the first energy value and the first amplitude mean, and the second squared value of the difference between the second energy value and the second amplitude mean; determine the square root of the product between the expected value of the first squared value and the expected value of the second squared value, and use the ratio of the expected value to the square root as the cross-correlation information between the external detection signal and the detection audio.

[0134] Specifically, the headphone's digital signal processor determines the difference between the first energy value and the first amplitude mean, and calculates the difference between the second energy value and the second amplitude mean. The digital signal processor then calculates the expected value of the product of the two differences to obtain the expected value between the external detection signal and the detected audio.

[0135] The digital signal processor (DSP) calculates the first squared value of the difference between a first energy value and a first mean amplitude, and the second squared value of the difference between a second energy value and a second mean amplitude. The DSP calculates the product of the expected value of the first squared value and the expected value of the second squared value, and takes the square root of this product. The DSP calculates the ratio of the expected value to the square root, and uses this ratio as the cross-correlation value between the external detection signal and the detection audio. This cross-correlation value characterizes the cross-correlation information between the external detection signal and the detection audio.

[0136] For example, the digital signal processor of an earphone calculates the cross-correlation value using the following formula:

[0137]

[0138] Where, p ij Let s be the cross-correlation value between audio signal i and audio signal j. i (t) represents the energy value corresponding to audio signal i, s j (t) represents the energy value corresponding to the audio signal j. E(s) i (t) represents the mean amplitude of the audio signal i, E(s) j (t) represents the mean amplitude of the audio signal j. E[(s)]i (t)-E(s i (t)))(s j (t)-E(s j [(t)))] represents the expected values ​​of audio signal i and audio signal j.

[0139] The cross-correlation value satisfies |p ij |≤1, when p ij When = 0, it means s i (t) and s j (t) is uncorrelated; when 0 < |p ij When | < 1, it means s i (t) and s j (t) correlated; when |p ij When |=1, it means s i (t) and s j (t) is perfectly correlated.

[0140] When calculating the cross-correlation value between the external detection signal and the detection audio, the external detection signal can be taken as i, the detection audio as j, and the first energy value as s. i (t),

[0141] The first mean magnitude is used as E(s) i (t)); take the second energy value as s j (t), the second amplitude mean is used as E(s) j Substituting (t) into the above formula, the cross-correlation value p can be calculated. ij .

[0142] In this embodiment, based on the first energy value, the first average amplitude, the second energy value, and the second average amplitude, the expected value between the external detection signal and the detection audio is calculated. The first squared value of the difference between the first energy value and the first average amplitude, and the second squared value of the difference between the second energy value and the second average amplitude are calculated. The square root of the product between the expected value of the first squared value and the expected value of the second squared value is determined. The ratio of the expected value to the square root is used as the cross-correlation information between the external detection signal and the detection audio, thereby enabling accurate calculation of the degree of cross-correlation between the external detection signal and the detection audio.

[0143] In one embodiment, obtaining reference energy information includes:

[0144] In an anechoic environment, the playback audio is collected by the feedback microphone of the headphones in a standard wearing state to obtain the corresponding internal reference detection signal; this standard wearing state represents the seamless fit between the headphones and the test fixture; and the reference energy information corresponding to the internal reference detection signal is determined.

[0145] The test fixture is a tool used to assist in testing the sound leakage status of headphones. The standard wearing condition characterizes the seamless fit between the headphones and the test fixture when worn. The test fixture can be configured as follows: Figure 7 As shown, an anechoic environment refers to an environment free from external noise interference.

[0146] In one embodiment, the standard wearing state characterizes the state in which the headphones fit seamlessly between the headphones and the artificial head's ear or a real human ear when the headphones are worn.

[0147] Specifically, in an anechoic environment, the headphones are placed within the acoustic coupling cavity of the test fixture, ensuring a seamless fit between the headphones and the fixture to guarantee good sealing and achieve standard wearing conditions. Audio is played in the anechoic environment, and the audio signal within the acoustic coupling cavity of the test fixture is collected via the headphones' feedback microphone to obtain an internal reference detection signal. A digital signal processor can then calculate the energy information corresponding to this internal reference detection signal, i.e., the reference energy information.

[0148] In one embodiment, an audio signal in the acoustic coupling cavity of the test fixture is acquired through the feedback microphone of the headphones, and the acquired audio signal is subjected to a first filtering process to obtain an internal reference detection signal.

[0149] In one embodiment, the digital signal processor can acquire the signal amplitude corresponding to each frequency point in the internal reference detection signal, and calculate the reference energy information based on the signal amplitude corresponding to each frequency point. Further, the digital signal processor can sum or perform a weighted summation of the signal amplitudes at each frequency point to obtain a reference energy value, and use this reference energy value as the reference energy information.

[0150] In one embodiment, determining the reference energy information corresponding to the internal reference detection signal includes: dividing the internal reference detection signal into multiple internal signal segments; for each internal signal segment, determining the internal segment energy value corresponding to the corresponding internal signal segment based on the signal amplitude corresponding to each frequency point in the corresponding internal signal segment; and determining the reference energy information corresponding to the internal reference detection signal based on the internal segment energy value corresponding to each internal signal segment. The specific processing method is similar to the above-described process for determining the energy information corresponding to the internal detection signal, and will not be repeated here.

[0151] In this embodiment, in an anechoic environment, the playback audio is collected by the feedback microphone of the headphones in a standard wearing state to obtain the corresponding internal reference detection signal. This standard wearing state represents a seamless fit between the headphones and the test fixture, enabling the acquisition of audio signals for the detection audio without external interference and with the headphones in a standard wearing state. This results in a more accurate internal reference detection signal and more precise reference energy information corresponding to the calculated internal reference detection signal. Furthermore, using the energy information obtained under the standard wearing state without external interference as reference information allows for comparison with the energy information obtained under the wearing state with external interference. Using both as conditions for detecting sound leakage in the headphones under wearing conditions improves the accuracy of the detection results.

[0152] In one embodiment, such as Figure 8 As shown, obtain reference mutual related information, including:

[0153] Step 802: In an anechoic environment, the detection audio played is acquired through the feedforward microphone of the headphones in the standard wearing state to obtain the corresponding first reference detection signal; the standard wearing state represents the seamless fit between the headphones and the test fixture.

[0154] Specifically, in an anechoic environment, the headphones are placed in the acoustic coupling cavity of the test fixture, ensuring a seamless fit between the headphones and the fixture to guarantee good sealing and achieve a standard wearing condition. Audio is played in the anechoic environment, and the audio signal in the acoustic coupling cavity of the test fixture is collected through the headphone's feedforward microphone to obtain the first reference detection signal.

[0155] In one embodiment, an audio signal in the acoustic coupling cavity of the test fixture is acquired through a feedforward microphone of an earphone, and the acquired audio signal is subjected to a second filtering process to obtain a first reference detection signal.

[0156] In one embodiment, the standard wearing state characterizes the state in which the headphones fit seamlessly between the headphones and the artificial head's ear or a real human ear when the headphones are worn.

[0157] Step 804: In an anechoic environment, the detection audio played is acquired through the feedforward microphone of the headphones when they are not being worn, and the corresponding second reference detection signal is obtained.

[0158] The "unworn" state refers to placing the headphones in a free sound field, without any seal, and with full leakage.

[0159] Specifically, in an anechoic environment, the speaker of an earphone that is not being worn plays a detection audio signal, and the audio signal of the played detection audio is acquired by the earphone's feedforward microphone to obtain a second reference detection signal.

[0160] Furthermore, the audio signal of the detected audio being played is acquired through the feedforward microphone of the headphones, and the acquired audio signal is subjected to a second filtering process to obtain a second reference detection signal.

[0161] Step 806: Determine the reference cross-correlation information between the first reference detection signal and the second reference detection signal.

[0162] The reference cross-correlation information is used to characterize the degree of cross-correlation between the first external audio signal and the second external audio signal. Specifically, the reference cross-correlation information can be a reference cross-correlation value.

[0163] Specifically, the headphone's digital signal processor can calculate the cross-correlation information between the first and second reference detection signals based on the first and second reference detection signals to obtain the reference cross-correlation information. Further, the digital signal processor can acquire the signal amplitude corresponding to each frequency point in the first and second reference detection signals, and calculate the reference cross-correlation information based on the signal amplitudes corresponding to the first and second reference detection signals.

[0164] In one embodiment, determining the reference cross-correlation information between the first reference detection signal and the second reference detection signal includes:

[0165] Based on the signal amplitude corresponding to each frequency point in the first reference detection signal, determine the first reference energy value and the first reference amplitude mean of the first reference detection signal; based on the signal amplitude corresponding to each frequency point in the second reference detection signal, determine the second reference energy value and the second reference amplitude mean of the second reference detection signal; based on the first reference energy value, the first reference amplitude mean, the second reference energy value, and the second reference amplitude mean, determine the reference cross-correlation information between the first reference detection signal and the second reference detection signal.

[0166] In one embodiment, determining the reference cross-correlation information between the first reference detection signal and the second reference detection signal based on the first reference energy value, the first reference amplitude average, the second reference energy value, and the second reference amplitude average includes:

[0167] Based on the first reference energy value, the first reference amplitude mean, the second reference energy value, and the second reference amplitude mean, calculate the reference expectation value between the first reference detection signal and the second reference detection signal; calculate the first reference square value of the difference between the first reference energy value and the first reference amplitude mean, and the second reference square value of the difference between the second reference energy value and the second reference amplitude mean; determine the square root of the product between the expectation of the first reference square value and the expectation of the second reference square value, and use the ratio of the reference expectation value to the square root as the reference cross-correlation information between the first reference detection signal and the second reference detection signal.

[0168] It is understandable that the specific processing procedure for referencing mutual related information is similar to the process for determining the mutual related information between the external detection signal and the detection audio, and will not be repeated here.

[0169] In this embodiment, in an anechoic environment, the detection audio played in both the standard wearing state and the no-wearing state is collected by the feedforward microphone of the headphones. The external audio signal collected in the standard wearing state and the external audio signal collected in the no-wearing state can be obtained. The cross-correlation between the audio signals detected in these two states can be calculated to detect the degree of leakage of the headphone to the sound signal, thereby further improving the accuracy of the detection results.

[0170] In one embodiment, determining the sound leakage status of the headphones while they are being worn, based on reference energy information, internal energy information, reference cross-correlation information, and external cross-correlation information, includes:

[0171] Confirm the energy weight and cross-correlation weight; based on the reference energy information, internal energy information, reference cross-correlation information, external cross-correlation information, energy weight, and cross-correlation weight, determine the sound leakage status of the headphones when they are worn.

[0172] Among them, energy weight refers to the weight corresponding to energy information, and cross-correlation weight refers to the weight corresponding to cross-correlation information.

[0173] Specifically, the digital signal processor (DSP) can acquire energy weights and cross-correlation weights. The DSP can determine the energy correlation between reference energy information and energy information, as well as the cross-correlation correlation between reference cross-correlation information and cross-correlation information, and then apply these energy correlation and cross-correlation correlation values. Based on the energy correlation, energy weights, cross-correlation correlation values, and cross-correlation weights, the sound leakage status of the headphones when worn is determined. This fit is used to determine the sound leakage status of the headphones when worn, or to characterize the sound leakage status of the headphones when worn.

[0174] In one embodiment, the digital signal processor can acquire energy weights and cross-correlation weights. It determines the energy weights corresponding to the reference energy information and the internal energy information, and determines the cross-correlation weights corresponding to the reference cross-correlation information and the cross-correlation information. The reference energy information, the internal energy information, the reference cross-correlation information, the cross-correlation information, and their respective weights are then weighted and summed to obtain the fit of the headphones when worn.

[0175] In this embodiment, different weights are assigned to the reference energy information, energy information, reference mutual related information, and mutual related information, so that the degree of attention paid to the reference energy information, energy information, reference mutual related information, and mutual related information varies. More weight is assigned to key information and less weight is assigned to non-key information, which can further improve the accuracy of detecting sound leakage in the headphones when they are worn.

[0176] In one embodiment, determining the sound leakage status of the headphones based on reference energy information, energy information, reference cross-correlation information, cross-correlation information, energy weight, and cross-correlation weight includes:

[0177] Determine the energy ratio between the energy information and the reference energy information, and the cross-correlation ratio between the cross-correlation information and the reference cross-correlation information; determine the difference between the preset coefficient and the cross-correlation ratio, and use the sum of the product of the energy ratio and the energy weight, and the product of the difference and the cross-correlation weight, as the fit of the headphones when worn; this fit characterizes the sound leakage of the headphones when worn.

[0178] Specifically, the headphone's digital signal processor calculates the energy ratio between the energy information and the reference energy information, which characterizes the energy correlation between the two. The digital signal processor also calculates the cross-correlation ratio between the mutual related information and the reference cross-correlation information, and calculates the difference between a preset coefficient and the cross-correlation ratio; this difference or cross-correlation ratio characterizes the cross-correlation correlation between the mutual related information and the reference cross-correlation information.

[0179] The digital signal processor calculates the product of the energy ratio and the energy weight, and the product of the difference and the cross-correlation weight. The sum of these two products yields the headphone's fit when worn. This fit characterizes the sound leakage of the headphones when worn; a higher fit results in less sound leakage, and a lower fit results in more sound leakage.

[0180] In one embodiment, the sum of the energy weight and the cross-correlation weight is equal to a preset coefficient. For example, if the energy weight is alpha, the cross-correlation weight is beta, and the preset coefficient is 1, then the following relationship is satisfied:

[0181] alpha + beta = 1;

[0182] Digital signal processors can calculate the fit using the following formula:

[0183] Gr=Pn / Png*alpha+(1-Qn / Qng); 0 <Gr≤1

[0184] Where Gr represents the fit, Pn represents the energy information, Png represents the reference energy information, Qn represents the cross-correlation information, and Qng represents the reference cross-correlation information.

[0185] In this embodiment, the energy ratio between the energy information and the reference energy information, and the cross-correlation ratio between the cross-correlation information and the reference cross-correlation information are determined. The difference between the preset coefficient and the cross-correlation ratio is determined. The sum of the product of the energy ratio and the energy weight, and the product of the difference and the cross-correlation weight, is used as the fit of the headphones when they are worn. The fit can characterize the sound leakage of the headphones when they are worn, thereby accurately detecting the sound leakage of the headphones.

[0186] In one embodiment, the detected audio is mixed audio; the internal detection signal corresponding to the detected audio is acquired through a feedback microphone, including:

[0187] The audio signal corresponding to the detection audio is acquired through a feedback microphone; the audio signal acquired by the feedback microphone is subjected to a first filtering process to obtain an internal detection signal within the first frequency band.

[0188] The external detection signal corresponding to the detection audio is acquired through a feedforward microphone, including:

[0189] The audio signal corresponding to the detection audio is acquired by a feedforward microphone; the audio signal acquired by the feedforward microphone is subjected to a second filtering process to obtain an external detection signal within the second frequency band range; the upper limit of the first frequency band range is less than the lower limit of the second frequency band range.

[0190] The first filtering process is used to separate the ultra-low frequency signal from the audio signal of the detected audio, which is the internal detection signal. The second filtering process is used to separate the mid-low frequency signal from the audio signal of the detected audio. The mid-low frequency signal separated from the audio signal collected by the feedforward microphone is the external detection signal, or, when worn, the mid-low frequency signal separated from the audio signal collected by the feedforward microphone is the external detection signal.

[0191] The first filtering process specifically includes one of the following: high-pass filtering, low-pass filtering, band-pass filtering, and band-stop filtering. The second filtering process specifically includes one of the following: high-pass filtering, low-pass filtering, band-pass filtering, and band-stop filtering.

[0192] Specifically, the detection audio is an audio signal composed of a mixture of signals from different frequency bands, specifically a mixture of signals within a first frequency band and signals within a second frequency band. The upper limit of the first frequency band is lower than the lower limit of the second frequency band. For example, it is a mixed signal composed of an ultra-low frequency single-frequency signal and a mid-low frequency signal. When the headphones are worn by the user, the detection audio is played, and the headphones' feedback microphone collects the audio signal from the user's ear canal. Then, the headphones' digital signal processor performs a first filtering process on the audio signal to separate the ultra-low frequency signal, thus obtaining the internal detection signal. Simultaneously, the headphones' feedforward microphone collects the audio signal from outside the headphones, and the headphones' digital signal processor performs a second filtering process on this audio signal to separate the ultra-low frequency signal, thus obtaining the external detection signal.

[0193] The second filtering process differs from the first filtering process. The first filtering process is used to separate ultra-low frequency signals, while the second filtering process is used to separate mid-to-low frequency signals. It can be understood that the first and second filtering processes can be of the same type, such as bandpass filtering, i.e., a first bandpass filter and a second bandpass filter. However, the first bandpass filter allows ultra-low frequency signals to pass while blocking signals in other frequency ranges, while the second bandpass filter allows mid-to-low frequency signals to pass while blocking signals in other frequency ranges.

[0194] In one embodiment, acquiring the audio signal corresponding to the detected audio through the feedback microphone includes: in the wearing state, acquiring the audio signal corresponding to the detected audio through the feedback microphone of the headphones;

[0195] The audio signal corresponding to the detected audio is acquired through a feedforward microphone, including: when wearing the device, the audio signal corresponding to the detected audio is acquired through a feedforward microphone.

[0196] For example, Figure 9 This is a schematic diagram of a bandpass filter a filtering a signal in one embodiment. Figure 9 In the coordinate system, the horizontal axis represents the signal input to bandpass filter a, and the vertical axis represents the attenuation magnitude of the input signal by bandpass filter a. For example, if the signal input to bandpass filter a is 10... -2 kHz, or 10Hz, corresponds to an attenuation of 0, so the signal output by bandpass filter a is still a 10Hz signal; the signal on the horizontal axis is 10. -1 If 100Hz is the frequency of the bandpass filter a, and the attenuation amplitude corresponding to the vertical axis is -30, then the signal output by the bandpass filter a is a 70Hz signal.

[0197] Figure 10 This is a schematic diagram illustrating how bandpass filter b filters a signal. Bandpass filter a is different from bandpass filter b. Figure 10 In the coordinate system, the horizontal axis represents the signal input to the bandpass filter b, and the vertical axis represents the attenuation of the input signal by the bandpass filter b.

[0198] from Figure 9 , Figure 10 As can be seen from the data, bandpass filter a and bandpass filter b have different attenuation amplitudes for the same signal. For example, bandpass filter b attenuates a 100Hz signal by approximately -21dB, while bandpass filter b attenuates a 100Hz signal by approximately -30dB. Therefore, bandpass filter a and bandpass filter b can be used to filter out the desired ultra-low frequency and mid-low frequency signals.

[0199] In this embodiment, while the headphones are being worn, the played detection audio is acquired through the headphone's feedback microphone and feedforward microphone, respectively, to obtain the corresponding audio signals. The audio signals acquired by the feedback and feedforward microphones are then subjected to appropriate filtering processes to separate the mid-to-low frequency and mid-to-low frequency signals from the audio signals. The separated signals are less susceptible to external environmental interference, resulting in more accurate data acquisition. While the headphones are being worn, the two microphones acquire audio signals from inside and outside the headphones respectively. The audio signal acquired by the feedback microphone is closer to the signal in the human ear canal, while the signal acquired by the feedforward microphone is closer to the audio signal leaking from the headphones. Therefore, combining the audio data from inside and outside the headphones allows for accurate detection of sound leakage, improving the accuracy of the detection results.

[0200] In one embodiment, before playing the detected audio, the method further includes:

[0201] The current ambient noise is collected by the feedforward microphone of the headphones to obtain the corresponding noise signal; the signal amplitude corresponding to each frequency point in the noise signal is determined, and the current noise value corresponding to the current ambient noise is determined based on the signal amplitude corresponding to each frequency point; if the current noise value is lower than the noise threshold, the frequency response of the headphones is calibrated.

[0202] Frequency response calibration refers to calibrating the frequency response. In electronics, frequency response describes the difference in an instrument's ability to process signals of different frequencies. Frequency response, also known as the gain curve, is the curve showing how gain changes with frequency. Every audio device or medium has its own frequency response curve. A medium refers to the object that records sound signals. An ideal frequency response curve should be flat, meaning the sound signal should pass through without distortion.

[0203] Specifically, factors such as acoustic components and assembly processes affect the frequency response of headphones. Therefore, the frequency response curve needs to be calibrated before detecting sound leakage. Since headphone frequency response calibration requires a quiet environment, ambient noise is collected using the headphone's feedforward microphone before calibration to obtain the corresponding noise signal. During noise signal acquisition, the headphone's digital signal processor detects the signal amplitude at each frequency point in the collected noise signal and calculates the current noise value based on the signal amplitude at each frequency point. This current noise value represents the signal strength of the current ambient noise. The digital signal processor obtains a preset noise threshold and compares the current noise value with the threshold. If the current noise value is not lower than the threshold, it indicates that the current ambient noise is significant and not suitable for headphone frequency response calibration. The user is then prompted to move to a quiet environment suitable for calibration. If the current noise value is lower than the threshold, it indicates that the current environment is relatively quiet and suitable for headphone frequency response calibration. The headphone frequency response calibration operation is then performed. This calibration operation can be triggered by the user or performed automatically by the headphone.

[0204] For example, the calculation method for determining the current ambient noise intensity is as follows:

[0205] Let the amplitude of the current ambient noise signal be V, where V is a non-negative number.

[0206] Q(m)=β*Q(m-1)+(1-β)*V; 0<β<1

[0207] Where Q(m) is the noise value of the current environment, and β is the weighting coefficient.

[0208] In this embodiment, detecting the noise level of the current ambient noise automatically helps the user determine whether the current environment is suitable for frequency response calibration of the headphones. Performing frequency response calibration when the current noise level is below the noise threshold avoids the influence of ambient noise, especially sudden noise, on the frequency response calibration of the headphones, thereby improving the accuracy of the frequency response calibration and significantly improving the accuracy of fit detection, thus enhancing the user experience.

[0209] In one embodiment, frequency response calibration of headphones includes: obtaining the actual transfer function of the headphones; calculating transfer function calibration parameters based on the actual transfer function and a reference transfer function; and calibrating the actual transfer function based on the transfer function calibration parameters.

[0210] Specifically, frequency response calibration of the headphones involves calibrating the actual transfer function between the speaker and the feedback microphone. Further, it involves calibrating the actual transfer function between the speaker and the feedback microphone when the headphones are placed in the charging case. Alternatively, it involves calibrating the actual transfer function between the speaker and the feedback microphone when the headphones are in standard wearing condition.

[0211] The charging case refers to the space used for charging the earbuds. When the in-ear noise-canceling earbuds are True Wireless Stereo (TWS), the earbuds can be equipped with a charging case.

[0212] When the current environment meets the calibration requirements, frequency response calibration is performed. The earphone's speaker plays a preset test audio source stored in the earphone as a reference signal. The test audio can be comfortable white noise or pink noise, picked up by the earphone's feedback microphone. The calibration filter parameters are calculated using a frequency response calibration algorithm. The earphone is placed in the charging case, and the test audio source is played to obtain the actual transfer function between the earphone's speaker and the feedback microphone. Alternatively, the test audio source is played in an anechoic environment to obtain the actual transfer function between the earphone's speaker and the feedback microphone under standard wearing conditions.

[0213] The digital signal processor acquires the reference transfer function, calculates the transfer function calibration parameters based on the actual transfer function and the reference transfer function, and calibrates the actual transfer function using the transfer function calibration parameters to achieve calibration of the frequency response of the headphones.

[0214] In one embodiment, obtaining the actual transfer function of the earphones includes: obtaining the transfer function between the earphone's speaker and the feedback microphone when the earphones are placed in the charging case as the actual transfer function; or, obtaining the transfer function between the earphone's speaker and the feedback microphone when the earphones are in a standard wearing state as the actual transfer function.

[0215] The actual transfer function was obtained by testing inside the charging compartment. The good sealing of the charging compartment can reduce interference from the external environment. At the same time, the sealing of the charging compartment can also reduce low-frequency attenuation, resulting in more accurate calibration results.

[0216] Standard wearing condition refers to a tight, snug fit between the headphones and the simulated test object, meaning a seamless seal. The simulated test object refers to a simulated object used to correct the gain of the actual transfer function. The simulated test object can be an artificial head, test fixture, etc.

[0217] When headphones leave the factory, a simulation test object is used to test the wearing condition of the headphones. The actual transfer function of the headphones is tested when they are worn on the simulation test object, and the gain of the actual transfer function is corrected. This allows users to accurately detect the attenuation of the test audio played by the headphones after they leave the factory.

[0218] The principle of frequency response calibration is as follows: The FIR (Finite Impulse Response) equalization method is used to achieve amplitude equalization targeting a flat amplitude-frequency response and phase equalization targeting a linear phase. This equalization method is designed based on the least squares criterion and a regularized filter to minimize the equalization error. The frequency domain expression of this equalization method is:

[0219]

[0220] Where M(k) is the calibration filter in the frequency domain, H(k) is the detected frequency response curve from the speaker to the internal microphone, i.e., the frequency response curve before calibration. λ represents the weighted scalar of the regularization filter, B(k) represents the Fourier transform of the regularization filter response, and D(k) represents the Fourier transform of the ideal bandpass filter response. Performing an inverse Fourier transform on M(k) yields the calibration filter parameters, which are in the form of an FIR filter. Applying the above FIR filter to the DSP program completes the frequency response calibration, as follows: Figure 11 The figure shows the frequency response curves from the headphone speaker to the feedback microphone before and after calibration. The dashed curve "original" represents the frequency response curve from the headphone speaker to the feedback microphone before calibration; the solid curve "calibration" represents the frequency response curve from the headphone speaker to the feedback microphone after calibration. Figure 11 As can be seen, the calibrated frequency response curve remains flat, and the sound signal does not produce distortion after passing through it.

[0221] In this embodiment, the actual transfer function of the headphones is obtained, and a transfer function calibration parameter is calculated based on the actual transfer function and a reference transfer function. The actual transfer function is then calibrated based on the calibration parameter, which eliminates inherent differences in acoustic components and acoustic errors caused by assembly processes. After completing the frequency response calibration of the headphones, the fit of the headphones is then tested, which improves the accuracy of the fit test results.

[0222] In one embodiment, the sound leakage of the headphones during wearing is characterized by the fit of the headphones during wearing; after determining the sound leakage of the headphones during wearing, the method further includes:

[0223] Based on the relationship between fit and preset fit threshold, the fit level of the headphones when worn is determined; and noise reduction enhancement or sound quality compensation processing is performed according to the fit level.

[0224] The preset fit threshold refers to the pre-set fit of the headphones when worn. For example, the fit can be a percentage such as 80%, 60%, 20%, or even 0.3, 0.06, 0.9, etc. The fit level refers to the level corresponding to the preset fit threshold, specifically level one, level two, level three, level four, etc. For example, a preset fit of 90% or higher corresponds to level one, while a preset fit below 60% corresponds to level four.

[0225] Specifically, the headphone's digital signal processor calculates the fit of the headphones when worn, based on reference energy information, energy information, reference cross-correlation information, and cross-correlation information. The digital signal processor obtains a preset fit threshold and compares the fit in the current wearing state with this preset fit threshold to determine the preset fit threshold satisfied by the fit in that wearing state. The fit level corresponding to the preset fit threshold satisfied by the fit in that wearing state is taken as the fit level of the headphones when worn.

[0226] When the headphone's fit level does not meet the required fit criteria while worn, the headphone performs enhanced noise cancellation or sound quality compensation. Specifically, the fit criteria can be defined as a fit level greater than or equal to a threshold value. A fit level less than the threshold value indicates a failure to meet the fit criteria. For example, if the preset fit threshold values ​​are divided into four levels (Level 1, Level 2, Level 3, and Level 4), and the threshold value is Level 3, then when the headphone's fit level is less than or equal to the threshold value, enhanced noise cancellation or sound quality compensation will be applied.

[0227] Enhanced noise cancellation in headphones can include either active or passive noise cancellation. During this process, the headphones can filter ambient noise or cancel it out, thereby further reducing noise levels.

[0228] Sound quality compensation refers to adjusting the center frequency of each frequency band to change the timbre of a sound. Sound quality compensation can include bass, midrange, and treble compensation. Bass refers to sounds with frequencies lower than a preset frequency, such as sounds with frequencies between 16Hz and 64Hz. Midrange is defined as 250Hz-2000Hz, and treble as 4000Hz-8000Hz.

[0229] When the headphones' speakers are playing music, the headphones can perform bass compensation to improve the bass quality of the music.

[0230] In one embodiment, the degree of sound leakage when the user wears the ear tips can be determined based on the fit level, thereby activating a noise reduction filter corresponding to the fit level to perform noise reduction processing on the headphones.

[0231] When the fit of the headphones does not meet the fit requirements, it means that the headphones are not fitting well. This makes the headphones prone to audio leakage from the speakers and susceptible to external noise interference. Therefore, enhancing noise reduction or sound quality compensation based on the fit level can improve the quality of the audio played by the speakers and reduce external noise interference.

[0232] Furthermore, for some users with unique ear canal structures, where suitable ear tips are unavailable (i.e., sound leakage occurs with all provided large, medium, and small sizes), the system assesses the degree of sound leakage based on the fit test results. It then activates a preset noise-canceling filter to optimize active noise cancellation performance and improve user experience. By determining the degree of sound leakage based on the fit test results and compensating for low-frequency sounds in the music, the system ensures optimal sound quality.

[0233] In one embodiment, after characterizing the sound leakage of the headphones in the wearing state by the fit of the headphones in the wearing state, the method further includes:

[0234] Based on the relationship between fit and preset fit threshold, the fit level of the headphones when worn is determined; and the target ear tips corresponding to the headphones are determined based on the fit level.

[0235] Specifically, the headphone's digital signal processor calculates the fit of the headphones when worn, based on reference energy information, energy information, reference cross-correlation information, and cross-correlation information. The digital signal processor obtains a preset fit threshold and compares the fit in the current wearing state with this preset fit threshold to determine the preset fit threshold satisfied by the fit in that wearing state. The fit level corresponding to the preset fit threshold satisfied by the fit in that wearing state is taken as the fit level of the headphones when worn. This fit level can be divided according to a preset step size, such as 0.1, 0.2, etc., but is not limited to this.

[0236] The digital signal processor can obtain the ear tip model of the headphones, determine the appropriate ear tip model based on the fit level of the headphones when worn, and use the ear tip model corresponding to the appropriate ear tip as the target ear tip. For example, the ear tip model is as follows: Figure 12As shown, the ear tips can be large, medium, or small. The digital signal processor assigns a four-level fit rating to the headphones when they are worn. If the fit rating is high, it indicates that the headphones have a high degree of sound leakage and prompts the user to use a larger size ear tip.

[0237] In this embodiment, the fit level of the headphones under wearing conditions is determined based on the relationship between fit degree and preset fit degree threshold. The fit degree can be subdivided into multiple levels, and the fit degree level reflects the fit performance of the ear tips. It can intuitively represent the degree of sound leakage when the headphones are worn, thereby enabling users to select comfortable and airtight ear tips, improving the active noise cancellation effect and sound quality experience.

[0238] In one embodiment, for multiple ear tips configured for the headphones, the fit of the headphones when using each ear tip can be determined, and the fit of each ear tip can be compared to determine the target ear tip that is most suitable for the headphones.

[0239] In one embodiment, the earphone is an in-ear wireless earphone with an ear cap structure that fits in the ear canal, and the earphone's feedback microphone and feedforward microphone are both located at the sound outlet.

[0240] Specifically, the earphones can be in-ear wireless earphones, such as TWS (True Wireless Stereo) ANC earphones. These earphones include a feedback microphone and a feedforward microphone. The earphones have an ear cap structure that fits snugly in the ear canal. The feedback microphone and feedforward microphone can be located at the earphone's sound outlet. The feedback microphone can be located inside the sound outlet, making the signal it collects closer to the audio signal in the human ear canal. The feedforward microphone can be located outside the sound outlet, closer to the ear cap structure, making the signal it collects closer to the leaked audio signal. The close proximity between the feedback microphone and the feedforward microphone facilitates comparison of the cross-correlation between the audio signals detected by the two, thereby improving the accuracy of the detection results.

[0241] In one embodiment, the sound leakage status of the headphones in the wearing state is determined by the fit of the headphones in the wearing state; the method further includes: receiving a fit detection command sent by a terminal; playing detection audio in response to the fit detection command, and performing the steps of acquiring an internal detection signal corresponding to the detection audio through a feedback microphone and acquiring an external detection signal corresponding to the detection audio through a feedforward microphone; after determining the fit of the headphones in the wearing state, the method further includes: sending the fit to the terminal so that the terminal displays the fit.

[0242] The terminal and headphones can connect wirelessly or via a wired connection. When wirelessly connected, they can connect via Wi-Fi, Bluetooth, or NFC, among other methods. When wired, the headphone cable plug can be inserted into the terminal's connection port.

[0243] In one implementation, the user can perform a preset operation on the terminal. The terminal generates a fit detection command based on the preset operation and then sends the fit detection command to the earphone. The preset operation can be a preset voice input, a touch / click / long press of a preset button, the input of a preset command, etc.

[0244] When the terminal receives the fit detection command, it sends the fit detection command to the earphone. The earphone receives the fit detection command and plays the detection audio in response to the fit detection command.

[0245] A corresponding control application for the headphones can also be installed on the terminal. This control application can communicate with the headphones; when the user performs a preset operation on the control application on the terminal, a fit detection command is generated. The preset operation can be a single click, swipe, double click, voice input, etc., and is not limited to these.

[0246] When the headphones obtain the fit, they send the fit to the terminal and display it on the terminal's control application screen. The user can then obtain the fit of the headphones from the screen and adjust the fit accordingly.

[0247] like Figure 13 The diagram shows a framework of a detection method applied to headphones in one embodiment. The headphones include an external microphone 1302 (i.e., a feedforward microphone) and an internal microphone 1306 (i.e., a feedback microphone). The external microphone 1302 performs steps 1308 and 1312. Step 1308: Acquire ambient noise to determine the current noise value, and then perform step 1310, i.e., perform frequency response calibration on the headphones if the current noise value is lower than a noise threshold.

[0248] After executing step 1310, step 1312 is executed, that is, the detection audio is played while the headphones are being worn, the external audio signal is collected through the external microphone, and the collected audio signal is processed by bandpass filter b to obtain the external detection signal.

[0249] And, in step 1304, the signal of the detected audio is bandpass filtered by bandpass filter b to obtain the filtered detected audio.

[0250] Perform step 1316 to calculate the cross-correlation value between the external detection signal and the filtered detection audio.

[0251] Then, step 1306 is executed, where the headphones play detection audio while in use, and the internal audio signal is acquired through the internal microphone. Step 1318 is then executed, where the acquired audio signals are bandpass filtered using bandpass filter a to obtain the internal detection signal. Next, step 1320 is executed, where the energy value corresponding to the internal detection signal is calculated. Finally, step 1322 is executed.

[0252] Step 1322: Obtain reference energy information and reference cross-correlation information. Based on the reference energy information, energy information, reference cross-correlation information, and cross-correlation information, and their corresponding weights, calculate the headphone fit degree and compare it with the fit degree threshold. Next, execute step 1324, which displays the headphone's sound leakage level based on the fit degree detection results.

[0253] In one embodiment, a detection method is provided, applied to headphones, comprising:

[0254] The headphone's feedforward microphone collects the current ambient noise and obtains the corresponding noise signal.

[0255] The headphone's digital signal processor determines the signal amplitude corresponding to each frequency point in the noise signal, and determines the current noise value corresponding to the current ambient noise based on the signal amplitude corresponding to each frequency point.

[0256] When the current noise level is below the noise threshold, the digital signal processor obtains the transfer function between the earphone's speaker and the feedback microphone when the earphone is placed in the charging case as the actual transfer function.

[0257] Next, the digital signal processor calculates the transfer function calibration parameters based on the actual transfer function and the reference transfer function; and calibrates the actual transfer function based on the transfer function calibration parameters.

[0258] When worn, the headphone's feedback microphone and feedforward microphone respectively collect the played detection audio to obtain the corresponding audio signal; the feedback microphone is used to detect the audio signal inside the ear canal, and the feedforward microphone is used to detect the audio signal outside the headphone.

[0259] Next, the digital signal processor performs a first filtering process on the audio signal collected by the feedback microphone to obtain an internal detection signal within the first frequency band.

[0260] Furthermore, the digital signal processor performs a second filtering process on the audio signal acquired by the feedforward microphone to obtain an external detection signal within the second frequency band range; the upper limit of the first frequency band range is less than the lower limit of the second frequency band range.

[0261] Next, the digital signal processor divides the internally detected signal into multiple signal segments; for each of the multiple signal segments, the segment energy value corresponding to the corresponding signal segment is determined according to the signal amplitude corresponding to each frequency point in the corresponding signal segment.

[0262] Next, the digital signal processor determines the energy information corresponding to the internal detection signal based on the segment energy value corresponding to each signal segment.

[0263] Furthermore, the digital signal processor determines the first energy value and the first amplitude mean of the external detection signal based on the signal amplitude corresponding to each frequency point in the external detection signal.

[0264] Furthermore, the digital signal processor determines the second energy value and the second amplitude mean of the detected audio based on the signal amplitude corresponding to each frequency point in the detected audio.

[0265] Next, the digital signal processor calculates the expected value between the external detection signal and the detection audio based on the first energy value, the first amplitude mean, the second energy value, and the second amplitude mean; it also calculates the first squared value of the difference between the first energy value and the first amplitude mean, and the second squared value of the difference between the second energy value and the second amplitude mean.

[0266] Furthermore, the digital signal processor determines the square root of the product between the expectation of the first squared value and the expectation of the second squared value, and uses the ratio of the expectation value to the square root as the cross-correlation information between the external detection signal and the detection audio.

[0267] In an anechoic environment, the playback detection audio is collected by the feedback microphone of the headphones in a standard wearing state to obtain the corresponding internal reference detection signal; this standard wearing state represents the seamless fit between the headphones and the test fixture.

[0268] Next, the digital signal processor divides the internal reference detection signal into multiple internal signal segments; for each internal signal segment, the internal segment energy value corresponding to the corresponding signal segment is determined according to the signal amplitude corresponding to each frequency point in the corresponding internal signal segment; based on the internal segment energy value corresponding to each internal signal segment, the reference energy information corresponding to the internal reference detection signal is determined.

[0269] In an anechoic environment, the detection audio played is acquired by the feedforward microphone of the headphones in a standard wearing state, and the corresponding first reference detection signal is obtained; the standard wearing state represents the seamless fit between the headphones and the test fixture.

[0270] In an anechoic environment, the detected audio is acquired by the feedforward microphone of the headphones when they are not being worn, and the corresponding second reference detection signal is obtained.

[0271] Next, the digital signal processor determines the first reference energy value and the first reference amplitude mean of the first reference detection signal based on the signal amplitude corresponding to each frequency point in the first reference detection signal; it determines the second reference energy value and the second reference amplitude mean of the second reference detection signal based on the signal amplitude corresponding to each frequency point in the second reference detection signal; and it determines the reference cross-correlation information between the first reference detection signal and the second reference detection signal based on the first reference energy value, the first reference amplitude mean, the second reference energy value, and the second reference amplitude mean.

[0272] Furthermore, the digital signal processor acquires the energy weights and cross-correlation weights.

[0273] Next, the digital signal processor determines the energy ratio between the energy information and the reference energy information, as well as the cross-correlation ratio between the cross-correlation information and the reference cross-correlation information; it determines the difference between the preset coefficient and the cross-correlation ratio, and uses the sum of the product of the energy ratio and the energy weight, and the product of the difference and the cross-correlation weight, as the fit of the headphones when worn.

[0274] Furthermore, the digital signal processor determines the fit level of the headphones when worn based on the relationship between the fit degree and a preset fit degree threshold; it then performs enhanced noise reduction processing or sound quality compensation processing based on the fit degree level. Alternatively, it determines the corresponding target ear tips for the headphones based on the fit degree level.

[0275] In this embodiment, detecting the noise level of the current ambient noise automatically helps the user determine whether the current environment is suitable for frequency response calibration of the headphones. Performing frequency response calibration when the current noise level is below the noise threshold avoids the influence of ambient noise, especially sudden noise, on the frequency response calibration of the headphones, thereby improving the accuracy of the frequency response calibration.

[0276] After frequency response calibration of the headphones, with the headphones in a wearing state, the played detection audio is acquired through both the feedback microphone and the feedforward microphone. The audio signals acquired by the feedback and feedforward microphones are then filtered accordingly to separate the mid-to-low frequency and mid-to-low frequency signals from the audio signal. The separated signals are less susceptible to external environmental interference, resulting in more accurate data acquisition. With the headphones in a wearing state, the two microphones acquire audio signals from inside and outside the headphones respectively. The audio signal acquired by the feedback microphone is closer to the signal in the human ear canal, while the signal acquired by the feedforward microphone is closer to the audio signal leaking from the headphones. Therefore, combining the audio data from inside and outside the headphones allows for accurate detection of sound leakage. The cross-correlation between the external detection signal acquired by the feedforward microphone and the detection audio signal is calculated to determine the degree of cross-correlation between them.

[0277] In an anechoic environment, the playback audio is collected by the feedback microphone of the headphones in a standard wearing state to obtain the corresponding internal reference detection signal. This standard wearing state represents the seamless fit between the headphones and the test fixture, thus enabling the acquisition of audio signals of the detection audio in the absence of external interference and when the headphones are in a standard wearing state. This makes the obtained internal reference detection signal more accurate, and the calculated reference energy information corresponding to the internal reference detection signal more accurate.

[0278] In an anechoic environment, the detection audio played in both the standard wearing state and the no-wearing state is collected by the feedforward microphone of the headphones. The external audio signal collected in the standard wearing state and the external audio signal collected in the no-wearing state can be obtained. The correlation between the audio signals collected in these two states can be calculated to detect the degree of sound signal leakage of the headphones.

[0279] By determining the energy information corresponding to the audio signal within the ear canal and combining it with reference energy information, energy information, reference cross-correlation information, and cross-correlation information, the sound leakage status of the headphones while they are being worn can be accurately detected. Furthermore, the sound leakage status of the headphones is calculated using audio signals collected by feedback and feedforward microphones, eliminating the need for additional hardware and saving on hardware costs.

[0280] It should be understood that, although Figure 2 , 6 The steps in flowcharts 8 and 13 are shown sequentially as indicated by the arrows; however, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order requirement for the execution of these steps, and they can be executed in other orders. Furthermore, Figure 2, 6 At least some of the steps in 8 and 13 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0281] Figure 14 This is a structural block diagram of a detection device according to one embodiment. Figure 14 As shown, the detection device 1400 includes:

[0282] The playback module 1402 is used to play the detection audio.

[0283] The acquisition module 1404 is used to acquire the internal detection signal corresponding to the detection audio through the feedback microphone and to acquire the external detection signal corresponding to the detection audio through the feedforward microphone.

[0284] The information determination module 1406 is used to determine the energy information corresponding to the internal detection signal, and to determine the mutual information between the external detection signal and the detection audio.

[0285] The sound leakage determination module 1408 is used to determine the sound leakage status of the headphones based on reference energy information, energy information, reference mutual related information and mutual related information.

[0286] In this embodiment, when the headphones are worn, detection audio is played. The feedback microphone of the headphones collects the audio signal inside the ear canal, and the feedforward microphone collects the external audio signal, resulting in different audio signals collected by different microphones under the same conditions. When the headphones are not worn, detection audio is played, and the feedforward microphone collects the external audio signal, allowing for the calculation of the cross-correlation between the two external audio signals collected by the same microphone in the worn and unworn states. By determining the energy information corresponding to the audio signal inside the ear canal and combining it with reference energy information, energy information, reference cross-correlation information, and cross-correlation information, the sound leakage status of the headphones when worn can be accurately detected. Furthermore, using the audio signals collected by the feedback and feedforward microphones to calculate the sound leakage status of the headphones eliminates the need for additional hardware, saving hardware costs.

[0287] In one embodiment, the playback module 1402 is used to play the detection audio.

[0288] The acquisition module 1404 is used to acquire the internal detection signal corresponding to the detection audio through the feedback microphone.

[0289] The information determination module 1406 is used to determine the energy information corresponding to the internal detection signal.

[0290] The sound leakage determination module 1408 is used to acquire reference energy information and determine the sound leakage status of the headphones based on the reference energy information and the energy information.

[0291] In this embodiment, the internal detection signal corresponding to the detected audio is acquired through a feedback microphone to determine the energy information corresponding to the internal detection signal. Based on the determined energy information and reference energy information, the sound leakage status of the headphones can be accurately determined with minimal computation. Furthermore, the sound leakage status of the headphones can be detected based on the signal collected by the feedback microphone, eliminating the need for additional hardware and saving hardware costs.

[0292] In one embodiment, the playback module 1402 is used to play the detection audio.

[0293] The acquisition module 1404 is used to acquire the external detection signal corresponding to the detection audio through the feedforward microphone.

[0294] The information determination module 1406 is used to determine the mutual related information between the external detection signal and the detection audio.

[0295] The sound leakage determination module 1408 is used to obtain reference mutual related information and determine the sound leakage status of the headphones based on the reference mutual related information and mutual related information.

[0296] In this embodiment, an external detection signal corresponding to the detection audio is acquired through a feedforward microphone. The cross-correlation between the acquired external detection signal and the detection audio is determined, revealing the degree of cross-correlation between the detected external signal and the original detection audio. Based on the cross-correlation information and a reference cross-correlation information, the sound leakage status of the headphones while worn can be accurately detected with minimal computation. Furthermore, the sound leakage status of the headphones can be detected based solely on the signal acquired by the feedforward microphone, eliminating the need for additional hardware and saving hardware costs.

[0297] In one embodiment, the information determination module 1406 is further configured to divide the internal detection signal into multiple signal segments; for each signal segment, determine the segment energy value corresponding to the corresponding signal segment based on the signal amplitude corresponding to each frequency point in the corresponding signal segment; and determine the energy information corresponding to the internal detection signal based on the segment energy value corresponding to each signal segment.

[0298] In this embodiment, the internal detection signal is divided into multiple signal segments. For each signal segment, the segment energy value in the time domain is accurately calculated based on the signal amplitude corresponding to each frequency point within the segment. Based on the segment energy value corresponding to each signal segment, the energy information of the internal detection signal can be accurately calculated, thereby accurately determining the energy information of the internal detection signal in the time domain. Furthermore, detecting the signal energy information in the time domain requires less computation and consumes less power in the headphones.

[0299] In one embodiment, the information determination module 1406 is further configured to determine a first energy value and a first amplitude mean of the external detection signal based on the signal amplitude corresponding to each frequency point in the external detection signal; determine a second energy value and a second amplitude mean of the detection audio based on the signal amplitude corresponding to each frequency point in the detection audio; and determine the mutual information between the external detection signal and the detection audio based on the first energy value, the first amplitude mean, the second energy value, and the second amplitude mean.

[0300] In this embodiment, the first energy value and the first amplitude mean of the external detection signal, and the second energy value and the second amplitude mean of the detection audio are calculated. The energy value and the amplitude mean can be used as conditions for calculating the correlation between the external detection signal and the detection audio, which fully considers various influencing factors and makes the calculation of the cross-correlation between the two more accurate.

[0301] The external detection signal is the audio signal obtained when the headphones are worn, while the detection audio is the audio signal obtained when the headphones are not worn. The energy value and the average amplitude are used as the conditions for calculating the degree of cross-correlation between the two, so that the degree of cross-correlation between the audio signals collected by the headphones in two different states can be calculated under the same conditions, making the calculated degree of cross-correlation more accurate.

[0302] In one embodiment, the information determination module 1406 is further configured to: calculate the expected value between the external detection signal and the detection audio based on the first energy value, the first amplitude mean, the second energy value, and the second amplitude mean; calculate the first squared value of the difference between the first energy value and the first amplitude mean, and the second squared value of the difference between the second energy value and the second amplitude mean; determine the square root of the product between the expected value of the first squared value and the expected value of the second squared value, and use the ratio of the expected value to the square root as the cross-correlation information between the external detection signal and the detection audio.

[0303] In this embodiment, based on the first energy value, the first average amplitude, the second energy value, and the second average amplitude, the expected value between the external detection signal and the detection audio is calculated. The first squared value of the difference between the first energy value and the first average amplitude, and the second squared value of the difference between the second energy value and the second average amplitude are calculated. The square root of the product between the expected value of the first squared value and the expected value of the second squared value is determined. The ratio of the expected value to the square root is used as the cross-correlation information between the external detection signal and the detection audio, thereby enabling accurate calculation of the cross-correlation information between the external detection signal and the detection audio.

[0304] In one embodiment, the sound leakage determination module 1408 is further configured to, in an anechoic environment, acquire the played detection audio through the feedback microphone of the headphones in a standard wearing state to obtain the corresponding internal reference detection signal; the standard wearing state characterizes the seamless fit between the headphones and the test fixture; and determine the reference energy information corresponding to the internal reference detection signal.

[0305] In this embodiment, in an anechoic environment, the playback audio is collected by the feedback microphone of the headphones in a standard wearing state to obtain the corresponding internal reference detection signal. This standard wearing state represents a seamless fit between the headphones and the test fixture, enabling the acquisition of audio signals for the detection audio without external interference and with the headphones in a standard wearing state. This results in a more accurate internal reference detection signal and more precise reference energy information corresponding to the calculated internal reference detection signal. Furthermore, using the energy information obtained under the standard wearing state without external interference as reference information allows for comparison with the energy information obtained under the wearing state with external interference. Using both as conditions for detecting sound leakage in the headphones under wearing conditions improves the accuracy of the detection results.

[0306] In one embodiment, the sound leakage determination module 1408 is further configured to divide the internal reference detection signal into multiple internal signal segments; for each internal signal segment, determine the internal segment energy value corresponding to the corresponding signal segment based on the signal amplitude corresponding to each frequency point in the corresponding internal signal segment; and determine the internal reference energy information corresponding to the internal reference detection signal based on the internal segment energy value corresponding to each internal signal segment.

[0307] In one embodiment, the sound leakage determination module 1408 is further configured to: in an anechoic environment, acquire the played detection audio through the feedforward microphone of the headphones in a standard wearing state to obtain a corresponding first reference detection signal; the standard wearing state characterizes the seamless fit between the headphones and the test fixture; in an anechoic environment, acquire the played detection audio through the feedforward microphone of the headphones in an unwearing state to obtain a corresponding second reference detection signal; and determine the reference cross-correlation information between the first reference detection signal and the second reference detection signal.

[0308] In this embodiment, in an anechoic environment, the detection audio played in both the standard wearing state and the no-wearing state is collected by the feedforward microphone of the headphones. The external audio signal collected in the standard wearing state and the external audio signal collected in the no-wearing state can be obtained. The cross-correlation between the audio signals collected in these two states can be calculated to detect the degree of leakage of the headphone to the sound signal, thereby further improving the accuracy of the detection results.

[0309] In one embodiment, the sound leakage determination module 1408 is further configured to determine a first reference energy value and a first reference amplitude mean corresponding to the first reference detection signal based on the signal amplitude corresponding to each frequency point in the first reference detection signal; determine a second reference energy value and a second reference amplitude mean corresponding to the second reference detection signal based on the signal amplitude corresponding to each frequency point in the second reference detection signal; and determine a reference cross-correlation information between the first reference detection signal and the second reference detection signal based on the first reference energy value, the first reference amplitude mean, the second reference energy value, and the second reference amplitude mean.

[0310] In one embodiment, the sound leakage determination module 1408 is further configured to: calculate a reference expectation value between a first reference audio signal and a second reference audio signal based on a first reference energy value, a first reference amplitude mean, a second reference energy value, and a second reference amplitude mean; calculate a first reference square value of the difference between the first reference energy value and the first reference amplitude mean, and a second reference square value of the difference between the second reference energy value and the second reference amplitude mean; determine the square root of the product between the expectation of the first reference square value and the expectation of the second reference square value, and use the ratio of the reference expectation value to the square root as the reference cross-correlation information between the first reference audio signal and the second reference audio signal.

[0311] In one embodiment, the sound leakage determination module 1408 further confirms the energy weight and cross-correlation weight; and determines the sound leakage status of the headphones based on the reference energy information, energy information, reference cross-correlation information, cross-correlation information, energy weight and cross-correlation weight.

[0312] In this embodiment, different weights are assigned to the reference energy information, energy information, reference mutual related information, and mutual related information, so that the degree of attention paid to the reference energy information, energy information, reference mutual related information, and mutual related information varies. More weight is assigned to key information and less weight is assigned to non-key information, which can further improve the accuracy of detecting sound leakage in the headphones when they are worn.

[0313] In one embodiment, the sound leakage determination module 1408 is further configured to determine the energy ratio between the energy information and the reference energy information, and the cross-correlation ratio between the cross-correlation information and the reference cross-correlation information; determine the difference between the preset coefficient and the cross-correlation ratio; and use the sum of the product of the energy ratio and the energy weight, and the product of the difference and the cross-correlation weight, as the fit of the headphones in the wearing state; the fit characterizes the sound leakage status of the headphones in the wearing state.

[0314] In this embodiment, the energy ratio between the energy information and the reference energy information, and the cross-correlation ratio between the cross-correlation information and the reference cross-correlation information are determined. The difference between the preset coefficient and the cross-correlation ratio is determined. The sum of the product of the energy ratio and the energy weight, and the product of the difference and the cross-correlation weight, is used as the fit of the headphones when they are worn. The fit can characterize the sound leakage of the headphones when they are worn, thereby accurately detecting the sound leakage of the headphones.

[0315] In one embodiment, the detected audio is a mixed audio; the acquisition module 1404 is further configured to acquire the audio signal corresponding to the detected audio through a feedback microphone; perform a first filtering process on the audio signal acquired by the feedback microphone to obtain an internal detection signal within a first frequency band; acquire the audio signal corresponding to the detected audio through a feedforward microphone; perform a second filtering process on the audio signal acquired by the feedforward microphone to obtain an external detection signal within a second frequency band; the upper limit of the first frequency band is less than the lower limit of the second frequency band.

[0316] In one embodiment, the detected audio is mixed audio; the acquisition module 1404 is further configured to, while in the wearing state, acquire the played detection audio through the first microphone and the second microphone of the earphone respectively to obtain the corresponding audio signal; perform a first filtering process on the audio signal acquired by the first microphone to obtain an internal detection signal within a first frequency band range; perform a second filtering process on the audio signal acquired by the feedforward microphone to obtain an external detection signal within a second frequency band range; the upper limit of the first frequency band range is less than the lower limit of the second frequency band range.

[0317] In this embodiment, while the headphones are being worn, the played detection audio is acquired through the headphone's feedback microphone and feedforward microphone, respectively, to obtain the corresponding audio signals. The audio signals acquired by the feedback and feedforward microphones are then subjected to appropriate filtering processes to separate the mid-to-low frequency and mid-to-low frequency signals from the audio signals. The separated signals are less susceptible to external environmental interference, resulting in more accurate data acquisition. While the headphones are being worn, the two microphones acquire audio signals from inside and outside the headphones respectively. The audio signal acquired by the feedback microphone is closer to the signal in the human ear canal, while the signal acquired by the feedforward microphone is closer to the audio signal leaking from the headphones. Therefore, combining the audio data from inside and outside the headphones allows for accurate detection of sound leakage, improving the accuracy of the detection results.

[0318] In one embodiment, the device further includes a calibration module; the calibration module is configured to acquire the current ambient noise through a feedforward microphone before playing the detection audio to obtain the corresponding noise signal; determine the signal amplitude corresponding to each frequency point in the noise signal, and determine the current noise value corresponding to the current ambient noise based on the signal amplitude corresponding to each frequency point; and perform frequency response calibration on the headphones if the current noise value is lower than the noise threshold.

[0319] In one embodiment, the device further includes a calibration module; the calibration module is configured to acquire the current ambient noise through the feedforward microphone of the headphones before playing the detection audio, and obtain the corresponding noise signal; determine the signal amplitude corresponding to each frequency point in the noise signal, and determine the current noise value corresponding to the current ambient noise based on the signal amplitude corresponding to each frequency point; and perform frequency response calibration on the headphones if the current noise value is lower than the noise threshold.

[0320] In this embodiment, detecting the noise level of the current ambient noise automatically helps the user determine whether the current environment is suitable for frequency response calibration of the headphones. Performing frequency response calibration when the current noise level is below the noise threshold avoids the influence of ambient noise, especially sudden noise, on the frequency response calibration of the headphones, thereby improving the accuracy of the frequency response calibration and significantly improving the accuracy of fit detection, thus enhancing the user experience.

[0321] In one embodiment, the calibration module is further configured to obtain the actual transfer function of the headphones; calculate transfer function calibration parameters based on the actual transfer function and a reference transfer function; and calibrate the actual transfer function based on the transfer function calibration parameters.

[0322] In this embodiment, the actual transfer function of the headphones is obtained, and a transfer function calibration parameter is calculated based on the actual transfer function and a reference transfer function. The actual transfer function is then calibrated based on the calibration parameter, which eliminates inherent differences in acoustic components and acoustic errors caused by assembly processes. After completing the frequency response calibration of the headphones, the fit of the headphones is then tested, which improves the accuracy of the fit test results.

[0323] In one embodiment, the sound leakage of the headphones during wear is characterized by the fit of the headphones during wear; the device further includes a processing module; the processing module is used to determine the fit level of the headphones during wear based on the relationship between the fit level and a preset fit threshold after determining the sound leakage of the headphones during wear; and to perform enhanced noise reduction processing or sound quality compensation processing based on the fit level.

[0324] In this embodiment, enhancing noise reduction or sound quality compensation based on the fit level can improve the quality of the audio played by the speaker and reduce external noise interference.

[0325] In one embodiment, the sound leakage of the headphones during wearing is characterized by the fit of the headphones during wearing; the device further includes a processing module; the processing module is used to determine the fit level of the headphones during wearing based on the relationship between the fit level and a preset fit threshold after determining the sound leakage of the headphones during wearing; and to determine the target ear tip corresponding to the headphones based on the fit level.

[0326] In this embodiment, the fit level of the headphones under wearing conditions is determined based on the relationship between fit degree and preset fit degree threshold. The fit degree can be subdivided into multiple levels, and the fit degree level reflects the fit performance of the ear tips. It can intuitively represent the degree of sound leakage when the headphones are worn, thereby enabling users to select comfortable and airtight ear tips, improving the active noise cancellation effect and sound quality experience.

[0327] In one embodiment, the earphone is an in-ear wireless earphone with an ear cap structure that fits in the ear canal, and the earphone's feedback microphone and feedforward microphone are both located at the sound outlet.

[0328] In this embodiment, the feedback microphone and the feedforward microphone can be located at the sound outlet of the earphone, so that the signal collected by the feedback microphone is closer to the audio signal in the human ear canal, and the signal collected by the feedforward microphone is closer to the leaked audio signal. The close proximity between the feedback microphone and the feedforward microphone makes it easier to compare the cross-correlation between the audio signals detected by the two, thereby helping to improve the accuracy of the detection results.

[0329] The division of the various modules in the above-described detection device is for illustrative purposes only. In other embodiments, the detection device may be divided into different modules as needed to complete all or part of the functions of the above-described detection device.

[0330] Specific limitations regarding the detection device can be found in the limitations of the detection method described above, and will not be repeated here. Each module in the aforementioned detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0331] Figure 15 This is a schematic diagram of the internal structure of the headphones in one embodiment. Figure 15 As shown, the headset includes a processor and a memory connected via a system bus. The processor provides computing and control capabilities to support the operation of the entire headset. The memory may include non-volatile storage media and internal memory. The non-volatile storage media stores an operating system and computer programs. The computer programs can be executed by the processor to implement a detection method provided in the following embodiments. The internal memory provides a cached runtime environment for the operating system computer programs in the non-volatile storage media. The headset can be any terminal device such as a mobile phone, tablet computer, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computer, wearable device, etc.

[0332] The various modules in the detection device provided in this application embodiment can be implemented in the form of a computer program. This computer program can run on a terminal or server. The program modules constituted by this computer program can be stored in the earphone's memory. When the computer program is executed by a processor, it implements the steps of the method described in this application embodiment.

[0333] This application also provides a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, cause the processors to perform the steps of a detection method.

[0334] A computer program product containing instructions that, when run on a computer, causes the computer to perform a detection method.

[0335] Any references to memory, storage, databases, or other media used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).

[0336] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A detection method applied to headphones, characterized in that, include: Play the detection audio; The internal detection signal corresponding to the detection audio is obtained through the feedback microphone, and the external detection signal corresponding to the detection audio is obtained through the feedforward microphone. Determine the energy information corresponding to the internal detection signal, and determine the mutual information between the external detection signal and the detection audio; Confirm the energy weights and cross-correlation weights; Determine the energy ratio between the energy information and the reference energy information, and the cross-correlation ratio between the cross-correlation information and the reference cross-correlation information; The difference between the preset coefficient and the cross-correlation ratio is determined. The sum of the product of the energy ratio and the energy weight, and the product of the difference and the cross-correlation weight, is used as the fit of the headphones when worn. The sound leakage of the headphones when worn is determined based on the fit. The methods for obtaining the reference energy information include: In an anechoic environment, the playback detection audio is acquired through the feedback microphone of the headphones in a standard wearing state to obtain an internal reference detection signal; the reference energy information corresponding to the internal reference detection signal is then determined. The methods for obtaining the reference mutual information include: In an anechoic environment, the playback detection audio is acquired by the feedforward microphone of the headphones in a standard wearing state to obtain the corresponding first reference detection signal; in an anechoic environment, the playback detection audio is acquired by the feedforward microphone of the headphones in an unwearing state to obtain the corresponding second reference detection signal; and the reference cross-correlation information between the first reference detection signal and the second reference detection signal is determined.

2. The method according to claim 1, characterized in that, Determining the cross-correlation between the external detection signal and the detected audio includes: Based on the signal amplitude corresponding to each frequency point in the external detection signal, determine the first energy value and the first amplitude mean value corresponding to the external detection signal; Based on the signal amplitude corresponding to each frequency point in the detected audio, determine the second energy value and the average second amplitude of the detected audio. Based on the first energy value, the first average amplitude, the second energy value, and the second average amplitude, the mutual information between the external detection signal and the detection audio is determined.

3. The method according to claim 2, characterized in that, The step of determining the cross-correlation information between the external detection signal and the detected audio based on the first energy value, the first average amplitude, the second energy value, and the second average amplitude includes: Based on the first energy value, the first average amplitude, the second energy value, and the second average amplitude, calculate the expected value between the external detection signal and the detection audio. Calculate the first squared value of the difference between the first energy value and the first amplitude mean, and the second squared value of the difference between the second energy value and the second amplitude mean; The square root of the product between the expected value of the first squared value and the expected value of the second squared value is determined, and the ratio of the expected value to the square root is used as the cross-correlation information between the external detection signal and the detection audio.

4. The method according to claim 1, characterized in that, Determining the energy information corresponding to the internal detection signal includes: The internal detection signal is divided into multiple signal segments; For each of the multiple signal segments, determine the segment energy value corresponding to the corresponding signal segment based on the signal amplitude corresponding to each frequency point in the corresponding signal segment; Based on the segment energy value corresponding to each signal segment, the energy information corresponding to the internal detection signal is determined.

5. The method according to claim 4, characterized in that, The step of determining the energy information corresponding to the internal detection signal based on the segment energy value corresponding to each signal segment includes: The sum of the segment energy values ​​corresponding to each signal segment is determined as the energy information corresponding to the internal detection signal.

6. The method according to claim 1, characterized in that, The detection audio is a mixed audio; the acquisition of the internal detection signal corresponding to the detection audio through the feedback microphone includes: The audio signal corresponding to the detected audio is acquired through a feedback microphone; The audio signal collected by the feedback microphone is subjected to a first filtering process to obtain an internal detection signal within the first frequency band range; The step of acquiring the external detection signal corresponding to the detection audio through a feedforward microphone includes: The audio signal corresponding to the detected audio is acquired through a feedforward microphone; The audio signal acquired by the feedforward microphone is subjected to a second filtering process to obtain an external detection signal within the second frequency band range; the upper limit of the first frequency band range is less than the lower limit of the second frequency band range.

7. The method according to claim 1, characterized in that, Before playing the detected audio, the following is also included: The current ambient noise is collected by a feedforward microphone to obtain the corresponding noise signal; Determine the signal amplitude corresponding to each frequency point in the noise signal, and determine the current noise value corresponding to the current environmental noise based on the signal amplitude corresponding to each frequency point; If the current noise level is below the noise threshold, the headphones are calibrated for frequency response.

8. The method according to claim 7, characterized in that, The frequency response calibration of the headphones includes: Obtain the actual transfer function of the headphones; Calculate the transfer function calibration parameters based on the actual transfer function and the reference transfer function; The actual transfer function is calibrated based on the transfer function calibration parameters.

9. The method according to any one of claims 1 to 8, characterized in that, After determining the sound leakage condition of the headphones, the method further includes: The fit level of the earphone in the wearing state is determined based on the relationship between the fit degree and the preset fit degree threshold. Enhanced noise reduction or sound quality compensation processing is performed based on the aforementioned fit level.

10. A detection device applied to headphones, characterized in that, include: The playback module is used to play the detected audio. The acquisition module is used to acquire the internal detection signal corresponding to the detection audio through the feedback microphone and to acquire the external detection signal corresponding to the detection audio through the feedforward microphone. The information determination module is used to determine the energy information corresponding to the internal detection signal, and to determine the mutual information between the external detection signal and the detection audio. The sound leakage determination module is used to confirm the energy weight and cross-correlation weight; Determine the energy ratio between the energy information and the reference energy information, and the cross-correlation ratio between the cross-correlation information and the reference cross-correlation information; The difference between the preset coefficient and the cross-correlation ratio is determined. The sum of the product of the energy ratio and the energy weight, and the product of the difference and the cross-correlation weight, is used as the fit of the headphones when worn. The sound leakage of the headphones when worn is determined based on the fit. The sound leakage determination module is also used to acquire the detection audio played through the feedback microphone of the headphones in a standard wearing state in an anechoic environment, obtain the internal reference detection signal, and determine the reference energy information corresponding to the internal reference detection signal; The sound leakage determination module is further configured to: in an anechoic environment, acquire the played detection audio through the feedforward microphone of the headphones in a standard wearing state to obtain a corresponding first reference detection signal; in an anechoic environment, acquire the played detection audio through the feedforward microphone of the headphones in an unwearing state to obtain a corresponding second reference detection signal; and determine the reference cross-correlation information between the first reference detection signal and the second reference detection signal.

11. An earphone, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the computer program is executed by the processor, it causes the processor to perform the steps of the method as described in any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 9.

13. A computer program product containing instructions, characterized in that, When it is run on a computer, it causes the computer to perform the steps of the method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Audio output apparatus, audio output method, audio output system, and program for audio output processing

    CN101212833A

  • Earphone control method and device and storage medium

    CN111818439A