CN111629297B - Earphone wearing state detection method and device, earphone and storage medium - Google Patents

Earphone wearing state detection method and device, earphone and storage medium Download PDF

Info

Publication number
CN111629297B
CN111629297B CN202010463011.9A CN202010463011A CN111629297B CN 111629297 B CN111629297 B CN 111629297B CN 202010463011 A CN202010463011 A CN 202010463011A CN 111629297 B CN111629297 B CN 111629297B
Authority
CN
China
Prior art keywords
earphone
wearing state
volume difference
noise signal
frequency range
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
CN202010463011.9A
Other languages
Chinese (zh)
Other versions
CN111629297A (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.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology 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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202010463011.9A priority Critical patent/CN111629297B/en
Publication of CN111629297A publication Critical patent/CN111629297A/en
Application granted granted Critical
Publication of CN111629297B publication Critical patent/CN111629297B/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
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1083Reduction of ambient noise
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • G10L21/0208Noise filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements
    • H04R29/001Monitoring arrangements; Testing arrangements for loudspeakers
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K2210/00Details of active noise control [ANC] covered by G10K11/178 but not provided for in any of its subgroups
    • G10K2210/10Applications
    • G10K2210/108Communication systems, e.g. where useful sound is kept and noise is cancelled
    • G10K2210/1081Earphones, e.g. for telephones, ear protectors or headsets

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Otolaryngology (AREA)
  • Headphones And Earphones (AREA)

Abstract

The invention discloses a method and a device for detecting the wearing state of an earphone, the earphone and a computer readable storage medium; in the scheme, when the wearing state of the earphone is judged, an extra sensor is not required to be added on the earphone, and the wearing state of the earphone can be timely and accurately detected only by utilizing the feedforward microphone and the feedback microphone of the earphone, so that the design complexity of the earphone is reduced, and the cost is reduced.

Description

Earphone wearing state detection method and device, earphone and storage medium
Technical Field
The present invention relates to the field of electronic devices, and in particular, to a method and an apparatus for detecting a wearing state of an earphone, and a computer-readable storage medium.
Background
At present, an earphone with an Active Noise Control (ANC) system can provide better experience for a user, and because the Active Noise Control system needs additional power supply, when the user takes off the earphone, the user timely detects the action of taking off the earphone, so that partial functions of the earphone are closed to save power, and especially the earphone powered by a battery is more important. In the present scheme, the earphone ear-off state monitoring is mainly realized by adding a capacitance sensor or an infrared sensor, and the detection mode needs to add an additional capacitance sensor or an infrared sensor on the earphone, so that the design complexity and the cost are improved.
Disclosure of Invention
The invention aims to provide a method and a device for detecting the wearing state of an earphone, the earphone and a computer readable storage medium, which are used for reducing the design complexity and cost of the earphone on the basis of realizing the detection of the wearing state of the earphone.
In order to achieve the above object, the present invention provides a method for detecting a wearing state of an earphone, including:
at each detection instant, acquiring a first noise signal from a feedforward microphone of an earphone and a synthesized noise signal from a feedback microphone of the earphone;
removing the audio signal in the synthesized noise signal by using a first audio signal played by the earphone to obtain a second noise signal, and determining a first volume difference value of the first noise signal and the second noise signal in a first frequency range; the first frequency range is a frequency range greater than 1 kHz;
and determining the wearing state of the earphone according to the first volume difference determined at different detection moments.
Wherein, the determining the wearing state of the earphone according to the first volume difference determined at different detection moments comprises:
judging whether a first volume difference value at the current detection moment is larger than a first preset threshold value or not compared with a first volume difference value at a historical detection moment adjacent to the current detection moment;
if yes, judging that the wearing state of the earphone is a worn state; if not, the wearing state of the earphone is judged to be the non-wearing state.
Wherein, after acquiring the synthesized noise signal from the feedback microphone of the earphone, the method further comprises:
removing a noise signal in the synthesized noise signal by using the first noise signal to obtain a second audio signal;
determining a second volume difference value of the second audio signal and the corresponding first audio signal in a second frequency range; the second frequency range is a frequency range less than 100 Hz;
determining the wearing state of the earphone according to the first volume difference determined at different detection moments, including: and determining the wearing state of the earphone according to the first volume difference value and the second volume difference value determined at different detection moments.
Wherein, the first volume difference and the second volume difference determined according to different detection moments determine the wearing state of the earphone, including:
judging whether a first volume difference value at the current detection moment is larger than a first preset threshold value or not compared with a first volume difference value at a historical detection moment adjacent to the current detection moment;
if not, judging that the wearing state of the earphone is an unworn state, and if so, judging whether a second volume difference value at the current detection moment is larger than a second preset threshold value compared with a second volume difference value at a historical detection moment adjacent to the current detection moment;
if not, the wearing state of the earphone is judged to be the non-wearing state, and if yes, the wearing state of the earphone is judged to be the worn state.
Wherein before acquiring the synthesized noise signal from the feedback microphone of the earphone, the method further comprises:
adding target audio with frequency lower than 20Hz into the audio played by the earphone; determining the wearing state of the earphone according to the first volume difference determined at different detection moments, including:
determining the wearing state of the earphone according to the first volume difference determined at different detection moments and the volume of the synthesized noise signal in a third frequency range; the third frequency range is a frequency range of less than 20 Hz.
Wherein, the determining the wearing state of the earphone according to the first volume difference determined at different detection moments and the volume of the synthesized noise signal in the third frequency range comprises:
judging whether a first volume difference value at the current detection moment is larger than a first preset threshold value or not compared with a first volume difference value at a historical detection moment adjacent to the current detection moment;
if not, judging that the wearing state of the earphone is a non-wearing state, if so, judging that the volume of the synthesized noise signal in a third frequency range acquired at the current detection moment is larger than a third preset threshold value or not compared with the volume of the synthesized noise signal in the third frequency range acquired at the historical detection moment adjacent to the current detection moment;
if not, judging that the wearing state of the earphone is an unworn state; and if so, judging that the wearing state of the earphone is the worn state.
Wherein, if it is determined that the wearing state of the earphone is an unworn state, the detecting further includes:
and closing the active noise reduction function of the earphone.
In order to achieve the above object, the present invention further provides a device for detecting a wearing state of an earphone, including:
the system comprises an acquisition module, a detection module and a control module, wherein the acquisition module is used for acquiring a first noise signal from a feedforward microphone of an earphone and acquiring a synthesized noise signal from a feedback microphone of the earphone at each detection moment;
a first volume difference determining module, configured to remove an audio signal in the synthesized noise signal by using a first audio signal played by the earphone to obtain a second noise signal, and determine a first volume difference of the first noise signal and the second noise signal in a first frequency range; the first frequency range is a frequency range greater than 1 kHz;
and the state determining module is used for determining the wearing state of the earphone according to the first volume difference determined at different detection moments.
To achieve the above object, the present invention further provides an earphone comprising: a feedforward microphone, a feedback microphone and a processor;
the processor is used for realizing the steps of the method for detecting the wearing state of the earphone when executing the computer program.
To achieve the above object, the present invention further provides a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of the method for detecting wearing state of a headset described above.
According to the scheme, the method for detecting the wearing state of the earphone, provided by the embodiment of the invention, comprises the following steps: at each detection instant, acquiring a first noise signal from a feedforward microphone of an earphone and a synthesized noise signal from a feedback microphone of the earphone; removing the audio signal in the synthesized noise signal by using a first audio signal played by the earphone to obtain a second noise signal, and determining a first volume difference value of the first noise signal and the second noise signal in a first frequency range; the first frequency range is a frequency range greater than 1 kHz; and determining the wearing state of the earphone according to the first volume difference determined at different detection moments.
Therefore, in the application, when the wearing state of the earphone is judged, an additional sensor is not required to be added on the earphone, only the feedforward microphone and the feedback microphone which are arranged on the earphone are utilized, and the wearing state of the earphone can be timely and accurately detected through the difference value of noise signals collected by the feedforward microphone and the feedback microphone, so that the design complexity of the earphone is reduced, and the cost is reduced. The invention also discloses a device for detecting the wearing state of the earphone, the earphone and a computer readable storage medium, and the technical effects can be realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of an earphone structure according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for detecting a wearing state of an earphone according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of another method for detecting a wearing state of an earphone according to an embodiment of the present invention;
fig. 4 is a schematic flow chart of another method for detecting a wearing state of an earphone according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device for detecting a wearing state of an earphone according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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, in the current detection of the wearing state of the earphone, a capacitive sensor or an infrared sensor and the like are required to be separately arranged on the earphone, the wearing state of the earphone is detected through a sensor on the earphone, and the design complexity of the earphone is increased by the scheme of realizing the off-ear detection by an additional device.
Therefore, the application discloses a method and a device for detecting the wearing state of an earphone, the earphone and a computer readable storage medium. For easy understanding, a headphone structure to which the technical solution of the present application is applied is described below, and referring to fig. 1, a schematic view of a headphone structure disclosed in an embodiment of the present invention is shown, where the headphone is specifically a headphone with an active noise reduction system, and as can be seen from fig. 1, the headphone includes a feedforward microphone 11, a processor 12, a feedback microphone 13, and a speaker 14.
Specifically, the noise reduction function of the headphone is mainly achieved by two aspects: firstly, passive noise reduction is realized, namely, a path from external noise to human ears is physically isolated by the earphone body; secondly, active noise reduction is performed, the feedforward microphone 11 collects ambient noise outside the earphone, the feedback microphone 13 collects mixed parts of noise between the earphone and the human ear and normal playing content, the collected data are submitted to the processor 12, and the processor 12 receives the data and drives the loudspeaker 14 to send out a signal with a phase opposite to that of the noise to offset the noise. Moreover, through analysis, the passive noise reduction function of the earphone has a very obvious attenuation effect on high-frequency environment noise above 1kHz (kiloHertz), and the attenuation effect on a low-frequency part less than 100Hz (Hertz) is almost negligible, so that the noise collected by the feedback microphone is observed based on the noise collected by the feedforward microphone under the two conditions of wearing and not wearing the earphone, and the difference between the noise above 1kHz and the noise below 100Hz is found to be very large, and the noise below 100Hz is basically consistent.
Therefore, based on this feature, the present application proposes a detection scheme for a wearing state of an earphone based on the earphone architecture shown in fig. 1, in which the feedforward microphone 11 and the feedback microphone 13 are specifically configured to collect a first noise signal and a synthesized noise signal at each detection time; the steps of the method for detecting the wearing state of a headset according to any of the method embodiments are implemented by a user of the processor 12 when executing a computer program. Specifically, the processor is configured to obtain a first noise signal from the feedforward microphone, obtain a synthesized noise signal from the feedback microphone, remove an audio signal from the synthesized noise signal using the first audio signal played by the earpiece speaker 14 to obtain a second noise signal, and determine a first volume difference between the first noise signal and the second noise signal in a first frequency range; the first frequency range is a frequency range larger than 1kHz, and then the wearing state of the earphone is determined according to the first volume difference determined at different detection moments.
It should be noted that the earphone in this embodiment is specifically an earphone with an Active Noise Control (ANC) function, and therefore the processor in this application may be specifically an ANC processor, so that in the process of implementing Noise reduction processing by the earphone, the wearing state of the earphone is timely and accurately detected by using a feedforward microphone and a feedback microphone that are provided by the earphone itself, thereby reducing the design complexity of the earphone and reducing the cost.
Fig. 2 is a schematic flow chart of a method for detecting a wearing state of an earphone according to an embodiment of the present invention; as can be seen from fig. 2, the detection method specifically includes:
s101, at each detection moment, acquiring a first noise signal from a feedforward microphone of the earphone, and acquiring a synthesized noise signal from a feedback microphone of the earphone;
it should be noted that the earphone in the present application is an earphone with an active noise reduction function, and therefore, the feedforward microphone and the feedback microphone in the present application may continuously collect sound information, such as: the first noise signal collected continuously by the feedforward microphone is ambient noise, and the synthesized noise signal collected by the feedback microphone includes: noise from the headphone to the human ear and the mixing of the headphone's normal playing content. The detection time in this application can be understood as each time when this scheme is executed to detect the wearing state of the headset, and the detection frequency at each detection time can be preset, for example: detection is performed every 0.1 second, or every 0.05 second, and the like, and is not particularly limited. In addition, at each detection moment, the first noise signal needs to be acquired from the feedforward microphone, and the synthesized noise signal needs to be acquired from the feedback microphone, so that the subsequent processing steps are executed, and the change of the wearing state of the earphone is detected in time.
S102, removing an audio signal in the synthesized noise signal by using a first audio signal played by an earphone to obtain a second noise signal, and determining a first volume difference value of the first noise signal and the second noise signal in a first frequency range; the first frequency range is a frequency range greater than 1 kHz;
it can be understood that, since the synthesized noise signal includes a mixed portion of the noise from the earphone to the human ear and the normal playing content of the earphone, in order to compare the earphone noise in the feedforward microphone and the feedback microphone, the normal audio playing on the earphone needs to be removed from the synthesized noise, and only the noise portion is reserved. In this application, the audio normally played by the earphone is referred to as a first audio signal, and therefore when the audio signal in the synthesized noise signal is removed, specifically, the audio signal in the synthesized noise signal is removed by the corresponding first audio signal, so as to obtain a second noise signal collected by the feedback microphone. Further, the present application also needs to calculate a difference value between the first noise signal and the second noise signal, so as to detect the wearing state of the earphone through the difference value.
S103, determining the wearing state of the earphone according to the first volume difference determined at different detection moments.
In this application, at different detection moments, all can utilize first noise signal and synthetic noise signal to calculate first volume difference, also every detection moment all has corresponding first volume difference, consequently, this application can confirm the wearing state of earphone according to the first volume difference of every detection moment, if: if the difference that the first volume difference value at a certain detection moment is compared with the first volume difference value at the previous detection moment and exceeds the preset threshold value is detected, the wearing state of the earphone is changed, and through the mode, the wearing state of the earphone can be determined by using the first volume difference values at different detection moments.
It can be seen that, in the application, when the wearing state of the earphone is determined, an additional sensor is not required to be added on the earphone, only the feedforward microphone and the feedback microphone which are provided by the earphone are utilized, and the wearing state of the earphone can be timely and accurately detected through the difference value of noise signals collected by the feedforward microphone and the feedback microphone, so that the design complexity of the earphone is reduced, and the cost is reduced.
Based on the above embodiment, in this embodiment, a specific wearing state determination method is disclosed, specifically: this application confirms according to the first volume difference value that different detection moments confirm when wearing state of earphone specifically includes:
judging whether a first volume difference value at the current detection moment is larger than a first preset threshold value or not compared with a first volume difference value at a historical detection moment adjacent to the current detection moment;
if yes, judging that the wearing state of the earphone is a worn state; if not, the wearing state of the earphone is judged to be the non-wearing state.
In the present application, since there are different time points with a time relationship between the detection time points, for example: the five detection moments of the first detection moment, the second detection moment, the third detection moment, the fourth detection moment and the fifth detection moment are sequenced according to time sequence, if the fifth detection moment is the current detection moment, the first detection moment to the fourth detection moment are historical detection moments of the current detection moment, and the historical detection moment adjacent to the current detection moment is the fourth detection moment, therefore, when the earphone is compared with the first volume difference of the historical detection moment adjacent to the current detection moment, the earphone is mainly used for judging whether the earphone is away from the ear between the historical detection moment and the current detection moment, if the earphone is away from the ear between the historical detection moment and the current detection moment, the earphone is detected by comparing the change degree of the first volume difference of the current detection moment with the first volume difference of the historical detection moment adjacent to the current detection moment, if the change degree is larger than a first preset threshold value, the earphone is out of the ear, and the wearing state is an unworn state, otherwise, the earphone is out of the ear, and the wearing state is an unworn state.
In summary, in this embodiment, the wearing state of the earphone can be determined by detecting the change degree of the first volume difference between the current detection time and the historical detection time, so that the wearing state of the earphone can be detected by using hardware of the earphone, the design complexity of the earphone is reduced, and the cost is reduced.
Fig. 3 is a schematic flow chart of another method for detecting the wearing state of an earphone according to the embodiment of the present invention; it should be noted that, the same points of the detection method described in this embodiment and the detection method described in the above embodiment may be referred to each other, and are not described herein again.
The detection method described in this embodiment specifically includes:
s201, at each detection moment, acquiring a first noise signal from a feedforward microphone of the earphone, and acquiring a synthesized noise signal from a feedback microphone of the earphone;
s202, removing the audio signal in the synthesized noise signal by using the first audio signal played by the earphone to obtain a second noise signal, and determining a first volume difference value of the first noise signal and the second noise signal in a first frequency range; the first frequency range is a frequency range greater than 1 kHz;
s203, removing the noise signal in the synthesized noise signal by using the first noise signal to obtain a second audio signal; determining a second volume difference value of the second audio signal and the corresponding first audio signal in a second frequency range; the second frequency range is a frequency range less than 100 Hz;
and S204, determining the wearing state of the earphone according to the first volume difference value and the second volume difference value determined at different detection moments.
It should be noted that, through analysis, it is found that the tightness of the earphone greatly affects the sound collected by the feedback microphone, and in the low frequency part, when the earphone is worn and when the earphone is taken off, the difference between the audio played by the earphone and the audio collected by the feedback microphone can reach more than 20dB, while the high frequency part is hardly affected. Therefore, in this embodiment, the wearing state of the headset is detected together by using the two characteristics that the physical isolation described in the above embodiment has obvious attenuation to the high-frequency part and the headset airtightness described in this embodiment has an influence on the feedforward microphone acquisition data, so as to improve the detection accuracy. Therefore, in this embodiment, after the synthesized noise signal is obtained from the feedback microphone of the earphone, the noise signal needs to be removed from the synthesized noise signal by using the first noise signal to obtain the second audio signal, and then the second volume difference between the second audio signal and the corresponding first audio signal in the second frequency range is calculated, where the second volume difference is the same as the first volume difference, and both the second volume difference and the first volume difference need to be calculated at each detection time, and after the first volume difference and the second volume difference at each detection time are both obtained, the wearing state of the earphone can be determined.
In this embodiment, when determining the wearing state of the earphone according to the first volume difference and the second volume difference determined at different detection times, the method specifically includes:
judging whether a first volume difference value at the current detection moment is larger than a first preset threshold value or not compared with a first volume difference value at a historical detection moment adjacent to the current detection moment;
if not, judging that the wearing state of the earphone is an unworn state, and if so, judging whether a second volume difference value at the current detection moment is larger than a second preset threshold value compared with a second volume difference value at a historical detection moment adjacent to the current detection moment;
if not, the wearing state of the earphone is judged to be the non-wearing state, and if yes, the wearing state of the earphone is judged to be the worn state.
It can be seen that, in the present application, when the wearing state of the earphone is determined by the first volume difference and the second volume difference, the earphone can be determined as the unworn state only when the first volume difference and the second volume difference both determine that the earphone is the unworn state, and if any one of the determination results is the unworn state, the earphone cannot be determined as the unworn state. It should be noted that, when determining the wearing state of the earphone, the wearing state of the earphone may be determined by using the first volume difference value, and then the wearing state of the earphone is determined by using the second volume difference value, and also the wearing state of the earphone may be determined by using the second volume difference value, and then the wearing state of the earphone is determined by using the first volume difference value, and the determination sequence is not particularly limited.
It can be understood that the process of determining the wearing state of the earphone according to the first volume difference described in this embodiment is the same as the determination method described in the foregoing embodiment, and thus, the description is omitted here. If the first volume difference value at the current detection moment is compared with the first volume difference value at the historical detection moment adjacent to the current detection moment, and the difference between the first volume difference value and the first volume difference value is a first preset threshold, whether a second volume difference value at the current detection moment is larger than a second preset threshold or not is judged; the historical detection time in this embodiment is the same as the historical detection time described in the previous embodiment, and is the previous detection time adjacent to the current time. And if the second volume difference value at the current detection moment is compared with the second volume difference value at the historical detection moment, and the difference between the two exceeds a second preset threshold value, judging that the wearing state of the earphone is an unworn state, otherwise, judging that the wearing state of the earphone is a worn state.
In summary, in the embodiment, when the wearing state of the earphone is determined, the wearing state of the earphone can be detected together through the two methods, and if the wearing state is determined to be not worn, the earphone can be determined to be not worn, so that the detection accuracy of the wearing state is improved through the two detection methods on the basis of reducing the design complexity of the earphone.
Fig. 4 is a schematic flow chart of another method for detecting the wearing state of an earphone according to the embodiment of the present invention; it should be noted that, the same points of the detection method described in this embodiment and the detection method described in the above embodiment may be referred to each other, and are not described herein again.
The detection method described in this embodiment specifically includes:
s301, adding target audio with frequency lower than 20Hz into audio played by the earphone;
s302, at each detection moment, acquiring a first noise signal from a feedforward microphone of the earphone, and acquiring a synthesized noise signal from a feedback microphone of the earphone;
s303, removing the audio signal in the synthesized noise signal by using the first audio signal played by the earphone to obtain a second noise signal, and determining a first volume difference value of the first noise signal and the second noise signal in a first frequency range; the first frequency range is a frequency range greater than 1 kHz;
s304, determining the wearing state of the earphone according to the first volume difference determined at different detection moments and the volume of the synthesized noise signal in a third frequency range; the third frequency range is a frequency range of less than 20 Hz.
It should be noted that, because the earphone tightness affects the data collected by the feedforward microphone, in the low frequency part, when the earphone is worn and removed, the audio played by the earphone and the audio collected by the feedback microphone have a large difference, in this application, the target audio with a frequency lower than 20Hz, which cannot be perceived by human ears, can be added to the audio played by the earphone in advance, and in the normal audio played by the earphone, the audio generally does not have a frequency lower than 20Hz, therefore, after the target audio is added to the audio normally played by the earphone, when it is determined whether the earphone is away from the ear, the noise signal in the synthesized noise signal does not need to be removed by the first noise signal, and the new volume lower than 20Hz in the synthesized noise can be directly compared.
In this embodiment, when determining the wearing state of the earphone according to the first volume difference determined at different detection times and the volume of the synthesized noise signal in the third frequency range, the method specifically includes:
judging whether a first volume difference value at the current detection moment is larger than a first preset threshold value or not compared with a first volume difference value at a historical detection moment adjacent to the current detection moment;
if not, judging that the wearing state of the earphone is a non-wearing state, if so, judging that the volume of the synthesized noise signal in a third frequency range acquired at the current detection moment is larger than a third preset threshold value or not compared with the volume of the synthesized noise signal in the third frequency range acquired at the historical detection moment adjacent to the current detection moment;
if not, judging that the wearing state of the earphone is an unworn state; and if so, judging that the wearing state of the earphone is the worn state.
It can be understood that the process of determining the wearing state of the earphone according to the first volume difference described in this embodiment is the same as the determination method described in the foregoing embodiment, and thus, the description is omitted here. If the first volume difference value at the current detection moment is compared with the first volume difference value at the historical detection moment adjacent to the current detection moment, and the difference between the first volume difference value and the first volume difference value at the historical detection moment is a first preset threshold value, the volume of the synthesized noise signal acquired at the current detection moment in a third frequency range is required to be judged, and if the volume difference value is larger than the third preset threshold value compared with the volume of the synthesized noise signal acquired at the historical detection moment adjacent to the current detection moment in the third frequency range, the synthesized noise signal acquired at the current detection moment in the historical detection moment is judged; the historical detection time in this embodiment is the same as the historical detection time described in the previous embodiment, and is the previous detection time adjacent to the current time. And if the volume difference value of the synthesized noise signals at the two detection moments is larger than a third preset threshold value, judging that the wearing state of the earphone is an unworn state, otherwise, judging that the wearing state of the earphone is an unworn state.
It should be noted that the first predetermined threshold, the second predetermined threshold, and the third predetermined threshold described in any of the above embodiments can be obtained by testing in the design stage of the earphone, and the specific values are not specifically limited herein. And, if the wearing state of the earphone is detected to be the unworn state by any of the above embodiments, the method further includes: and closing the active noise reduction function of the earphone. By the mode, when the earphone leaves the ear, the active noise reduction function of the earphone can be closed in time, so that the electric quantity of the earphone is saved.
In the following, the detection device provided by the embodiment of the present invention is introduced, and the detection device described below and the detection method described above may be referred to each other.
Referring to fig. 5, a schematic structural diagram of a device for detecting a wearing state of an earphone according to an embodiment of the present invention is shown; the apparatus may include:
an obtaining module 21, configured to obtain, at each detection time, a first noise signal from a feedforward microphone of an earphone and a synthesized noise signal from a feedback microphone of the earphone;
a first volume difference determining module 22, configured to remove an audio signal in the synthesized noise signal by using a first audio signal played by the earphone to obtain a second noise signal, and determine a first volume difference of the first noise signal and the second noise signal in a first frequency range; the first frequency range is a frequency range greater than 1 kHz;
and the state determining module 23 is configured to determine a wearing state of the headset according to the first volume difference determined at different detection moments.
Wherein, the state determining module 23 includes:
the first judging unit is used for judging whether a first volume difference value at the current detection moment is larger than a first preset threshold value compared with a first volume difference value at a historical detection moment adjacent to the current detection moment;
the first judging unit is used for judging that the wearing state of the earphone is a worn state when the difference between the two is larger than a first preset threshold value;
and the second judging unit is used for judging that the wearing state of the earphone is an unworn state when the difference between the two is not larger than the first preset threshold value.
Wherein, this device still includes:
the noise removing module is used for removing the noise signal in the synthesized noise signal by using the first noise signal to obtain a second audio signal;
a second volume difference determination module, configured to determine a second volume difference between the second audio signal and the corresponding first audio signal in a second frequency range; the second frequency range is a frequency range less than 100 Hz;
the state determination module is specifically configured to: and determining the wearing state of the earphone according to the first volume difference value and the second volume difference value determined at different detection moments.
Wherein the state determination module comprises:
the second judgment unit is used for judging whether the first volume difference value of the current detection moment is larger than a first preset threshold value or not compared with the first volume difference value of the historical detection moment adjacent to the current detection moment;
a third determination unit, configured to determine that the wearing state of the earphone is an unworn state when a difference between the two is not greater than a first predetermined threshold;
the third judging unit is used for judging whether a second volume difference value at the current detection time is larger than a second preset threshold value or not when the difference between the first volume difference value and the second volume difference value is larger than the first preset threshold value;
the fourth judging unit is used for judging that the wearing state of the earphone is an unworn state when the difference between the two is larger than a second preset threshold value;
and the fifth judging unit is used for judging that the wearing state of the earphone is the worn state when the difference between the two is not more than a second preset threshold value.
Wherein, this device still includes:
the target audio adding module is used for adding target audio with the frequency lower than 20Hz into the audio played by the earphone;
the state determination module is specifically configured to: determining the wearing state of the earphone according to the first volume difference determined at different detection moments and the volume of the synthesized noise signal in a third frequency range; the third frequency range is a frequency range of less than 20 Hz.
Wherein the state determination module comprises:
the fourth judging unit is used for judging whether the first volume difference value of the current detection moment is larger than a first preset threshold value or not compared with the first volume difference value of the historical detection moment adjacent to the current detection moment;
a sixth determination unit configured to determine that the wearing state of the headphone is an unworn state when a difference between the two is not greater than a first predetermined threshold;
a fifth judging unit, configured to judge, when a difference between the two is greater than a first predetermined threshold, whether a volume difference value of the synthesized noise signal obtained at the current detection time in a third frequency range is greater than a third predetermined threshold, compared with a volume difference value of the synthesized noise signal obtained at a historical detection time adjacent to the current detection time in the third frequency range;
a seventh determination unit configured to determine that the wearing state of the headphone is an unworn state when the volume difference value is larger than a third predetermined threshold value
An eighth determination unit configured to determine that the wearing state of the headphone is a worn state when the volume difference value is not greater than a third predetermined threshold.
Wherein, this device still includes:
and the function closing module is used for closing the active noise reduction function of the earphone when the wearing state of the earphone is judged to be the unworn state.
The embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the steps of the method for detecting the wearing state of the earphone in any method embodiment.
Wherein the storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for detecting the wearing state of an earphone is characterized by comprising the following steps:
at each detection instant, acquiring a first noise signal from a feedforward microphone of an earphone and a synthesized noise signal from a feedback microphone of the earphone;
removing the audio signal in the synthesized noise signal by using a first audio signal played by the earphone to obtain a second noise signal, and determining a first volume difference value of the first noise signal and the second noise signal in a first frequency range; the first frequency range is a frequency range greater than 1 kHz;
and determining the wearing state of the earphone according to the first volume difference determined at different detection moments.
2. The detection method according to claim 1, wherein the determining the wearing state of the headset according to the first volume difference determined at different detection moments comprises:
judging whether a first volume difference value at the current detection moment is larger than a first preset threshold value or not compared with a first volume difference value at a historical detection moment adjacent to the current detection moment;
if yes, judging that the wearing state of the earphone is a worn state; if not, the wearing state of the earphone is judged to be the non-wearing state.
3. The detection method according to claim 1, further comprising, after acquiring the synthesized noise signal from the feedback microphone of the headset:
removing a noise signal in the synthesized noise signal by using the first noise signal to obtain a second audio signal;
determining a second volume difference value of the second audio signal and the corresponding first audio signal in a second frequency range; the second frequency range is a frequency range less than 100 Hz;
determining the wearing state of the earphone according to the first volume difference determined at different detection moments, including: and determining the wearing state of the earphone according to the first volume difference value and the second volume difference value determined at different detection moments.
4. The detection method according to claim 3, wherein the determining the wearing state of the headset according to the first volume difference value and the second volume difference value determined at different detection moments comprises:
judging whether a first volume difference value at the current detection moment is larger than a first preset threshold value or not compared with a first volume difference value at a historical detection moment adjacent to the current detection moment;
if not, judging that the wearing state of the earphone is an unworn state, and if so, judging whether a second volume difference value at the current detection moment is larger than a second preset threshold value compared with a second volume difference value at a historical detection moment adjacent to the current detection moment;
if not, the wearing state of the earphone is judged to be the non-wearing state, and if yes, the wearing state of the earphone is judged to be the worn state.
5. The detection method according to claim 1, wherein before the obtaining the synthesized noise signal from the feedback microphone of the headset, further comprising:
adding target audio with frequency lower than 20Hz into the audio played by the earphone; determining the wearing state of the earphone according to the first volume difference determined at different detection moments, including:
determining the wearing state of the earphone according to the first volume difference determined at different detection moments and the volume of the synthesized noise signal in a third frequency range; the third frequency range is a frequency range of less than 20 Hz.
6. The detecting method according to claim 5, wherein the determining the wearing state of the earphone according to the first volume difference determined at different detecting moments and the volume of the synthesized noise signal in a third frequency range comprises:
judging whether a first volume difference value at the current detection moment is larger than a first preset threshold value or not compared with a first volume difference value at a historical detection moment adjacent to the current detection moment;
if not, judging that the wearing state of the earphone is a non-wearing state, if so, judging that the volume of the synthesized noise signal in a third frequency range acquired at the current detection moment is larger than a third preset threshold value or not compared with the volume of the synthesized noise signal in the third frequency range acquired at the historical detection moment adjacent to the current detection moment;
if not, judging that the wearing state of the earphone is an unworn state; and if so, judging that the wearing state of the earphone is the worn state.
7. The detection method according to any one of claims 1 to 6, wherein if it is determined that the wearing state of the headset is an unworn state, the detecting further includes:
and closing the active noise reduction function of the earphone.
8. An apparatus for detecting a wearing state of a headphone, comprising:
the system comprises an acquisition module, a detection module and a control module, wherein the acquisition module is used for acquiring a first noise signal from a feedforward microphone of an earphone and acquiring a synthesized noise signal from a feedback microphone of the earphone at each detection moment;
a first volume difference determining module, configured to remove an audio signal in the synthesized noise signal by using a first audio signal played by the earphone to obtain a second noise signal, and determine a first volume difference of the first noise signal and the second noise signal in a first frequency range; the first frequency range is a frequency range greater than 1 kHz;
and the state determining module is used for determining the wearing state of the earphone according to the first volume difference determined at different detection moments.
9. An earphone, comprising: a feedforward microphone, a feedback microphone and a processor;
wherein the processor is adapted to carry out the steps of the method of detecting a wearing state of a headset according to any one of claims 1 to 7 when executing a computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of detecting a wearing state of a headset according to any one of claims 1 to 7.
CN202010463011.9A 2020-05-27 2020-05-27 Earphone wearing state detection method and device, earphone and storage medium Active CN111629297B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010463011.9A CN111629297B (en) 2020-05-27 2020-05-27 Earphone wearing state detection method and device, earphone and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010463011.9A CN111629297B (en) 2020-05-27 2020-05-27 Earphone wearing state detection method and device, earphone and storage medium

Publications (2)

Publication Number Publication Date
CN111629297A CN111629297A (en) 2020-09-04
CN111629297B true CN111629297B (en) 2022-03-29

Family

ID=72272644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010463011.9A Active CN111629297B (en) 2020-05-27 2020-05-27 Earphone wearing state detection method and device, earphone and storage medium

Country Status (1)

Country Link
CN (1) CN111629297B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468924A (en) * 2020-12-01 2021-03-09 南京紫牛软件科技有限公司 Earphone noise reduction method and device
CN113179475B (en) * 2021-04-02 2022-03-25 歌尔股份有限公司 Earphone wearing state detection method and device, earphone and medium
CN113132885B (en) * 2021-04-16 2022-10-04 深圳木芯科技有限公司 Method for judging wearing state of earphone based on energy difference of double microphones
CN113473286A (en) * 2021-06-23 2021-10-01 芯海科技(深圳)股份有限公司 State detection method, earphone and computer readable storage medium
CN113766411A (en) * 2021-09-28 2021-12-07 安徽华米信息科技有限公司 Earphone state detection method, earphone and storage medium
CN114157975A (en) * 2021-12-01 2022-03-08 思必驰科技股份有限公司 Earphone wearing detection method and device
CN117319870B (en) * 2023-11-09 2024-05-17 深圳市通力科技开发有限公司 Earphone wearing state detection method and device, earphone and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109195045A (en) * 2018-08-16 2019-01-11 歌尔科技有限公司 The method, apparatus and earphone of test earphone wearing state
CN110324751A (en) * 2019-07-30 2019-10-11 潍坊歌尔电子有限公司 Pleasant structural recognition method, sound quality adjusting method and the earphone of earphone
CN110326305A (en) * 2017-02-24 2019-10-11 伯斯有限公司 In-Ear Headphones are detected from head
CN110839190A (en) * 2019-11-15 2020-02-25 歌尔股份有限公司 Earphone wearing detection method and device, earphone and readable storage medium
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
CN110326305A (en) * 2017-02-24 2019-10-11 伯斯有限公司 In-Ear Headphones are detected from head
CN109195045A (en) * 2018-08-16 2019-01-11 歌尔科技有限公司 The method, apparatus and earphone of test earphone wearing state
CN110896509A (en) * 2018-09-13 2020-03-20 北京三星通信技术研究有限公司 Earphone wearing state determining method, electronic equipment control method and electronic equipment
CN110324751A (en) * 2019-07-30 2019-10-11 潍坊歌尔电子有限公司 Pleasant structural recognition method, sound quality adjusting method and the earphone of earphone
CN110839190A (en) * 2019-11-15 2020-02-25 歌尔股份有限公司 Earphone wearing detection method and device, earphone and readable storage medium

Also Published As

Publication number Publication date
CN111629297A (en) 2020-09-04

Similar Documents

Publication Publication Date Title
CN111629297B (en) Earphone wearing state detection method and device, earphone and storage medium
EP3688998B1 (en) On/off head detection using capacitive sensing
JP6096993B1 (en) Earphone sound effect compensation method, apparatus, and earphone
EP1947904B1 (en) Sound outputting apparatus, sound outputting method, sound outputting system and sound output processing program
JP5396685B2 (en) Audio output device, audio output method, audio output system, and audio output processing program
EP2487930B1 (en) Sound signal output apparatus and sound signal output method
CN102293012B (en) The equipment detected for the tympanophonia of earphone and method
CN104978980B (en) A kind of method for controlling sound to play and sound playing system
EP3459266A1 (en) On/off head detection of personal acoustic device
CN101997498A (en) Volume adjusting method and device
JP2012169828A (en) Sound signal output apparatus, speaker apparatus, sound signal output method
CN113826157B (en) Audio system and signal processing method for ear-mounted playing device
WO2021103260A1 (en) Control method for headphones and headphones
CN111294719A (en) Method and device for detecting in-ear state of ear-wearing type device and mobile terminal
CN117319870B (en) Earphone wearing state detection method and device, earphone and storage medium
CN117440282A (en) Earphone wearing state detection method and device, earphone and storage medium
CN110324742B (en) Control method, earphone and storage medium
CN114567849B (en) Detection method and device, wireless earphone and storage medium
KR20110103213A (en) Mobile audio epuipment preventing hearing loss and control mehtod thereof
CN114095835A (en) Method and device for controlling transparent mode of earphone, earphone equipment and storage medium
CN117499830B (en) Earphone wearing state detection method and device, earphone and storage medium
CN109246513A (en) A kind of active noise reduction earphone and its noise-reduction method, device
CN117896648A (en) Earphone wearing state detection method and device, earphone and storage medium
US20240257795A1 (en) Noise reduction parameter setting method and apparatus, earphone device and storage medium
CN117579970A (en) Earphone wearing state detection method, device, equipment and storage medium

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