Search

CN-115412824-B - Detection method, detection device, earphone and computer readable storage medium

CN115412824BCN 115412824 BCN115412824 BCN 115412824BCN-115412824-B

Abstract

The application relates to a detection method, a device, an earphone and a storage medium, wherein the method comprises the steps of playing detection audio, obtaining an internal detection signal corresponding to the detection audio through a feedback microphone, obtaining an external detection signal corresponding to the detection audio through a feedforward microphone, determining energy information corresponding to the internal detection signal, determining cross-correlation information between the external detection signal and the detection audio, and determining sound leakage condition of the earphone according to reference energy information, the reference cross-correlation information and the cross-correlation information. By adopting the method, the sound leakage condition of the earphone can be accurately detected.

Inventors

  • LIAN TIANFU

Assignees

  • OPPO广东移动通信有限公司

Dates

Publication Date
20260505
Application Date
20210527

Claims (13)

  1. 1. A detection method applied to an earphone, comprising: Playing the detection audio; acquiring an internal detection signal corresponding to the detection audio through a feedback microphone, and acquiring an external detection signal corresponding to the detection audio through a feedforward microphone; Determining energy information corresponding to the internal detection signal and cross-correlation information between the external detection signal and the detection audio; Confirming energy weights and cross-correlation weights; Determining an energy ratio between the energy information and reference energy information and a cross-correlation ratio between the cross-correlation information and reference cross-correlation information; Determining a difference value between a preset coefficient and the cross-correlation ratio, taking the sum of the product of the energy ratio and the energy weight and the product of the difference value and the cross-correlation weight as the fitting degree of the earphone in the wearing state, and determining the sound leakage condition of the earphone in the wearing state according to the fitting degree; The reference energy information obtaining mode comprises the following steps: in a sound elimination environment, the feedback microphone of the earphone in a standard wearing state collects the played detection audio to acquire an internal reference detection signal; The acquisition mode of the reference cross-correlation information comprises the following steps: In the noise elimination environment, the played detection audio is collected through a feedforward microphone of the earphone in a standard wearing state to obtain a corresponding first reference detection signal, in the noise elimination environment, the played detection audio is collected through a feedforward microphone of the earphone in a non-wearing state to obtain a corresponding second reference detection signal, and the reference cross-correlation information between the first reference detection signal and the second reference detection signal is determined.
  2. 2. The method of claim 1, wherein said determining cross-correlation information between the external detection signal and the detection audio comprises: Determining a first energy value and a 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; determining 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; Cross-correlation information between the external detection signal and the detection audio is determined based on the first energy value, the first amplitude mean, the second energy value, and the second amplitude mean.
  3. 3. The method of claim 2, wherein the determining cross-correlation information between the external detection signal and the detection audio based on the first energy value, the first amplitude mean, the second energy value, and the second amplitude mean comprises: Calculating an expected 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; Calculating a first square value of a difference between the first energy value and the first amplitude mean value and a second square value of a difference between the second energy value and the second amplitude mean value; A square root of a product between a desire of the first square value and a desire of the second square value is determined, and a ratio of the desire value to the square root is taken as cross-correlation information between the external detection signal and the detection audio.
  4. 4. The method of claim 1, wherein determining energy information corresponding to the internal detection signal comprises: dividing the internal detection signal into a plurality of signal segments; For each signal segment in the plurality of signal segments, determining a segment energy value corresponding to the corresponding signal segment according to the signal amplitude corresponding to each frequency point in the corresponding signal segment; and determining energy information corresponding to the internal detection signals based on the segment energy values corresponding to each signal segment respectively.
  5. 5. The method of claim 4, wherein determining the energy information corresponding to the internal detection signal based on the segment energy values corresponding to each signal segment, respectively, comprises: And determining the sum of the fragment energy values corresponding to each signal fragment as energy information corresponding to the internal detection signal.
  6. 6. The method of claim 1, wherein the detected audio is mixed audio, and wherein the obtaining, by the feedback microphone, the internal detection signal corresponding to the detected audio comprises: Collecting an audio signal corresponding to the detected audio through a feedback microphone; Performing first filtering processing on the audio signals acquired by the feedback microphone to obtain internal detection signals in a first frequency range; The obtaining, by the feedforward microphone, the external detection signal corresponding to the detection audio includes: collecting an audio signal corresponding to the detection audio through a feedforward microphone; and performing second filtering processing on the audio signals acquired by the feedforward microphone to obtain external detection signals in a second frequency band range, wherein the upper limit value of the first frequency band range is smaller than the lower limit value of the second frequency band range.
  7. 7. The method of claim 1, further comprising, prior to said playing the detected audio: collecting current environmental noise through a feedforward microphone to obtain a corresponding noise signal; determining signal amplitudes corresponding to all frequency points in the noise signal, and determining a current noise value corresponding to the current environmental noise according to the signal amplitudes corresponding to all frequency points; And carrying out frequency response calibration on the earphone under the condition that the current noise value is lower than a noise threshold value.
  8. 8. The method of claim 7, wherein the performing frequency response calibration on the headset comprises: Acquiring 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 parameters.
  9. 9. The method according to any one of claims 1 to 8, further comprising, after said determining the sound leakage condition of the earphone: determining the fit degree grade of the earphone in the wearing state according to the relation between the fit degree and a preset fit degree threshold; And carrying out enhanced noise reduction processing or tone quality compensation processing according to the fitting degree grade.
  10. 10. A detection device for use with headphones, comprising: The playing module is used for playing the detection audio; The acquisition module is used for acquiring an internal detection signal corresponding to the detection audio through a feedback microphone and acquiring an external detection signal corresponding to the detection audio through a feedforward microphone; The information determining module is used for determining energy information corresponding to the internal detection signal and cross-correlation information between the external detection signal and the detection audio; The sound leakage determining module is used for determining the energy weight and the cross-correlation weight, determining 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, determining the difference between a preset coefficient and the cross-correlation ratio, taking the product of the energy ratio and the energy weight and the sum of the products of the difference and the cross-correlation weight as the fitting degree of the earphone in the wearing state, and determining the sound leakage condition of the earphone in the wearing state according to the fitting degree; the sound leakage determining module is also used for acquiring the played detection audio through a feedback microphone of the earphone in a standard wearing state in a sound elimination environment to acquire an internal reference detection signal; the sound leakage determining module is further used for acquiring played detection audio through a feedforward microphone of the earphone in a standard wearing state to obtain a corresponding first reference detection signal in a sound elimination environment, acquiring played detection audio through a feedforward microphone of the earphone in a non-wearing state to obtain a corresponding second reference detection signal in the sound elimination environment, and determining reference cross-correlation information between the first reference detection signal and the second reference detection signal.
  11. 11. A headset comprising a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 9.
  12. 12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 9.
  13. 13. A computer program product containing instructions which, when run on a computer, cause the computer to perform the steps of the method according to any one of claims 1 to 9.

Description

Detection method, detection device, earphone and computer readable storage medium Technical Field The present application relates to the field of computer technologies, and in particular, to a detection method, a detection device, an earphone, and a computer readable storage medium. Background With the development of earphone technology, active noise reduction (ANC, active Noise Cancellation) technology and noise reduction earphones appear, and the ANC technology can cancel most of noise, so that the noise reduction effect is achieved. For in-ear headphones, the best sound quality and excellent noise reduction experience can be achieved with the most appropriately sized earplug, so proper selection of an earplug that is both comfortable and closely fitting is critical. However, in many cases, the user can only determine whether there is a sound leakage in the earphone in the current wearing state by means of subjective feeling, and cannot accurately detect the leakage condition of the sound signal played by the earphone. Disclosure of Invention The embodiment of the application provides a detection method, a detection device, an earphone and a computer readable storage medium, which can accurately detect the sound leakage condition of the earphone in the current wearing state. A detection method applied to a headset, comprising: Playing the detection audio; acquiring an internal detection signal corresponding to the detection audio through a feedback microphone, and acquiring an external detection signal corresponding to the detection audio through a feedforward microphone; Determining energy information corresponding to the internal detection signal and cross-correlation information between the external detection signal and the detection audio; And determining the sound leakage condition of the earphone according to the reference energy information, the reference cross-correlation information and the cross-correlation information. A detection device applied to a headset, comprising: The playing module is used for playing the detection audio; The acquisition module is used for acquiring an internal detection signal corresponding to the detection audio through a feedback microphone and acquiring an external detection signal corresponding to the detection audio through a feedforward microphone; The information determining module is used for determining energy information corresponding to the internal detection signal and cross-correlation information between the external detection signal and the detection audio; And the sound leakage determining module is used for determining the sound leakage condition of the earphone according to the reference energy information, the reference cross-correlation information and the cross-correlation information. A headset comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of: Playing the detection audio; acquiring an internal detection signal corresponding to the detection audio through a feedback microphone, and acquiring an external detection signal corresponding to the detection audio through a feedforward microphone; Determining energy information corresponding to the internal detection signal and cross-correlation information between the external detection signal and the detection audio; And determining the sound leakage condition of the earphone according to the reference energy information, the reference cross-correlation information and the cross-correlation information. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of: Playing the detection audio; acquiring an internal detection signal corresponding to the detection audio through a feedback microphone, and acquiring an external detection signal corresponding to the detection audio through a feedforward microphone; Determining energy information corresponding to the internal detection signal and cross-correlation information between the external detection signal and the detection audio; And determining the sound leakage condition of the earphone according to the reference energy information, the reference cross-correlation information and the cross-correlation information. According to the detection method, the detection device, the earphone and the computer readable storage medium, the detection audio is played through the earphone in the wearing state, the audio signals in the auditory canal are collected through the feedback microphone of the earphone, the external audio signals of the earphone are collected through the feedforward microphone of the earphone, and different audio signals collected by different microphones in the same state are obtained. The detection audio is played in the wearing-free state, and the external audio signals of the earphone are collected through the feedforward microphone of the earphone, so that t