WO2022247673A1 - 检测方法、装置、耳机和计算机可读存储介质 - Google Patents

检测方法、装置、耳机和计算机可读存储介质 Download PDF

Info

Publication number
WO2022247673A1
WO2022247673A1 PCT/CN2022/093021 CN2022093021W WO2022247673A1 WO 2022247673 A1 WO2022247673 A1 WO 2022247673A1 CN 2022093021 W CN2022093021 W CN 2022093021W WO 2022247673 A1 WO2022247673 A1 WO 2022247673A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal
audio
earphone
detection
energy
Prior art date
Application number
PCT/CN2022/093021
Other languages
English (en)
French (fr)
Inventor
练添富
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2022247673A1 publication Critical patent/WO2022247673A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements
    • H04R29/001Monitoring arrangements; Testing arrangements for loudspeakers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements

Definitions

  • the present application relates to the field of computer technology, in particular to a detection method, device, earphone and computer-readable storage medium.
  • ANC Active Noise Cancellation
  • noise-canceling headphones have appeared.
  • ANC technology can offset most of the noise, so as to achieve the effect of noise reduction.
  • the best sound quality and excellent noise-canceling experience can be obtained with the best size eartips, so choosing the right eartips for comfort and a snug fit is crucial.
  • the user can only rely on subjective feelings to judge whether there is sound leakage in the earphone in the current wearing state, but cannot accurately detect the leakage of the sound signal played by the earphone.
  • the embodiments of the present application provide a detection method, device, earphone and computer-readable storage medium, which can accurately detect the sound leakage of the earphone in the current wearing state.
  • a detection method applied to earphones comprising:
  • 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;
  • the sound leakage condition of the earphone is determined according to the reference energy information, the energy information, the reference cross-correlation information and the cross-correlation information.
  • a detection device applied to earphones, comprising:
  • the playback module is used to play the detection audio
  • the obtaining module is used to 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;
  • An information determination module configured to determine energy information corresponding to the internal detection signal, and determine cross-correlation information between the external detection signal and the detection audio;
  • the sound leakage determination module is used to determine the sound leakage of the earphone according to the reference energy information, the energy information, the reference cross-correlation information and the cross-correlation information.
  • An earphone including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor performs the following operations:
  • 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;
  • the sound leakage condition of the earphone is determined according to the reference energy information, the energy information, the reference cross-correlation information and the cross-correlation information.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following operations are realized:
  • 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;
  • the sound leakage condition of the earphone is determined according to the reference energy information, the energy information, the reference cross-correlation information and the cross-correlation information.
  • the above detection method, device, earphone and computer-readable storage medium play the detection audio through the earphone in the wearing state, collect the audio signal in the ear canal through the feedback microphone of the earphone, and collect the external audio signal of the earphone through the feedforward microphone of the earphone to obtain different Different audio signals collected by the microphone in the same state. Play the detection audio in the non-wearing state, and collect the external audio signal of the earphone through the feed-forward microphone of the earphone, so that the cross-correlation degree between the two external audio signals collected by the same microphone in the wearing state and the non-wearing state can be calculated .
  • the audio signal collected by the feedback microphone and the feedforward microphone is used to calculate the sound leakage of the earphone, without using additional hardware, which can save hardware costs.
  • Fig. 1 is an application environment diagram of a detection method in an embodiment.
  • Fig. 2 is a flow chart of the detection method in one embodiment.
  • Figure 3 is a time domain diagram of detecting audio in one embodiment.
  • Figure 4 is a spectrogram of detected audio in one embodiment.
  • FIG. 5 is a block diagram of an earphone in one embodiment.
  • FIG. 6 is a flow chart of operations for determining cross-correlation information between an external detection signal and detected audio in one embodiment.
  • FIG. 7 is a schematic diagram of a test fixture in an embodiment.
  • FIG. 8 is a flowchart of the operation of obtaining reference cross-correlation information in one embodiment.
  • Fig. 9 is a schematic diagram of filtering a signal by a bandpass filter a in an embodiment.
  • Fig. 10 is a schematic diagram of filtering a signal by a bandpass filter b in an embodiment.
  • FIG. 11 is a schematic diagram of frequency response curves before and after calibration in an embodiment.
  • Figure 12 is a schematic diagram of different sizes of ear caps in one embodiment.
  • Figure 13 is a block diagram of the detection method in one embodiment.
  • Fig. 14 is a structural block diagram of a detection device in an embodiment.
  • Fig. 15 is a schematic diagram of the internal structure of the earphone in one embodiment.
  • first, second and the like used in this application may be used to describe various elements herein, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element.
  • a first energy value could be termed a second energy value, and, similarly, a second energy value could be termed a first energy value, without departing from the scope of the present application.
  • Both the first energy value and the second energy value are energy values, but they are not the same energy value.
  • Fig. 1 is a schematic diagram of the application environment of the detection method in one embodiment.
  • the application environment includes a headset 102 and a terminal 104 .
  • the earphone 102 and the terminal 104 are connected.
  • the earphone 102 plays detection audio
  • the feedback microphone of the earphone 102 obtains an internal detection signal corresponding to the detection audio
  • the feedforward microphone of the earphone 102 obtains an external detection signal corresponding to the detection audio.
  • the earphone 102 determines energy information corresponding to the internal detection signal, and determines cross-correlation information between the external detection signal and the detection audio.
  • the earphone 102 determines the sound leakage status of the earphone according to the reference energy information, the energy information, the reference cross-correlation information and the cross-correlation information.
  • the earphone 102 may be a headphone, an on-ear earphone, an in-ear earphone, etc., but is not limited thereto.
  • the terminal 104 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • Fig. 2 is a flow chart of a detection method applied to earphones in an embodiment.
  • the detection method in this embodiment is described by taking the earphone running on the earphone shown in FIG. 1 as an example.
  • the detection method includes:
  • Operation 202 playing detection audio.
  • Detection audio refers to the audio played when detecting the sound leakage condition of the earphone.
  • the duration of audio detection can be set as required, for example, the duration of audio detection can be 3-5 seconds.
  • the detection audio can be pre-stored in the earphone chip storage space, and the earphone responds to the detection instruction and obtains the detection audio from the earphone chip storage space to play the detection audio.
  • the frequency band of the detected audio is within the preset frequency range, and the preset frequency band may include ultra-low frequency and mid-low frequency. Preset frequency bands can be set as required. For example, the frequency range of the middle and low frequencies may be 100 Hz-1 kHz, and the frequency range of the ultra-low frequency may be lower than 20 Hz.
  • the detection audio may be composed of a mixture of detection information in different frequency bands.
  • the detection audio may be composed of a super-low-frequency single-frequency signal mixed with a medium-low frequency audio source signal.
  • the sound source signal in the range of 100Hz-1kHz is collected for high-pass filter processing, and the high-pass filter processed sound source signal is mixed with the ultra-low frequency single-frequency signal of 10Hz to obtain the detection audio.
  • the time-domain diagram of the detected audio is shown in FIG. 3 , the horizontal axis in the time-domain diagram represents time, and the vertical axis represents the signal amplitude of the audio signal of the detected audio.
  • the spectrogram of the detected audio is shown in FIG. 4 , the horizontal axis in the spectrogram represents the frequency of the audio signal of the detected audio, and the vertical axis represents the signal amplitude of the audio signal of the detected audio.
  • the amplitude of a single-frequency signal is detected and compared with the set threshold to judge the sound leakage of the single-frequency signal.
  • the single-frequency signal is more likely to be interfered by external environmental noise or the user's own speech, etc. Inaccurate, abnormal headphone fit test results and other problems.
  • the detection frequency range is wide, the detection result is not easily disturbed by the external environment, and the sound leakage of the audio signal collected by the earphone can be accurately detected, thereby accurately detecting Improve the fit of the earphones and improve the user experience.
  • an internal detection signal corresponding to the detected audio is obtained through the feedback microphone, and an external detection signal corresponding to the detected audio is obtained through the feedforward microphone.
  • the earphone may be an in-ear earphone, an on-ear earphone, a headset, etc., but is not limited thereto.
  • the earphone also includes earplugs.
  • the above-mentioned earphones can be wireless earphones or wired earphones, such as in-ear wired earphones, on-ear wired earphones, head-mounted wired earphones, in-ear wireless earphones, on-ear wireless earphones, and head-mounted wireless earphones. Headphones, etc., but not limited to.
  • the earphone is an in-ear earphone, including a feedback microphone and a feedforward microphone, and has an ear cap structure that fits the ear canal.
  • the feedback microphone is used to detect the audio signal in the ear canal
  • the feed-forward microphone is used to detect the external audio signal of the earphone.
  • Feedback microphones are also known as internal microphones
  • feedforward microphones are also known as external microphones.
  • the ear cap structure of the headphones fits the ear canal, the detected audio can be played into the ear canal through the speaker of the earphone, and then the audio signal in the ear canal is collected through the feedback microphone , collect the audio signal outside the earphone through the feed-forward microphone.
  • the noise-cancelling headset when the user is wearing a noise-cancelling headset, the noise-cancelling headset has an earmuff structure that covers the auricle, and the detected audio can be played into the earmuff through the speaker of the headset, and then passed
  • the feedback microphone collects audio signals in the earmuffs, and the feedforward microphone collects audio signals outside the earmuffs.
  • the internal detection signal is the audio signal in the user's ear canal collected by the feedback microphone of the earphone, or it may be the audio signal in the user's ear canal collected by the feedback microphone when the earphone is in the wearing state to play detection audio.
  • the external detection signal is an audio signal outside the earphone collected by the feed-forward microphone, or it may be an audio signal outside the earphone collected by the feed-forward microphone when the earphone is playing the detection audio in the wearing state.
  • the feedback microphone of the earphone collects the audio signal in the user's ear canal to obtain the internal detection signal.
  • the feed-forward microphone of the earphone collects the audio signal outside the earphone to obtain an external detection signal.
  • the internal detection signal corresponding to the detected audio is obtained through the feedback microphone, and the external detection signal corresponding to the detected audio is obtained through the feedforward microphone, including:
  • 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.
  • the detection audio can be played into the ear canal through the speaker of the earphone.
  • the feedback microphone of the earphone collects the audio signal in the user's ear canal to obtain an internal detection signal.
  • the feedforward microphone of the earphone collects the audio signal outside the earphone to obtain the external detection signal.
  • the feedback microphone can be an internal microphone and the feedforward microphone can be an external microphone.
  • the earphone includes an earphone cavity, a loudspeaker, an internal microphone, an external microphone, a digital signal processor, a storage circuit, a power supply circuit and the like.
  • the speaker is used to play fit detection audio source signal, music signal, active noise reduction and anti-phase noise, etc.
  • the internal microphone and the external microphone are used for ANC (Active Noise Cancellation, active noise cancellation), signal acquisition of the headphone fit detection algorithm, and the audio signal processing chip circuit is used to run the ANC algorithm and the headphone fit detection algorithm.
  • the storage circuit is used for storing the sound source PCM (Pulse Code Modulation, pulse code modulation) audio data of the fit detection.
  • the power supply circuit can supply power to other hardware components, and the power supply source is the built-in battery of the earphone.
  • the speaker may be a horn.
  • the user actively triggers the earphone fit detection function through the control application program in the terminal that detects the earphone fit degree.
  • the earphone plays the detection audio pre-stored on the earphone end, and the internal microphone and the external microphone
  • the collected audio signal enters the DSP (Digital Signal Process, digital signal processing module) module to complete the fit detection calculation, and the fit detection result is transmitted to the terminal's control application program for display through Bluetooth.
  • the digital signal processor can also be replaced by other processors.
  • energy information corresponding to the internal detection signal is determined, and cross-correlation information between the external detection signal and the detection audio is determined.
  • the energy information refers to information related to the energy of the internal detection signal, for example, it may include the sum of the signal amplitude values at each frequency point, the sum of the squares of the signal amplitude values at each frequency point, and the square integral of the signal amplitude values at each frequency point at least one of the
  • the cross-correlation information is information for characterizing the degree of cross-correlation between the external detection signal and the detection audio.
  • the digital signal processor of the earphone 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 according to the external detection signal and the detection audio, and obtain the external correlation Related Information.
  • the digital signal processor of the earphone can obtain the signal amplitude corresponding to each frequency point in the internal detection signal, and calculate the energy information according to the signal amplitude corresponding to each frequency point.
  • the signal amplitude refers to the amplitude 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.
  • the digital signal processor of the earphone can obtain 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, according to the signal amplitude and the corresponding signal amplitude of the external detection signal The amplitude of each signal corresponding to the detected audio is used to calculate the external cross-correlation information.
  • Operation 208 determine the sound leakage condition of the earphone according to the reference energy information, the energy information, the reference cross-correlation information and the cross-correlation information.
  • the reference energy information refers to 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 feedback microphone of the earphone in the anechoic environment, or the detection audio collected and played by the feedback microphone of the earphone in the standard wearing state in the anechoic environment The resulting audio signal.
  • the reference cross-correlation information is information used to characterize the degree of cross-correlation between the first reference detection signal and the second reference detection signal.
  • the first reference detection signal is an audio signal obtained by collecting and playing detection audio by a feed-forward microphone in a noise-cancelling environment, or it may be an audio signal collected and played by a feed-forward microphone of an earphone in a standard wearing state in a noise-cancelling environment The resulting audio signal of the detected audio.
  • the second reference detection signal is the corresponding audio signal obtained by collecting and playing the detected audio by the feed-forward microphone in the noise-cancelling environment, or it can also be the audio signal collected and played by the feed-forward microphone of the earphone in the non-wearing state in the noise-cancelling environment The corresponding audio signal is obtained from the detected audio.
  • the reference energy information and the reference cross-correlation information may be pre-stored in the headset, or stored in a terminal device communicatively connected with the headset.
  • the reference energy information and the reference cross-correlation information can be pre-stored in the memory of the earphone, and the reference energy information and the reference cross-correlation information can be read from the memory when detecting; the reference energy information and the reference cross-correlation information can also be stored in the earphone communication connection In the terminal device, when the earphone performs detection, the reference energy information and the reference cross-correlation information are acquired from the terminal device.
  • the digital signal processor of the earphone obtains the reference energy information and the reference cross-correlation information, calculates the fitting degree of the earphone in the wearing state according to the reference energy information, energy information, reference cross-correlation information and cross-correlation information, and determines the fit degree of the earphone according to the fitting degree Sound leakage condition in wearing state.
  • the digital signal processor can determine the weights corresponding to the reference energy information, the energy information, the reference cross-correlation information and the cross-correlation information respectively, and combine the reference energy information, the energy information, the reference cross-correlation information, the cross-correlation information and the corresponding
  • the weights of the earphones are weighted and summed to obtain the fit degree of the earphone in the wearing state, and the sound leakage status of the earphone in the wearing state is represented by the fit degree. The tighter the fit, the less sound leaks, and the tighter the fit, the more sound leaks.
  • the digital signal processor can determine the energy correlation degree between the reference energy information and the energy information, and the cross-correlation correlation degree between the reference cross-correlation information and the cross-correlation information, according to the energy correlation degree and the cross-correlation correlation degree, to calculate the fit degree of the headset in the wearing state.
  • the degree of energy correlation can be represented by the reference energy information and the ratio or difference between the energy information
  • the cross-correlation degree can be represented by the reference cross-correlation information and the ratio or difference between the cross-correlation information.
  • the earphone plays the detection audio
  • the internal detection signal corresponding to the detection audio is obtained through the feedback microphone
  • the external detection signal corresponding to the detection audio is obtained through the feedforward microphone
  • the signal in the ear canal and the external signal of the earphone can be collected through different microphones at the same time.
  • signal of. Determine the cross-correlation information between the obtained detection signal outside the earphone and the detection audio, and know the degree of cross-correlation between the detected signal outside the earphone and the original detection audio, combined with reference energy information, internal energy information, and reference Multi-faceted information such as cross-correlation information and external cross-correlation information can accurately detect the sound leakage of the earphone when it is worn.
  • the audio signal collected by the feedback microphone and the feedforward microphone is used to calculate the sound leakage of the earphone, without using additional hardware, which can save hardware costs.
  • a detection method applied to earphones, comprising:
  • the ratio or difference between the reference energy information and the energy information can be determined, and the ratio or difference can be used as the fitting degree of the earphone.
  • the sound leakage of headphones is characterized by the fit of the headphones.
  • the energy weight may be obtained, and the sound leakage condition of the earphone is determined according to the energy weight, reference energy information, and energy information.
  • a ratio between the reference energy information and the energy information may be calculated, and the product of the ratio and the energy weight is used as the fitting degree of the earphone.
  • the sound leakage of headphones is characterized by the fit of the headphones.
  • acquiring the internal detection signal corresponding to the detected audio through the feedback microphone includes: acquiring the internal detection signal corresponding to the detected audio through the feedback microphone in the wearing state.
  • the internal detection signal corresponding to the detected audio is obtained through the 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 earphone can be accurately determined, and the calculation amount Small. Moreover, the sound leakage of the earphone can be detected based on the signal collected by the feedback microphone, without using redundant hardware, which can save hardware cost.
  • a detection method applied to earphones, comprising:
  • a ratio or difference between the reference cross-correlation information and the cross-correlation information can be determined, and the ratio or difference can be used as the fitting degree of the earphone.
  • the sound leakage of headphones is characterized by the fit of the headphones.
  • the cross-correlation weight may be obtained, and the sound leakage condition of the earphone is determined according to the cross-correlation weight, 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 the preset coefficient and the ratio can be calculated, and the product of the difference and the cross-correlation weight can be used as the fitting degree of the earphone.
  • the sound leakage of headphones is characterized by the fit of the headphones.
  • acquiring the external detection signal corresponding to the detected audio through the feedforward microphone includes: acquiring the external detection signal corresponding to the detected audio through the feedforward microphone in the wearing state.
  • the external detection signal corresponding to the detection audio is obtained through the feed-forward microphone, and the cross-correlation information between the obtained detection signal outside the earphone and the detection audio is determined, so that the detected signal outside the earphone and the original Detects the degree of cross-correlation between audio.
  • the cross-correlation information and the reference cross-correlation information the sound leakage condition of the earphone in the wearing state can be accurately detected, and the calculation amount is small.
  • the sound leakage of the earphone can be detected based on the signal collected by the feed-forward microphone, without using redundant hardware, which can save hardware cost.
  • a detection method applied to earphones, comprising:
  • the first external detection signal is an audio signal outside the earphone collected by a feed-forward microphone when the earphone is playing detection audio in a wearing state.
  • the second external detection signal refers to that the earphone plays the detection audio when the earphone is not worn, and feeds forward the audio signal outside the earphone collected by the microphone.
  • the external cross-correlation information is information used to characterize the degree of cross-correlation between the first external detection signal and the second external detection signal.
  • the detection audio is played through the speaker, and the earphone collects an audio signal outside the earphone through a feed-forward microphone to obtain a second external detection signal.
  • the digital signal processor of the earphone may calculate energy information corresponding to the internal detection signal, that is, internal energy information.
  • the digital signal processor of the earphone can calculate the cross-correlation information between the first external detection signal and the second external detection signal according to the first external detection signal and the second external detection signal to obtain the external cross-correlation information.
  • the digital signal processor of the earphone can obtain 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, according to the first external detection signal
  • Each signal amplitude corresponding to the signal and each signal amplitude corresponding to the second external detection signal calculate external cross-correlation information.
  • the second external detection signal corresponding to the detection audio is obtained through the feedforward microphone, including:
  • the detection audio played is collected by the feedforward microphone to obtain a corresponding audio signal; the second filtering process is performed on the audio signal collected by the feedforward microphone to obtain a second external detection signal.
  • the second filtering process is used to separate the middle and low frequency signals from the audio signal of the detected audio.
  • the mid-low frequency signal separated from the audio signal collected by the feed-forward microphone is the second external detection signal.
  • the second filter processing specifically includes one of high-pass filter processing, low-pass filter processing, band-pass filter processing, and band-stop filter processing.
  • High-pass filtering refers to the use of the frequency characteristics of the filter to allow high-frequency signals to pass through, while low-frequency signals cannot pass through.
  • High-pass filtering refers to allowing low-frequency signals to pass through, while high-frequency signals cannot pass through.
  • Band-stop filtering refers to preventing signals in a certain frequency range from passing and allowing signals in other frequency ranges to pass through.
  • Bandpass filtering refers to allowing signals in a certain frequency range to pass through while preventing signals in other frequency ranges from passing through.
  • Band-pass filtering and band-stop filtering are complementary.
  • the detected audio is a mixed signal composed of ultra-low-frequency single-frequency signals and medium-low frequency signals.
  • the detection audio is played through the speaker.
  • the feed-forward microphone of the earphone collects the audio signal outside the earphone.
  • the digital signal processor of the earphone performs a second filtering process on the audio signal to separate the ultra-low frequency signal, that is A second external detection signal is available.
  • the digital signal processor can determine weights corresponding to reference energy information, internal energy information, reference cross-correlation information and external cross-correlation information respectively, and combine the reference energy information, internal energy information, reference cross-correlation information, external cross-correlation information Relevant information and corresponding weights are weighted and summed to obtain the fit degree of the earphone in the wearing state, and the sound leakage status of the earphone in the wearing state is represented by the fit degree. The tighter the fit, the less sound leaks, and the tighter the fit, the more sound leaks.
  • the digital signal processor can determine the energy correlation degree between the reference energy information and the internal energy information, and the cross-correlation degree between the reference cross-correlation information and the external cross-correlation information, according to the energy correlation degree and the cross-correlation Correlation degree, calculate the fitting degree of the earphone in the wearing state.
  • the degree of energy correlation can be represented by the ratio or difference between reference energy information and internal energy information
  • the degree of cross-correlation can be represented by the ratio or difference between reference cross-correlation information and external cross-correlation information.
  • the earphone plays detection audio when it is worn, the audio signal in the ear canal is collected through the feedback microphone of the earphone, and the external audio signal of the earphone is collected through the feedforward microphone of the earphone, so as to obtain the audio signals collected by different microphones in the same state. different audio signals. Play the detection audio in the non-wearing state, and collect the external audio signal of the earphone through the feed-forward microphone of the earphone, so that the cross-correlation degree between the two external audio signals collected by the same microphone in the wearing state and the non-wearing state can be calculated .
  • the audio signal collected by the feedback microphone and the feedforward microphone is used to calculate the sound leakage of the earphone, without using additional hardware, which can save hardware costs.
  • determining the energy information corresponding to the internal detection signal includes:
  • the segment energy value refers to an energy value corresponding to a signal segment.
  • the digital signal processor of the earphone may divide the internal detection signal into a plurality of signal segments, and the plurality refers to at least two. Further, the digital signal processor may obtain a window function, and divide the internal detection signal into multiple signal segments through the window function, and each signal segment represents an audio signal at a different time.
  • the digital signal processor obtains the signal amplitude of each frequency point in the signal segment, and calculates the segment energy corresponding to the signal segment according to the signal amplitude corresponding to each frequency point in the signal segment value. According to the same processing method, the digital signal processor can calculate the segment energy value corresponding to each signal segment.
  • the digital signal processor can sum the energy values of each segment to obtain the energy value corresponding to the internal detection signal, and use the energy value as energy information.
  • 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 the corresponding weights, obtain the energy value corresponding to the internal detection signal, and use the energy value as the energy information .
  • the digital signal processor may perform smoothing processing on energy values of each segment to obtain smoothed energy values of each segment.
  • the digital signal processor can sum the energy values of each segment after smoothing to obtain an energy value.
  • the digital signal processor may calculate the weights corresponding to the smoothed energy values of each segment, and sum the products of the smoothed energy values of each segment and the corresponding weights to obtain the energy value.
  • the window length can be set according to the demand, then the expression of the rectangular window is as follows:
  • X n (M) ⁇ *X n (m-1)+(1- ⁇ )*X n (m), 0 ⁇ 1
  • X n (m) is the energy of the current segment before smoothing
  • X n (M) is the energy of the current segment after smoothing
  • X n (m-1) is the energy of the previous segment
  • X n (m) is the energy of the current segment
  • is the weight of the energy of the previous segment
  • (1- ⁇ ) is the weight of the energy of the current segment.
  • the internal detection signal is divided into a plurality of signal segments, and for each signal segment in the plurality of signal segments, according to the signal amplitude corresponding to each frequency point in the corresponding signal segment, the corresponding signal segment is accurately calculated in the time domain The corresponding fragment energy value on . Based on the segment energy values 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.
  • determining the cross-correlation information between the external detection signal and the detection audio includes:
  • Operation 602 Determine a first energy value and a first amplitude average value corresponding to the external detection signal according to the signal amplitude corresponding to each frequency point in the external detection signal.
  • the digital signal processor of the earphone may acquire signal amplitudes corresponding to each frequency point in the external detection signal, and sum the signal amplitudes corresponding to each frequency point to obtain the first energy value.
  • the weighted summation is performed on the signal amplitudes corresponding to the respective frequency points to obtain the first energy value.
  • the digital signal processor of the earphone 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 amplitude mean value corresponding to the external detection signal. Alternatively, the ratio of the first energy value obtained by weighting and summing the signal amplitudes of each frequency point to the number of frequency points is used as the first average amplitude value.
  • determining the first energy value corresponding to the external detection signal includes: dividing the external detection signal into a plurality of external signal segments; For each external signal segment in the segment, according to the signal amplitude corresponding to each frequency point in the corresponding external signal segment, determine the external segment energy value corresponding to the corresponding external signal segment; based on the external segment energy value corresponding to each external signal segment, A first energy value corresponding to the external detection signal is determined.
  • the specific processing manner is similar to the above-mentioned processing process of determining the energy information corresponding to the internal detection signal, and will not be repeated here.
  • Operation 604 Determine a second energy value and a second amplitude mean value corresponding to the detected audio according to the signal amplitude corresponding to each frequency point in the detected audio.
  • the digital signal processor of the earphone may obtain signal amplitudes corresponding to each frequency point in the detected audio, and sum the signal amplitudes corresponding to each frequency point to obtain the second energy value.
  • weighted summation is performed on signal amplitudes corresponding to each frequency point to obtain the second energy value.
  • the digital signal processor of the earphone can determine the number of frequency points in the middle frequency point of 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 value corresponding to the detected audio. Alternatively, the ratio of the second energy value obtained by performing weighted summation of the signal amplitudes of each frequency point to the number of frequency points is used as the second average amplitude value.
  • determining the second energy value corresponding to the detected audio includes: dividing the detected audio into a plurality of signal segments; for each of the plurality of signal segments For the signal segment, determine the segment energy value corresponding to the corresponding signal segment according to the signal amplitude corresponding to each frequency point in the corresponding signal segment; determine the second energy value corresponding to the detected audio based on the segment energy value corresponding to each signal segment.
  • the specific processing manner is similar to the above-mentioned processing process of determining the energy information corresponding to the internal detection signal, and will not be repeated here.
  • Operation 606 based on the first energy value, the first amplitude mean value, the second energy value and the second amplitude mean value, determine cross-correlation information between the external detection signal and the detection audio.
  • the digital signal processor of the earphone calculates the cross-correlation value between the external detection signal and the detection audio according to the first energy value, the first amplitude mean value, the second energy value and the second amplitude mean value.
  • the cross-correlation value can be used to characterize the cross-correlation information between the external detection signal and the detection audio.
  • the first energy value and the first amplitude average value of the external detection signal are calculated, and the second energy value and the second amplitude average value of the detected audio frequency can be used as the calculation between the external detection signal and the detected audio frequency.
  • the condition of the degree of correlation fully considers various influencing factors, making the calculation of the degree of cross-correlation between the two more accurate.
  • determining the cross-correlation information between the external detection signal and the detection audio includes:
  • the digital signal processor of the earphone determines the difference between the first energy value and the first amplitude mean value, and calculates the difference between the second energy value and the second amplitude mean value, and the digital signal processor calculates the difference between the two differences Calculate the expected value by multiplying the values to get the expected value between the external detection signal and the detection audio.
  • the digital signal processor calculates a first square of the difference between the first energy value and the first amplitude mean, and a second square of the difference between the second energy value and the second amplitude mean.
  • the digital signal processor calculates a product between the expectation of the first square value and the expectation of the second square value and squares the product to obtain the square root.
  • the digital signal processor calculates a ratio of the expected value to the square root, and uses the ratio of the expected value to the square root as a cross-correlation value between the external detection signal and the detection audio.
  • the cross-correlation value is used to represent the cross-correlation information between the external detection signal and the detection audio.
  • the digital signal processor of headphones calculates the cross-correlation value by the following formula:
  • p ij is the cross-correlation value between audio signal i and audio signal j
  • s i (t) is the energy value corresponding to audio signal i
  • s j (t) is the energy value corresponding to audio signal j
  • E(s i (t)) is the mean amplitude value corresponding to audio signal i
  • E(s j (t)) is the mean amplitude value corresponding to audio signal j.
  • E[(s i (t)-E(s i (t))))(s j (t)-E(s j (t)))] is the expected value of audio signal i and audio signal j.
  • the cross-correlation value satisfies
  • ⁇ 1, when p ij 0, it means that s i (t) and s j (t) are not correlated; when 0 ⁇
  • 1, it means that s i (t) and s j (t) are completely correlated.
  • the external detection signal can be taken as i
  • the detection audio can be taken as j
  • the first energy value can be taken as s i (t)
  • the first amplitude mean value can be taken as E(s i (t))
  • taking the second energy value as s j (t) and the second amplitude mean value as E(s j (t)) substituting the above formula to calculate the cross-correlation value p ij .
  • the expected value between the external detection signal and the detected audio frequency is calculated, and the difference between the first energy value and the first amplitude mean value is calculated.
  • the first squared value of the difference, and the second squared value of the difference between the second energy value and the second magnitude mean determine the square root of the product between the expectation of the first squared value and the expected second squared value, dividing the expected value with the square root
  • the ratio of is used as the cross-correlation information between the external detection signal and the detection audio, so that the degree of cross-correlation between the external detection signal and the detection audio can be accurately calculated.
  • obtaining reference energy information includes:
  • the played detection audio through the feedback microphone of the earphone in the standard wearing state, and obtain the corresponding internal reference detection signal;
  • the standard wearing state represents the state of seamless fit between the earphone and the test fixture;
  • test fixture is a test tool for assisting in testing the sound leakage state of the earphone.
  • This standard wearing state represents the state of seamless fit between the earphone and the test fixture when the earphone is worn.
  • the test fixture can be shown in Figure 7.
  • An anechoic environment refers to an environment free from external noise disturbances.
  • the standard wearing state represents a state of seamless fit between the earphone and the ear of the artificial head or the ear of a real person when the earphone is worn.
  • the earphone in an anechoic environment, is placed in the acoustic coupling cavity of the test fixture, so that the earphone and the test fixture are seamlessly fitted to ensure good airtightness and achieve a standard wearing state.
  • Play audio in an anechoic environment collect the audio signal in the acoustic coupling cavity of the test fixture through the feedback microphone of the earphone, and obtain the internal reference detection signal.
  • the digital signal processor can calculate energy information corresponding to the internal reference detection signal, that is, reference energy information.
  • the audio signal in the acoustic coupling cavity of the test fixture is collected by the feedback microphone of the earphone, and a first filtering process is performed on the collected audio signal to obtain an internal reference detection signal.
  • the digital signal processor may obtain signal amplitudes corresponding to each frequency point in the internal reference detection signal, and calculate reference energy information through the signal amplitudes corresponding to each frequency point. Further, the digital signal processor may sum the signal amplitudes of the frequency points, or add weighted sums to obtain a reference energy value, and use the reference energy value as reference energy information.
  • determining the reference energy information corresponding to the internal reference detection signal includes: dividing the internal reference detection signal into a plurality of internal signal segments; for each internal signal segment in the plurality of internal signal segments, according to the corresponding internal signal Based on the signal amplitude corresponding to each frequency point in the segment, the internal segment energy value corresponding to the corresponding signal segment is determined; 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.
  • the specific processing manner is similar to the above-mentioned processing process of determining the energy information corresponding to the internal detection signal, and will not be repeated here.
  • the playback detection audio is collected through the feedback microphone of the earphone in the standard wearing state, and the corresponding internal reference detection signal is obtained.
  • the standard wearing state represents the seamlessness between the earphone and the test fixture. Fitting state, so that the audio signal of the detection audio can be collected without external interference and the earphone is in the standard wearing state, so that the obtained internal reference detection signal is more accurate, and the reference energy information corresponding to the calculated internal reference detection signal is more accurate.
  • the energy information obtained by detection without external interference and the headset is in the standard wearing state can be used as reference information, which can be compared with the energy information obtained by detection under the presence of external interference and the user is wearing the state, and the two can be used as the detection headphone
  • the condition of the sound leakage situation in the wearing state can improve the accuracy of the detection result.
  • obtaining reference cross-correlation information includes:
  • Operation 802 in an anechoic environment, collect the played detection audio through the feed-forward microphone of the earphone in the standard wearing state, and obtain the corresponding first reference detection signal; the standard wearing state represents the seamless bonding between the earphone and the test fixture. combined state.
  • the earphone in an anechoic environment, is placed in the acoustic coupling cavity of the test fixture, so that the earphone and the test fixture are seamlessly fitted to ensure good airtightness and achieve a standard wearing state.
  • the audio is played in an anechoic environment, and the audio signal in the acoustic coupling cavity of the test fixture is collected through the feed-forward microphone of the earphone to obtain the first reference detection signal.
  • the audio signal in the acoustic coupling cavity of the test fixture is collected by the feed-forward microphone of the earphone, and the collected audio signal is subjected to a second filtering process to obtain the first reference detection signal.
  • the standard wearing state represents a state of seamless fit between the earphone and the ear of the artificial head or the ear of a real person when the earphone is worn.
  • Operation 804 in the noise-cancelling environment, collect the played detection audio through the feed-forward microphone of the earphone in the non-wearing state, and obtain a corresponding second reference detection signal.
  • the non-wearing state refers to the state where the earphone is placed in a free sound field, without airtightness and full leakage.
  • the speaker of the earphone in the unworn state plays the detection audio
  • the audio signal of the played detection audio is collected by the feed-forward microphone of the earphone to obtain the second reference detection signal.
  • the audio signal of the played detection audio is collected by the feed-forward microphone of the earphone, and a second filtering process is performed on the collected audio signal to obtain a second reference detection signal.
  • Operation 806 determining reference cross-correlation information between the first reference detection signal and the second reference detection signal.
  • the reference cross-correlation information is information used to characterize the degree of cross-correlation between the first external audio signal and the second external audio signal.
  • the reference cross-correlation information may specifically be a reference cross-correlation value.
  • the digital signal processor of the earphone may calculate cross-correlation information between the first reference detection signal and the second reference detection signal according to the first reference detection signal and the second reference detection signal, to obtain reference cross-correlation information. Further, the digital signal processor can obtain the signal amplitude corresponding to each frequency point in the first reference detection signal, and the signal amplitude corresponding to each frequency point in the second reference detection signal, and according to each signal corresponding to the first reference detection signal The amplitude and the amplitude of each signal corresponding to the second reference detection signal are calculated with reference to the cross-correlation information.
  • determining reference cross-correlation information between the first reference detection signal and the second reference detection signal includes:
  • 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 value corresponding to the first reference detection signal; according to the signal corresponding to each frequency point in the second reference detection signal Amplitude, determine the second reference energy value and the second reference amplitude mean value corresponding to the second reference detection signal; based on the first reference energy value, the first reference amplitude mean value, the second reference energy value and the second reference amplitude mean value, determine the first Reference cross-correlation information between the reference detection signal and the second reference detection signal.
  • the reference cross-correlation information between the first reference detection signal and the second reference detection signal is determined ,include:
  • the first reference amplitude mean value, the second reference energy value and the second reference amplitude mean value calculate the reference expectation value between the first reference detection signal and the second reference detection signal; calculate the first reference energy value and The first reference square value of the difference between the first reference amplitude mean value, the second reference square value of the difference between the second reference energy value and the second reference amplitude mean value; determine the expectation of the first reference square value and the second reference square value
  • the square root of the product between expectations will be referred to as the ratio of the expected value to the square root as reference cross-correlation information between the first reference detection signal and the second reference detection signal.
  • the detection audio played in the standard wearing state and the non-wearing state are respectively collected through the feedforward microphone of the earphone, and the audio signal outside the earphone collected in the standard wearing state can be obtained
  • Computing the degree of cross-correlation between the audio signals detected in the two states and the external audio signals collected in the non-wearing state can detect the leakage degree of the earphone to the sound signal, and further improve the accuracy of the detection results.
  • the sound leakage condition of the earphone in the wearing state is determined, including:
  • the energy weight refers to the weight corresponding to the energy information
  • the cross-correlation weight refers to the weight corresponding to the cross-correlation information
  • the digital signal processor can obtain energy weights and cross-correlation weights.
  • the digital signal processor can determine the reference energy information and the energy correlation degree between the energy information, and the reference cross-correlation information and the cross-correlation degree between the cross-correlation information, and combine the energy correlation degree and the cross-correlation degree.
  • the energy correlation degree, energy weight, cross-correlation correlation degree and cross-correlation weight the sound leakage status of the earphone in the wearing state is determined.
  • the sound leakage condition of the earphone in the wearing state is determined through the fit degree, or the sound leakage state of the earphone in the wearing state is characterized by the fit degree.
  • a digital signal processor may obtain energy weights and cross-correlation weights. Determine the energy weights corresponding to the reference energy information and the internal energy information respectively, determine the cross-correlation weights corresponding to the reference cross-correlation information and the cross-correlation information respectively, and combine the reference energy information, energy information, reference cross-correlation information, cross-correlation information and corresponding weights Perform weighted summation to obtain the fit degree of the earphone in the wearing state.
  • different weights are assigned to the reference energy information, energy information, reference cross-correlation information, and cross-correlation information, so that the degree of attention to the reference energy information, energy information, reference cross-correlation information, and cross-correlation information is different, and the key
  • the information is assigned a greater weight, and the non-key information is assigned a smaller weight, so that the accuracy of sound leakage detection of the earphone in the wearing state can be further improved.
  • the sound leakage condition of the earphone is determined according to reference energy information, energy information, reference cross-correlation information, cross-correlation information, energy weight and cross-correlation weight, including:
  • the digital signal processor of the earphone calculates an energy ratio between the energy information and the reference energy information, and the energy ratio may represent an energy correlation degree between the energy information and the reference energy information.
  • the digital signal processor calculates the cross-correlation ratio between the cross-correlation information and the reference cross-correlation information, and calculates the difference between the preset coefficient and the cross-correlation ratio.
  • the difference or cross-correlation ratio can represent the cross-correlation information and the reference cross-correlation Interrelationship between information.
  • the digital signal processor calculates the product of the energy ratio and the energy weight, and calculates the product of the difference and the cross-correlation weight, and sums the two products to obtain the fitting degree of the earphone in the wearing state.
  • the degree of fit represents the sound leakage of the earphone in the wearing state. The higher the degree of fit, the less sound leakage, and the lower the degree of fit, the more sound leakage.
  • the sum of the energy weight and the cross-correlation weight is equal to a preset coefficient, for example, the energy weight is alpha, the cross-correlation weight is beta, and the preset coefficient is 1, then the following relationship is satisfied:
  • the digital signal processor can calculate the fit by the following formula:
  • Gr Pn/Png*alpha+(1-Qn/Qng); 0 ⁇ Gr ⁇ 1
  • Gr is the fit degree
  • Pn is the energy information
  • Png is the reference energy information
  • Qn is the cross-correlation information
  • Qng is the reference cross-correlation information
  • 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, and the energy The product of the ratio and the energy weight, and the sum of the product of the difference and the cross-correlation weight are used as the fit degree of the earphone in the wearing state, and the sound leakage of the earphone in the wearing state can be represented by the fit degree, so as to accurately detect The sound leakage condition of the headphones.
  • the detected audio is mixed audio; the internal detection signal corresponding to the detected audio is obtained through a feedback microphone, including:
  • the first filtering process is performed on the audio signal collected by the feedback microphone to obtain an internal detection signal within the first frequency range;
  • the external detection signal corresponding to the detection audio through the feed-forward microphone including:
  • the audio signal corresponding to the detection audio is collected by the feedforward microphone; the audio signal collected by the feedforward microphone is subjected to a second filtering process to obtain an external detection signal within the second frequency range; the upper limit of the first frequency range is less than the second The lower limit value of the frequency band range.
  • the first filtering process is used to separate the ultra-low frequency signal from the audio signal of the detected audio
  • the ultra-low frequency signal 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 in the wearing state, collected from the feedforward microphone.
  • the middle and low frequency signal separated from the audio signal is the external detection signal.
  • the first filter processing specifically includes one of high-pass filter processing, low-pass filter processing, band-pass filter processing, and band-stop filter processing.
  • the second wave processing specifically includes one of high-pass filter processing, low-pass filter processing, band-pass filter processing, and band-stop filter processing.
  • the detected audio is an audio composed of signals in different frequency bands mixed, and specifically may be an audio obtained by mixing signals within the first frequency range and signals within the second frequency range.
  • the upper limit of the first frequency range is smaller than the lower limit of the second frequency range.
  • it is a mixed signal composed of an ultra-low frequency single-frequency signal and a medium-low frequency signal.
  • the detection audio is played when the earphone is worn by the user, and the feedback microphone of the earphone collects the audio signal in the ear canal of the user. Then, the audio signal is first filtered through the digital signal processor of the earphone, and the ultra-low frequency signal is separated to obtain the internal detection signal.
  • the feed-forward microphone of the earphone collects the audio signal outside the earphone, and the digital signal processor of the earphone performs a second filtering process on the audio signal to separate the ultra-low frequency signal to obtain the external detection signal.
  • the second filtering process is different from the first filtering process, which means that the first filtering process is used for filtering processing of separating ultra-low frequency signals, and the second filtering processing is used for filtering processing of separating medium and low frequency signals.
  • the first filtering process and the second filtering process can be the same type of filtering process, for example, both can be band-pass filtering processes, that is, the first band-pass filtering process and the second band-pass filtering process, but the first band-pass filtering process
  • the processing allows ultra-low frequency signals to pass while blocking signals in other frequency ranges
  • the second bandpass filter processing allows mid-low frequency signals to pass while blocking signals in other frequency ranges.
  • collecting the audio signal corresponding to the detection audio through the feedback microphone includes: collecting the audio signal corresponding to the detection audio through the feedback microphone of the earphone in the wearing state;
  • Collecting the audio signal corresponding to the detected audio through the feedforward microphone includes: collecting and detecting the audio signal corresponding to the audio through the feedforward microphone in the wearing state.
  • FIG. 9 is a schematic diagram of filtering a signal by the bandpass filter a in an embodiment.
  • the horizontal axis of the coordinate system in Figure 9 is the signal input to the band-pass filter a, and the vertical axis is the attenuation range of the input signal by the band-pass filter a.
  • the signal input to the band-pass filter a is 10 -2 kHz, namely 10HZ, the corresponding attenuation range is 0, then the signal output by the band-pass filter a is still a 10HZ signal; the signal on the horizontal axis is 10 -1 kHz, that is, 100HZ, and the corresponding attenuation range on the vertical axis is -30, then the band-pass The signal output by the filter a is a 70HZ signal.
  • FIG. 10 is a schematic diagram of filtering a signal by the bandpass filter b.
  • Bandpass filter a is different from bandpass filter b.
  • the horizontal axis of the coordinate system in FIG. 10 is the signal input to the band-pass filter b, and the vertical axis is the attenuation range of the input signal by the band-pass filter b.
  • the band-pass filter a and band-pass filter b have different attenuation ranges for the same signal.
  • the attenuation range of band-pass filter b for a 100HZ signal is about -21dB, while The band-pass filter b has an attenuation range of -30 for the 100HZ signal, and the required ultra-low frequency signal and mid-low frequency signal can be filtered out through the band-pass filter a and band-pass filter b.
  • the played detection audio is collected through the feedback microphone and the feedforward microphone of the earphone respectively to obtain corresponding audio signals.
  • the audio signals collected by the feedback microphone and the feedforward microphone are respectively filtered accordingly, and the mid-ultra-low frequency signal and the mid-low frequency signal can be separated from the audio signal.
  • the separated signal is not easily disturbed by the external environment, making the collected data more accurate .
  • two microphones are used to collect audio signals inside and outside the earphone respectively.
  • the audio signal collected by the feedback microphone is closer to the signal of the human ear canal, and the signal collected by the feedforward microphone is closer to the audio signal leaked by the earphone, so that it can be combined
  • the audio data inside and outside the earphones can accurately detect the sound leakage situation, which helps to improve the accuracy of the detection results.
  • before playing the detection audio it also includes:
  • the frequency response calibration refers to the calibration of the frequency response.
  • Frequency response is used in electronics to describe the difference in the ability of an instrument to process signals of different frequencies.
  • the frequency response is also called the response curve, which refers to the change curve of gain with frequency. Any audio equipment or carrier has its frequency response curve.
  • the carrier refers to the object on which the sound signal is recorded. The ideal frequency response curve should be flat, and the sound signal will not be distorted after passing through.
  • the frequency response calibration of the earphone needs to be performed in a quiet environment.
  • the ambient noise is collected through the feed-forward microphone of the earphone to obtain the corresponding noise signal.
  • the digital signal processor of the earphone detects the signal amplitude of each frequency point in the collected noise signal, and calculates the current noise value corresponding to the current environmental noise according to the signal amplitude of each frequency point. The value is used to represent the signal strength of the current ambient noise.
  • the digital signal processor obtains the preset noise threshold, and compares the current noise value with the noise threshold. If the current noise value is not lower than the noise threshold, it means that the current environmental noise is relatively obvious, and it is not suitable for the frequency response calibration of the earphone. Then the user is prompted to calibrate in a quiet environment that meets the conditions. If the current noise value is lower than the noise threshold, it means that the current environment is relatively quiet and the frequency response calibration of the earphone can be performed, and then the frequency response calibration operation of the earphone is performed. The operation of calibrating the frequency response of the earphones can be actively triggered by the user, or can be automatically performed by the earphones.
  • the calculation method for judging the current environmental noise intensity is as follows:
  • Q(m) is the noise value of the current environment noise
  • is the weight coefficient
  • detecting the noise value of the current environmental noise can automatically help the user determine whether the detected current environment is suitable for the earphone to perform frequency response calibration.
  • Carrying out frequency response calibration when the current noise value is lower than the noise threshold can avoid the impact of environmental noise, especially sudden noise, on the frequency response calibration of the earphones, thereby improving the accuracy of the frequency response calibration of the earphones, thereby greatly improving The accuracy of fit detection improves user experience.
  • performing frequency response calibration on the earphones includes: obtaining an actual transfer function of the earphone; calculating a transfer function calibration parameter according to the actual transfer function and a reference transfer function; and calibrating the actual transfer function based on the transfer function calibration parameter.
  • the frequency response calibration of the earphone is the calibration of the actual transfer function between the speaker and the feedback microphone. Furthermore, it is the calibration of the actual transfer function between the speaker of the earphone and the feedback microphone when the earphone is placed in the charging compartment. Alternatively, it is a calibration of the actual transfer function between the speaker of the headset and the feedback microphone in a standard wearing state.
  • the charging compartment refers to the space used for earphone charging.
  • the in-ear noise-cancelling headphones are True Wireless Stereo (TWS)
  • TWS True Wireless Stereo
  • the speaker of the headset plays the preset detection sound source stored in the headset as a reference signal.
  • the detection audio can be comfortable white noise or pink noise, which is picked up by the feedback microphone of the headset.
  • the response calibration algorithm calculates the calibration filter parameters. Place the earphones in the charging case, play the detected audio source, and obtain the actual transfer function between the speaker of the earphones and the feedback microphone. Alternatively, play the detected sound source in an anechoic environment to obtain the actual transfer function between the speaker of the earphone and the feedback microphone in the standard wearing state.
  • the digital signal processor obtains the reference transfer function, and calculates transfer function calibration parameters according to the actual transfer function and the reference transfer function, so as to calibrate the actual transfer function through the transfer function calibration parameters and realize the calibration of the frequency response of the earphone.
  • obtaining the actual transfer function of the earphone includes: obtaining the transfer function between the speaker of the earphone and the feedback microphone when the earphone is placed in the charging compartment as the actual transfer function; The transfer function between the loudspeaker and the feedback microphone is taken as the actual transfer function.
  • the actual transfer function is detected in the charging compartment.
  • the airtightness of the charging compartment is better, which can reduce the interference of the external environment; at the same time, the airtightness of the charging compartment can also reduce the low-frequency attenuation, and the calibration result is more accurate.
  • the standard wearing state refers to the state where the earphone is worn tightly, that is, the state where there is no gap between the earphone and the simulated test object when wearing the earphone.
  • the simulated test object refers to a simulated object used to correct the gain of the actual transfer function.
  • the simulation test object can be artificial head, test fixture and so on.
  • the wearing condition of the earphone will be detected by using the simulated test object.
  • the actual transfer function will be tested when the earphone is worn on the simulated test object, and the gain of the actual transfer function will be corrected, so that after the earphone leaves the factory, the user can Accurately detects the attenuation of detected audio played by headphones.
  • FIR Finite Impulse Response, finite impulse response
  • M(k) is the calibration filter in the frequency domain state
  • H(k) is the detected frequency response curve from the speaker to the internal microphone, that is, the frequency response curve before calibration.
  • denotes the regularized filter weighting scalar
  • B(k) denotes the Fourier transform of the regularized filter response
  • D(k) denotes the Fourier transform of the ideal bandpass filter response.
  • the actual transfer function of the earphone is obtained, the transfer function calibration parameters are calculated according to the actual transfer function and the reference transfer function, and the actual transfer function is calibrated based on the transfer function calibration parameters, which can eliminate the differences in the acoustic device itself and the differences in the assembly process. resulting in acoustic errors.
  • the fit test of the earphones can be performed to improve the accuracy of the fit test results.
  • the sound leakage condition of the earphone in the wearing state is characterized by the fitting degree of the earphone in the wearing state; after determining the sound leakage condition of the earphone in the wearing state, it also includes:
  • the fitting degree level of the earphone in the wearing state is determined; and the enhanced noise reduction processing or the sound quality compensation processing is performed according to the fitting degree level.
  • the preset fitting degree threshold refers to a preset fitting degree of the earphone in a wearing state.
  • the fitting degree of earphones can be percentages such as 80%, 60%, 20%, etc., and can also be 0.3, .06, 0.9, etc.
  • the fitting degree level refers to the level corresponding to the preset fitting degree threshold, which may specifically be level 1, level 2, level 3, level 4, and so on. For example, if the preset fitting degree is set to 90% or above, then the corresponding level is Level 1; if the preset fitting degree is set to be below 60%, then the corresponding level is Level 4.
  • the digital signal processor of the earphone calculates the fitting degree of the earphone in the wearing state according to the reference energy information, the energy information, the reference cross-correlation information and the cross-correlation information.
  • the digital signal processor acquires a preset fit threshold, and compares the fit in the wearing state with the preset fit threshold to determine the preset fit threshold that the fit in the wearing state satisfies .
  • the fit degree corresponding to the preset fit degree threshold that the fit degree in the wearing state satisfies is taken as the fit degree level of the earphone in the wearing state.
  • the earphone When the fit level of the earphone in the wearing state does not meet the fit condition, the earphone performs enhanced noise reduction processing or sound quality compensation processing.
  • the fit condition may be that the fit level of the earphone in the wearing state is greater than or equal to the level threshold, and the fit condition is not satisfied if the fit level of the earphone in the wearing state is less than the level threshold. In a case where the fit level of the earphone in the wearing state is less than or equal to the level threshold, the earphone performs enhanced noise reduction processing or sound quality compensation processing.
  • the fit level corresponding to the preset fit threshold is divided into one, two, three, and four levels, and the level threshold is three, and the fit level of the headset in the wearing state is less than or equal to the level
  • the enhanced noise reduction processing or sound quality compensation processing is performed on the earphone.
  • the earphone performs enhanced noise reduction processing, which may include active noise reduction processing or passive noise reduction processing.
  • enhanced noise reduction processing may include active noise reduction processing or passive noise reduction processing.
  • the environment can be filtered, or the noise in the environment can be offset, so as to further reduce the noise.
  • Sound quality compensation refers to adjusting the center frequency of each frequency band to change the timbre of the sound.
  • the sound quality compensation may include bass sound quality compensation, middle tone sound quality compensation, and treble sound quality compensation.
  • Bass is a sound with a frequency lower than a preset frequency, for example, a sound with a frequency of 16Hz-64Hz is a bass.
  • 250Hz-2000Hz can be midrange, 4000Hz-8000Hz can be treble.
  • the earphone can perform bass sound quality compensation to improve the bass sound quality of the music.
  • the degree of sound leakage of the earmuffs worn by the user may be determined according to the degree of fit, so that the noise reduction filter corresponding to the degree of fit is invoked to perform noise reduction processing on the earphones.
  • the fit level of the earphones in the wearing state does not meet the fit conditions, it means that the fit of the earphones is low, and the earphones are likely to leak the audio played by the speaker and be interfered by external noise. Therefore, according to the fit Enhanced noise reduction processing or sound quality compensation can improve the quality of the audio played by the speaker and reduce external noise interference.
  • ear cap matching for some users with special ear canal structures, there is no suitable ear cap matching, that is, the provided large, medium and small ear caps all have sound leakage, and the sound leakage of the ear cap worn by the user can be judged according to the fit test results
  • call the noise reduction filter of the preset gear which can optimize the performance of active noise reduction and improve the user experience. Judging the degree of sound leakage when the user is wearing ear caps based on the results of the fit test, and compensating for the low-frequency band of the music can ensure the sound quality.
  • the method further includes:
  • the fitting degree level of the earphone in the wearing state is determined; and the target ear cap corresponding to the earphone is determined according to the fitting degree level.
  • the digital signal processor of the earphone calculates the fitting degree of the earphone in the wearing state according to the reference energy information, the energy information, the reference cross-correlation information and the cross-correlation information.
  • the digital signal processor acquires a preset fit threshold, and compares the fit in the wearing state with the preset fit threshold to determine the preset fit threshold that the fit in the wearing state satisfies .
  • the fit degree corresponding to the preset fit degree threshold that the fit degree in the wearing state satisfies is taken as the fit degree level of the earphone in the wearing state.
  • the fitting degree can be divided according to a preset step size, such as 0.1, 0.2, etc., but not limited thereto.
  • the digital signal processor can obtain the ear cap model of the earphone, determine the ear cap model corresponding to the ear cap suitable for the ear cap according to the fit level of the ear cap in the wearing state, and use the ear cap corresponding to the ear cap model as the target ear cap. cap.
  • the models of the ear caps are shown in Figure 12.
  • the ear cap models can include large, medium and small models.
  • the digital signal processor classifies the degree of fit of the earphones into four levels according to the degree of fit of the earphones in the wearing state, which means that the earphones are in the wearing state. The degree of sound leakage is relatively high, prompting users to use large-sized ear caps.
  • the fit degree level of the earphone in the wearing state is determined, and the fit degree can be subdivided into multiple levels, and the fit level feedback
  • the fitting performance of the ear caps can intuitively indicate the degree of sound leakage when the earphones are worn, so that users can choose comfortable and air-tight ear caps, which improves the active noise reduction effect and sound quality experience.
  • the fitting degree corresponding to each earcap can be determined when the earphone is used, so that the fitting degree corresponding to each earcap can be compared to determine the best Target ear caps that fit the headset.
  • the earphone is an in-ear wireless earphone with an ear cap structure that fits the ear canal, and both the feedback microphone and the feedforward microphone of the earphone are located at the sound outlet.
  • the earphone may be an in-ear wireless earphone, such as a TWS (True Wireless Stereo, true wireless stereo) ANC earphone, the earphone includes a feedback microphone and a feedforward microphone, and the earphone has an ear cap structure that fits the ear canal,
  • the feedback microphone and the feedforward microphone can be located at the sound outlet of the earphone, the feedback microphone can be located inside the sound outlet, so that the signal collected by the feedback microphone is closer to the audio signal of the human ear canal, and the feedforward microphone can be located at the sound outlet
  • the feedforward microphone is made close to the ear cap structure, so that the signal collected by the feedforward microphone is closer to the leaked audio signal.
  • the distance between the feedback microphone and the feedforward microphone is relatively close, which is more conducive to comparing the degree of cross-correlation between the audio signals detected by the two, thereby helping to improve the accuracy of the detection result.
  • determining the sound leakage condition of the earphone in the wearing state is represented by the fit degree of the earphone in the wearing state; the method further includes: receiving a fit detection instruction sent by the terminal; responding to the fit detection instruction Play the detection audio, perform the operation of obtaining the internal detection signal corresponding to the detection audio through the feedback microphone, and the operation of obtaining the external detection signal corresponding to the detection audio through the feedforward microphone; Send the fitting degree so that the terminal displays the fitting degree.
  • the terminal and the headset can be connected wirelessly or wired.
  • the terminal When the terminal is wirelessly connected to the earphone, it can be connected through a wireless network, can also be connected through Bluetooth, and can also perform near-field communication, and so on.
  • the plug of the earphone cable When the terminal is connected to the earphone by wire, the plug of the earphone cable can be inserted into the connection hole of the terminal for connection.
  • the user may perform a preset operation on the terminal, and the terminal generates a fit detection instruction according to the preset operation, and then sends the fit detection instruction to the earphone.
  • the preset operation may be a preset voice input, touch/click/long press a preset button, input of a preset instruction, and the like.
  • the terminal When the terminal acquires the fitting degree detection instruction, it sends the fitting degree detection instruction to the earphone, and the earphone receives the fitting degree detection instruction, and plays the detection audio in response to the fitting degree detection instruction.
  • a control application program corresponding to the headset can also be installed in the terminal, and the control application program can communicate with the headset; when the user performs a preset operation on the control application program in the terminal, a fit detection instruction is generated.
  • the preset operation may be single click, slide, double click, voice input, etc., but is not limited thereto.
  • the earphone When the earphone acquires the fit degree of wearing, it sends the fit degree to the terminal and displays it in the display interface of the control application program of the terminal, then the user can obtain the fit degree of the earphone from the display interface, thereby Adjust the fit of the earphones.
  • FIG. 13 it is a frame diagram of a detection method applied to earphones in an embodiment.
  • the headset includes an external microphone 1302 (ie, a feedforward microphone) and an internal microphone 1306 (ie, a feedback microphone).
  • External microphone 1302 perform operation 1308 and operation 1312.
  • Operation 1308 collect ambient noise to determine the current noise value, and then perform operation 1310, that is, perform frequency response calibration on the earphone when the current noise value is lower than the noise threshold.
  • operation 1312 is performed, that is, the earphone plays detection audio in the wearing state, collects the audio signal outside the earphone through an external microphone, and performs band-pass filtering on the collected audio signal through the band-pass filter b to obtain the external heartbeat.
  • perform operation 1304 perform band-pass filtering processing on the signal of the detected audio through the band-pass filter b, to obtain filtered detected audio.
  • Operation 1316 is performed to calculate a cross-correlation value between the external detection signal and the filtered detection audio.
  • perform operation 1306, that is, play the detection audio when the earphone is worn collect the audio signal inside the earphone through the internal microphone, and perform operation 1318, that is, perform band-pass filtering processing on the respectively collected audio signals through the band-pass filter a, Get the internal heartbeat.
  • perform operation 1320 that is, calculate an energy value corresponding to the internal detection signal.
  • operation 1322 is performed.
  • Operation 1322 obtain reference energy information and reference cross-correlation information, calculate the fit degree of the earphone according to the reference energy information, energy information, reference cross-correlation information and cross-correlation information, and corresponding weights, and compare the fit degree and fit Threshold for comparison.
  • perform operation 1324 that is, display the degree of sound leakage of the earphone through the result of the fitting degree detection.
  • a detection method applied to earphones, comprising:
  • the feed-forward microphone of the earphone collects the current environmental noise to obtain the corresponding noise signal.
  • the digital signal processor of the earphone determines the signal amplitude corresponding to each frequency point in the noise signal, and determines the current noise value corresponding to the current environmental noise according to the signal amplitude corresponding to each frequency point.
  • the digital signal processor obtains the transfer function between the speaker of the earphone and the feedback microphone when the earphone is placed in the charging compartment as the actual transfer function.
  • the digital signal processor calculates transfer function calibration parameters according to the actual transfer function and the reference transfer function; and calibrates the actual transfer function based on the transfer function calibration parameters.
  • the feedback microphone and the feedforward microphone of the headset collect the played detection audio respectively to obtain the corresponding audio signal; the feedback microphone is used to detect the audio signal in the ear canal, and the feedforward microphone is used to detect the external audio signal of the headset.
  • 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 range;
  • the digital signal processor performs a second filtering process on the audio signal collected by the feedforward microphone to obtain an external detection signal within the second frequency range; the upper limit of the first frequency range is smaller than the lower limit of the second frequency range value.
  • the digital signal processor divides the internal detection signal into a plurality of signal segments; for each signal segment in the plurality of signal segments, according to the signal amplitude corresponding to each frequency point in the corresponding signal segment, determine the segment corresponding to the corresponding signal segment Energy value.
  • the digital signal processor determines energy information corresponding to the internal detection signal based on the segment energy values corresponding to each signal segment.
  • the digital signal processor determines the first energy value and the first amplitude mean value corresponding to the external detection signal according to the signal amplitude corresponding to each frequency point in the external detection signal.
  • the digital signal processor determines the second energy value and the second amplitude mean value corresponding to the detected audio according to the signal amplitude corresponding to each frequency point in the detected audio.
  • the digital signal processor calculates the expected value between the external detection signal and the detected audio frequency according to the first energy value, the first amplitude mean value, the second energy value and the second amplitude mean value; calculates the difference between the first energy value and the first amplitude mean value The first squared value of the difference, and the second squared value of the difference between the second energy value and the second magnitude mean.
  • the digital signal processor determines the square root of the product of the expected first square value and the expected second square value, and uses the ratio of the expected value to the square root as cross-correlation information between the external detection signal and the detected audio.
  • the playback detection audio is collected through the feedback microphone of the earphone in the standard wearing state, and the corresponding internal reference detection signal is obtained;
  • the standard wearing state represents the state of seamless fit between the earphone and the test fixture.
  • the digital signal processor divides the internal reference detection signal into multiple internal signal segments; for each internal signal segment in the multiple internal signal segments, according to the signal amplitude corresponding to each frequency point in the corresponding internal signal segment, determine the corresponding The internal segment energy value corresponding to the 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.
  • the detection audio played is collected by the feed-forward microphone of the earphone in the standard wearing state, and the corresponding first reference detection signal is obtained;
  • the standard wearing state represents the state of seamless fit between the earphone and the test fixture .
  • the detection audio played is collected through the feed-forward microphone of the earphone in the non-wearing state, and the corresponding second reference detection signal is obtained.
  • the digital signal processor determines the first reference energy value and the first reference amplitude mean value corresponding to the first reference detection signal according to the signal amplitude corresponding to each frequency point in the first reference detection signal;
  • the signal amplitude corresponding to each frequency point determines the second reference energy value and the second reference amplitude mean value corresponding to the second reference detection signal; based on the first reference energy value, the first reference amplitude mean value, the second reference energy value and the second reference
  • the amplitude mean value is used to determine reference cross-correlation information between the first reference detection signal and the second reference detection signal.
  • the digital signal processor acquires energy weights and cross-correlation weights.
  • the digital signal processor determines 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; determines the difference between the preset coefficient and the cross-correlation ratio, and The product of the energy ratio and the energy weight, and the sum of the product of the difference and the cross-correlation weight are used as the fitting degree of the earphone in the wearing state.
  • the digital signal processor determines the degree of fit of the earphone in the wearing state according to the relationship between the degree of fit and the preset threshold of fit; and performs enhanced noise reduction processing or sound quality compensation processing according to the degree of fit. Or, determine the target ear cap corresponding to the earphone according to the fit level.
  • detecting the noise value of the current environmental noise can automatically help the user determine whether the detected current environment is suitable for the earphone to perform frequency response calibration.
  • Performing frequency response calibration when the current noise value is lower than the noise threshold can avoid the impact of environmental noise, especially burst noise, on the frequency response calibration of the earphone, thereby improving the accuracy of the frequency response calibration of the earphone.
  • the earphones After completing the frequency response calibration of the earphones, when the earphones are in the wearing state, collect the played detection audio through the feedback microphone and the feed-forward microphone of the earphones respectively, and perform corresponding corresponding analysis on the audio signals collected by the feedback microphone and the feed-forward microphone.
  • the filter processing can separate the mid-ultra-low frequency signal and the mid-low frequency signal from the audio signal. The separated signal is not easily disturbed by the external environment, making the collected data more accurate.
  • two microphones are used to collect audio signals inside and outside the earphone respectively.
  • the audio signal collected by the feedback microphone is closer to the signal of the human ear canal, and the signal collected by the feedforward microphone is closer to the audio signal leaked by the earphone, so that it can be combined Audio data inside and outside the earphones enables accurate detection of sound leakage. Calculate the cross-correlation information between the external detection signal collected by the feedforward microphone and the audio signal of the detection audio in the wearing state, so as to determine the degree of cross-correlation between the external detection signal collected by the feedforward microphone and the audio signal of the detection audio.
  • the playback detection audio is collected through the feedback microphone of the earphone in the standard wearing state, and the corresponding internal reference detection signal is obtained.
  • the standard wearing state represents the state of seamless fit between the earphone and the test fixture. In this way, the audio signal of the detected audio can be collected without external interference and the earphone is in the standard wearing state, so that the obtained internal reference detection signal is more accurate, and the calculated reference energy information corresponding to the internal reference detection signal is more accurate.
  • the detection audio played in the standard wearing state and the non-wearing state are respectively collected through the feed-forward microphone of the earphone, and the audio signal outside the earphone collected in the standard wearing state and the audio signal in the non-wearing state can be obtained.
  • the collected external audio signal is calculated to calculate the degree of correlation between the collected audio signals in these two states, and the degree of leakage of the earphone to the sound signal can be detected.
  • Determine the energy information corresponding to the audio signal in the ear canal, combined with multiple information such as reference energy information, energy information, reference cross-correlation information, and cross-correlation information, combined with multiple information can accurately detect the sound leakage of the earphone when it is worn situation.
  • the audio signal collected by the feedback microphone and the feedforward microphone is used to calculate the sound leakage of the earphone, without using additional hardware, which can save hardware costs.
  • Fig. 14 is a structural block diagram of a detection device of an embodiment. As shown in Figure 14, the detection device 1400 includes:
  • the playing module 1402 is used for playing detection audio.
  • the obtaining module 1404 is configured to obtain an internal detection signal corresponding to the detection audio through the feedback microphone, and obtain an external detection signal corresponding to the detection audio through the feedforward microphone.
  • the information determining module 1406 is configured to determine energy information corresponding to the internal detection signal, and determine cross-correlation information between the external detection signal and the detected audio.
  • the sound leakage determination module 1408 is configured to determine the sound leakage condition of the earphone according to the reference energy information, energy information, reference cross-correlation information and cross-correlation information.
  • the earphone plays detection audio when it is worn, the audio signal in the ear canal is collected through the feedback microphone of the earphone, and the external audio signal of the earphone is collected through the feedforward microphone of the earphone, so as to obtain the audio signals collected by different microphones in the same state. different audio signals. Play the detection audio in the non-wearing state, and collect the external audio signal of the earphone through the feed-forward microphone of the earphone, so that the cross-correlation degree between the two external audio signals collected by the same microphone in the wearing state and the non-wearing state can be calculated .
  • the audio signal collected by the feedback microphone and the feedforward microphone is used to calculate the sound leakage of the earphone, without using additional hardware, which can save hardware costs.
  • the playing module 1402 is configured to play detection audio.
  • the obtaining module 1404 is configured to obtain an internal detection signal corresponding to the detection audio through a feedback microphone.
  • An information determining module 1406, configured to determine energy information corresponding to the internal detection signal.
  • the sound leakage determination module 1408 is configured to obtain reference energy information, and determine the sound leakage condition of the earphone according to the reference energy information and the energy information.
  • the internal detection signal corresponding to the detected audio is obtained through the 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 earphone can be accurately determined, and the calculation amount Small. Moreover, the sound leakage of the earphone can be detected based on the signal collected by the feedback microphone, without using redundant hardware, which can save hardware cost.
  • the playing module 1402 is configured to play detection audio.
  • the acquisition module 1404 is configured to acquire an external detection signal corresponding to the detection audio through a feed-forward microphone.
  • An information determining module 1406, configured to determine cross-correlation information between the external detection signal and the detection audio.
  • the sound leakage determination module 1408 is configured to obtain reference cross-correlation information, and determine the sound leakage status of the earphone according to the reference cross-correlation information and the cross-correlation information.
  • the external detection signal corresponding to the detection audio is obtained through the feed-forward microphone, and the cross-correlation information between the obtained detection signal outside the earphone and the detection audio is determined, so that the detected signal outside the earphone and the original Detects the degree of cross-correlation between audio.
  • the cross-correlation information and the reference cross-correlation information the sound leakage condition of the earphone in the wearing state can be accurately detected, and the calculation amount is small.
  • the sound leakage of the earphone can be detected based on the signal collected by the feed-forward microphone, without using redundant hardware, which can save hardware cost.
  • the information determination module 1406 is also used to divide the internal detection signal into multiple signal segments; for each signal segment in the multiple signal segments, according to the signal amplitude corresponding to each frequency point in the corresponding signal segment , determine the segment energy value corresponding to the corresponding signal segment; determine the energy information corresponding to the internal detection signal based on the segment energy value corresponding to each signal segment.
  • the internal detection signal is divided into a plurality of signal segments, and for each signal segment in the plurality of signal segments, according to the signal amplitude corresponding to each frequency point in the corresponding signal segment, the corresponding signal segment is accurately calculated in the time domain The corresponding fragment energy value on . Based on the segment energy values 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. Moreover, the detection of the energy information of the signal is performed in the time domain, so the amount of calculation is small, and the power consumption of the earphone is low.
  • the information determination module 1406 is further configured to determine the first energy value and the first amplitude mean value corresponding to the external detection signal according to the signal amplitude corresponding to each frequency point in the external detection signal; The signal amplitude corresponding to the frequency point determines the second energy value and the second amplitude average value corresponding to the detected audio; based on the first energy value, the first amplitude average value, the second energy value, and the second amplitude average value, determine the external detection signal and the detected audio frequency information about each other.
  • the first energy value and the first amplitude average value of the external detection signal are calculated, and the second energy value and the second amplitude average value of the detected audio frequency can be used as the calculation between the external detection signal and the detected audio frequency.
  • the condition of the degree of correlation fully considers various influencing factors, making the calculation of the degree of cross-correlation between the two more accurate.
  • the external detection signal is the audio signal obtained when the headset is worn, and the detection audio is the audio signal obtained when the earphone is not worn.
  • the energy value and the amplitude mean value are used as the calculation conditions for the degree of cross-correlation between the two, so that it can be used under the same conditions
  • the information determination module 1406 is further configured to calculate the expected value between the external detection signal and the detected audio according to the first energy value, the first amplitude mean value, the second energy value and the second amplitude mean value; calculate the first The first square value of the difference between the energy value and the first amplitude mean, and the second square value of the difference between the second energy value and the second amplitude mean; determine the expected difference between the first squared value and the second squared value
  • the square root of the product, 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.
  • the first energy value, the first amplitude mean value, the second energy value and the second amplitude mean value, the expected value between the external detection signal and the detected audio frequency is calculated, and the difference between the first energy value and the first amplitude mean value is calculated.
  • the first squared value of the difference, and the second squared value of the difference between the second energy value and the second magnitude mean determine the square root of the product between the expectation of the first squared value and the expected second squared value, dividing the expected value with the square root
  • the ratio of is used as the cross-correlation information between the external detection signal and the detection audio, so that the cross-correlation information between the external detection signal and the detection audio can be accurately calculated.
  • the sound leakage determination module 1408 is also used to collect the played detection audio through the feedback microphone of the earphone in the standard wearing state in the noise-abneance environment, and obtain the corresponding internal reference detection signal; standard wearing state characterization The state of seamless fit between the earphone and the test fixture; determine the reference energy information corresponding to the internal reference detection signal.
  • the playback detection audio is collected through the feedback microphone of the earphone in the standard wearing state, and the corresponding internal reference detection signal is obtained.
  • the standard wearing state represents the seamlessness between the earphone and the test fixture. Fitting state, so that the audio signal of the detection audio can be collected without external interference and the earphone is in the standard wearing state, so that the obtained internal reference detection signal is more accurate, and the reference energy information corresponding to the calculated internal reference detection signal is more accurate.
  • the energy information obtained by detection without external interference and the headset is in the standard wearing state can be used as reference information, which can be compared with the energy information obtained by detection under the presence of external interference and the user is wearing the state, and the two can be used as the detection headphone
  • the condition of the sound leakage situation in the wearing state can improve the accuracy of the detection result.
  • 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 in the multiple internal signal segments, according to each Determine the internal segment energy value corresponding to the corresponding signal segment based on the signal amplitude corresponding to the frequency point; 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.
  • the sound leakage determination module 1408 is further configured to collect the played detection audio through the feed-forward microphone of the earphone in the standard wearing state in the noise-abneance environment, and obtain the corresponding first reference detection signal; standard wearing The state represents the state of seamless fit between the earphone and the test fixture; in the anechoic environment, the detection audio played is collected through the feedforward microphone of the earphone in the non-wearing state, and the corresponding second reference detection signal is obtained; determine Reference cross-correlation information between the first reference detection signal and the second reference detection signal.
  • the detection audio played in the standard wearing state and the non-wearing state are respectively collected through the feedforward microphone of the earphone, and the audio signal outside the earphone collected in the standard wearing state can be obtained and the external audio signal collected in the non-wearing state, and calculating the degree of cross-correlation between the audio signals collected in the two states can detect the leakage degree of the earphone to the sound signal, and further improve the accuracy of the detection result.
  • the sound leakage determination module 1408 is further configured to determine the first reference energy value and the first reference amplitude mean corresponding to the first reference detection signal according to the signal amplitude corresponding to each frequency point in the first reference detection signal ; According to 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 value corresponding to the second reference detection signal; based on the first reference energy value, the first reference amplitude mean value, The second reference energy value and the second reference amplitude mean value determine reference cross-correlation information between the first reference detection signal and the second reference detection signal.
  • the sound leakage determination module 1408 is further configured to calculate the first reference audio signal and the second reference audio signal according to the first reference energy value, the first reference amplitude mean value, the second reference energy value and the second reference amplitude mean value.
  • a reference expectation value between audio signals calculating a first reference square value of the difference between the first reference energy value and the first reference amplitude mean value, and a second reference square value of the difference between the second reference energy value and the second reference amplitude mean value; 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 .
  • the sound leakage determination module 1408 also confirms energy weights and cross-correlation weights
  • the energy information, the reference cross-correlation information, the cross-correlation information, the energy weight and the cross-correlation weight is determined.
  • different weights are assigned to the reference energy information, energy information, reference cross-correlation information, and cross-correlation information, so that the degree of attention to the reference energy information, energy information, reference cross-correlation information, and cross-correlation information is different, and the key
  • the information is assigned a greater weight, and the non-key information is assigned a smaller weight, so that the accuracy of sound leakage detection of the earphone in the wearing state can be further improved.
  • the sound leakage determination module 1408 is also used 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 preset coefficient and the cross-correlation The difference between the correlation ratios, 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 earphone in the wearing state; the fit represents the fit of the earphone in the wearing state Sound leak condition.
  • 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, and the energy The product of the ratio and the energy weight, and the sum of the product of the difference and the cross-correlation weight are used as the fit degree of the earphone in the wearing state, and the sound leakage of the earphone in the wearing state can be represented by the fit degree, so as to accurately detect The sound leakage condition of the headphones.
  • the detected audio is mixed audio; the acquisition module 1404 is also configured to collect the audio signal corresponding to the detected audio through the feedback microphone; perform the first filtering process on the audio signal collected by the feedback microphone to obtain the audio signal in the first frequency range The internal detection signal within; the audio signal corresponding to the detection audio is collected by the feed-forward microphone; the audio signal collected by the feed-forward microphone is subjected to a second filtering process to obtain an external detection signal within the second frequency range; the first frequency range The upper limit value is smaller than the lower limit value of the second frequency band range.
  • the detection audio is mixed audio; the acquisition module 1404 is also used to collect the played detection audio respectively through the first microphone and the second microphone of the earphone in the wearing state, and obtain the corresponding audio signal;
  • the audio signal collected by a microphone is subjected to the first filtering process to obtain the internal detection signal within the first frequency range; the second filtering process is performed on the audio signal collected by the feed-forward microphone to obtain the external detection signal within the second frequency range Signal; the upper limit value of the first frequency band range is less than the lower limit value of the second frequency band range.
  • the played detection audio is collected through the feedback microphone and the feedforward microphone of the earphone respectively to obtain corresponding audio signals.
  • the audio signals collected by the feedback microphone and the feedforward microphone are respectively filtered accordingly, and the mid-ultra-low frequency signal and the mid-low frequency signal can be separated from the audio signal.
  • the separated signal is not easily disturbed by the external environment, making the collected data more accurate .
  • two microphones are used to collect audio signals inside and outside the earphone respectively.
  • the audio signal collected by the feedback microphone is closer to the signal of the human ear canal, and the signal collected by the feedforward microphone is closer to the audio signal leaked by the earphone, so that it can be combined
  • the audio data inside and outside the earphones can accurately detect the sound leakage situation, which helps to improve the accuracy of the detection results.
  • the device also includes a calibration module; the calibration module is used to collect the current environmental noise through the feedforward microphone to obtain the corresponding noise signal before playing the detection audio; 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 according to the signal amplitude corresponding to each frequency point; when the current noise value is lower than the noise threshold, perform frequency response calibration on the earphone.
  • the calibration module is used to collect the current environmental noise through the feedforward microphone to obtain the corresponding noise signal before playing the detection audio; 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 according to the signal amplitude corresponding to each frequency point; when the current noise value is lower than the noise threshold, perform frequency response calibration on the earphone.
  • the device also includes a calibration module; the calibration module is used to collect the current environmental noise through the feed-forward microphone of the earphone before playing the detection audio to obtain the corresponding noise signal; determine the corresponding frequency points in the noise signal The current noise value corresponding to the current environmental noise is determined according to the signal amplitude corresponding to each frequency point; when the current noise value is lower than the noise threshold, the frequency response calibration of the earphone is performed.
  • detecting the noise value of the current environmental noise can automatically help the user determine whether the detected current environment is suitable for the earphone to perform frequency response calibration.
  • Carrying out frequency response calibration when the current noise value is lower than the noise threshold can avoid the impact of environmental noise, especially sudden noise, on the frequency response calibration of the earphones, thereby improving the accuracy of the frequency response calibration of the earphones, thereby greatly improving The accuracy of fit detection improves user experience.
  • the calibration module is also used to obtain the actual transfer function of the earphone; calculate the transfer function calibration parameter according to the actual transfer function and the reference transfer function; and calibrate the actual transfer function based on the transfer function calibration parameter.
  • the actual transfer function of the earphone is obtained, the transfer function calibration parameters are calculated according to the actual transfer function and the reference transfer function, and the actual transfer function is calibrated based on the transfer function calibration parameters, which can eliminate the differences in the acoustic device itself and the differences in the assembly process. resulting in acoustic errors.
  • the fit test of the earphones can be performed to improve the accuracy of the fit test results.
  • the sound leakage condition of the earphone in the wearing state is characterized by the fitting degree of the earphone in the wearing state; the device also includes a processing module; the processing module is used to determine the sound leakage condition of the earphone in the wearing state Afterwards, according to the relationship between the fit degree and the preset fit degree threshold, the fit level of the earphone in the wearing state is determined; according to the fit level, enhanced noise reduction processing or sound quality compensation processing is performed.
  • enhanced noise reduction processing or sound quality compensation is performed according to the degree of fit, which can improve the quality of the audio played by the speaker and reduce external noise interference.
  • the sound leakage condition of the earphone in the wearing state is characterized by the fitting degree of the earphone in the wearing state; the device also includes a processing module; the processing module is used to determine the sound leakage condition of the earphone in the wearing state Afterwards, according to the relationship between the fit degree and the preset fit degree threshold, determine the fit level of the earphone in the wearing state; determine the target ear cap corresponding to the earphone according to the fit level.
  • the fit degree level of the earphone in the wearing state is determined, and the fit degree can be subdivided into multiple levels, and the fit level feedback
  • the fitting performance of the ear caps can intuitively indicate the degree of sound leakage when the earphones are worn, so that users can choose comfortable and air-tight ear caps, which improves the active noise reduction effect and sound quality experience.
  • the earphone is an in-ear wireless earphone with an ear cap structure that fits the ear canal, and both the feedback microphone and the feedforward microphone of the earphone are located at the sound outlet.
  • 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 of the human ear canal, and the signal collected by the feedforward microphone is closer to the leaked audio signal .
  • the distance between the feedback microphone and the feedforward microphone is relatively close, which is more conducive to comparing the degree of cross-correlation between the audio signals detected by the two, thereby helping to improve the accuracy of the detection result.
  • each module in the above-mentioned detection device is only for illustration. In other embodiments, the detection device can be divided into different modules according to needs, so as to complete all or part of the functions of the above-mentioned detection device.
  • Each module in the above detection device can be fully or partially realized by software, hardware and a combination thereof.
  • the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.
  • Fig. 15 is a schematic diagram of the internal structure of the earphone in one embodiment.
  • the headset includes a processor and a memory connected through a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire headset.
  • the memory may include non-volatile storage media and internal memory. Nonvolatile storage media store operating systems and computer programs.
  • the computer program can be executed by a processor to implement a detection method provided in each of the following embodiments.
  • the internal memory provides a high-speed running environment for the operating system computer program in the non-volatile storage medium.
  • the earphone can be any terminal device such as mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sales terminal), vehicle-mounted computer, wearable device, etc.
  • each module in the detection device provided in the embodiment of the present application may be in the form of a computer program.
  • the computer program can run on a terminal or a server.
  • the program modules constituted by the computer program can be stored in the memory of the headset.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the operations of the detection method.
  • a computer program product comprising instructions which, when run on a computer, cause the computer to perform the detection method.
  • Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as external cache memory.
  • RAM is available in many forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Synchlink DRAM (SLDRAM), Memory Bus (Rambus) Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM).
  • SRAM Static RAM
  • DRAM Dynamic RAM
  • SDRAM Synchronous DRAM
  • DDR SDRAM Double Data Rate SDRAM
  • ESDRAM Enhanced SDRAM
  • SLDRAM Synchronous Synchlink DRAM
  • SLDRAM Synchronous Synchlink DRAM
  • Memory Bus Radbus
  • RDRAM Direct RAM
  • DRAM Direct Memory Bus Dynamic RAM
  • RDRAM Memory Bus Dynamic RAM

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Otolaryngology (AREA)
  • Headphones And Earphones (AREA)

Abstract

一种检测方法,包括:播放检测音频(202);通过反馈麦克风获取检测音频对应的内部检测信号,通过前馈麦克风获取检测音频对应的外部检测信号(204);确定内部检测信号对应的能量信息,以及确定外部检测信号与检测音频之间的互相关信息(206);根据参考能量信息、能量信息、参考互相关信息和互相关信息,确定耳机的声音泄漏状况(208)。

Description

检测方法、装置、耳机和计算机可读存储介质
相关申请的交叉引用
本申请要求于2021年05月27日提交中国专利局、申请号为2021105847762、发明名称为“检测方法、装置、耳机和计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及一种检测方法、装置、耳机和计算机可读存储介质。
背景技术
随着耳机技术的发展,出现了主动降噪(ANC,Active Noise Cancellation)技术以及降噪耳机,ANC技术可以将大部分噪声抵消掉,从而达到降噪的效果。对于入耳式耳机,使用尺寸最合适的耳塞可获得最佳的音质和优秀的降噪体验,因此正确选择既舒适又紧密贴合的耳塞至关重要。
然而,多数情况下用户只能依靠主观感受来判断在当前佩戴状态下的耳机是否存在声音泄漏的情况,而无法准确检测出耳机所播放的声音信号的泄漏状况。
发明内容
本申请实施例提供了一种检测方法、装置、耳机和计算机可读存储介质,可以准确检测出耳机在当前佩戴状态下的声音泄漏状况。
一种检测方法,应用于耳机,包括:
播放检测音频;
通过反馈麦克风获取检测音频对应的内部检测信号,通过前馈麦克风获取检测音频对应的外部检测信号;
确定内部检测信号对应的能量信息,以及确定外部检测信号与检测音频之间的互相关信息;及
根据参考能量信息、能量信息、参考互相关信息和互相关信息,确定耳机的声音泄漏状况。
一种检测装置,应用于耳机,包括:
播放模块,用于播放检测音频;
获取模块,用于通过反馈麦克风获取检测音频对应的内部检测信号,通过前馈麦克风获取检测音频对应的外部检测信号;
信息确定模块,用于确定内部检测信号对应的能量信息,以及确定外部检测信号与检测音频之间的互相关信息;及
声音泄漏确定模块,用于根据参考能量信息、能量信息、参考互相关信息和互相关信息,确定耳机的声音泄漏状况。
一种耳机,包括存储器及处理器,存储器中储存有计算机程序,计算机程序被处理器执行时,使得处理器执行如下操作:
播放检测音频;
通过反馈麦克风获取检测音频对应的内部检测信号,通过前馈麦克风获取检测音频对应的外部检测信号;
确定内部检测信号对应的能量信息,以及确定外部检测信号与检测音频之间的互相关信息;及
根据参考能量信息、能量信息、参考互相关信息和互相关信息,确定耳机的声音泄漏状况。
一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现如下操作:
播放检测音频;
通过反馈麦克风获取检测音频对应的内部检测信号,通过前馈麦克风获取检测音频对应的外部检测信号;
确定内部检测信号对应的能量信息,以及确定外部检测信号与检测音频之间的互相关信息;及
根据参考能量信息、能量信息、参考互相关信息和互相关信息,确定耳机的声音泄漏状况。
上述检测方法、装置、耳机和计算机可读存储介质,通过耳机在佩戴状态下播放检测音频,通过耳 机的反馈麦克风采集耳道内的音频信号,通过耳机的前馈麦克风采集耳机外部音频信号,得到不同麦克风在处于相同状态下所采集到的不同的音频信号。在无佩戴状态下播放检测音频,通过耳机的前馈麦克风采集耳机外部音频信号,从而能够计算出同一麦克风采集的在佩戴状态下和无佩戴状态下的两种外部音频信号之间的互相关程度。确定耳道内的音频信号对应的能量信息,结合参考能量信息、内部能量信息、参考互相关信息和外部互相关信息等多方面的信息,可以准确检测出耳机在佩戴状态下的声音泄漏状况。并且使用反馈麦克风和前馈麦克风所采集的音频信号进行耳机的声音泄漏状况的计算,无需额外使用其他硬件,可以节省硬件成本。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他实施例的附图。
图1为一个实施例中检测方法的应用环境图。
图2为一个实施例中检测方法的流程图。
图3为一个实施例中检测音频的时域图。
图4为一个实施例中检测音频的频谱图。
图5为一个实施例中耳机的电路框图。
图6为一个实施例中确定确定外部检测信号与检测音频之间的互相关信息的操作的流程图。
图7为一个实施例中测试治具的示意图。
图8为一个实施例中获取参考互相关信息的操作的流程图。
图9为一个实施例中带通滤波器a对信号进行滤波处理的示意图。
图10为一个实施例中带通滤波器b对信号进行滤波处理的示意图。
图11为一个实施例中校准前后的频响曲线的示意图。
图12为一个实施例中不同型号的耳帽的示意图。
图13为一个实施例中检测方法的框架图。
图14为一个实施例中检测装置的结构框图。
图15为一个实施例中耳机的内部结构示意图。
具体实施方式
为了便于理解本申请,下面将参照相关附图对本申请进行更全面的描述。附图中给出了本申请的较佳实施例。但是,本申请可以以许多不同的形式来实现,并不限于本文所描述的实施例。相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一能量值称为第二能量值,且类似地,可将第二能量值称为第一能量值。第一能量值和第二能量值两者都是能量值,但其不是同一能量值。
图1为一个实施例中检测方法的应用环境示意图。如图1所示,该应用环境包括耳机102和终端104。耳机102和终端104进行连接。当用户佩戴耳机102时,可以对耳机的声音泄漏状况进行检测。具体地,耳机102播放检测音频,耳机102的反馈麦克风获取检测音频对应的内部检测信号,耳机102的前馈麦克风获取检测音频对应的外部检测信号。耳机102确定内部检测信号对应的能量信息,以及确定外部检测信号与检测音频之间的互相关信息。耳机102根据参考能量信息、能量信息、参考互相关信息和互相关信息,确定耳机的声音泄漏状况。其中,耳机102可以是头戴式耳机、贴耳式耳机、入耳式耳机等,不限于此。终端104可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。
图2为一个实施例中应用于耳机的检测方法的流程图。本实施例中的检测方法方法,以运行于图1中的耳机上为例进行描述。如图2所示,该检测方法包括:
操作202,播放检测音频。
检测音频指的是用于检测耳机声音泄漏状况时所播放的音频。检测音频的时长可以根据需要进行设置,例如检测音频的时长可以是3-5秒钟。检测音频可以预先存储在耳机芯片存储空间中,耳机响应于检测指令,从耳机芯片存储空间中获取检测音频,以播放该检测音频。
检测音频的频段处于预设频段范围内,该预设频段可以包括超低频和中低频。预设频段可以根据需要进行设置。例如,中低频的频段范围可以是100Hz-1kHz,超低频的频段范围可以是低于20Hz。
在一个实施例中,检测音频可以是由不同频段范围内的检测信息混合组成。检测音频具体可以是由超低频单频信号与中低频的音源信号混合组成。采集处于100Hz-1kHz范围内的音源信号进行高通滤波处理,将高通滤波处理后的音源信号和10Hz的超低频单频信号混合,获得检测音频。该检测音频的时域图如图3所示,该时域图中的横轴表示时间,纵轴表示检测音频的音频信号的信号幅度。该检测音频的频谱图如图4所示,该频谱图中的横轴表示检测音频的音频信号的频率,纵轴表示检测音频的音频信号的信号幅度。
传统技术中检测某个单频信号的幅值并与设定阈值进行比较,从而判断该单频信号的声音泄漏状况,单频信号更容易受到外界环境噪声或者用户自身说话等干扰,而导致检测不准确,耳机贴合度检测结果异常等问题。相对于传统技术,当本申请采用检测音频的频段处于预设频段范围内,检测频段范围宽,检测结果不易受外界环境干扰,可以准确检测耳机所采集的音频信号的声音泄漏状况,从而准确检测出耳机佩戴的贴合度,提升用户体验。
操作204,通过反馈麦克风获取检测音频对应的内部检测信号,通过前馈麦克风获取检测音频对应的外部检测信号。
其中,耳机可以是入耳式耳机、贴耳式耳机、头戴式耳机等,但不限于此。当耳机是入耳式耳机时,入耳式耳机还包括耳塞。可以理解的是,上述耳机可以是无线耳机或有线耳机,例如可以是入耳式有线耳机、贴耳式有线耳机、头戴式有线耳机、入耳式无线耳机、贴耳式无线耳机、头戴式无线耳机等,但不限于此。
耳机为入耳式耳机,包括反馈麦克风和前馈麦克风,且具有与耳道贴合的耳帽结构。其中,反馈麦克风用于检测耳道内音频信号,前馈麦克风用于检测耳机外部音频信号。反馈麦克风也称为内部麦克风,前馈麦克风也称为外部麦克风。
可以理解的是,当用户在佩戴入耳式降噪耳机时,将耳机的耳帽结构与耳道贴合,检测音频可以通过耳机的扬声器播放至耳道中,再通过反馈麦克风采集耳道中的音频信号,通过前馈麦克风采集耳机外部的音频信号。
在其他实施例中,当用户在佩戴头戴式降噪耳机时,头戴式降噪耳机具有包覆耳廓的耳罩结构,检测音频可以通过耳机的扬声器播放至耳罩内中,再通过反馈麦克风采集耳罩中的音频信号,通过前馈麦克风采集耳罩外部的音频信号。
内部检测信号是耳机的反馈麦克风所采集的用户耳道内的音频信号,还可以是耳机在佩戴状态下播放检测音频时,反馈麦克风所采集的用户耳道内的音频信号。外部检测信号是前馈麦克风所采集的该耳机外部的音频信号,还可以是耳机在佩戴状态下播放检测音频时,前馈麦克风所采集的该耳机外部的音频信号。
具体地,耳机通过扬声器播放检测音频时,该耳机的反馈麦克风采集用户耳道中的音频信号,获得内部检测信号。并且,该耳机的前馈麦克风采集该耳机外部的音频信号,获得外部检测信号。
在一个实施例中,通过反馈麦克风获取检测音频对应的内部检测信号,通过前馈麦克风获取检测音频对应的外部检测信号,包括:
在佩戴状态下,通过反馈麦克风获取检测音频对应的内部检测信号,通过前馈麦克风获取检测音频对应的外部检测信号。
具体地,耳机处于用户的佩戴状态下,检测音频可以通过耳机的扬声器播放至耳道中。该耳机的反馈麦克风采集用户耳道中的音频信号,获得内部检测信号。并且,处于该佩戴状态下播放检测音频时,耳机的前馈麦克风采集该耳机外部的音频信号,获得外部检测信号。
如图5所示,为一个实施例中耳机的电路框图。反馈麦克风可以是内部麦克风,前馈麦克风可以是 外部麦克风。该耳机包括耳机腔体、扬声器、内部麦克风、外部麦克风、数字信号处理器、存储电路和供电电路等。扬声器用于播放贴合度检测音源信号、音乐信号、主动降噪反相噪声等。内部麦克风、外部麦克风用于ANC(Active Noise Cancellation,主动噪声消除)、耳机贴合度检测算法的信号采集,音频信号处理芯片电路用于运行ANC算法以及耳机贴合度检测算法。存储电路用于存储贴合度检测的音源PCM(Pulse Code Modulation,脉冲编码调制)音频数据。供电电路可以为其他硬件部件供电,供电来源是耳机内置的电池。扬声器可以是喇叭。
在本实施例中,用户通过终端中的对耳机贴合度进行检测的控制应用程序主动触发耳机贴合度检测功能,此时耳机播放预存储在耳机端的检测音频,由内部麦克风与外部麦克风实时采集音频信号进入DSP(Digital Signal Process,数字信号处理模块)模块,以完成贴合度检测运算,并将贴合度检测结果通过蓝牙传输到终端的控制应用程序进行显示。此外,该数字信号处理器也可以采用其他处理器代替。
操作206,确定内部检测信号对应的能量信息,以及确定外部检测信号与检测音频之间的互相关信息。
其中,能量信息是指与内部检测信号的能量相关的信息,例如可以包括各频点的信号幅度值之和、各频点的信号幅度值平方之和、各频点的信号幅度值的平方积分中的至少一种。互相关信息是用于表征外部检测信号和检测音频之间互相关程度的信息。
具体地,耳机的数字信号处理器可计算该内部检测信号对应的能量信息,数字信号处理器可根据外部检测信号和检测音频,计算外部检测信号和检测音频之间的互相关信息,得到外部互相关信息。
在一个实施例中,耳机的数字信号处理器可获取该内部检测信号中各频点分别对应的信号幅度,通过各频点分别对应的信号幅度计算出能量信息。信号幅度是指信号的幅度,可以是信号在某一时刻的瞬时幅度,或者是信号的峰值幅值。峰值幅值是指整个信号的能量的开方。
在一个实施例中,耳机的数字信号处理器可获取外部检测信号中各频点分别对应的信号幅度,以及检测音频中各频点分别对应的信号幅度,根据外部检测信号对应的各信号幅度和检测音频对应的各信号幅度计算外部互相关信息。
操作208,根据参考能量信息、能量信息、参考互相关信息和互相关信息,确定耳机的声音泄漏状况。
其中,参考能量信息是指内部参考检测信号对应的能量信息。内部参考检测信号是在消声环境中,耳机的反馈麦克风所获取的检测音频对应的音频信号,还可以是在消声环境中,处于标准佩戴状态下的耳机的反馈麦克风采集所播放的检测音频所得到的音频信号。
参考互相关信息是用于表征第一参考检测信号和第二参考检测信号之间互相关程度的信息。
第一参考检测信号是在消声环境中,前馈麦克风采集所播放的检测音频所得到的音频信号,还可以是在消声环境中,处于标准佩戴状态下的耳机的前馈麦克风采集所播放的检测音频所得到的音频信号。第二参考检测信号是在消声环境中,前馈麦克风采集所播放的检测音频所得到对应的音频信号,还可以是在消声环境中处于无佩戴状态下的耳机的前馈麦克风采集所播放的检测音频所得到对应的音频信号。
参考能量信息和参考互相关信息可以预先存储于耳机中,或者存储于与耳机通信连接的终端设备中。
参考能量信息和参考互相关信息可以预先存储在耳机的存储器中,当检测时从存储器中读取参考能量信息和参考互相关信息;参考能量信息和参考互相关信息也可以存储于与耳机通信连接的终端设备中,当耳机进行检测时,从该终端设备中获取参考能量信息和参考互相关信息。
耳机的数字信号处理器获取参考能量信息和参考互相关信息,根据参考能量信息、能量信息、参考互相关信息和互相关信息,计算耳机在佩戴状态下的贴合度,根据贴合度确定耳机在佩戴状态下的声音泄漏状况。
在一个实施例中,数字信号处理器可确定参考能量信息、能量信息、参考互相关信息和互相关信息分别对应的权重,将参考能量信息、能量信息、参考互相关信息、互相关信息和相应的权重进行加权求和,得到耳机在佩戴状态下的贴合度,通过该贴合度表征耳机在佩戴状态下的声音泄漏状况。贴合度越高,声音泄漏越少,贴合度越低,声音泄漏越多。
在一个实施例中,数字信号处理器可确定参考能量信息和能量信息之间的能量关联度,以及参考互相关信息和互相关信息之间的互相关关联度,根据能量关联度和互相关关联度,计算耳机在佩戴状态下的贴合度。能量关联度可以通过参考能量信息和能量信息之间的比值或差值表征,互相关关联度可以通过参考互相关信息和互相关信息之间的比值或差值表征。
本实施例中,耳机播放检测音频,通过反馈麦克风获取检测音频对应的内部检测信号,通过前馈麦克风获取检测音频对应的外部检测信号,能够同时通过不同的麦克分别采集耳道内的信号和耳机外部的信号。确定所获得的耳机外部的检测信号与检测音频之间的互相关信息,能够获知所检测到的耳机外部的信号与原始检测音频之间的互相关程度,结合参考能量信息、内部能量信息、参考互相关信息和外部互相关信息等多方面的信息,可以准确检测出耳机在佩戴状态下的声音泄漏状况。并且使用反馈麦克风和前馈麦克风所采集的音频信号进行耳机的声音泄漏状况的计算,无需额外使用其他硬件,可以节省硬件成本。
在一个实施例中,提供了一种检测方法,应用于耳机,包括:
播放检测音频;通过反馈麦克风获取检测音频对应的内部检测信号;确定内部检测信号对应的能量信息;获取参考能量信息,根据参考能量信息和能量信息,确定耳机的声音泄漏状况。
可确定参考能量信息和能量信息之间的比值或差值,通过比值或差值作为耳机的贴合度。通过耳机的贴合度表征耳机的声音泄漏状况。
在一个实施例中,可获取能量权重,根据能量权重、参考能量信息和能量信息,确定耳机的声音泄漏状况。可计算参考能量信息和能量信息之间的比值,将比值和能量权重的乘积作为耳机的贴合度。通过耳机的贴合度表征耳机的声音泄漏状况。
在一个实施例中,通过反馈麦克风获取检测音频对应的内部检测信号,包括:在佩戴状态下,通过反馈麦克风获取检测音频对应的内部检测信号。
本实施例中,通过反馈麦克风获取检测音频对应的内部检测信号,以确定内部检测信号对应的能量信息,基于所确定的能量信息和参考能量信息,能够准确确定耳机的声音泄漏状况,且计算量小。并且,基于反馈麦克风所采集信号即可对耳机的声音泄漏状况进行检测,无需采用多余的硬件,能够节省硬件成本。
在一个实施例中,提供了一种检测方法,应用于耳机,包括:
播放检测音频;通过前馈麦克风获取检测音频对应的外部检测信号;确定外部检测信号与检测音频之间的互相关信息;获取参考互相关信息,根据参考互相关信息和互相关信息,确定耳机的声音泄漏状况。
可确定参考互相关信息和互相关信息之间的比值或差值,通过比值或差值作为耳机的贴合度。通过耳机的贴合度表征耳机的声音泄漏状况。
在一个实施例中,可获取互相关权重,根据互相关权重、参考互相关信息和互相关信息,确定耳机的声音泄漏状况。可计算参考互相关信息和互相关信息之间的比值,并计算预设系数与该比值之间的差值,将该差值和互相关权重的乘积作为耳机的贴合度。通过耳机的贴合度表征耳机的声音泄漏状况。
在一个实施例中,通过前馈麦克风获取检测音频对应的外部检测信号,包括:在佩戴状态下,通过前馈麦克风获取检测音频对应的外部检测信号。
本实施例中,通过前馈麦克风获取检测音频对应的外部检测信号,确定所获得的耳机外部的检测信号与检测音频之间的互相关信息,能够获知所检测到的耳机外部的信号与原始的检测音频之间的互相关程度。根据互相关信息和参考互相关信息,可以准确检测出耳机在佩戴状态下的声音泄漏状况,且计算量小。并且,基于前馈麦克风所采集信号即可对耳机的声音泄漏状况进行检测,无需采用多余的硬件,能够节省硬件成本。
在一个实施例中,提供了一种检测方法,应用于耳机,包括:
播放检测音频;在佩戴状态下,通过耳机的反馈麦克风获取检测音频对应的内部检测信号,通过耳机的前馈麦克风获取检测音频对应的第一外部检测信号;在无佩戴状态下,通过前馈麦克风获取检测音频对应的第二外部检测信号;确定内部音频信号对应的内部能量信息,以及确定第一外部音频信号和第 二外部音频信号之间的外部互相关信息;获取参考能量信息和参考互相关信息,根据参考能量信息、内部能量信息、参考互相关信息和外部互相关信息,确定耳机在佩戴状态下的声音泄漏状况。
其中,第一外部检测信号是耳机在佩戴状态下播放检测音频时,前馈麦克风所采集的该耳机外部的音频信号。第二外部检测信号是指耳机在无佩戴状态下播放检测音频,前馈麦克风所采集的该耳机外部的音频信号。
外部互相关信息是用于表征第一外部检测信号和第二外部检测信号之间互相关程度的信息。
具体地,耳机处于无佩戴状态下,通过扬声器播放检测音频,耳机通过前馈麦克风采集该耳机外部的音频信号,获得第二外部检测信号。
具体地,耳机的数字信号处理器可计算该内部检测信号对应的能量信息,即内部能量信息。耳机的数字信号处理器可根据第一外部检测信号和第二外部检测信号,计算第一外部检测信号和第二外部检测信号之间的互相关信息,得到外部互相关信息。
在一个实施例中,耳机的数字信号处理器可获取第一外部检测信号中各频点分别对应的信号幅度,以及第二外部检测信号中各频点分别对应的信号幅度,根据第一外部检测信号对应的各信号幅度和第二外部检测信号对应的各信号幅度计算外部互相关信息。
在一个实施例中,在无佩戴状态下,通过前馈麦克风获取检测音频对应的第二外部检测信号,包括:
在无佩戴状态下,通过前馈麦克风采集所播放的检测音频,得到对应的音频信号;对前馈麦克风所采集得到的音频信号进行第二滤波处理,得到第二外部检测信号。
其中,第二滤波处理用于从检测音频的音频信号中分离出中低频信号。在无佩戴状态下,从前馈麦克风采集的音频信号中分离出的中低频信号为第二外部检测信号。第二滤波处理具体包括高通滤波处理、低通滤波处理、带通滤波处理和带阻滤波处理中的一种。高通滤波处理是指利用滤波器的频率特性,让高频的信号通过,低频的信号无法通过。高通滤波处理是指让低频的信号通过,高频的信号无法通过。带阻滤波是指阻止一定频率范围内的信号通过而允许其他频率范围内的信号通过。带通滤波处理是指允许一定频率范围内的信号通过而阻止其它频率范围内的信号通过。带通滤波和带阻滤波为互补关系。
具体地,该检测音频为超低频单频信号和中低频信号组成的混合信号。耳机处于无佩戴状态下,通过扬声器播放检测音频,耳机的前馈麦克风采集该耳机外部的音频信号,通过耳机的数字信号处理器对该音频信号进行第二滤波处理,分离出超低频信号,即可得到第二外部检测信号。
在一个实施例中,数字信号处理器可确定参考能量信息、内部能量信息、参考互相关信息和外部互相关信息分别对应的权重,将参考能量信息、内部能量信息、参考互相关信息、外部互相关信息和相应的权重进行加权求和,得到耳机在佩戴状态下的贴合度,通过该贴合度表征耳机在佩戴状态下的声音泄漏状况。贴合度越高,声音泄漏越少,贴合度越低,声音泄漏越多。
在一个实施例中,数字信号处理器可确定参考能量信息和内部能量信息之间的能量关联度,以及参考互相关信息和外部互相关信息之间的互相关关联度,根据能量关联度和互相关关联度,计算耳机在佩戴状态下的贴合度。能量关联度可以通过参考能量信息和内部能量信息之间的比值或差值表征,互相关关联度可以通过参考互相关信息和外部互相关信息之间的比值或差值表征。
本实施例中,耳机在佩戴状态下播放检测音频,通过耳机的反馈麦克风采集耳道内的音频信号,通过耳机的前馈麦克风采集耳机外部音频信号,得到不同麦克风在处于相同状态下所采集到的不同的音频信号。在无佩戴状态下播放检测音频,通过耳机的前馈麦克风采集耳机外部音频信号,从而能够计算出同一麦克风采集的在佩戴状态下和无佩戴状态下的两种外部音频信号之间的互相关程度。确定耳道内的音频信号对应的能量信息,结合参考能量信息、内部能量信息、参考互相关信息和外部互相关信息等多方面的信息,可以准确检测出耳机在佩戴状态下的声音泄漏状况。并且使用反馈麦克风和前馈麦克风所采集的音频信号进行耳机的声音泄漏状况的计算,无需额外使用其他硬件,可以节省硬件成本。
在一个实施例中,确定内部检测信号对应的能量信息,包括:
将内部检测信号划分为多个信号片段;针对多个信号片段中的每个信号片段,根据相应信号片段中每个频点对应的信号幅度,确定相应信号片段对应的片段能量值;基于每个信号片段分别对应的片段能量值,确定内部检测信号对应的能量信息。
其中,片段能量值是指信号片段对应的能量值。
具体地,耳机的数字信号处理器可将内部检测信号划分为多个信号片段,该多个指至少两个。进一步地,数字信号处理器可获取窗函数,通过窗函数将内部检测信号划分为多个信号片段,每个信号片段表示在不同时间内的音频信号。
对于多个信号片段中的每个信号片段,数字信号处理器获取信号片段中每个频点的信号幅度,根据该信号片段中每个频点对应的信号幅度,计算该信号片段对应的片段能量值。按照相同的处理方式,数字信号处理器可计算出每个信号片段分别对应的片段能量值。
数字信号处理器可将各片段能量值求和,得到该内部检测信号对应的能量值,将该能量值作为能量信息。
在一个实施例中,数字信号处理器可获取个片段能量分别对应的权重,将各片段能量值和相应权重的乘积求和,得到该内部检测信号对应的能量值,将该能量值作为能量信息。
在一个实施例中,数字信号处理器可对各片段能量值进行平滑处理,得到平滑后的各片段能量值。数字信号处理器可将平滑后的各片段能量值求和,得到能量值。或者,数字信号处理器可将平滑后的各片段能量值分别对应的权重,将平滑后的各片段能量值和相应权重的乘积求和,得到能量值。
例如,能量的计算方式,设w(n)为窗函数,N为窗长,窗长可根据需求设置,则矩形窗的表达式如下:
Figure PCTCN2022093021-appb-000001
定义n时刻内部检测信号的片段能量X n
Figure PCTCN2022093021-appb-000002
对得到的X n进行平滑处理,即:
X n(M)=α*X n(m-1)+(1-α)*X n(m),0<α<1
其中,X n(m)为平滑处理前的当前片段能量,X n(M)为平滑处理后的当前片段能量。X n(m-1)为上一片段能量,X n(m)为当前片段能量,α为上一片段能量的权重,(1-α)为当前片段能量的权重。
本实施例中,将内部检测信号划分为多个信号片段,针对多个信号片段中的每个信号片段,根据相应信号片段中每个频点对应的信号幅度,准确计算相应信号片段在时域上对应的片段能量值。基于每个信号片段分别对应的片段能量值,能够准确计算出内部检测信号对应的能量信息,从而准确确定内部检测信号在时域上的能量信息。
在一个实施例中,如图6所示,确定外部检测信号与检测音频之间的互相关信息,包括:
操作602,根据外部检测信号中每个频点对应的信号幅度,确定外部检测信号对应的第一能量值和第一幅度均值。
具体地,耳机的数字信号处理器可获取外部检测信号中各频点分别对应的信号幅度,将各频点分别对应的信号幅度求和得到第一能量值。或者,将各频点分别对应的信号幅度进行加权求和,得到第一能量值。
耳机的数字信号处理器可确定外部检测信号中频点的频点数量,将各频点分别对应的信号幅度之和,与频点数量的比值,作为外部检测信号对应的第一幅度均值。或者,将各频点的信号幅度进行加权 求和所得到的第一能量值与频点数量的比值,作为第一幅度均值。
在一个实施例中,根据外部检测信号中每个频点对应的信号幅度,确定外部检测信号对应的第一能量值,包括:将外部检测信号划分为多个外部信号片段;针对多个外部信号片段中的每个外部信号片段,根据相应外部信号片段中每个频点对应的信号幅度,确定相应外部信号片段对应的外部片段能量值;基于每个外部信号片段分别对应的外部片段能量值,确定外部检测信号对应的第一能量值。具体处理方式与上述确定内部检测信号对应的能量信息的处理过程类似,在此不再赘述。
操作604,根据检测音频中每个频点对应的信号幅度,确定检测音频对应的第二能量值和第二幅度均值。
具体地,耳机的数字信号处理器可获取检测音频中各频点分别对应的信号幅度,将各频点分别对应的信号幅度求和得到第二能量值。或者,将各频点分别对应的信号幅度进行加权求和,得到第二能量值。
耳机的数字信号处理器可确定检测音频中频点的频点数量,将各频点分别对应的信号幅度之和,与频点数量的比值,作为检测音频对应的第二幅度均值。或者,将各频点的信号幅度进行加权求和所得到的第二能量值与频点数量的比值,作为第二幅度均值。
在一个实施例中,根据检测音频中每个频点对应的信号幅度,确定检测音频对应的第二能量值,包括:将检测音频划分为多个信号片段;针对多个信号片段中的每个信号片段,根据相应信号片段中每个频点对应的信号幅度,确定相应信号片段对应的片段能量值;基于每个信号片段分别对应的片段能量值,确定检测音频对应的第二能量值。具体处理方式与上述确定内部检测信号对应的能量信息的处理过程类似,在此不再赘述。
操作606,基于第一能量值、第一幅度均值、第二能量值和第二幅度均值,确定外部检测信号和检测音频之间的互相关信息。
具体地,耳机的数字信号处理器根据第一能量值、第一幅度均值、第二能量值和第二幅度均值,计算外部检测信号和检测音频之间的互相关值。该互相关值可用于表征外部检测信号和检测音频之间的互相关信息。
本实施例中,计算外部检测信号的第一能量值、第一幅度均值,检测音频的第二能量值、第二幅度均值,能够将能量值和幅度均值作为计算外部检测信号和检测音频之间的相关程度的条件,充分考虑了多方面的影响因素,使得两者的互相关程度的计算更准确。
在一个实施例中,基于第一能量值、第一幅度均值、第二能量值和第二幅度均值,确定外部检测信号和检测音频之间的互相关信息,包括:
根据第一能量值、第一幅度均值、第二能量值和第二幅度均值,计算外部检测信号和检测音频之间的期望值;计算第一能量值和第一幅度均值之差的第一平方值,与第二能量值和第二幅度均值之差的第二平方值;确定第一平方值的期望与第二平方值的期望之间的乘积的平方根,将期望值与平方根的比值,作为外部检测信号和检测音频之间的互相关信息。
具体地,耳机的数字信号处理器确定第一能量值和第一幅度均值之间的差值,并计算第二能量值和第二幅度均值之间的差值,数字信号处理器对两个差值的乘积求期望值,得到外部检测信号和检测音频之间的期望值。
数字信号处理器计算第一能量值和第一幅度均值之差的第一平方值,以及第二能量值和第二幅度均值之差的第二平方值。数字信号处理器计算第一平方值的期望与第二平方值的期望之间的乘积,对该乘积开平方,得到平方根。数字信号处理器计算期望值与平方根的比值,将期望值与平方根的比值,作为外部检测信号和检测音频之间的互相关值。该互相关值用于表征外部检测信号和检测音频之间的互相关信息。
例如,耳机的数字信号处理器通过以下公式计算互相关值:
Figure PCTCN2022093021-appb-000003
其中,p ij为音频信号i和音频信号j之间的互相关值,s i(t)为音频信号i对应的能量值,s j(t)为 音频信号j对应的能量值。E(s i(t))为音频信号i对应的幅度均值,E(s j(t))为音频信号j对应的幅度均值。E[(s i(t)-E(s i(t)))(s j(t)-E(s j(t)))]为音频信号i和音频信号j的期望值。
互相关值满足|p ij|≤1,当p ij=0时,表示s i(t)和s j(t)不相关;当0<|p ij|<1时,表示s i(t)和s j(t)相关;当|p ij|=1时,表示s i(t)和s j(t)完全相关。
在计算外部检测信号和检测音频之间的互相关值时,可将外部检测信号作为i、检测音频作为j,将第一能量值作为s i(t)、第一幅度均值作为E(s i(t));将第二能量值作为s j(t)、第二幅度均值作为E(s j(t)),代入上述公式即可计算得到互相关值p ij
本实施例中,根据第一能量值、第一幅度均值、第二能量值和第二幅度均值,计算外部检测信号和检测音频之间的期望值,并计算第一能量值和第一幅度均值之差的第一平方值,与第二能量值和第二幅度均值之差的第二平方值,确定第一平方值的期望与第二平方值的期望之间的乘积的平方根,将期望值与平方根的比值,作为外部检测信号和检测音频之间的互相关信息,从而能够准确计算出外部检测信号和检测音频之间的互相关程度。
在一个实施例中,获取参考能量信息,包括:
在消声环境中,通过标准佩戴状态下的耳机的反馈麦克风采集所播放的检测音频,获得对应的内部参考检测信号;该标准佩戴状态表征耳机与测试治具之间无缝贴合的状态;确定内部参考检测信号对应的参考能量信息。
其中,测试治具是用于协助测试耳机的声音泄漏状态的测试工具。该标准佩戴状态表征佩戴耳机时,耳机与测试治具之间无缝贴合的状态。测试治具可如图7所示。消声环境是指不受外界噪声干扰的环境。
在一个实施例中,该标准佩戴状态表征佩戴耳机时,耳机与人工头的耳部或真人耳部之间无缝贴合的状态。
具体地,在消声环境中,将耳机放置在测试治具的声耦合腔中,使得耳机与测试治具之间无缝贴合,以确保良好密闭性,达到标准佩戴状态。在消声环境中播放音频,通过耳机的反馈麦克风采集在测试治具的声耦合腔中的音频信号,获得内部参考检测信号。数字信号处理器可计算该内部参考检测信号对应的能量信息,即参考能量信息。
在一个实施例中,通过耳机的反馈麦克风采集在测试治具的声耦合腔中的音频信号,对所采集的音频信号进行第一滤波处理,得到内部参考检测信号。
在一个实施例,数字信号处理器可获取该内部参考检测信号中各频点分别对应的信号幅度,通过各频点分别对应的信号幅度计算出参考能量信息。进一步地,数字信号处理器可对频点的信号幅度求和,或加权求和,得到参考能量值,将该参考能量值作为参考能量信息。
在一个实施例中,确定内部参考检测信号对应的参考能量信息,包括:将内部参考检测信号划分为多个内部信号片段;针对多个内部信号片段中的每个内部信号片段,根据相应内部信号片段中每个频点对应的信号幅度,确定相应信号片段对应的内部片段能量值;基于每个内部信号片段分别对应的内部片段能量值,确定内部参考检测信号对应的参考能量信息。具体处理方式与上述确定内部检测信号对应的能量信息的处理过程类似,在此不再赘述。
本实施例中,在消声环境中,通过标准佩戴状态下的耳机的反馈麦克风采集所播放的检测音频,获得对应的内部参考检测信号,该标准佩戴状态表征耳机与测试治具之间无缝贴合的状态,从而能够在无外界干扰且耳机处于标准佩戴状态下采集检测音频的音频信号,使得所获得的内部参考检测信号更精准,所计算的内部参考检测信号对应的参考能量信息更准确。并且,将在无外界干扰且耳机处于标准佩戴状态下检测所获得的能量信息作为参考信息,能够与存在外界干扰且用户佩戴状态下检测所获得的能 量信息进行对比,将这两者作为检测耳机在佩戴状态下的声音泄漏状况的条件,能够提高检测结果的准确度。
在一个实施例中,如图8所示,获取参考互相关信息,包括:
操作802,在消声环境中,通过标准佩戴状态下的耳机的前馈麦克风采集所播放的检测音频,获得对应的第一参考检测信号;标准佩戴状态表征耳机与测试治具之间无缝贴合的状态。
具体地,在消声环境中,将耳机放置在测试治具的声耦合腔中,使得耳机与测试治具之间无缝贴合,以确保良好密闭性,达到标准佩戴状态。在消声环境中播放音频,通过耳机的前馈麦克风采集在测试治具的声耦合腔中的音频信号,获得第一参考检测信号。
在一个实施例中,通过耳机的前馈麦克风采集在测试治具的声耦合腔中的音频信号,对所采集的音频信号进行第二滤波处理,得到第一参考检测信号。
在一个实施例中,该标准佩戴状态表征佩戴耳机时,耳机与人工头的耳部或真人耳部之间无缝贴合的状态。
操作804,在消声环境中,通过无佩戴状态下的耳机的前馈麦克风采集所播放的检测音频,获得对应的第二参考检测信号。
其中,无佩戴状态是指将耳机放置在自由声场中、无密闭、全泄漏的状态。
具体地,在消声环境中,处于无佩戴状态下的耳机的扬声器播放检测音频,通过耳机的前馈麦克风采集所播放的检测音频的音频信号,获得第二参考检测信号。
进一步地,通过耳机的前馈麦克风采集所播放的检测音频的音频信号,对所采集的音频信号进行第二滤波处理,得到第二参考检测信号。
操作806,确定第一参考检测信号和第二参考检测信号之间的参考互相关信息。
其中,参考互相关信息是用于表征第一外部音频信号和第二外部音频信号之间互相关程度的信息。参考互相关信息具体可以是参考互相关值。
具体地,耳机的数字信号处理器可根据第一参考检测信号和第二参考检测信号,计算第一参考检测信号和第二参考检测信号之间的互相关信息,得到参考互相关信息。进一步地,数字信号处理器可获取第一参考检测信号中各频点分别对应的信号幅度,以及第二参考检测信号中各频点分别对应的信号幅度,根据第一参考检测信号对应的各信号幅度和第二参考检测信号对应的各信号幅度计算参考互相关信息。
在一个实施例中,确定第一参考检测信号和第二参考检测信号之间的参考互相关信息,包括:
根据第一参考检测信号中每个频点对应的信号幅度,确定第一参考检测信号对应的第一参考能量值和第一参考幅度均值;根据第二参考检测信号中每个频点对应的信号幅度,确定第二参考检测信号对应的第二参考能量值和第二参考幅度均值;基于第一参考能量值、第一参考幅度均值、第二参考能量值和第二参考幅度均值,确定第一参考检测信号和第二参考检测信号之间的参考互相关信息。
在一个实施例中,基于第一参考能量值、第一参考幅度均值、第二参考能量值和第二参考幅度均值,确定第一参考检测信号和第二参考检测信号之间的参考互相关信息,包括:
根据第一参考能量值、第一参考幅度均值、第二参考能量值和第二参考幅度均值,计算第一参考检测信号和第二参考检测信号之间的参考期望值;计算第一参考能量值和第一参考幅度均值之差的第一参考平方值,与第二参考能量值和第二参考幅度均值之差的第二参考平方值;确定第一参考平方值的期望与第二参考平方值的期望之间的乘积的平方根,将参考期望值与平方根的比值,作为第一参考检测信号和第二参考检测信号之间的参考互相关信息。
可以理解的是,参考互相关信息的具体处理过程与上述确定外部检测信号与检测音频之间的互相关信息的处理过程类似,在此不再赘述。
本实施例中,在消声环境中,通过耳机的前馈麦克风分别采集处于标准佩戴状态下和无佩戴状态下所播放的检测音频,能够得到在标准佩戴状态下所采集的耳机外部的音频信号和无佩戴状态下采集的外部的音频信号,计算这两种状态下检测到的音频信号之间的互相关程度,能够检测出耳机对声音信号的泄漏程度,进一步提高检测结果的准确度。
在一个实施例中,根据参考能量信息、内部能量信息、参考互相关信息和外部互相关信息,确定耳机在佩戴状态下的声音泄漏状况,包括:
确认能量权重和互相关权重;根据参考能量信息、内部能量信息、参考互相关信息、外部互相关信息、能量权重和互相关权重,确定耳机在佩戴状态下的声音泄漏状况。
其中,能量权重是指能量信息对应的权重,互相关权重是指互相关信息对应的权重。
具体地,数字信号处理器可获取能量权重和互相关权重。数字信号处理器可确定参考能量信息和能量信息之间的能量关联度,以及参考互相关信息和互相关信息之间的互相关关联度,将能量关联度和互相关关联度。根据能量关联度、能量权重、互相关关联度和互相关权重,确定耳机在佩戴状态下的声音泄漏状况。通过该贴合度确定耳机在佩戴状态下的声音泄漏状况,或者,通过该贴合度表征耳机在佩戴状态下的声音泄漏状况。
在一个实施例中,数字信号处理器可获取能量权重和互相关权重。确定参考能量信息和内部能量信息分别对应的能量权重,确定参考互相关信息、互相关信息分别对应的互相关权重,将参考能量信息、能量信息、参考互相关信息、互相关信息和相应的权重进行加权求和,得到耳机在佩戴状态下的贴合度。
本实施例中,对参考能量信息、能量信息、参考互相关信息和互相关信息分配不同的权重,使得对参考能量信息、能量信息、参考互相关信息和互相关信息的关注程度不同,对关键信息分配更大的权重,对非关键信息分配较小的权重,使得能够进一步提高对耳机在佩戴状态下的声音泄漏状况检测的准确性。
在一个实施例中,根据参考能量信息、能量信息、参考互相关信息、互相关信息、能量权重和互相关权重,确定耳机的声音泄漏状况,包括:
确定能量信息与参考能量信息之间的能量比值,以及互相关信息与参考互相关信息之间的互相关比值;确定预设系数和互相关比值之间的差值,将能量比值与能量权重的乘积,以及差值与互相关权重的乘积之和,作为耳机在佩戴状态下的贴合度;该贴合度表征耳机在佩戴状态下的声音泄漏状况。
具体地,耳机的数字信号处理器计算能量信息与参考能量信息之间的能量比值,该能量比值可表征能量信息与参考能量信息之间的能量关联度。数字信号处理器计算互相关信息与参考互相关信息之间的互相关比值,计算预设系数与互相关比值之间的差值,该差值或互相关比值可表征互相关信息与参考互相关信息之间的互相关关联度。
数字信号处理器计算能量比值与能量权重的乘积,以及计算该差值与互相关权重的乘积,将两个乘积求和得到耳机在佩戴状态下的贴合度。该贴合度表征耳机在佩戴状态下的声音泄漏状况,贴合度越高,声音泄漏越少,贴合度越低,声音泄漏越多。
在一个实施例中,能量权重和互相关权重之和等于预设系数,例如能量权重为alpha,互相关权重为beta,预设系数为1,则满足如下关系式:
alpha+beta=1;
数字信号处理器可通过如下公式计算贴合度:
Gr=Pn/Png*alpha+(1-Qn/Qng);0<Gr≤1
其中,Gr为贴合度,Pn为能量信息,Png为参考能量信息,Qn为互相关信息,Qng为参考互相关信息。
本实施例中,确定能量信息与参考能量信息之间的能量比值,以及互相关信息与参考互相关信息之间的互相关比值,确定预设系数和互相关比值之间的差值,将能量比值与能量权重的乘积,以及差值与互相关权重的乘积之和,作为耳机在佩戴状态下的贴合度,能够通过贴合度表征耳机在佩戴状态下的声音泄漏状况,从而准确检测出耳机的声音泄漏状况。
在一个实施例中,检测音频为混合音频;通过反馈麦克风获取检测音频对应的内部检测信号,包括:
通过反馈麦克风采集检测音频对应的音频信号;对反馈麦克风所采集的音频信号进行第一滤波处 理,得到处于第一频段范围内的内部检测信号;
通过前馈麦克风获取检测音频对应的外部检测信号,包括:
通过前馈麦克风采集检测音频对应的音频信号;对前馈麦克风所采集的音频信号进行第二滤波处理,得到处于第二频段范围内的外部检测信号;第一频段范围的上限值小于第二频段范围的下限值。
其中,第一滤波处理用于从检测音频的音频信号中分离出超低频信号,该超低频信号即为内部检测信号。第二滤波处理用于从检测音频的音频信号中分离出中低频信号,从前馈麦克风采集的音频信号中分离出的中低频信号即为外部检测信号,或者在佩戴状态下,从前馈麦克风采集的音频信号中分离出的中低频信号即为外部检测信号。
第一滤波处理具体包括高通滤波处理、低通滤波处理、带通滤波处理和带阻滤波处理中的一种。第二波处理具体包括高通滤波处理、低通滤波处理、带通滤波处理和带阻滤波处理中的一种。
具体地,该检测音频为不同频段的信号混合组成的音频,具体可以是处于第一频段范围内的信号和处于第二频段范围内的信号所混合得到的音频。该第一频段范围的上限值小于第二频段范围的下限值。例如是超低频单频信号和中低频信号组成的混合信号。在耳机处于用户佩戴的状态下播放检测音频,该耳机的反馈麦克风采集用户耳道中的音频信号。接着,通过耳机的数字信号处理器对该音频信号进行第一滤波处理,分离出超低频信号,即可得到内部检测信号。同时,耳机的前馈麦克风采集该耳机外部的音频信号,通过耳机的数字信号处理器对该音频信号进行第二滤波处理,分离出超低频信号,即可得到外部检测信号。
第二滤波处理不同于第一滤波处理,是指第一滤波处理用于分离出超低频信号的滤波处理,第二滤波处理用于分离出中低频信号的滤波处理。可以理解的是第一滤波处理和第二滤波处理可以是同一类型滤波处理,例如均可以是带通滤波处理,即第一带通滤波处理和第二带通滤波处理,但第一带通滤波处理允许超低频信号通过而阻止其它频率范围内的信号通过,第二带通滤波处理允许中低频信号通过而阻止其它频率范围内的信号通过。
在一个实施例,通过反馈麦克风采集检测音频对应的音频信号,包括:在佩戴状态下,通过耳机的反馈麦克风采集检测音频对应的音频信号;
通过前馈麦克风采集检测音频对应的音频信号,包括:在佩戴状态下,通过前馈麦克风采集检测音频对应的音频信号。
例如,图9为一个实施例中带通滤波器a对信号进行滤波处理的示意图。图9中坐标系的横轴为输入带通滤波器a的信号,纵轴为带通滤波器a对输入的信号的衰减幅度,例如输入带通滤波器a的信号为10 -2kHZ,即10HZ,对应的衰减幅度为0,则带通滤波器a输出的信号仍然为10HZ的信号;横轴的信号为10 -1kHZ,即100HZ,纵轴对应的衰减幅度为-30,则带通滤波器a输出的信号为70HZ的信号。
图10为带通滤波器b对信号进行滤波处理的示意图。带通滤波器a不同于带通滤波器b。图10中坐标系的横轴为输入带通滤波器b的信号,纵轴为带通滤波器b对输入的信号的衰减幅度。
从图9、图10中可知,带通滤波器a和带通滤波器b对于同一信号的衰减幅度并不相同,例如,带通滤波器b对100HZ的信号的衰减幅度大概为-21dB,而带通滤波器b对100HZ的信号的衰减幅度为-30,则通过带通滤波器a和带通滤波器b可以滤出需要的超低频信号和中低频信号。
本实施例中,在耳机处于佩戴状态下,分别通过耳机的反馈麦克风和前馈麦克风采集所播放的检测音频,得到对应的音频信号。对反馈麦克风和前馈麦克风所采集的音频信号分别进行相应的滤波处理,能够从音频信号中分离中超低频信号和中低频信号,所分离得到的信号不易受外界环境干扰,使得采集的数据更准确。在佩戴状态下通过两个麦克风分别采集耳机内外的音频信号,反馈麦克风采集到的音频信号更接近人耳耳道的信号,前馈麦克风采集到的信号更接近耳机泄漏的音频信号,从而能够结合耳机内外的音频数据对声音泄漏状况进行准确检测,有助于提高检测结果的准确度。
在一个实施例中,在播放检测音频之前,还包括:
通过耳机的前馈麦克风采集当前环境噪声,得到对应的噪声信号;确定噪声信号中各频点对应的信 号幅度,并根据各频点对应的信号幅度确定当前环境噪声对应的当前噪声值;在当前噪声值低于噪声阈值的情况下,对耳机进行频响校准。
其中,频响校准是指对频率响应进行校准。频响是在电子学上用来描述一台仪器对于不同频率的信号的处理能力的差异。频响也称响曲线,是指增益随频率的变化曲线。任何音响设备或载体都有其频响曲线。载体是指记录声音信号的物体。理想的频响曲线应当是平直的,声音信号通过后不产生失真。
具体地,声学器件、组装工艺等因素会影响耳机的频率响应,因此在进行声音泄漏状况检测前需要校准频响曲线。而耳机的频率响应校准需在安静的环境下进行,则在进行耳机的频率响应校准之前,通过耳机的前馈麦克风采集环境噪声,得到对应的噪声信号。在噪声信号的采集过程中,耳机的数字信号处理器检测所采集的噪声信号中每个频点的信号幅度,根据每个频点的信号幅度计算出当前环境噪声对应的当前噪声值,当前噪声值用于表示当前环境噪声的信号强度。数字信号处理器获取预设的噪声阈值,将当前噪声值和噪声阈值进行比较,在当前噪声值不低于噪声阈值的情况下,表示当前环境噪声较明显,不适合进行耳机的频响校准,则提示用户到符合条件的安静环境下进行校准。在当前噪声值低于噪声阈值的情况下,表示当前环境较安静,能够进行耳机的频响校准,则执行对耳机的频响校准操作。该对耳机的频响校准操作可由用户主动触发执行,或者耳机自动执行。
例如,判断当前环境噪声强度的计算方式如下:
设当前外界环境噪声的信号幅度为V,V为非负数,则
Q(m)=β*Q(m-1)+(1-β)*V;0<β<1
其中,Q(m)为当前环境噪声的噪声值,β为权重系数。
本实施例中,检测当前环境噪声的噪声值,能够自动帮助用户判断检测当前环境是否适合耳机进行频响校准。在当前噪声值低于噪声阈值的情况下进行频响校准,能够避免环境噪声尤其是突发噪声,对耳机的频率响应校准的影响,从而提高对耳机的频率响应校准的准确性,进而大幅提高贴合度检测准确程度,提升用户体验。
在一个实施例中,对耳机进行频响校准,包括:获取耳机的实际传递函数;根据实际传递函数和参考传递函数计算传递函数校准参数;基于传递函数校准参数对实际传递函数进行校准。
具体地,对耳机进行频响校准是对扬声器至反馈麦克风之间的实际传递函数的校准。进一步地,是对耳机放置于充电仓时,耳机的扬声器至反馈麦克风之间的实际传递函数的校准。或者,是对标准佩戴状态时,耳机的扬声器至反馈麦克风之间的实际传递函数的校准。
充电仓指的是用于耳机充电的空间。入耳式降噪耳机为真无线立体声(True Wireless Stereo,TWS)时,耳机可以配置充电仓。
在当前环境符合校准环境要求时,进行频响校准,耳机的扬声器播放预设存储在耳机的检测音源作为参考信号,检测音频可以是舒适白噪声或者粉噪,由耳机的反馈麦克风拾取,经过频响校准算法计算校准滤波器参数。将耳机放置在充电仓中,播放检测音源,获取耳机的扬声器至反馈麦克风之间的实际传递函数。或者,在消声环境中播放检测音源,获取标准佩戴状态下的耳机的扬声器至反馈麦克风之间的实际传递函数。
数字信号处理器获取参考传递函数,根据实际传递函数和参考传递函数计算传递函数校准参数,以通过传递函数校准参数对实际传递函数进行校准,实现对耳机的频率响应的校准。
在一个实施例中,获取耳机的实际传递函数包括:获取耳机放置于充电仓时,耳机的扬声器至反馈麦克风之间的传递函数作为实际传递函数;或者,获取耳机处于标准佩戴状态下,耳机的扬声器至反馈麦克风之间的传递函数作为实际传递函数。
在充电仓中检测得到实际传递函数,充电仓内密闭性较好,可减小外界环境的干扰;同时充电仓内密闭,也可以减小低频衰减,校正结果更准确。
标准佩戴状态指的是耳机佩戴紧密贴合的状态,也就是佩戴耳机时耳机与仿真测试对象之间的贴合情况无缝隙的状态。仿真测试对象指的是仿真的用于校正实际传递函数的增益的对象。仿真测试对象可 以是人工头、测试治具等。
耳机在出厂时,会采用仿真测试对象对耳机佩戴情况进行检测,耳机被佩戴于仿真测试对象的情况下测试实际传递函数,并对实际传递函数的增益进行校正,使得耳机在出厂之后,用户可以准确检测出耳机所播放的检测音频的衰减情况。
频响校准的原理如下:采用FIR(Finite Impulse Response,有限冲激脉冲响应)均衡方法实现平直幅频响应为目标的幅度均衡和以线性相位为目标的相位均衡,该均衡方法的设计基于最小二乘准则与正则化滤波器使均衡误差最小化,该均衡方法的频域表达式为:
Figure PCTCN2022093021-appb-000004
其中,M(k)是在频域状态下的校准滤波器,H(k)是检测出来的喇叭至内部麦克风的频响曲线,即校准前的频响曲线。λ表示正则化滤波器加权标量,B(k)表示正则化滤波器响应的傅里叶变换,D(k)表示理想带通滤波器响应的傅里叶变换。将M(k)进行逆傅里叶变换,得到校准滤波器参数,其形式为FIR滤波器。将上述FIR滤波器应用到DSP程序,完成频响校准,如下图11所示,是校准前后的耳机的扬声器至反馈麦克风的频响曲线,图中虚线的曲线original表示校准前,耳机的扬声器至反馈麦克风的频响曲线;实线的曲线calibration表示校准后,耳机的扬声器至反馈麦克风的频响曲线。从图11中可知,校准后的频响曲线calibration是保持平直的,声音信号通过后不产生失真。
本实施例中,获取耳机的实际传递函数,根据实际传递函数和参考传递函数计算传递函数校准参数,基于传递函数校准参数对实际传递函数进行校准,能够消除声学器件自身的差异、以及组装工艺所导致的声学误差。在完成对耳机的频响校准之后,再进行耳机的贴合度检测,能够提高贴合度检测结果的准确性。
在一个实施例中,耳机在佩戴状态下的声音泄漏状况通过耳机在佩戴状态下的贴合度表征;在确定耳机在佩戴状态下的声音泄漏状况之后,还包括:
根据贴合度和预设贴合度阈值之间的关系,确定耳机在佩戴状态下的贴合度等级;根据贴合度等级进行增强降噪处理或者音质补偿处理。
其中,预设贴合度阈值是指耳机在佩戴状态下的预先设置的贴合度。例如,耳机佩戴的贴合度可以是百分比如80%、60%、20%等,还可以是0.3、.06、0.9等。贴合度等级是指预设贴合度阈值所对应的等级,具体可以是一级、二级、三级、四级等。例如预设贴合度设置为90%及以上,则对应的等级为一级,预设贴合度设置为60%以下,则对应的等级为四级。
具体地,耳机的数字信号处理器根据参考能量信息、能量信息、参考互相关信息和互相关信息,计算出耳机在佩戴状态下的贴合度。数字信号处理器获取预设贴合度阈值,将在佩戴状态下的贴合度和预设贴合度阈值进行比较,以确定该佩戴状态下的贴合度所满足的预设贴合度阈值。将该佩戴状态下的贴合度满足的预设贴合度阈值所对应的贴合度等级,作为耳机在佩戴状态下的贴合度等级。
当耳机在佩戴状态下的贴合度等级不满足贴合度条件时,耳机进行增强降噪处理或者音质补偿处理。贴合度条件具体可以是耳机在佩戴状态下的贴合度等级大于或等于等级阈值,则耳机在佩戴状态下的贴合度等级小于等级阈值即为不满足贴合度条件。在耳机在佩戴状态下的贴合度等级小于或等于等级阈值的情况下,耳机进行增强降噪处理或者音质补偿处理。例如,预设贴合度阈值所对应的贴合度等级分为一级、二级、三级、四级,等级阈值为三级,在耳机在佩戴状态下的贴合度等级小于或等于等级阈值的情况下,对耳机进行增强降噪处理或者音质补偿处理。
耳机进行增强降噪处理,可以包括主动降噪处理或者被动降噪处理。在耳机进行增强降噪处理的过程中,可以对环境进行滤波处理,或者将环境中的噪声进行抵消,从而达到进一步降低噪声的效果。
音质补偿指的是调整各频段的中心频率来改变声音的音色。音质补偿可以包括低音的音质补偿、中音的音质补偿和高音的音质补偿。低音为频率低于预设频率的声音,例如频率为16Hz-64Hz的声音为低音。而250Hz-2000Hz可以是中音,4000Hz-8000Hz可以是高音。
当耳机的扬声器播放音乐时,则耳机可以进行低音音质补偿,提高音乐的低音音质。
在一个实施例中,可根据贴合度等级判断用户佩戴耳帽的漏音程度,从而调用与贴合度等级相对应的降噪滤波器,以对耳机进行降噪处理。
当耳机在佩戴状态下的贴合度等级不满足贴合度条件时,表示耳机佩戴的贴合度低,则耳机容易泄漏扬声器所播放的音频,以及受到外界的噪声干扰,因此根据贴合度等级进行增强降噪处理或者音质补偿,可以提高扬声器所播放的音频的质量,并且可以降低外界的噪声干扰。
并且,对于部分耳道结构特殊的用户,无合适耳帽匹配,即提供的大、中、小型号的耳帽都出现声音泄漏的情况,根据贴合度检测结果判断用户佩戴耳帽的漏音程度,调用预设档位的降噪滤波器,能够优化主动降噪性能,改善用户体验。根据贴合度检测结果判断用户佩戴耳帽的漏音程度,对音乐的低频频段补偿,能够保障音质效果。
在一个实施例中,耳机在佩戴状态下的声音泄漏状况通过耳机在佩戴状态下的贴合度表征声音泄漏状况之后,该方法还包括:
根据贴合度和预设贴合度阈值之间的关系,确定耳机在佩戴状态下的贴合度等级;根据贴合度等级确定耳机对应的目标耳帽。
具体地,耳机的数字信号处理器根据参考能量信息、能量信息、参考互相关信息和互相关信息,计算出耳机在佩戴状态下的贴合度。数字信号处理器获取预设贴合度阈值,将在佩戴状态下的贴合度和预设贴合度阈值进行比较,以确定该佩戴状态下的贴合度所满足的预设贴合度阈值。将该佩戴状态下的贴合度满足的预设贴合度阈值所对应的贴合度等级,作为耳机在佩戴状态下的贴合度等级。该贴合度等级可按照预设步长划分,例如0.1、0.2等,但不限于此。
数字信号处理器可获取该耳机所配置的耳帽型号,根据耳机在佩戴状态下的贴合度等级确定适合该耳机的耳帽对应的耳帽型号,将耳帽型号对应的耳帽作为目标耳帽。例如,耳帽的型号如图12所示,耳帽型号可包括大、中、小型号,数字信号处理器根据耳机在佩戴状态下的贴合度等级为四级,则表示耳机在佩戴状态下声音的泄漏程度比较高,提示用户使用大型号的耳帽。
本实施例中,根据贴合度和预设贴合度阈值之间的关系,确定耳机在佩戴状态下的贴合度等级,能够将贴合度细分为多个等级,贴合度等级反馈耳帽的贴合性能,能够直观表示出耳机在佩戴状态下声音的泄漏程度,从而能够为用户选择舒适且气密性良好的耳帽,提升了主动降噪效果和音质体验。
在一个实施例中,对于耳机所配置的多个耳帽,可确定耳机在使用每个耳帽时分别对应的贴合度,从而将每个耳帽对应的贴合度进行比较,确定出最适合该耳机的目标耳帽。
在一个实施例中,耳机为入耳式无线耳机,具有与耳道贴合的耳帽结构,耳机的反馈麦克风和前馈麦克风均位于出音孔处。
具体地,耳机可以是入耳式无线耳机,例如可以是TWS(True Wireless Stereo,真无线立体声)ANC耳机,该耳机包括反馈麦克风和前馈麦克风,该耳机具有与耳道贴合的耳帽结构,该反馈麦克风和前馈麦克风可位于耳机的出音孔处,反馈麦克风可位于出音孔内侧,使得反馈麦克风采集到的信号更接近人耳耳道的音频信号,前馈麦克风可位于出音孔外侧,使得前馈麦克风靠近耳帽结构,使得前馈麦克风采集到的信号更接近泄漏的音频信号。反馈麦克风和前馈麦克风之间的距离比较接近,更有利于比较两者检测到的音频信号之间的互相关程度,从而有助于提高检测结果的准确度。
在一个实施例中,确定耳机在佩戴状态下的声音泄漏状况通过耳机在佩戴状态下的贴合度表征;该方法还包括:接收终端发送的贴合度检测指令;响应于贴合度检测指令播放检测音频,执行通过反馈麦克风获取检测音频对应的内部检测信号,通过前馈麦克风获取检测音频对应的外部检测信号的操作;在确定耳机在佩戴状态下的贴合度之后,还包括:向终端发送贴合度,使得终端显示贴合度。
终端与耳机可以进行无线连接,也可以进行有线连接。当终端与耳机进行无线连接时,可以通过无线网络进行连接,也可以通过蓝牙进行连接,还可以进行近场通信,等等。当终端与耳机进行有线连接时,耳机线的插头可以插入终端的连接孔中进行连接。
在一种实施方式中,用户可以对终端执行预设操作,终端根据预设操作生成贴合度检测指令,再将贴合度检测指令发送至耳机。其中,预设操作可以是预设的语音输入、触摸/点击/长按预设按键、预设 的指令的输入,等等。
当终端获取到贴合度检测指令时,将贴合度检测指令发送至耳机,耳机接收贴合度检测指令,响应于贴合度检测指令播放检测音频。
在终端中还可以安装耳机对应的控制应用程序,该控制应用程序可以与耳机进行通信;当用户对终端中的控制应用程序进行预设操作时,生成贴合度检测指令。其中,预设操作可以是单击、滑动、双击、语音输入等,不限于此。
当耳机获取到佩戴的贴合度时,向终端发送该贴合度,并显示在终端的控制应用程序的显示界面中,则用户可以从显示界面中获取到该耳机佩戴的贴合度,从而对耳机佩戴的贴合度进行调整。
如图13所示,为一个实施例中应用于耳机的检测方法的框架图。耳机包括外部麦克风1302(即前馈麦克风)和内部麦克风1306(即反馈麦克风)。外部麦克风1302,执行操作1308和操作1312。操作1308:采集环境噪声,以确定当前噪声值,接着执行操作1310,即在当前噪声值低于噪声阈值的情况下,对耳机进行频响校准。
在执行操作1310之后,执行操作1312,即耳机在佩戴状态下播放检测音频,通过外部麦克风采集耳机外部的音频信号,并通过带通滤波器b对采集的音频信号进行带通滤波处理,得到外部检测信号。
以及,执行操作1304,通过带通滤波器b对检测音频的信号进行带通滤波处理,得到滤波后的检测音频。
执行操作1316,计算外部检测信号和滤波后的检测音频之间的互相关值。
以及,执行操作1306,即耳机在佩戴状态下播放检测音频,通过内部麦克风采集耳机内部的音频信号,并执行操作1318,即通过带通滤波器a对分别采集的音频信号进行带通滤波处理,得到内部检测信号。接着,执行操作1320,即计算内部检测信号对应的能量值。接着,执行操作1322。
操作1322,获取参考能量信息和参考互相关信息,根据参考能量信息、能量信息、参考互相关信息和互相关信息,以及相应的权重,计算耳机的贴合度,并将贴合度和贴合度阈值进行比较。接着,执行操作1324,即通过贴合度检测结果显示耳机的声音泄漏程度。
在一个实施例中,提供了一种检测方法,应用于耳机,包括:
耳机的前馈麦克风采集当前环境噪声,得到对应的噪声信号。
耳机的数字信号处理器确定噪声信号中各频点对应的信号幅度,并根据各频点对应的信号幅度确定当前环境噪声对应的当前噪声值。
在当前噪声值低于噪声阈值的情况下,数字信号处理器获取耳机放置于充电仓时,耳机的扬声器至反馈麦克风之间的传递函数作为实际传递函数。
接着,数字信号处理器根据实际传递函数和参考传递函数计算传递函数校准参数;基于传递函数校准参数对实际传递函数进行校准。
在佩戴状态下,耳机的反馈麦克风和前馈麦克风分别采集所播放的检测音频,得到对应的音频信号;反馈麦克风用于检测耳道内音频信号,前馈麦克风用于检测耳机外部音频信号。
接着,数字信号处理器对反馈麦克风所采集的音频信号进行第一滤波处理,得到得到处于第一频段范围内的内部检测信号;
以及,数字信号处理器对前馈麦克风所采集的音频信号进行第二滤波处理,得到得到处于第二频段范围内的外部检测信号;第一频段范围的上限值小于第二频段范围的下限值。
接着,数字信号处理器将内部检测信号划分为多个信号片段;针对多个信号片段中的每个信号片段,根据相应信号片段中每个频点对应的信号幅度,确定相应信号片段对应的片段能量值。
接着,数字信号处理器基于每个信号片段分别对应的片段能量值,确定内部检测信号对应的能量信息。
进一步地,数字信号处理器根据外部检测信号中每个频点对应的信号幅度,确定外部检测信号对应的第一能量值和第一幅度均值。
以及,数字信号处理器根据检测音频中每个频点对应的信号幅度,确定检测音频对应的第二能量值和第二幅度均值。
接着,数字信号处理器根据第一能量值、第一幅度均值、第二能量值和第二幅度均值,计算外部检测信号和检测音频之间的期望值;计算第一能量值和第一幅度均值之差的第一平方值,与第二能量值和第二幅度均值之差的第二平方值。
进一步地,数字信号处理器确定第一平方值的期望与第二平方值的期望之间的乘积的平方根,将期望值与平方根的比值,作为外部检测信号和检测音频之间的互相关信息。
在消声环境中,通过标准佩戴状态下的耳机的反馈麦克风采集所播放的检测音频,得到对应的内部参考检测信号;该标准佩戴状态表征耳机与测试治具之间无缝贴合的状态。
接着,数字信号处理器将内部参考检测信号划分为多个内部信号片段;针对多个内部信号片段中的每个内部信号片段,根据相应内部信号片段中每个频点对应的信号幅度,确定相应信号片段对应的内部片段能量值;基于每个内部信号片段分别对应的内部片段能量值,确定内部参考检测信号对应的参考能量信息。
在消声环境中,通过标准佩戴状态下的耳机的前馈麦克风采集所播放的检测音频,获得对应的第一参考检测信号;标准佩戴状态表征耳机与测试治具之间无缝贴合的状态。
在消声环境中,通过无佩戴状态下的耳机的前馈麦克风采集所播放的检测音频,获得对应的第二参考检测信号。
接着,数字信号处理器根据第一参考检测信号中每个频点对应的信号幅度,确定第一参考检测信号对应的第一参考能量值和第一参考幅度均值;根据第二参考检测信号中每个频点对应的信号幅度,确定第二参考检测信号对应的第二参考能量值和第二参考幅度均值;基于第一参考能量值、第一参考幅度均值、第二参考能量值和第二参考幅度均值,确定第一参考检测信号和第二参考检测信号之间的参考互相关信息。
进一步地,数字信号处理器获取能量权重和互相关权重。
接着,数字信号处理器确定能量信息与参考能量信息之间的能量比值,以及互相关信息与参考互相关信息之间的互相关比值;确定预设系数和互相关比值之间的差值,将能量比值与能量权重的乘积,以及差值与互相关权重的乘积之和,作为耳机在佩戴状态下的贴合度。
进一步地,数字信号处理器根据贴合度和预设贴合度阈值之间的关系,确定耳机在佩戴状态下的贴合度等级;根据贴合度等级进行增强降噪处理或者音质补偿处理。或者,根据贴合度等级确定耳机对应的目标耳帽。
本实施例中,检测当前环境噪声的噪声值,能够自动帮助用户判断检测当前环境是否适合耳机进行频响校准。在当前噪声值低于噪声阈值的情况下进行频响校准,能够避免环境噪声尤其是突发噪声,对耳机的频率响应校准的影响,从而提高对耳机的频率响应校准的准确性。
在完成对耳机的频率响应校准之后,在耳机处于佩戴状态下,分别通过耳机的反馈麦克风和前馈麦克风采集所播放的检测音频,对反馈麦克风和前馈麦克风所采集的音频信号分别进行相应的滤波处理,能够从音频信号中分离中超低频信号和中低频信号,所分离得到的信号不易受外界环境干扰,使得采集的数据更准确。在佩戴状态下通过两个麦克风分别采集耳机内外的音频信号,反馈麦克风采集到的音频信号更接近人耳耳道的信号,前馈麦克风采集到的信号更接近耳机泄漏的音频信号,从而能够结合耳机内外的音频数据对声音泄漏状况进行准确检测。计算出在佩戴状态下前馈麦克风采集的外部检测信号和检测音频的音频信号之间的互相关信息,以确定前馈麦克风采集的外部检测信号和检测音频的音频信号之间的互相关程度。
在消声环境中,通过标准佩戴状态下的耳机的反馈麦克风采集所播放的检测音频,得到对应的内部参考检测信号,该标准佩戴状态表征耳机与测试治具之间无缝贴合的状态,从而能够在无外界干扰且耳机处于标准佩戴状态下采集检测音频的音频信号,使得所获得的内部参考检测信号更精准,所计算的内部参考检测信号对应的参考能量信息更准确。
在消声环境中,通过耳机的前馈麦克风分别采集处于标准佩戴状态下和无佩戴状态下所播放的检测音频,能够得到在标准佩戴状态下所采集的耳机外部的音频信号和无佩戴状态下采集的外部的音频信号,计算这两种状态下采集到的音频信号之间的相关程度,能够检测出耳机对声音信号的泄漏程度。
确定耳道内的音频信号对应的能量信息,结合参考能量信息、能量信息、参考互相关信息和互相关信息等多方面的信息,结合多方面的信息可以准确检测出耳机在佩戴状态下的声音泄漏状况。并且使用反馈麦克风和前馈麦克风所采集的音频信号进行耳机的声音泄漏状况的计算,无需额外使用其他硬件,可以节省硬件成本。
应该理解的是,虽然图2、6、8、13的流程图中的各个操作按照箭头的指示依次显示,但是这些操作并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些操作的执行并没有严格的顺序限制,这些操作可以以其它的顺序执行。而且,图2、6、8、13中的至少一部分操作可以包括多个子操作或者多个阶段,这些子操作或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子操作或者阶段的执行顺序也不必然是依次进行,而是可以与其它操作或者其它操作的子操作或者阶段的至少一部分轮流或者交替地执行。
图14为一个实施例的检测装置的结构框图。如图14所示,该检测装置1400包括:
播放模块1402,用于播放检测音频。
获取模块1404,用于通过反馈麦克风获取检测音频对应的内部检测信号,通过前馈麦克风获取检测音频对应的外部检测信号。
信息确定模块1406,用于确定内部检测信号对应的能量信息,以及确定外部检测信号与检测音频之间的互相关信息。
声音泄漏确定模块1408,用于根据参考能量信息、能量信息、参考互相关信息和互相关信息,确定耳机的声音泄漏状况。
本实施例中,耳机在佩戴状态下播放检测音频,通过耳机的反馈麦克风采集耳道内的音频信号,通过耳机的前馈麦克风采集耳机外部音频信号,得到不同麦克风在处于相同状态下所采集到的不同的音频信号。在无佩戴状态下播放检测音频,通过耳机的前馈麦克风采集耳机外部音频信号,从而能够计算出同一麦克风采集的在佩戴状态下和无佩戴状态下的两种外部音频信号之间的互相关程度。确定耳道内的音频信号对应的能量信息,结合参考能量信息、能量信息、参考互相关信息和互相关信息等多方面的信息,可以准确检测出耳机在佩戴状态下的声音泄漏状况。并且使用反馈麦克风和前馈麦克风所采集的音频信号进行耳机的声音泄漏状况的计算,无需额外使用其他硬件,可以节省硬件成本。
在一个实施例中,播放模块1402,用于播放检测音频。
获取模块1404,用于通过反馈麦克风获取检测音频对应的内部检测信号。
信息确定模块1406,用于确定内部检测信号对应的能量信息。
声音泄漏确定模块1408,用于获取参考能量信息,根据参考能量信息和能量信息,确定耳机的声音泄漏状况。
本实施例中,通过反馈麦克风获取检测音频对应的内部检测信号,以确定内部检测信号对应的能量信息,基于所确定的能量信息和参考能量信息,能够准确确定耳机的声音泄漏状况,且计算量小。并且,基于反馈麦克风所采集信号即可对耳机的声音泄漏状况进行检测,无需采用多余的硬件,能够节省硬件成本。
在一个实施例中,播放模块1402,用于播放检测音频。
获取模块1404,用于通过前馈麦克风获取检测音频对应的外部检测信号。
信息确定模块1406,用于确定外部检测信号与检测音频之间的互相关信息。
声音泄漏确定模块1408,用于获取参考互相关信息,根据参考互相关信息和互相关信息,确定耳机的声音泄漏状况。
本实施例中,通过前馈麦克风获取检测音频对应的外部检测信号,确定所获得的耳机外部的检测信号与检测音频之间的互相关信息,能够获知所检测到的耳机外部的信号与原始的检测音频之间的互相关程度。根据互相关信息和参考互相关信息,可以准确检测出耳机在佩戴状态下的声音泄漏状况,且计算量小。并且,基于前馈麦克风所采集信号即可对耳机的声音泄漏状况进行检测,无需采用多余的硬件,能够节省硬件成本。
在一个实施例中,信息确定模块1406,还用于将内部检测信号划分为多个信号片段;针对多个信 号片段中的每个信号片段,根据相应信号片段中每个频点对应的信号幅度,确定相应信号片段对应的片段能量值;基于每个信号片段分别对应的片段能量值,确定内部检测信号对应的能量信息。
本实施例中,将内部检测信号划分为多个信号片段,针对多个信号片段中的每个信号片段,根据相应信号片段中每个频点对应的信号幅度,准确计算相应信号片段在时域上对应的片段能量值。基于每个信号片段分别对应的片段能量值,能够准确计算出内部检测信号对应的能量信息,从而准确确定内部检测信号在时域上的能量信息。并且,在时域上进行信号的能量信息的检测,计算量小,消耗的耳机功耗低。
在一个实施例中,信息确定模块1406,还用于根据外部检测信号中每个频点对应的信号幅度,确定外部检测信号对应的第一能量值和第一幅度均值;根据检测音频中每个频点对应的信号幅度,确定检测音频对应的第二能量值和第二幅度均值;基于第一能量值、第一幅度均值、第二能量值和第二幅度均值,确定外部检测信号和检测音频之间的互相关信息。
本实施例中,计算外部检测信号的第一能量值、第一幅度均值,检测音频的第二能量值、第二幅度均值,能够将能量值和幅度均值作为计算外部检测信号和检测音频之间的相关程度的条件,充分考虑了多方面的影响因素,使得两者的互相关程度的计算更准确。
外部检测信号是在耳机佩戴状态下所获得的音频信号,检测音频是在无佩戴状态下所获得的音频信号,将能量值和幅度均值作为两者互相关程度的计算条件,从而能够在相同条件下计算耳机在两种不同状态下所采集的音频信号之间的互相关程度,使得所计算的互相关程度更准确。
在一个实施例中,信息确定模块1406,还用于根据第一能量值、第一幅度均值、第二能量值和第二幅度均值,计算外部检测信号和检测音频之间的期望值;计算第一能量值和第一幅度均值之差的第一平方值,与第二能量值和第二幅度均值之差的第二平方值;确定第一平方值的期望与第二平方值的期望之间的乘积的平方根,将期望值与平方根的比值,作为外部检测信号和检测音频之间的互相关信息。
本实施例中,根据第一能量值、第一幅度均值、第二能量值和第二幅度均值,计算外部检测信号和检测音频之间的期望值,并计算第一能量值和第一幅度均值之差的第一平方值,与第二能量值和第二幅度均值之差的第二平方值,确定第一平方值的期望与第二平方值的期望之间的乘积的平方根,将期望值与平方根的比值,作为外部检测信号和检测音频之间的互相关信息,从而能够准确计算出外部检测信号和检测音频之间的互相关信息。
在一个实施例中,声音泄漏确定模块1408,还用于在消声环境中,通过标准佩戴状态下的耳机的反馈麦克风采集所播放的检测音频,得到对应的内部参考检测信号;标准佩戴状态表征耳机与测试治具之间无缝贴合的状态;确定内部参考检测信号对应的参考能量信息。
本实施例中,在消声环境中,通过标准佩戴状态下的耳机的反馈麦克风采集所播放的检测音频,得到对应的内部参考检测信号,该标准佩戴状态表征耳机与测试治具之间无缝贴合的状态,从而能够在无外界干扰且耳机处于标准佩戴状态下采集检测音频的音频信号,使得所获得的内部参考检测信号更精准,所计算的内部参考检测信号对应的参考能量信息更准确。并且,将在无外界干扰且耳机处于标准佩戴状态下检测所获得的能量信息作为参考信息,能够与存在外界干扰且用户佩戴状态下检测所获得的能量信息进行对比,将这两者作为检测耳机在佩戴状态下的声音泄漏状况的条件,能够提高检测结果的准确度。
在一个实施例中,声音泄漏确定模块1408,还用于将内部参考检测信号划分为多个内部信号片段;针对多个内部信号片段中的每个内部信号片段,根据相应内部信号片段中每个频点对应的信号幅度,确定相应信号片段对应的内部片段能量值;基于每个内部信号片段分别对应的内部片段能量值,确定内部参考检测信号对应的内部参考能量信息。
在一个实施例中,声音泄漏确定模块1408,还用于在消声环境中,通过标准佩戴状态下的耳机的前馈麦克风采集所播放的检测音频,得到对应的第一参考检测信号;标准佩戴状态表征耳机与测试治具之间无缝贴合的状态;在消声环境中,通过无佩戴状态下的耳机的前馈麦克风采集所播放的检测音频,得到对应的第二参考检测信号;确定第一参考检测信号和第二参考检测信号之间的参考互相关信息。
本实施例中,在消声环境中,通过耳机的前馈麦克风分别采集处于标准佩戴状态下和无佩戴状态下 所播放的检测音频,能够得到在标准佩戴状态下所采集的耳机外部的音频信号和无佩戴状态下采集的外部的音频信号,计算这两种状态下采集到的音频信号之间的互相关程度,能够检测出耳机对声音信号的泄漏程度,进一步提高检测结果的准确度。
在一个实施例中,声音泄漏确定模块1408,还用于根据第一参考检测信号中每个频点对应的信号幅度,确定第一参考检测信号对应的第一参考能量值和第一参考幅度均值;根据第二参考检测信号中每个频点对应的信号幅度,确定第二参考检测信号对应的第二参考能量值和第二参考幅度均值;基于第一参考能量值、第一参考幅度均值、第二参考能量值和第二参考幅度均值,确定第一参考检测信号和第二参考检测信号之间的参考互相关信息。
在一个实施例中,声音泄漏确定模块1408,还用于根据第一参考能量值、第一参考幅度均值、第二参考能量值和第二参考幅度均值,计算第一参考音频信号和第二参考音频信号之间的参考期望值;计算第一参考能量值和第一参考幅度均值之差的第一参考平方值,与第二参考能量值和第二参考幅度均值之差的第二参考平方值;确定第一参考平方值的期望与第二参考平方值的期望之间的乘积的平方根,将参考期望值与平方根的比值,作为第一参考音频信号和第二参考音频信号之间的参考互相关信息。
在一个实施例中,声音泄漏确定模块1408,还确认能量权重和互相关权重;
根据参考能量信息、能量信息、参考互相关信息、互相关信息、能量权重和互相关权重,确定耳机的声音泄漏状况。
本实施例中,对参考能量信息、能量信息、参考互相关信息和互相关信息分配不同的权重,使得对参考能量信息、能量信息、参考互相关信息和互相关信息的关注程度不同,对关键信息分配更大的权重,对非关键信息分配较小的权重,使得能够进一步提高对耳机在佩戴状态下的声音泄漏状况检测的准确性。
在一个实施例中,声音泄漏确定模块1408,还用于确定能量信息与参考能量信息之间的能量比值,以及互相关信息与参考互相关信息之间的互相关比值;确定预设系数和互相关比值之间的差值,将能量比值与能量权重的乘积,以及差值与互相关权重的乘积之和,作为耳机在佩戴状态下的贴合度;贴合度表征耳机在佩戴状态下的声音泄漏状况。
本实施例中,确定能量信息与参考能量信息之间的能量比值,以及互相关信息与参考互相关信息之间的互相关比值,确定预设系数和互相关比值之间的差值,将能量比值与能量权重的乘积,以及差值与互相关权重的乘积之和,作为耳机在佩戴状态下的贴合度,能够通过贴合度表征耳机在佩戴状态下的声音泄漏状况,从而准确检测出耳机的声音泄漏状况。
在一个实施例中,检测音频为混合音频;获取模块1404,还用于通过反馈麦克风采集检测音频对应的音频信号;对反馈麦克风所采集的音频信号进行第一滤波处理,得到处于第一频段范围内的内部检测信号;通过前馈麦克风采集检测音频对应的音频信号;对前馈麦克风所采集的音频信号进行第二滤波处理,得到处于第二频段范围内的外部检测信号;第一频段范围的上限值小于第二频段范围的下限值。
在一个实施例中,检测音频为混合音频;获取模块1404,还用于在佩戴状态下,通过耳机的第一麦克风和第二麦克风分别采集所播放的检测音频,得到对应的音频信号;对第一麦克风所采集的音频信号进行第一滤波处理,得到处于第一频段范围内的内部检测信号;对前馈麦克风所采集的音频信号进行第二滤波处理,得到处于第二频段范围内的外部检测信号;第一频段范围的上限值小于第二频段范围的下限值。
本实施例中,在耳机处于佩戴状态下,分别通过耳机的反馈麦克风和前馈麦克风采集所播放的检测音频,得到对应的音频信号。对反馈麦克风和前馈麦克风所采集的音频信号分别进行相应的滤波处理,能够从音频信号中分离中超低频信号和中低频信号,所分离得到的信号不易受外界环境干扰,使得采集的数据更准确。在佩戴状态下通过两个麦克风分别采集耳机内外的音频信号,反馈麦克风采集到的音频信号更接近人耳耳道的信号,前馈麦克风采集到的信号更接近耳机泄漏的音频信号,从而能够结合耳机内外的音频数据对声音泄漏状况进行准确检测,有助于提高检测结果的准确度。
在一个实施例中,该装置还包括校准模块;校准模块,用于在播放检测音频之前,通过前馈麦克风采集当前环境噪声,得到对应的噪声信号;确定噪声信号中各频点对应的信号幅度,并根据各频点对应 的信号幅度确定当前环境噪声对应的当前噪声值;在当前噪声值低于噪声阈值的情况下,对耳机进行频响校准。
在一个实施例中,该装置还包括校准模块;校准模块,用于在播放检测音频之前之前,通过耳机的前馈麦克风采集当前环境噪声,得到对应的噪声信号;确定噪声信号中各频点对应的信号幅度,并根据各频点对应的信号幅度确定当前环境噪声对应的当前噪声值;在当前噪声值低于噪声阈值的情况下,对耳机进行频响校准。
本实施例中,检测当前环境噪声的噪声值,能够自动帮助用户判断检测当前环境是否适合耳机进行频响校准。在当前噪声值低于噪声阈值的情况下进行频响校准,能够避免环境噪声尤其是突发噪声,对耳机的频率响应校准的影响,从而提高对耳机的频率响应校准的准确性,进而大幅提高贴合度检测准确程度,提升用户体验。
在一个实施例中,校准模块,还用于获取耳机的实际传递函数;根据实际传递函数和参考传递函数计算传递函数校准参数;基于传递函数校准参数对实际传递函数进行校准。
本实施例中,获取耳机的实际传递函数,根据实际传递函数和参考传递函数计算传递函数校准参数,基于传递函数校准参数对实际传递函数进行校准,能够消除声学器件自身的差异、以及组装工艺所导致的声学误差。在完成对耳机的频响校准之后,再进行耳机的贴合度检测,能够提高贴合度检测结果的准确性。
在一个实施例中,耳机在佩戴状态下的声音泄漏状况通过耳机在佩戴状态下的贴合度表征;该装置还包括处理模块;处理模块,用于在确定耳机在佩戴状态下的声音泄漏状况之后,根据贴合度和预设贴合度阈值之间的关系,确定耳机在佩戴状态下的贴合度等级;根据贴合度等级进行增强降噪处理或者音质补偿处理。
本实施例中,根据贴合度等级进行增强降噪处理或者音质补偿,可以提高扬声器所播放的音频的质量,并且可以降低外界的噪声干扰。
在一个实施例中,耳机在佩戴状态下的声音泄漏状况通过耳机在佩戴状态下的贴合度表征;该装置还包括处理模块;处理模块,用于在确定耳机在佩戴状态下的声音泄漏状况之后,根据贴合度和预设贴合度阈值之间的关系,确定耳机在佩戴状态下的贴合度等级;根据贴合度等级确定耳机对应的目标耳帽。
本实施例中,根据贴合度和预设贴合度阈值之间的关系,确定耳机在佩戴状态下的贴合度等级,能够将贴合度细分为多个等级,贴合度等级反馈耳帽的贴合性能,能够直观表示出耳机在佩戴状态下声音的泄漏程度,从而能够为用户选择舒适且气密性良好的耳帽,提升了主动降噪效果和音质体验。
在一个实施例中,耳机为入耳式无线耳机,具有与耳道贴合的耳帽结构,耳机的反馈麦克风和前馈麦克风均位于出音孔处。
本实施例中,反馈麦克风和前馈麦克风可位于耳机的出音孔处,使得反馈麦克风采集到的信号更接近人耳耳道的音频信号、前馈麦克风采集到的信号更接近泄漏的音频信号。反馈麦克风和前馈麦克风之间的距离比较接近,更有利于比较两者检测到的音频信号之间的互相关程度,从而有助于提高检测结果的准确度。
上述检测装置中各个模块的划分仅用于举例说明,在其他实施例中,可将检测装置按照需要划分为不同的模块,以完成上述检测装置的全部或部分功能。
关于检测装置的具体限定可以参见上文中对于检测方法的限定,在此不再赘述。上述检测装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
图15为一个实施例中耳机的内部结构示意图。如图15所示,该耳机包括通过系统总线连接的处理器和存储器。其中,该处理器用于提供计算和控制能力,支撑整个耳机的运行。存储器可包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现以下各个实施例所提供的一种检测方法。内存储器为非易失性存储介质中的操作系统计算机程序提供高速缓存的运行环境。该耳机可以是手机、平板电脑、PDA(Personal Digital Assistant, 个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备。
本申请实施例中提供的检测装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在耳机的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的操作。
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,使得处理器执行检测方法的操作。
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行检测方法。
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种检测方法,应用于耳机,其特征在于,包括:
    播放检测音频;
    通过反馈麦克风获取所述检测音频对应的内部检测信号,通过前馈麦克风获取所述检测音频对应的外部检测信号;
    确定所述内部检测信号对应的能量信息,以及确定所述外部检测信号与所述检测音频之间的互相关信息;及
    根据参考能量信息、所述能量信息、参考互相关信息和所述互相关信息,确定所述耳机的声音泄漏状况。
  2. 根据权利要求1所述的方法,其特征在于,所述确定所述外部检测信号与所述检测音频之间的互相关信息,包括:
    根据所述外部检测信号中每个频点对应的信号幅度,确定所述外部检测信号对应的第一能量值和第一幅度均值;
    根据所述检测音频中每个频点对应的信号幅度,确定所述检测音频对应的第二能量值和第二幅度均值;及
    基于所述第一能量值、所述第一幅度均值、所述第二能量值和所述第二幅度均值,确定所述外部音频信号与所述检测音频之间的互相关信息。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述外部检测信号中每个频点对应的信号幅度,确定所述外部检测信号对应的第一能量值,包括:
    将所述外部检测信号划分为多个外部信号片段;
    针对多个所述外部信号片段中的每个外部信号片段,根据相应外部信号片段中每个频点对应的信号幅度,确定相应外部信号片段对应的外部片段能量值;及
    基于每个所述外部信号片段分别对应的外部片段能量值,确定所述外部检测信号对应的第一能量值。
  4. 根据权利要求2所述的方法,其特征在于,所述基于所述第一能量值、所述第一幅度均值、所述第二能量值和所述第二幅度均值,确定所述外部检测信号与所述检测音频之间的互相关信息,包括:
    根据所述第一能量值、所述第一幅度均值、所述第二能量值和所述第二幅度均值,计算所述外部检测信号和所述检测音频之间的期望值;
    计算所述第一能量值和所述第一幅度均值之差的第一平方值,与所述第二能量值和所述第二幅度均值之差的第二平方值;及
    确定所述第一平方值的期望与所述第二平方值的期望之间的乘积的平方根,将所述期望值与所述平方根的比值,作为所述外部检测信号与所述检测音频之间的互相关信息。
  5. 根据权利要求1所述的方法,其特征在于,所述根据参考能量信息、所述能量信息、参考互相关信息和所述互相关信息,确定所述耳机的声音泄漏状况,包括:
    确定参考能量信息和所述能量信息之间的能量关联度,以及参考互相关信息和所述互相关信息之间的互相关关联度;及
    根据所述能量关联度和所述互相关关联度,确定所述耳机在佩戴状态下的贴合度;所述贴合度表征所述耳机在所述佩戴状态下的声音泄漏状况。
  6. 根据权利要求1所述的方法,其特征在于,所述根据参考能量信息、所述能量信息、参考互相关信息和所述互相关信息,确定所述耳机的声音泄漏状况,包括:
    确认能量权重和互相关权重;及
    根据参考能量信息、所述能量信息、参考互相关信息、所述互相关信息、所述能量权重和所述互相关权重,确定所述耳机的声音泄漏状况。
  7. 根据权利要求6所述的方法,其特征在于,所述根据参考能量信息、所述能量信息、参考互相关信息、所述互相关信息、所述能量权重和所述互相关权重,确定所述耳机的声音泄漏状况,包括:
    确定所述能量信息与所述参考能量信息之间的能量比值,以及所述互相关信息与所述参考互相关信息之间的互相关比值;及
    确定预设系数和所述互相关比值之间的差值,将所述能量比值与所述能量权重的乘积,以及所述差值与所述互相关权重的乘积之和,作为所述耳机在佩戴状态下的贴合度;所述贴合度表征所述耳机在所述佩戴状态下的声音泄漏状况。
  8. 根据权利要求1所述的方法,其特征在于,所述检测音频为混合音频;所述通过反馈麦克风获取所述检测音频对应的内部检测信号,包括:
    通过反馈麦克风采集所述检测音频对应的音频信号;
    对所述反馈麦克风所采集的音频信号进行第一滤波处理,得到处于第一频段范围内的内部检测信号;
    所述通过前馈麦克风获取所述检测音频对应的外部检测信号,包括:
    通过前馈麦克风采集所述检测音频对应的音频信号;及
    对所述前馈麦克风所采集的音频信号进行第二滤波处理,得到处于第二频段范围内的外部检测信号;所述第一频段范围的上限值小于所述第二频段范围的下限值。
  9. 根据权利要求1所述的方法,其特征在于,在所述播放检测音频之前,还包括:
    通过前馈麦克风采集当前环境噪声,得到对应的噪声信号;
    确定所述噪声信号中各频点对应的信号幅度,并根据所述各频点对应的信号幅度确定所述当前环境噪声对应的当前噪声值;及
    在所述当前噪声值低于噪声阈值的情况下,对所述耳机进行频响校准。
  10. 根据权利要求9所述的方法,其特征在于,所述对所述耳机进行频响校准,包括:
    获取所述耳机的实际传递函数;
    根据所述实际传递函数和参考传递函数计算传递函数校准参数;及
    基于所述传递函数校准参数对所述实际传递函数进行校准。
  11. 根据权利要求1所述的方法,其特征在于,所述通过反馈麦克风获取所述检测音频对应的内部检测信号,通过前馈麦克风获取所述检测音频对应的外部检测信号,包括:
    在佩戴状态下,通过反馈麦克风获取所述检测音频对应的内部检测信号,通过前馈麦克风获取所述检测音频对应的外部检测信号。
  12. 根据权利要求1所述的方法,其特征在于,所述确定所述内部检测信号对应的能量信息,包括:
    将所述内部检测信号划分为多个信号片段;
    针对多个所述信号片段中的每个信号片段,根据相应信号片段中每个频点对应的信号幅度,确定相应信号片段对应的片段能量值;及
    基于每个所述信号片段分别对应的片段能量值,确定所述内部检测信号对应的能量信息。
  13. 根据权利要求1至12任一项所述的方法,其特征在于,所述耳机的声音泄漏状况通过所述耳机在佩戴状态下的贴合度表征;在所述确定所述耳机的声音泄漏状况之后,还包括:
    根据所述贴合度和预设贴合度阈值之间的关系,确定所述耳机在所述佩戴状态下的贴合度等级;及
    根据所述贴合度等级进行增强降噪处理或者音质补偿处理。
  14. 一种检测方法,应用于耳机,其特征在于,包括:
    播放检测音频;
    通过反馈麦克风获取所述检测音频对应的内部检测信号;
    确定所述内部检测信号对应的能量信息;及
    获取参考能量信息,根据所述参考能量信息和所述能量信息,确定耳机的声音泄漏状况。
  15. 根据权利要求14所述的方法,其特征在于,所述获取参考能量信息,包括:
    在消声环境中,通过标准佩戴状态下的所述耳机的反馈麦克风采集所播放的检测音频,获得对应 的内部参考检测信号;所述标准佩戴状态表征所述耳机与测试治具之间无缝贴合的状态;及
    确定所述内部参考检测信号对应的参考能量信息。
  16. 根据权利要求15所述的方法,其特征在于,所述在消声环境中,通过标准佩戴状态下的所述耳机的反馈麦克风采集所播放的检测音频,获得对应的内部参考检测信号,包括:
    在消声环境中,通过标准佩戴状态下的所述耳机的反馈麦克风采集在测试治具的声耦合腔中的音频信号;及
    对所采集的音频信号进行第一滤波处理,得到内部参考检测信号。
  17. 一种检测装置,应用于耳机,其特征在于,包括:
    播放模块,用于播放检测音频;
    获取模块,用于通过反馈麦克风获取所述检测音频对应的内部检测信号,通过前馈麦克风获取所述检测音频对应的外部检测信号;
    信息确定模块,用于确定所述内部检测信号对应的能量信息,以及确定所述外部检测信号与所述检测音频之间的互相关信息;及
    声音泄漏确定模块,用于根据参考能量信息、所述能量信息、参考互相关信息和所述互相关信息,确定所述耳机的声音泄漏状况。
  18. 一种检测装置,应用于耳机,其特征在于,包括:
    播放模块,用于播放检测音频;
    获取模块,用于通过反馈麦克风获取所述检测音频对应的内部检测信号;
    信息确定模块,用于确定所述内部检测信号对应的能量信息;及
    声音泄漏确定模块,用于获取参考能量信息,根据所述参考能量信息和所述能量信息,确定耳机的声音泄漏状况。
  19. 一种耳机,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1至16中任一项所述的方法的操作。
  20. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至16中任一项所述的方法的操作。
PCT/CN2022/093021 2021-05-27 2022-05-16 检测方法、装置、耳机和计算机可读存储介质 WO2022247673A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110584776.2 2021-05-27
CN202110584776.2A CN115412824A (zh) 2021-05-27 2021-05-27 检测方法、装置、耳机和计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2022247673A1 true WO2022247673A1 (zh) 2022-12-01

Family

ID=84155523

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/093021 WO2022247673A1 (zh) 2021-05-27 2022-05-16 检测方法、装置、耳机和计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN115412824A (zh)
WO (1) WO2022247673A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116761128B (zh) * 2023-08-23 2023-11-24 深圳市中翔达润电子有限公司 一种运动蓝牙耳机声音泄漏检测方法

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212833A (zh) * 2006-12-25 2008-07-02 索尼株式会社 音频输出设备、方法和系统及用于音频输出处理的程序
CN103581796A (zh) * 2012-08-02 2014-02-12 索尼公司 耳机装置、佩戴状态检测装置及佩戴状态检测方法
US20200014996A1 (en) * 2018-07-09 2020-01-09 Avnera Corporation Headphone off-ear detection
CN111133770A (zh) * 2017-06-26 2020-05-08 高等工艺学校 用于评估耳机的拟合质量的系统和方法
CN111149369A (zh) * 2017-10-10 2020-05-12 思睿逻辑国际半导体有限公司 头戴式受话器耳上状态检测
CN111818439A (zh) * 2020-07-20 2020-10-23 恒玄科技(上海)股份有限公司 耳机的控制方法、控制装置及存储介质
CN112104969A (zh) * 2020-10-23 2020-12-18 苏州思必驰信息科技有限公司 用于蓝牙耳机的检测方法及装置
WO2021063688A1 (en) * 2019-09-30 2021-04-08 Ams Ag Audio system and signal processing method for an ear mountable playback device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212833A (zh) * 2006-12-25 2008-07-02 索尼株式会社 音频输出设备、方法和系统及用于音频输出处理的程序
CN103581796A (zh) * 2012-08-02 2014-02-12 索尼公司 耳机装置、佩戴状态检测装置及佩戴状态检测方法
CN111133770A (zh) * 2017-06-26 2020-05-08 高等工艺学校 用于评估耳机的拟合质量的系统和方法
CN111149369A (zh) * 2017-10-10 2020-05-12 思睿逻辑国际半导体有限公司 头戴式受话器耳上状态检测
US20200014996A1 (en) * 2018-07-09 2020-01-09 Avnera Corporation Headphone off-ear detection
WO2021063688A1 (en) * 2019-09-30 2021-04-08 Ams Ag Audio system and signal processing method for an ear mountable playback device
CN111818439A (zh) * 2020-07-20 2020-10-23 恒玄科技(上海)股份有限公司 耳机的控制方法、控制装置及存储介质
CN112104969A (zh) * 2020-10-23 2020-12-18 苏州思必驰信息科技有限公司 用于蓝牙耳机的检测方法及装置

Also Published As

Publication number Publication date
CN115412824A (zh) 2022-11-29

Similar Documents

Publication Publication Date Title
KR102266080B1 (ko) 주파수 의존 측음 교정
JP7066705B2 (ja) ヘッドフォンオフイヤー検知
CN113676803B (zh) 一种主动降噪方法及装置
US9516407B2 (en) Active noise control with compensation for error sensing at the eardrum
WO2022048334A1 (zh) 检测方法、装置、耳机和可读存储介质
US11330359B2 (en) Active noise control headphones
TWI626646B (zh) 音頻系統以及音頻控制方法
US11468875B2 (en) Ambient detector for dual mode ANC
CN105530565A (zh) 自动声音均衡装置
US11595764B2 (en) Tuning method, manufacturing method, computer-readable storage medium and tuning system
US11044557B2 (en) Method for determining a response function of a noise cancellation enabled audio device
WO2022247673A1 (zh) 检测方法、装置、耳机和计算机可读存储介质
TWI713374B (zh) 用於主動式降噪的音頻調校方法以及相關音頻調校裝置
US11516604B2 (en) System and method for evaluating an ear seal using external stimulus
US20220343886A1 (en) Audio system and signal processing method for an ear mountable playback device
US11206502B1 (en) System and method for evaluating an ear seal using normalization
US11825281B1 (en) Adaptive equalization compensation for earbuds
CN116264658A (zh) 音讯调节系统及音讯调节方法
CN115175046A (zh) 耳机降噪方法、装置、电子设备及计算机可读取存储介质

Legal Events

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

Ref document number: 22810400

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22810400

Country of ref document: EP

Kind code of ref document: A1