CN113132885B - Method for judging wearing state of earphone based on energy difference of double microphones - Google Patents

Method for judging wearing state of earphone based on energy difference of double microphones Download PDF

Info

Publication number
CN113132885B
CN113132885B CN202110414092.8A CN202110414092A CN113132885B CN 113132885 B CN113132885 B CN 113132885B CN 202110414092 A CN202110414092 A CN 202110414092A CN 113132885 B CN113132885 B CN 113132885B
Authority
CN
China
Prior art keywords
signal
energy difference
frequency bands
energy
wearing state
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110414092.8A
Other languages
Chinese (zh)
Other versions
CN113132885A (en
Inventor
谭波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Wood Core Technology Co ltd
Original Assignee
Shenzhen Wood Core Technology Co ltd
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 Shenzhen Wood Core Technology Co ltd filed Critical Shenzhen Wood Core Technology Co ltd
Priority to CN202110414092.8A priority Critical patent/CN113132885B/en
Publication of CN113132885A publication Critical patent/CN113132885A/en
Application granted granted Critical
Publication of CN113132885B publication Critical patent/CN113132885B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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/08Mouthpieces; Microphones; Attachments therefor
    • 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
    • H04R2201/00Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
    • H04R2201/10Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2410/00Microphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2460/00Details of hearing devices, i.e. of ear- or headphones covered by H04R1/10 or H04R5/033 but not provided for in any of their subgroups, or of hearing aids covered by H04R25/00 but not provided for in any of its subgroups
    • H04R2460/13Hearing devices using bone conduction transducers

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

The invention provides a method for judging the wearing state of an earphone based on the energy difference of double microphones, which is used in the earphone, wherein the earphone comprises a first microphone and a second microphone, the first microphone is positioned at one side of the earphone far away from the auditory canal, and the second microphone is positioned in the auditory canal of a wearer or close to the auditory canal when the earphone is worn, and the method comprises the following steps: acquiring a first signal provided by the first microphone, wherein the first signal comprises an ambient environment signal; acquiring a second signal provided by the second microphone; and comparing the first signal with the second signal, and determining whether the earphone is in a wearing state according to the comparison result. The embodiment of the invention can effectively judge whether the earphone is in a wearing state.

Description

Method for judging wearing state of earphone based on energy difference of double microphones
Technical Field
The invention relates to the field of voice processing, in particular to a method and computer equipment for judging the wearing state of an earphone based on energy difference of double microphones.
Background
The earphone is an important hearing device for inputting and outputting audio signals.
In the related art, part of the headphones is provided with a wearing detection function, that is, detects whether or not the headphones are worn on the ears of the wearer. The existing wearing detection function is mainly realized by detecting the wearing state of the earphone, the most commonly adopted wearing detection scheme at present is an optical scheme, and a part of the existing wearing detection scheme adopts a traditional capacitance detection scheme. The optical scheme detects a wearing state of a user using a proximity sensor, and the capacitive detection scheme detects a wearing state of a user using a conventional touch sensor by detecting a contact of a headset head position with an ear skin surface.
However, the above scheme still cannot effectively determine whether the headset is in a wearing state, and further cannot determine whether the headset is firmly worn.
Disclosure of Invention
The invention aims to provide a method, a system, computer equipment and a computer readable storage medium for judging the wearing state of an earphone based on the energy difference of double microphones, and solves or partially solves the problems.
An aspect of the embodiments of the present invention provides a method for determining a wearing state of an earphone based on a dual-microphone energy difference, where the earphone is used in an earphone, the earphone includes a first microphone and a second microphone, the first microphone is located on a side of the earphone away from an ear canal, and the second microphone is located in the ear canal or close to the ear canal of a wearer when the earphone is worn, and the method includes:
acquiring a first signal provided by the first microphone, wherein the first signal comprises an ambient environment signal;
acquiring a second signal provided by the second microphone; and
and comparing the first signal with the second signal, and determining whether the earphone is in a wearing state according to the comparison result.
Preferably, the step of comparing the first signal and the second signal and determining whether the headset is in a wearing state according to the comparison result includes:
decomposing the first signal into M first subband signals S 11 、S 12 、…S 1M
Decomposing the second signal into M second subband signals S 21 、S 22 、…S 2M (ii) a Wherein the first subband signal S 1i Corresponding second subband signal S 2i Corresponding to the same frequency band, i is more than or equal to 1 and less than or equal to M, i is an integer, and M is an integer more than 1;
calculating M energy difference values corresponding to the M frequency bands, wherein each energy difference value represents the energy difference between the signal energy of the first sub-band signal of the corresponding frequency band and the signal energy of the second sub-band signal of the corresponding frequency band; and
and determining whether the earphone is in a wearing state or not according to the M energy difference values corresponding to the M frequency bands.
Preferably, the step of determining whether the headset is in a wearing state according to M energy difference values corresponding to the M frequency bands includes:
comparing M energy difference values corresponding to the M frequency bands with an energy difference threshold value respectively to generate M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in the wearing state; when the energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first numerical value for the frequency band; when the energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band;
configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; and
and determining whether the earphone is in a wearing state or not according to the M wearing state values and the M confidence degrees.
Preferably, the method further comprises the step of obtaining the energy difference threshold value:
calculating a signal energy of the first signal; and
dynamically adjusting the energy difference threshold according to the signal energy of the first signal on the basis of a preset energy difference threshold; wherein the signal energy of the first signal and the energy difference threshold are in a positive relationship.
Preferably, the step of configuring M confidences for the M frequency bands includes:
screening L first sub-band signals with the largest signal energy from the M first sub-band signals, wherein L is more than or equal to 1 and is more than M, and L is an integer;
respectively configuring first confidence coefficients for L frequency bands corresponding to the L first sub-band signals; and
respectively configuring second confidence coefficients for other frequency bands in the M frequency bands; wherein the first confidence is greater than the second confidence, and the other frequency bands of the M frequency bands are the frequency bands of the M frequency bands except for the L frequency bands.
Preferably, the M frequency bands comprise K frequency bands lower than a frequency threshold and M-K frequency bands higher than the frequency threshold, and K is an integer greater than or equal to 1; configuring M confidences for the M frequency bands, including:
judging whether the wearer speaks or not through the second signal, wherein the second signal does not comprise an output signal of a loudspeaker; and
if the wearer is judged to be speaking, respectively configuring a third confidence coefficient for the K frequency bands, and respectively configuring a fourth confidence coefficient for the M-K frequency bands; wherein the third confidence level is greater than the fourth confidence level.
Preferably, the M frequency bands include K frequency bands below a frequency threshold and M-K frequency bands above the frequency threshold, K being an integer greater than 1; configuring M confidences for the M frequency bands, comprising:
acquiring total energy of first signals of K first sub-band signals corresponding to the K frequency bands;
acquiring total energy of second signals of K second sub-band signals corresponding to the K frequency bands;
comparing the total energy of the first signal with the total energy of the second signal to obtain a total energy difference of the signals;
if the total energy of the first signals is greater than the total energy of the second signals, and the total energy difference of the signals is greater than a total energy difference threshold value, screening L first sub-band signals with the largest signal energy from the M first sub-band signals, wherein L is greater than or equal to 1 and is greater than M, and L is an integer; respectively configuring first confidence coefficients for L frequency bands corresponding to L first sub-band signals with the maximum energy intensity in the M first sub-band signals; respectively configuring second confidence coefficients for other frequency bands except the L frequency bands in the M frequency bands, wherein the first confidence coefficient is greater than the second confidence coefficient; and
if the total energy of the first signal is less than the total energy of the second signal and the total energy difference of the signals is greater than the total energy difference threshold, respectively configuring a third confidence coefficient for the K frequency bands and respectively configuring a fourth confidence coefficient for the M-K frequency bands; wherein the third confidence level is greater than the fourth confidence level.
Preferably, the step of comparing the first signal and the second signal and determining whether the headset is in a wearing state according to the comparison result comprises:
decomposing the first signal into M first subband signals S 11 、S 12 、…S 1M
Decomposing the second signal into M second subband signals S 21 、S 22 、…S 2M (ii) a Wherein the first subband signal S 1i Corresponding second subband signal S 2i Corresponding to the same frequency band, i is more than or equal to 1 and less than or equal to M, i is an integer, and M is an integer more than 1;
obtaining signal smooth energy of each first sub-band signal in a first time window;
acquiring sub-band signal energy of each first sub-band signal in a second time window, wherein the time length of the second time window is shorter than that of the first time window, and the second time window is a current time window;
obtaining the signal smooth energy of each second sub-band signal in the first time window;
acquiring sub-band signal energy of each second sub-band signal in a second time window;
calculating M smooth energy difference values corresponding to M frequency bands of the first time window; wherein each smoothed energy difference value represents an energy difference between a signal smoothed energy of a first subband signal of the respective frequency band within the first time window and a signal smoothed energy of a second subband signal of the respective frequency band within the first time window;
calculating M energy difference values corresponding to M frequency bands of the second time window; wherein each energy difference value represents an energy difference between a signal energy of a first subband signal of a respective frequency band within the second time window and a signal energy of a second subband signal of the respective frequency band within the second time window; and
and determining whether the earphone is in a wearing state or not according to the M smooth energy difference values and/or the M energy difference values.
Preferably, the step of determining whether the headset is in a wearing state according to the M smooth energy difference values and/or the M energy difference values includes:
if the average value of the M energy difference values is less than 0.5 × a first threshold value, then: comparing M energy difference values corresponding to the M frequency bands with an energy difference threshold value respectively to generate M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in the wearing state; when the energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first value for the frequency band; when the energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; carrying out weighting operation according to the M wearing state values and the M confidence coefficients to obtain a first weighting value; if the first weighted value is smaller than a second threshold value, judging that the earphone is not in a wearing state;
if the average value of the M energy difference values is larger than the first threshold value, judging that the earphone is firmly worn;
if the average value of the M energy difference values is between the 0.5 × first threshold and the first threshold, judging whether the average value of the M smooth energy difference values corresponding to the M frequency bands is less than a 0.8 × third threshold;
if the average value of the M smooth energy difference values corresponding to the M frequency bands is less than 0.8 × the third threshold, comparing the M smooth energy difference values corresponding to the M frequency bands with an energy difference threshold, respectively, to generate M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in a wearing state; when the smooth energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first numerical value for the frequency band; when the smooth energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; carrying out weighting operation according to the M wearing state values and the M confidence coefficients to obtain a second weighted value; if the second weighted value is smaller than a fourth threshold value, judging that the earphone is not in a wearing state;
if the average value of the M smooth energy difference values corresponding to the M frequency bands is greater than 0.8 × the third threshold, comparing the M smooth energy difference values corresponding to the M frequency bands with an energy difference threshold, respectively, and generating M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in a wearing state; when the smooth energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first numerical value for the frequency band; when the smooth energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; carrying out weighting operation according to the M wearing state values and the M confidence coefficients to obtain a third weighted value; and if the third weighted value is larger than the fourth threshold value, judging that the earphone is worn firmly.
An aspect of the embodiments of the present invention further provides a computer device, which includes a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method for determining the wearing state of the headset based on the energy difference between the two microphones.
An aspect of the embodiments of the present invention further provides a computer-readable storage medium, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the steps of the method for determining the wearing state of the earphone based on the energy difference between the two microphones as described above.
According to the method, the equipment and the computer-readable storage medium for judging the wearing state of the earphone based on the energy difference of the two microphones, provided by the embodiment of the invention, whether the earphone is in the wearing state or not, even whether the earphone is firmly worn or not can be effectively judged by analyzing and analyzing the difference between the signal collected by the first microphone and the signal collected by the second microphone.
Drawings
Fig. 1 schematically shows a structural view of a headset;
FIG. 2 is a graph of energy difference in the frequency domain for a first microphone and a second microphone;
FIG. 3 is a graph of energy difference in the frequency domain for a first microphone and a second microphone;
FIG. 4 is a graph of an energy difference analysis of the time domain of a first microphone and a second microphone;
fig. 5 is a graph comparing energy difference in frequency domain of the first microphone and the second microphone in a state where the headset is not worn;
fig. 6 is a flow chart schematically illustrating a method for determining the wearing state of the headset based on the energy difference between two microphones according to an embodiment of the present invention;
FIG. 7 is a sub-flowchart of step S604 in FIG. 6;
FIG. 8 is a detailed flowchart for determining whether the earphone is worn;
FIG. 9 is a sub-flowchart of step S706 in FIG. 7;
FIG. 10 is a diagram of determining whether the earphone is worn in one of the frequency bands;
FIG. 11 is a flow chart of obtaining an energy difference threshold;
fig. 12 is a schematic view for comprehensively judging the wearing state of the headphone by confidence;
FIG. 13 is a schematic illustration of configuration confidence;
FIG. 14 is another schematic illustration of configuration confidence;
FIG. 15 is another illustration of configuration confidence;
FIG. 16 is another sub-flowchart of step S604 in FIG. 6;
fig. 17 is a sub-flowchart of step S1614 in fig. 14;
fig. 18 schematically shows another configuration diagram of the earphone;
FIG. 19 is another detailed flow chart for determining whether the headset is worn;
fig. 20 is a block diagram schematically illustrating a system for determining the wearing state of the headset based on the energy difference between two microphones according to a second embodiment of the present invention; and
fig. 21 is a schematic diagram of a hardware architecture of a computer device suitable for implementing a method for determining a wearing state of an earphone based on a two-microphone energy difference according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the descriptions relating to "first", "second", etc. in the embodiments of the present invention are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
In the description of the present invention, it should be understood that the numerical references before the steps do not identify the sequence of executing the steps, but merely serve to facilitate the description of the present invention and to distinguish each step, and thus, should not be construed as limiting the present invention.
Fig. 1 schematically shows an environment application diagram of a method for determining a wearing state of an earphone based on a two-microphone energy difference according to an embodiment of the present invention. The method of discriminating the wearing state of the headset based on the difference in the energies of the two microphones may be implemented in the headset 2.
The headset 2 comprises a housing, which comprises a first microphone 21, a second microphone 22, a processor 23, and a speaker 24.
A first microphone 21 is located on the side of the earpiece facing away from the ear canal (outside the housing) for acquiring ambient signals around the wearer.
A second microphone 22 located on the other side of the housing, i.e. the second microphone 22 is located in or next to the ear canal of the wearer when the headset is worn. When the headset 2 is worn, it is located in the ear canal 4 of the wearer for acquiring signals. When the headset 2 is worn, the signals mainly include various types of signals collected by the second microphone 22 in the ear canal, such as signals transmitted through the skull when the wearer speaks; however, the signal does not include the audio signal output by the speaker 24. When the headset 2 is not worn, the signal is an ambient signal around the wearer.
The first microphone 21 corresponds to a feedforward microphone, and the second microphone 22 corresponds to a feedback microphone.
And a processor 23 electrically connected to the first microphone 21, the second microphone 22 and the speaker 24 for providing signals from the first microphone 21 and the second microphone 22. For example, the audio signal output from the speaker 24 is filtered out from the signal provided by the second microphone 22 to obtain a target signal for determining whether the headset 2 is worn. In the present embodiment, the processor 23 may be a DSP (Digital Signal Processing) chip or the like.
A speaker 24 for receiving the sound signal processed by the processor 23 and outputting the processed sound signal to the ear canal 4.
A silicone sleeve 25 for at least partial insertion into the ear canal 4 when the headset 2 is worn. The silicone sleeve 25 may to some extent block the entry of sound around the wearer into the ear canal 4. Of course, the material of the silicone sleeve 25 may be replaced.
The present invention provides a method for determining the wearing state of the headset based on the energy difference between two microphones, which can determine whether the headset 2 is in the wearing state by analyzing the difference (e.g. the energy difference between the signals) between the signals collected by the first microphone 21 and the signals collected by the second microphone 22. The principle is as follows:
in the case where the headset 2 is normally worn and the wearer does not speak, as shown in fig. 2 and 3, the energy between the signal collected by the first microphone 21 (i.e., the ambient signal of the full frequency band) and the signal collected by the second microphone 22 has a difference, and shows a different difference in each frequency band. The reasons for the difference are as follows: as shown in fig. 1, the second microphone 22 is less capable of acquiring external ambient signals due to its location in the ear canal 4 and due to the sound insulation of the ear plug. At this time, the signal collected by the second microphone 22 is weak and mainly concentrates below 1 KHZ.
When the earphone 2 is not worn in the ear or is not worn firmly, the second microphone 22 is not physically isolated from the outside or is insufficiently isolated, and the second microphone 22 can effectively collect the ambient signals in the full frequency band. At this time, the difference in energy between the signal collected by the first microphone 21 and the signal collected by the second microphone 22 is small. As shown in fig. 4, the difference in signal energy between the signal collected by the first microphone 21 and the signal collected by the second microphone 22 is within 5 dB. As shown in fig. 5, the first microphone 21 receives the second microphone 22 substantially in unison.
In a case where the earphone 2 is normally worn and the wearer speaks, since the wearer's own voice signal is transmitted through the skull when the wearer himself makes a sound, the wearer's own voice signal can be effectively propagated to the second microphone 22. At this time, the energy of the signal collected by the second microphone 22 may be significantly increased. The energy of the signal collected by the second microphone 22, which is primarily the wearer's own voice signal transmitted through the skull, can determine whether the wearer is speaking, which can be used to determine whether the headset 2 is worn. For example, since the wearer's own voice signal transmitted through the skull is concentrated on a low frequency part (1 KHZ or less), the earphone 2 is in a wearing state when the energy of the signal of 1KHZ or less collected by the second microphone 22 is significantly larger than the energy of the signal of 1KHZ or less collected by the first microphone 21.
As can be seen from the above analysis, by analyzing the difference between the signal collected by the first microphone 21 and the signal collected by the second microphone 22, it can be effectively determined whether the headset 2 is worn or not, and even whether the headset is worn firmly.
A plurality of embodiments will be provided below, and the embodiments provided below can be used to implement the above-described method for determining the wearing state of the headset based on the energy difference between two microphones. For ease of understanding, the following description exemplifies the headphone 2 as an execution body.
Example one
In the present embodiment, a method of discriminating the wearing state of the headphones based on the difference in the energies of the two microphones is performed in the headphones 2.
Fig. 6 schematically shows a flowchart of a method for determining a wearing state of an earphone based on a two-microphone energy difference according to an embodiment of the present invention. As shown in fig. 6, the method for determining the wearing state of the headset based on the energy difference between two microphones may include steps S600 to S604, where:
step S600, a first signal provided by the first microphone is obtained, where the first signal includes an ambient signal.
When the headset 2 is worn on the ear of a wearer, the first microphone 21 can acquire the ambient environment signal of the wearer. In an exemplary embodiment, the ambient signal may include various sound signals around the wearer, such as sound signals of other people, sound signals of animals, and various noise signals of automobiles and the like
When the wearer himself makes a sound, the wearer's own sound signal is also propagated through the air to the first microphone 21, in which case the ambient signal also comprises the wearer's own sound signal.
Step S602, a second signal provided by the second microphone is obtained.
When the headset 2 is worn in the ear, the second signal mainly comprises the various types of signals collected by the second microphone 22 in the ear canal (due to the sound-insulating effect of the ear plug, signals outside the ear canal are severely attenuated by the transmission to the second microphone 22). The second signal comprises the signal transmitted to the second microphone 22 through the skull of the wearer's own speech when the wearer is speaking. Note that the second signal does not include the audio signal output by the speaker 24.
When the headset 2 is not worn, the second signal is an ambient signal around the wearer.
Step S604, comparing the first signal and the second signal, and determining whether the earphone is in a wearing state according to the comparison result.
When the headset 2 is worn normally and the wearer does not speak, the energy difference between the first signal and the second signal is relatively large; when the earphone 2 is worn normally and the wearer speaks, the energy of the signal of the low-frequency part of the first signal is larger than that of the signal of the low-frequency part of the second signal, and the energy difference between the two signals is larger; when the headset 2 is not worn in the ear or is not worn firmly, the energy difference between the first signal and the second signal is not large. Based on the above analysis, the energy difference between the first signal and the second signal can be compared, and whether the headset 2 is in a wearing state or not can be determined according to the energy difference. Of course, the wearing state of the headset 2 may also be determined according to other parameter differences, such as the signal-to-noise ratio.
In order to further provide an accuracy of the determination whether the headset 2 is worn or not, several alternative embodiments are provided below.
As shown in fig. 7, the step S604 may include steps S700 to S706, wherein: step S700, decomposing the first signal into M first subband signals S 11 、S 12 、…S 1M (ii) a Step S702, decomposing the second signal into M second subband signals S 21 、S 22 、…S 2M (ii) a Wherein the first subband signal S 1i Corresponding second subband signal S 2i Corresponding to the same frequency band, i is more than or equal to 1 and less than or equal toM, i is an integer, M is an integer > 1; step S704, calculating M energy difference values corresponding to M frequency bands, where each energy difference value represents an energy difference between a signal energy of a first sub-band signal of a corresponding frequency band and a signal energy of a second sub-band signal of the corresponding frequency band; and step S706, determining whether the earphone is in a wearing state according to the M energy difference values corresponding to the M frequency bands. By applying the subband signals, it is possible to more accurately determine whether the headphones 2 are worn.
As an example, as shown in fig. 8, after a first signal collected by the first microphone 21 is subjected to Analog-to-digital (a/D) and sub-band filtering, M first sub-band signals are obtained; the second signal collected by the second microphone 22 is subjected to a/D conversion and sub-band filtering to obtain M second sub-band signals, the energy of each first sub-band signal and the energy of each second sub-band signal are calculated, the energy of the first sub-band signal and the energy of the second sub-band signal of the same frequency band are compared to obtain the energy difference of each frequency band, and the degree of sealing of the headset 2 worn in each frequency band can be obtained according to the energy difference of each frequency band and the reference difference, for example: m is a group of 1 =S 11 -1S 21 ,M 1 Represents the energy difference between the first microphone 21 and the second microphone 22 in the first frequency band, and thus can be based on M 1 The data of (a) yields the degree of sealing that is now within the first frequency band. By analogy, M i =S 1i -1S 2i ,M i Representing the energy difference between the first microphone 21 and the second microphone 22 in the ith frequency band, which may be according to M i The data of (a) yields the degree of sealing within the i-th frequency band at the moment. Whether the earphone 2 is in a wearing state can be comprehensively judged according to the sealing degree of each frequency band.
If the sealing degree is good, the earphone 2 is worn normally;
the sealing degree is normal, which means that the earphone 2 is worn but not firmly worn;
a poor seal indicates that the headset 2 is not worn.
It can be known that the degree of sealing, i.e., the wearing state of the earphone 2, can be effectively known by the energy difference and the reference difference.
In an exemplary embodiment, as shown in fig. 9, the step S706 may include steps S900 to S904, wherein: step S900, comparing M energy difference values corresponding to the M frequency bands with an energy difference threshold (i.e., a reference difference), respectively, and generating M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in the wearing state; when the energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first value for the frequency band; when the energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; step S902, configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; and step S904, determining whether the earphone is in a wearing state according to the M wearing state values and the M confidence degrees.
As shown in FIG. 10, M 1 If the energy difference is larger than the energy difference threshold, it indicates that the earphone 2 is in a wearing state according to the judgment result of the first frequency band; otherwise, the headphone 2 is not in a worn state. And by analogy, the judgment result of each frequency band is obtained.
In order to further improve the determination accuracy, as shown in fig. 11, the method further includes the step of obtaining the energy difference threshold: step S1100, calculating signal energy of the first signal; step S1102, dynamically adjusting the energy difference threshold according to the signal energy of the first signal on the basis of a preset energy difference threshold; wherein the signal energy of the first signal and the energy difference threshold are in a positive relationship. The signal energy of the first signal and the energy difference threshold may have a linear or non-linear relationship therebetween. The preset energy difference threshold may be set to 10dB, and of course, the preset energy difference threshold may also be set to other values.
In order to further improve the determination accuracy, as shown in fig. 12, when determining the wearing state of the headset 2, different or the same confidence levels (e.g., weight values) may be respectively configured for each frequency band to comprehensively determine the wearing state of the headset 2.
In an exemplary embodiment, as shown in fig. 13, the step of configuring M confidences for the M frequency bands in step S902 includes: s1300, screening L first sub-band signals with the largest signal energy from the M first sub-band signals, wherein L is more than or equal to 1 and is less than M, and L is an integer; step S1302, configuring first confidence levels for L frequency bands corresponding to the L first subband signals, respectively; step S1304, configuring second confidence coefficients for other frequency bands in the M frequency bands respectively; wherein the first confidence is greater than the second confidence, and the other frequency bands of the M frequency bands are the frequency bands of the M frequency bands except for the L frequency bands. For example, in a general situation, the first signal is an external ambient signal, which is generally concentrated between 1KHZ and 2KHZ, and the wearing state of the earphone 2 can be determined more effectively by using the signal for energy comparison. It should be noted that this approach is particularly useful in environments where the wearer does not speak himself.
The inventor has found that when the second microphone 22 detects that the wearer speaks himself/herself in the wearing state of the headset 2, the energy of the low frequency part (below 1 KHZ) increases rapidly. Thus, if the second microphone 22 detects that the wearer is speaking himself, then the experimental practice of the confidence level in the frequency band below 1KHZ at this time represents a very high level.
In an exemplary embodiment, the M frequency bands include K frequency bands below a frequency threshold (e.g., 1 KHZ) and M-K frequency bands above the frequency threshold, K being an integer ≧ 1. As shown in fig. 14, the step of configuring M confidences for the M frequency bands in step S902 includes: step S1400, judging whether the wearer speaks according to the second signal, wherein the second signal does not comprise an output signal of a loudspeaker; and step S1402, if it is determined that the wearer is speaking, configuring a third confidence level for the K frequency bands respectively, and configuring a fourth confidence level for the M-K frequency bands respectively; wherein the third confidence level is greater than the fourth confidence level. This approach is particularly useful in environments where the wearer is speaking himself, but where the ambient noise is low.
There are ways to interpret whether the wearer is speaking himself, for example: when the wearer speaks, the sound signal of the wearer can be picked up by the second microphone 22 through the skull, and the skull belongs to a solid physical medium, so that propagation attenuation is reduced, and therefore, when the second microphone 22 picks up the sound signal of the wearer, the signal energy is relatively large. In view of this, the embodiment may dynamically generate or customize a preset threshold, and when the signal picked up by the second microphone 22 is greater than the preset threshold, it is determined that the wearer is speaking. It should be noted that when the preset threshold is self-defined, the preset threshold may be set between 60 and 80 decibels (dB).
In an exemplary embodiment, the M frequency bands include K frequency bands below a frequency threshold (e.g., 1 KHZ) and M-K frequency bands above the frequency threshold, K being an integer greater than 1. As shown in fig. 15, the step of configuring M confidences for the M frequency bands in step S902 includes: step S1500, acquiring total energy of first signals of K first sub-band signals corresponding to the K frequency bands; step S1502, obtaining total energy of second signals of K second subband signals corresponding to the K frequency bands; step S1504, comparing the total energy of the first signal with the total energy of the second signal to obtain a total energy difference of the signals; step S1506, if the total energy of the first signal is greater than the total energy of the second signal and the total energy difference of the signals is greater than a total energy difference threshold, screening L first subband signals with the largest signal energy from the M first subband signals, wherein L is greater than or equal to 1 and less than M, and L is an integer; respectively configuring first confidence coefficients for L frequency bands corresponding to L first sub-band signals with the maximum energy intensity in the M first sub-band signals; respectively configuring second confidence coefficients for other frequency bands except the L frequency bands in the M frequency bands, wherein the first confidence coefficient is greater than the second confidence coefficient; and step S1508, if the total energy of the first signal is smaller than the total energy of the second signal, and the total energy difference of the signals is greater than the total energy difference threshold, configuring a third confidence coefficient for the K frequency bands respectively, and configuring a fourth confidence coefficient for the M-K frequency bands respectively; wherein the third confidence level is greater than the fourth confidence level. This approach is particularly useful in environments where the wearer is speaking and the surroundings are noisy.
Another decision-making means for determining whether the headset 2 is worn is provided below, which uses a fusion of short-time and long-time decision-making. The inventor finds that if hands rub the sound of the microphone, the short-time judgment decision is not accurate. Thus, a long-time decision is added in the method. In an exemplary embodiment, as shown in fig. 16, the step S604 may include steps S1600 to S1614, wherein: step S1600, decomposing the first signal into M first subband signals S 11 、S 12 、…S 1M (ii) a Step S1602, decomposing the second signal into M second subband signals S 21 、S 22 、…S 2M (ii) a Wherein the first subband signal S 1i With corresponding second subband signal S 2i Corresponding to the same frequency band, i is more than or equal to 1 and less than or equal to M, i is an integer, and M is an integer more than 1; step S1604, obtaining signal smooth energy of each first sub-band signal in a first time window; step S1606, acquiring subband signal energy of each first subband signal in a second time window, where a time length of the second time window is shorter than a time length of the first time window, and the second time window is a current time window; step S1608, obtaining signal smooth energy of each second sub-band signal within the first time window; step S1610, acquiring sub-band signal energy of each second sub-band signal in a second time window; step S1612, calculating M smooth energy difference values corresponding to M frequency bands in the first time window; wherein each smoothed energy difference value represents an energy difference between a signal smoothed energy of a first subband signal of the respective frequency band within the first time window and a signal smoothed energy of a second subband signal of the respective frequency band within the first time window; step S1614, calculating M energy difference values corresponding to M frequency bands of the second time window; wherein each energy difference value represents a sum of signal energies of first subband signals of a respective frequency band within the second time windowAn energy difference between signal energies of second sub-band signals of the respective frequency band within the second time window; and step S1616, determining whether the earphone is in a wearing state according to the M smooth energy difference values and/or the M energy difference values. The signal smoothing energy is an average value of signal energy, and the smoothing energy difference value is an average value of energy differences between the first signal and the second signal in the same frequency band.
Further, as shown in fig. 17, the step S1614 may be implemented by: in step S1700, if the average value of the M energy difference values is smaller than 0.5 × a first threshold value: comparing M energy difference values corresponding to the M frequency bands with energy difference threshold values respectively to generate M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in the wearing state; when the energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first value for the frequency band; when the energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; carrying out weighting operation according to the M wearing state values and the M confidence coefficients to obtain a first weighted value; if the first weighted value is smaller than a second threshold value, judging that the earphone is not in a wearing state; step 1702, if the average value of the M energy difference values is greater than the first threshold, determining that the headset is worn reliably; step S1704, if the average value of the M energy difference values is between the 0.5 × first threshold and the first threshold, determine whether the average value of the M smooth energy difference values corresponding to the M frequency bands is less than a 0.8 × third threshold; step S1706, if the average value of the M smooth energy difference values corresponding to the M frequency bands is less than 0.8 × the third threshold, comparing the M smooth energy difference values corresponding to the M frequency bands with an energy difference threshold, respectively, and generating M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in the wearing state; when the smooth energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first numerical value for the frequency band; when the smooth energy difference value corresponding to a frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; carrying out weighting operation according to the M wearing state values and the M confidence coefficients to obtain a second weighted value; if the second weighted value is smaller than a fourth threshold value, judging that the earphone is not in a wearing state; step S1708, if the average of the M smooth energy difference values corresponding to the M frequency bands is greater than 0.8 × the third threshold, comparing the M smooth energy difference values corresponding to the M frequency bands with an energy difference threshold, respectively, and generating M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in the wearing state; when the smooth energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first numerical value for the frequency band; when the smooth energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; carrying out weighting operation according to the M wearing state values and the M confidence coefficients to obtain a third weighted value; and if the third weighted value is greater than the fourth threshold value, judging that the headset is worn reliably. The above fusion discrimination in combination with the long-time energy difference and the short-time energy difference of the first microphone 21 and the second microphone 22 can effectively remove the interference factors such as the hand rubbing to the microphones. In addition, this embodiment can also detect effectively whether the earphone is worn reliably, promotes user experience.
In still other embodiments, as shown in fig. 18, the headset 2 includes a first microphone 21, a second microphone 22, and a third microphone 26, wherein the first microphone 21 corresponds to a feed-forward microphone, the second microphone 22 corresponds to a bone conduction microphone proximate to the ear canal, and the third microphone 26 corresponds to a feedback microphone. The signal collected by the common microphone is mainly conducted by sound. The bone conduction microphone mainly collects vibration signals. The bone conduction microphone can effectively remove the interference of wind noise. A bone conduction microphone is utilized so that the headset can be worn by the wearer. If the wearer is speaking at the same time, the wearing state judgment is extremely accurate, as shown in fig. 19.
Example two
As shown in fig. 20, fig. 20 schematically shows a block diagram of a system 2000 for determining wearing status of a headset based on energy difference of two microphones according to a second embodiment of the present invention. The system 2000 for determining the wearing state of an earphone based on the energy difference of two microphones is used in an earphone, wherein the earphone comprises a first microphone and a second microphone, and the second microphone is positioned in the ear canal of the wearer when the earphone is worn. The system may be partitioned into one or more program modules, which are stored in a storage medium and executed by one or more processors to implement embodiments of the invention. The program modules referred to in the embodiments of the present invention refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of the program modules in the embodiments.
A first acquiring module 2010, configured to acquire a first signal provided by the first microphone, where the first signal includes an ambient environment signal;
a second obtaining module 2020 for obtaining a second signal provided by the second microphone; and
a determining module 2030, configured to compare the first signal and the second signal, and determine whether the earphone is in a wearing state according to a comparison result.
In an exemplary embodiment, the determining module 2030 is further configured to: decomposing the first signal into M first subband signals S 11 、S 12 、…S 1M (ii) a Decomposing the second signal into M second subband signals S 21 、S 22 、…S 2M (ii) a Wherein the first subband signal S 1i Corresponding second subband signal S 2i Corresponding to the same frequency band, i is more than or equal to 1 and less than or equal to M, i is an integer, and M is an integer more than 1; calculating M energy difference values corresponding to the M frequency bands, wherein each energy difference value represents the energy difference between the signal energy of the first sub-band signal of the corresponding frequency band and the signal energy of the second sub-band signal of the corresponding frequency band; and determining whether the earphone is in a wearing state or not according to the M energy difference values corresponding to the M frequency bands.
In an exemplary embodiment, the determining module 2030 is further configured to: comparing M energy difference values corresponding to the M frequency bands with an energy difference threshold value respectively to generate M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in the wearing state; when the energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first value for the frequency band; when the energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; and determining whether the earphone is in a wearing state or not according to the M wearing state values and the M confidence degrees.
In an exemplary embodiment, the determining module 2030 is further configured to: a step of obtaining the energy difference threshold: calculating a signal energy of the first signal; on the basis of a preset energy difference threshold value, dynamically adjusting the energy difference threshold value according to the signal energy of the first signal; wherein the signal energy of the first signal and the energy difference threshold are in a positive relationship.
In an exemplary embodiment, the determining module 2030 is further configured to: screening L first sub-band signals with the largest signal energy from the M first sub-band signals, wherein L is more than or equal to 1 and is more than M, and L is an integer; respectively configuring first confidence coefficients for L frequency bands corresponding to the L first sub-band signals; respectively configuring second confidence coefficients for other frequency bands in the M frequency bands; wherein the first confidence level is greater than the second confidence level, and the other frequency bands of the M frequency bands are the frequency bands of the M frequency bands except for the L frequency bands.
In an exemplary embodiment, the M frequency bands include K frequency bands below a frequency threshold and M-K frequency bands above the frequency threshold, K being an integer ≧ 1; the determining module 2030, further configured to: judging whether the wearer speaks or not through the second signal, wherein the second signal does not comprise an output signal of a loudspeaker; if the wearer is judged to speak, respectively configuring a third confidence coefficient for the K frequency bands and respectively configuring a fourth confidence coefficient for the M-K frequency bands; wherein the third confidence level is greater than the fourth confidence level.
In an exemplary embodiment, the M frequency bands include K frequency bands below a frequency threshold and M-K frequency bands above the frequency threshold, K being an integer greater than 1; the determining module 2030, further configured to: acquiring total energy of first signals of K first sub-band signals corresponding to the K frequency bands; acquiring total energy of second signals of K second sub-band signals corresponding to the K frequency bands; comparing the total energy of the first signal with the total energy of the second signal to obtain a total energy difference of the signals; if the total energy of the first signals is greater than the total energy of the second signals, and the total energy difference of the signals is greater than a total energy difference threshold value, screening L first sub-band signals with the largest signal energy from the M first sub-band signals, wherein L is greater than or equal to 1 and is greater than M, and L is an integer; respectively configuring first confidence coefficients for L frequency bands corresponding to L first sub-band signals with the maximum energy intensity in the M first sub-band signals; respectively configuring second confidence coefficients for other frequency bands except the L frequency bands in the M frequency bands, wherein the first confidence coefficient is greater than the second confidence coefficient; if the total energy of the first signal is less than the total energy of the second signal and the total energy difference of the signals is greater than the total energy difference threshold, respectively configuring a third confidence coefficient for the K frequency bands and respectively configuring a fourth confidence coefficient for the M-K frequency bands; wherein the third confidence level is greater than the fourth confidence level.
In an exemplary embodiment, the determining module 2030 is further configured to: decomposing the first signal into M first subband signals S 11 、S 12 、…S 1M (ii) a Decomposing the second signal into M second subband signals S 21 、S 22 、…S 2M (ii) a Wherein the first subband signal S 1i With corresponding second subband signal S 2i Corresponding to the same frequency band, i is more than or equal to 1 and less than or equal to M, i is an integer, and M is an integer more than 1; obtaining signal smooth energy of each first sub-band signal in a first time window; acquiring sub-band signal energy of each first sub-band signal in a second time window, wherein the time length of the second time window is shorter than that of the first time window, and the second time window is a current time window; obtaining signal smooth energy of each second sub-band signal in the first time window; acquiring sub-band signal energy of each second sub-band signal in a second time window; calculating M smooth energy difference values corresponding to M frequency bands of the first time window; wherein each smoothed energy difference value represents an energy difference between a signal smoothed energy of a first subband signal of the respective frequency band within the first time window and a signal smoothed energy of a second subband signal of the respective frequency band within the first time window; calculating M energy difference values corresponding to M frequency bands of the second time window; wherein each energy difference value represents an energy difference between a signal energy of a first subband signal of a respective frequency band within the second time window and a signal energy of a second subband signal of the respective frequency band within the second time window; and determining whether the earphone is in a wearing state or not according to the M smooth energy difference values and/or the M energy difference values.
In an exemplary embodiment, the determining module 2030 is further configured to: if the average value of the M energy difference values is less than 0.5 × a first threshold value, then: comparing M energy difference values corresponding to the M frequency bands with an energy difference threshold value respectively to generate M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in the wearing state; when the energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first value for the frequency band; when the energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; carrying out weighting operation according to the M wearing state values and the M confidence coefficients to obtain a first weighted value; if the first weighted value is smaller than a second threshold value, judging that the earphone is not in a wearing state; if the average value of the M energy difference values is larger than the first threshold value, judging that the earphone is worn firmly; if the average value of the M energy difference values is between the 0.5 × first threshold and the first threshold, determining whether the average value of the M smooth energy difference values corresponding to the M frequency bands is less than a 0.8 × third threshold; if the average value of the M smooth energy difference values corresponding to the M frequency bands is less than 0.8 × the third threshold, comparing the M smooth energy difference values corresponding to the M frequency bands with an energy difference threshold, respectively, to generate M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in a wearing state; when the smooth energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first numerical value for the frequency band; when the smooth energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; carrying out weighting operation according to the M wearing state values and the M confidence coefficients to obtain a second weighted value; if the second weighted value is smaller than a fourth threshold value, judging that the earphone is not in a wearing state; if the average value of the M smooth energy difference values corresponding to the M frequency bands is greater than 0.8 × the third threshold, comparing the M smooth energy difference values corresponding to the M frequency bands with an energy difference threshold, respectively, and generating M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in the wearing state; when the smooth energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first numerical value for the frequency band; when the smooth energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; carrying out weighting operation according to the M wearing state values and the M confidence coefficients to obtain a third weighted value; and if the third weighted value is larger than the fourth threshold value, judging that the earphone is worn firmly.
EXAMPLE III
As shown in fig. 21, fig. 21 schematically shows a hardware architecture diagram of a computer device 2100 suitable for implementing a method for determining a wearing state of a headset based on a two-microphone energy difference according to a third embodiment of the present invention. In this embodiment, the computer device 2100 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a command set in advance or stored. For example, an earphone, a hearing aid with an earphone function, or the like may be used. As shown in fig. 21, computer device 2100 includes at least, but is not limited to: the memory 2110, processor 2120, and network interface 2130 may be communicatively linked to each other via a system bus. Wherein:
the memory 2110 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 2110 may be an internal storage module of the computer device 2100, such as a hard disk or memory of the computer device 2100. In other embodiments, the memory 2110 may also be an external storage device of the computer device 2100, such as a plug-in hard disk provided on the computer device 2100, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Of course, the memory 2110 may also include both internal and external storage modules for the computer device 2100. In this embodiment, the memory 2110 is generally used for storing an operating system and various application software installed on the computer device 2100, such as program codes of a method for determining the wearing status of the headset based on the energy difference between the two microphones. In addition, the memory 2110 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 2120 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 2120 generally serves to control overall operation of the computer device 2100, such as performing control and processing related to data interaction or communication with the computer device 2100. In this embodiment, the processor 2120 is configured to execute the program codes stored in the memory 2110 or process data.
The network interface 2130 may comprise a wireless network interface or a wired network interface, the network interface 2130 generally being used to establish communications links between the computer device 2100 and other computer devices. For example, the network interface 2130 is used to connect the computer device 2100 with an external terminal via a network, establish a data transmission channel and a communication link between the computer device 2100 and the external terminal, and the like. The network may be an Intranet (Internet), the Internet (Internet), a Global System of Mobile communication (GSM), wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), wi-Fi, or other wireless or wired network. A
It should be noted that fig. 21 only shows a computer device having the components 2110-2130, but it should be understood that not all of the shown components are required to be implemented, and more or fewer components may be implemented instead. In this embodiment, the method for determining the wearing status of the headset based on the energy difference between the two microphones stored in the memory 2110 may also be divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 2120), so as to complete the embodiments of the present invention.
Example four
The present invention also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, implements the steps of the method for determining a wearing state of an earphone based on a difference in energy of two microphones in an embodiment.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used to store an operating system and various types of application software installed in the computer device, for example, the program code of the method for determining the wearing state of the headset based on the energy difference between the two microphones in the embodiment, and the like. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software. The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present invention or directly or indirectly applied to other related technical fields are also included in the scope of the present invention.

Claims (8)

1. A method for determining the wearing state of an earphone based on the energy difference of two microphones, which is used in an earphone, wherein the earphone comprises a first microphone and a second microphone, the first microphone is located at the side of the earphone far away from the ear canal, the second microphone is located in the ear canal or close to the ear canal of a wearer when the earphone is worn, and the method comprises:
acquiring a first signal provided by the first microphone, wherein the first signal comprises an ambient environment signal;
acquiring a second signal provided by the second microphone; and
comparing the first signal with the second signal, and determining whether the earphone is in a wearing state according to the comparison result;
wherein the step of comparing the first signal and the second signal and determining whether the earphone is in a wearing state according to the comparison result comprises:
decomposing the first signal into M first subband signals S 11 、S 12 、…S 1M
Decomposing the second signal into M second subband signals S 21 、S 22 、…S 2M (ii) a Wherein the first subband signal S 1i With corresponding second subband signal S 2i Correspond toIn the same frequency band, i is more than or equal to 1 and less than or equal to M, i is an integer, and M is an integer more than 1;
calculating M energy difference values corresponding to the M frequency bands, wherein each energy difference value represents the energy difference between the signal energy of the first sub-band signal of the corresponding frequency band and the signal energy of the second sub-band signal of the corresponding frequency band; and
determining whether the earphone is in a wearing state or not according to M energy difference values corresponding to the M frequency bands;
wherein, according to the M energy difference values corresponding to the M frequency bands, the step of determining whether the earphone is in a wearing state comprises the following steps:
comparing M energy difference values corresponding to the M frequency bands with energy difference threshold values respectively to generate M wearing state values corresponding to the M frequency bands; the wearing state value comprises a first numerical value representing that the earphone is in a wearing state and a second numerical value representing that the earphone is not in the wearing state; when the energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first value for the frequency band; when the energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band;
configuring M confidences for the M frequency bands, wherein the M confidences correspond to the M frequency bands one by one; and
and determining whether the earphone is in a wearing state or not according to the M wearing state values and the M confidence degrees.
2. The method of claim 1, further comprising the step of obtaining the energy difference threshold value:
calculating a signal energy of the first signal; and
dynamically adjusting the energy difference threshold according to the signal energy of the first signal on the basis of a preset energy difference threshold; wherein the signal energy of the first signal and the energy difference threshold are in a positive relationship.
3. The method of claim 1, wherein the step of configuring M confidences for the M frequency bands comprises:
screening L first sub-band signals with the largest signal energy from the M first sub-band signals, wherein L is more than or equal to 1 and is more than M, and L is an integer;
respectively configuring first confidence coefficients for L frequency bands corresponding to the L first sub-band signals; and
respectively configuring second confidence coefficients for other frequency bands in the M frequency bands; wherein the first confidence is greater than the second confidence, and the other frequency bands of the M frequency bands are the frequency bands of the M frequency bands except for the L frequency bands.
4. The method of claim 1, wherein the M frequency bands include K frequency bands lower than a frequency threshold and M-K frequency bands higher than the frequency threshold, where K is an integer greater than or equal to 1; configuring M confidences for the M frequency bands, including:
judging whether the wearer speaks or not through the second signal, wherein the second signal does not comprise an output signal of a loudspeaker; and
if the wearer is judged to speak, respectively configuring a third confidence coefficient for the K frequency bands and respectively configuring a fourth confidence coefficient for the M-K frequency bands; wherein the third confidence level is greater than the fourth confidence level.
5. The method of claim 1, wherein the M frequency bands include K frequency bands below a frequency threshold and M-K frequency bands above the frequency threshold, K being an integer greater than 1; configuring M confidences for the M frequency bands, comprising:
acquiring the total energy of first signals of K first sub-band signals corresponding to the K frequency bands;
acquiring total energy of second signals of K second sub-band signals corresponding to the K frequency bands;
comparing the total energy of the first signal with the total energy of the second signal to obtain a total energy difference of the signals;
if the total energy of the first signals is greater than the total energy of the second signals, and the total energy difference of the signals is greater than a total energy difference threshold value, screening L first sub-band signals with the largest signal energy from the M first sub-band signals, wherein L is greater than or equal to 1 and is greater than M, and L is an integer; respectively configuring first confidence coefficients for L frequency bands corresponding to L first sub-band signals with the maximum energy intensity in the M first sub-band signals; respectively configuring second confidence coefficients for other frequency bands except the L frequency bands in the M frequency bands, wherein the first confidence coefficient is greater than the second confidence coefficient; and
if the total energy of the first signal is less than the total energy of the second signal, and the total energy difference of the signals is greater than the total energy difference threshold, respectively configuring a third confidence coefficient for the K frequency bands, and respectively configuring a fourth confidence coefficient for the M-K frequency bands; wherein the third confidence level is greater than the fourth confidence level.
6. The method of claim 1, wherein the step of comparing the first signal with the second signal and determining whether the headset is in a wearing state according to the comparison result comprises:
decomposing the first signal into M first subband signals S 11 、S 12 、…S 1M
Decomposing the second signal into M second subband signals S 21 、S 22 、…S 2M (ii) a Wherein the first subband signal S 1i Corresponding second subband signal S 2i Corresponding to the same frequency band, i is more than or equal to 1 and less than or equal to M, i is an integer, and M is an integer more than 1;
obtaining signal smooth energy of each first sub-band signal in a first time window;
acquiring sub-band signal energy of each first sub-band signal in a second time window, wherein the time length of the second time window is shorter than that of the first time window, and the second time window is a current time window;
obtaining signal smooth energy of each second sub-band signal in the first time window;
acquiring sub-band signal energy of each second sub-band signal in a second time window;
calculating M smooth energy difference values corresponding to M frequency bands of the first time window; wherein each smoothed energy difference value represents an energy difference between a signal smoothed energy of a first subband signal of the respective frequency band within the first time window and a signal smoothed energy of a second subband signal of the respective frequency band within the first time window;
calculating M energy difference values corresponding to M frequency bands of the second time window; wherein each energy difference value represents an energy difference between a signal energy of a first subband signal of a respective frequency band within the second time window and a signal energy of a second subband signal of the respective frequency band within the second time window; and
and determining whether the earphone is in a wearing state or not according to the M smooth energy difference values and/or the M energy difference values.
7. The method of claim 6, wherein the step of determining whether the headset is in a wearing state according to the M smoothed energy difference values and/or the M energy difference values comprises:
if the average value of the M energy difference values is less than 0.5 × a first threshold value, then: comparing M energy difference values corresponding to the M frequency bands with energy difference threshold values respectively to generate M wearing state values corresponding to the M frequency bands; carrying out weighting operation according to the M wearing state values and the M confidence coefficients to obtain a first weighted value; if the first weighted value is smaller than a second threshold value, judging that the earphone is not in a wearing state;
if the average value of the M energy difference values is larger than the first threshold value, judging that the earphone is firmly worn;
if the average value of the M energy difference values is between the 0.5 × first threshold and the first threshold, judging whether the average value of the M smooth energy difference values corresponding to the M frequency bands is less than a 0.8 × third threshold;
if the average value of the M smooth energy difference values corresponding to the M frequency bands is less than 0.8 × the third threshold, comparing the M smooth energy difference values corresponding to the M frequency bands with an energy difference threshold, respectively, and generating M wearing state values corresponding to the M frequency bands; when the smooth energy difference value corresponding to a frequency band is larger than the energy difference threshold value, generating the first value for the frequency band; when the smooth energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; carrying out weighting operation according to the M wearing state values and the M confidence coefficients to obtain a second weighted value; if the second weighted value is smaller than a fourth threshold value, judging that the earphone is not in a wearing state;
if the average value of the M smooth energy difference values corresponding to the M frequency bands is greater than 0.8 × the third threshold, comparing the M smooth energy difference values corresponding to the M frequency bands with an energy difference threshold, respectively, and generating M wearing state values corresponding to the M frequency bands; when the smooth energy difference value corresponding to one frequency band is larger than the energy difference threshold value, generating the first numerical value for the frequency band; when the smooth energy difference value corresponding to one frequency band is not larger than the energy difference threshold value, generating the second value for the frequency band; carrying out weighting operation according to the M wearing state values and the M confidence coefficients to obtain a third weighted value; and if the third weighted value is larger than the fourth threshold value, judging that the earphone is worn firmly.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program is configured to implement the steps of the method for determining the wearing state of a headset based on the energy difference of two microphones of any one of claims 1 to 7.
CN202110414092.8A 2021-04-16 2021-04-16 Method for judging wearing state of earphone based on energy difference of double microphones Active CN113132885B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110414092.8A CN113132885B (en) 2021-04-16 2021-04-16 Method for judging wearing state of earphone based on energy difference of double microphones

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110414092.8A CN113132885B (en) 2021-04-16 2021-04-16 Method for judging wearing state of earphone based on energy difference of double microphones

Publications (2)

Publication Number Publication Date
CN113132885A CN113132885A (en) 2021-07-16
CN113132885B true CN113132885B (en) 2022-10-04

Family

ID=76777317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110414092.8A Active CN113132885B (en) 2021-04-16 2021-04-16 Method for judging wearing state of earphone based on energy difference of double microphones

Country Status (1)

Country Link
CN (1) CN113132885B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157975A (en) * 2021-12-01 2022-03-08 思必驰科技股份有限公司 Earphone wearing detection method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581796A (en) * 2012-08-02 2014-02-12 索尼公司 Headphone device, wearing state detection device, and wearing state detection method
CN104661153A (en) * 2014-12-31 2015-05-27 歌尔声学股份有限公司 Earphone sound effect compensation method and device as well as earphone
CN109195045A (en) * 2018-08-16 2019-01-11 歌尔科技有限公司 The method, apparatus and earphone of test earphone wearing state
CN110291581A (en) * 2016-10-24 2019-09-27 爱浮诺亚股份有限公司 Headphone is detected from ear
CN111629297A (en) * 2020-05-27 2020-09-04 歌尔科技有限公司 Earphone wearing state detection method and device, earphone and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6922603B2 (en) * 2017-09-26 2021-08-18 株式会社Jvcケンウッド Signal processing equipment, signal processing methods, and programs
CN110896509A (en) * 2018-09-13 2020-03-20 北京三星通信技术研究有限公司 Earphone wearing state determining method, electronic equipment control method and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581796A (en) * 2012-08-02 2014-02-12 索尼公司 Headphone device, wearing state detection device, and wearing state detection method
CN104661153A (en) * 2014-12-31 2015-05-27 歌尔声学股份有限公司 Earphone sound effect compensation method and device as well as earphone
CN110291581A (en) * 2016-10-24 2019-09-27 爱浮诺亚股份有限公司 Headphone is detected from ear
CN109195045A (en) * 2018-08-16 2019-01-11 歌尔科技有限公司 The method, apparatus and earphone of test earphone wearing state
CN111629297A (en) * 2020-05-27 2020-09-04 歌尔科技有限公司 Earphone wearing state detection method and device, earphone and storage medium

Also Published As

Publication number Publication date
CN113132885A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
EP3701525B1 (en) Electronic device using a compound metric for sound enhancement
CN109196877B (en) On/off-head detection of personal audio devices
US6728385B2 (en) Voice detection and discrimination apparatus and method
US10631105B2 (en) Hearing aid system and a method of operating a hearing aid system
CN113676803A (en) Active noise reduction method and device
US10154353B2 (en) Monaural speech intelligibility predictor unit, a hearing aid and a binaural hearing system
CN108235181B (en) Method for noise reduction in an audio processing apparatus
CN113395647B (en) Hearing system with at least one hearing device and method for operating a hearing system
CN113711308A (en) Wind noise detection system and method
CN112911441A (en) Noise reduction method, apparatus, audio device, and computer-readable storage medium
CN108696813A (en) Method for running hearing device and hearing device
EP4132010A2 (en) A hearing system and a method for personalizing a hearing aid
CN113949955A (en) Noise reduction processing method and device, electronic equipment, earphone and storage medium
CN113132885B (en) Method for judging wearing state of earphone based on energy difference of double microphones
CN113132881B (en) Method for adaptively controlling sound amplification degree of wearer based on multiple microphones
CA2474792C (en) Voice detection and discrimination apparatus and method
Sørensen et al. Semi-non-intrusive objective intelligibility measure using spatial filtering in hearing aids
EP3182729B1 (en) Hearing aid system and a method of operating a hearing aid system
CN115996349A (en) Hearing device comprising a feedback control system
EP4340395A1 (en) A hearing aid comprising a voice control interface
EP3996390A1 (en) Method for selecting a hearing program of a hearing device based on own voice detection
Grant et al. An objective measure for selecting microphone modes in OMNI/DIR hearing aid circuits
CN115866474A (en) Transparent transmission noise reduction control method and system of wireless earphone and wireless earphone

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant