CN112752186A - Earphone wearing state detection method and device and earphone - Google Patents

Earphone wearing state detection method and device and earphone Download PDF

Info

Publication number
CN112752186A
CN112752186A CN202110106411.9A CN202110106411A CN112752186A CN 112752186 A CN112752186 A CN 112752186A CN 202110106411 A CN202110106411 A CN 202110106411A CN 112752186 A CN112752186 A CN 112752186A
Authority
CN
China
Prior art keywords
wearing state
earphone
state
noise signal
current
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.)
Pending
Application number
CN202110106411.9A
Other languages
Chinese (zh)
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 CN202110106411.9A priority Critical patent/CN112752186A/en
Publication of CN112752186A publication Critical patent/CN112752186A/en
Pending legal-status Critical Current

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/1041Mechanical or electronic switches, or control elements
    • 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

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)
  • Soundproofing, Sound Blocking, And Sound Damping (AREA)

Abstract

The embodiment of the disclosure discloses a method and a device for detecting the wearing state of an earphone and the earphone, wherein the method for detecting the wearing state of the earphone comprises the following steps: according to a first noise signal picked up by a feedforward microphone and a second noise signal picked up by a feedback microphone of the earphone, determining one wearing state as the current wearing state of the earphone in at least two preset wearing states, wherein the at least two wearing states comprise an in-ear state and an out-ear state; acquiring the last wearing state of the earphone; and outputting a control signal corresponding to the current wearing state when the current wearing state is inconsistent with the last wearing state.

Description

Earphone wearing state detection method and device and earphone
Technical Field
The embodiment of the disclosure relates to the technical field of earphones, in particular to a method and a device for detecting wearing states of earphones and the earphones.
Background
At present, earphones are one of electronic devices frequently used by people in daily life, such as using earphones to listen to music, or using earphones to listen to a call.
In the prior art, the wearing state of the headset is usually determined by the proximity degree of the infrared sensor and other objects, so as to avoid the problem that the power consumption of the headset is caused by forgetting to turn off the audio program when a user takes off the headset. However, the infrared sensor cannot distinguish whether an object close to the infrared sensor is an ear canal or other objects, which may cause the infrared sensor to mistakenly identify the state of the earphone as a wearing state, and output a control signal to turn on the earphone, resulting in the earphone being turned on in a non-wearing state, consuming the electric quantity of the earphone, and increasing power consumption. In addition, in this way, structures such as a sensor need to be added in the earphone, which occupies the space in the earphone and cannot meet the requirement of the user on the portability of the earphone.
Therefore, it is necessary to provide a new method for detecting the wearing state of the earphone, so as to reduce the false triggering rate and improve the user experience.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a new technical solution for detecting a wearing state of an earphone, so as to reduce a false trigger rate and improve user experience.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for detecting a wearing state of a headset, the method including:
according to a first noise signal picked up by a feedforward microphone and a second noise signal picked up by a feedback microphone of the earphone, determining one wearing state as the current wearing state of the earphone in at least two preset wearing states, wherein the at least two wearing states comprise an in-ear state and an out-ear state;
acquiring the last wearing state of the earphone;
and outputting a control signal corresponding to the current wearing state when the current wearing state is inconsistent with the last wearing state.
Optionally, the method further comprises:
determining the next wearing state of the earphone under the condition that the current wearing state is inconsistent with the last wearing state;
and outputting a control signal corresponding to the current wearing state when the next wearing state is consistent with the current wearing state.
Optionally, the method further comprises:
determining the next wearing state of the earphone under the condition that the current wearing state is inconsistent with the last wearing state;
and if the frequency of the continuous occurrence of the condition that the next wearing state is consistent with the current wearing state reaches a preset frequency threshold value, outputting a control signal corresponding to the current wearing state.
Optionally, the outputting a control signal corresponding to the current wearing state includes:
outputting a first control signal under the condition that the in-ear state is determined to be the current wearing state of the earphone;
and outputting a second control signal under the condition that the ear state is determined to be the current wearing state of the earphone.
Optionally, a first control instruction is generated according to the first control signal, and the earphone is controlled to continue playing audio according to the first control instruction;
and generating a second control instruction according to the second control signal, and controlling the earphone to stop playing audio according to the second control instruction.
Optionally, the determining, according to a first noise signal picked up by a feedforward microphone and a second noise signal picked up by a feedback microphone of the headset, one wearing state as a current wearing state of the headset in at least two preset wearing states includes:
acquiring a first noise signal picked up by a feedforward microphone of the headset;
acquiring a second noise signal picked up by a feedback microphone of the headset;
filtering an audio signal in the second noise signal to obtain a processed second noise signal;
and determining one wearing state as the current wearing state of the earphone in at least two preset wearing states according to the signal intensity difference between the first noise signal and the processed second noise signal, wherein the at least two wearing states comprise an in-ear state and an out-ear state.
Optionally, the determining, according to a signal strength difference between the first noise signal and the processed second noise signal, one wearing state as a current wearing state of the earphone in at least two preset wearing states includes:
comparing the signal intensity difference value with a preset intensity threshold value;
determining that the in-ear state is the current wearing state of the earphone under the condition that the signal intensity difference is larger than or equal to a preset intensity threshold;
and under the condition that the signal intensity difference is smaller than a preset intensity threshold value, determining that the ear state is the current wearing state of the earphone.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for detecting a wearing state of a headphone, including:
the earphone comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining one wearing state as the current wearing state of the earphone in at least two preset wearing states according to a first noise signal picked up by a feedforward microphone and a second noise signal picked up by a feedback microphone of the earphone, and the at least two wearing states comprise an in-ear state and an out-ear state;
the acquisition module is used for acquiring the last wearing state of the earphone;
and the processing module is used for outputting a control signal corresponding to the current wearing state under the condition that the current wearing state is inconsistent with the last wearing state.
According to a third aspect of the embodiments of the present disclosure, there is provided a headset comprising a processor and a memory, the memory storing computer instructions, which when executed by the processor, perform the method provided by the first aspect of the embodiments of the present disclosure.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, perform the method provided by the first aspect of the embodiments of the present disclosure.
According to the embodiment of the disclosure, the current wearing state of the earphone is determined according to the first noise signal picked up by the feedforward microphone and the noise signal output by the feedback microphone, so that the judgment accuracy can be improved, and the false triggering rate can be reduced. Furthermore, the current wearing state and the last wearing state are compared, so that the corresponding control signal is output under the condition that the current wearing state is inconsistent with the last wearing state, the situation that the earphone is controlled repeatedly to execute corresponding operation is avoided, and the user experience is improved. In addition, the present embodiment of the disclosure identifies the current wearing state of the headset based on the original feedforward microphone and feedback microphone in the headset, and does not need to add components such as a sensor, which can save space, reduce hardware cost, and is beneficial to reducing the overall size of the electronic device and improving the portability of the electronic device.
Other features of, and advantages with, the disclosed embodiments will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the embodiments will be briefly described below. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope. For a person skilled in the art, it is possible to derive other relevant figures from these figures without inventive effort.
FIG. 1 illustrates an application scenario diagram according to one embodiment;
fig. 2 is a schematic hardware configuration diagram of a headphone that can be used to implement the detection method of the wearing state of the headphone of one embodiment;
fig. 3 is a flow chart diagram of a method of detecting a wearing state of a headset according to an embodiment;
FIG. 4 is a spectral diagram of a noise signal of a headset wearing state according to one embodiment;
FIG. 5 is a spectral diagram of a noise signal of a headset wearing state according to one embodiment;
fig. 6 is a flowchart illustrating a method of detecting a wearing state of an earphone according to an example;
fig. 7 is a block diagram showing the configuration of a device for detecting wearing state of a headphone according to an embodiment;
fig. 8 is a block diagram of the structure of a headset according to an embodiment.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of parts and steps, numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the embodiments of the present disclosure unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
In the process of using the earphone, the wearing state of the earphone can be detected, so that the earphone is controlled to work according to the wearing state of the earphone, and the power consumption of the earphone is reduced.
In an embodiment, set up infrared sensor or capacitive sensor in the earphone, acquire the signal of telecommunication of infrared sensor or capacitive sensor output, judge whether the earphone is sheltered from according to the signal of telecommunication to confirm the wearing state of earphone, this kind of mode has placed other article or the user around the earphone and has taken under the condition of earphone, the problem of false triggering appears in the earphone easily.
In order to solve the problem, the embodiment of the present disclosure provides a technical scheme for determining a wearing state of an earphone according to noise signals picked up by a feedforward microphone and a feedback microphone of the earphone, so as to avoid the occurrence of false triggering of the earphone.
Fig. 1 illustrates one application scenario of an embodiment of the present disclosure. In the application scenario, a feed-forward microphone (FF MIC) of the headset is arranged on the outer side of the headset, and a feedback microphone (FB MIC) is arranged on the inner side of the headset. When the earphone is in an in-ear state, a noise signal picked up by a feedforward microphone of the earphone is an environmental noise signal, and a noise signal picked up by a feedback microphone of the earphone is a noise signal subjected to isolation and noise reduction by the earphone, that is, the noise signals received by the feedforward microphone and the feedback microphone are obviously different. When the earphone is in an ear-out state, the noise signal picked up by the feedforward microphone of the earphone is an ambient noise signal, and the noise signal picked up by the feedback microphone of the earphone is also an ambient noise signal, that is, the noise signals received by the feedforward microphone and the feedback microphone are basically the same. Therefore, the wearing state of the earphone can be judged according to the noise signals received by the feedforward microphone and the feedback microphone, the judgment accuracy can be improved, and the problem that the earphone is triggered by mistake is avoided.
< hardware configuration >
Fig. 2 is a schematic diagram of a hardware configuration of a headphone that can be used to implement the detection method of a wearing state of the headphone of one embodiment.
In one embodiment, the headset 2000 may be as shown in fig. 2, including a processor 2100, a memory 2200, an interface device 2300, a communication device 2400, a microphone 2500, a speaker 2600, and a sensor 2700. The processor 2100 may include, but is not limited to, a central processing unit CPU, a microprocessor MCU, and the like. The memory 2200 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface device 2300 includes, for example, various bus interfaces, such as a serial bus interface (including a USB interface), a parallel bus interface, and the like. Communication device 2400 is capable of wired or wireless communication, for example. The microphone 2500 may be used to input voice information, and the microphone 2500 may include, for example, a feed-forward microphone (FF MIC) and a feedback microphone (FB MIC). Speaker 2600 may be used to output voice information. Sensor 2700 can be, for example, a distance sensor, a proximity light sensor, an ambient light sensor, a touch sensor, a temperature sensor, and the like.
In one embodiment, the headset 2000 may be an ANC (Active Noise Cancellation) headset, for example.
In this embodiment, the memory 2200 of the headset 2000 is configured to store instructions for controlling the processor 2100 to operate to implement or support the implementation of a method of detecting a wearing state of a headset according to any embodiment. The skilled person can design the instructions according to the solution disclosed in the present specification. How the instructions control the operation of the processor is well known in the art and will not be described in detail herein.
The headset 2000 illustrated in fig. 2 is merely illustrative and is in no way intended to limit the present description, its application, or uses.
< method examples >
Fig. 3 illustrates a method of detecting a wearing state of a headset according to an embodiment of the present disclosure, which may be implemented by, for example, the headset 2000 illustrated in fig. 2.
The method for detecting the wearing state of the headset provided by the embodiment may include the following steps S3100 to S3300.
Step S3100, determining one wearing state as a current wearing state of the headset in at least two preset wearing states according to a first noise signal picked up by a feedforward microphone and a second noise signal picked up by a feedback microphone of the headset.
In the present embodiment, the at least two wearing states include an in-ear state and an out-ear state. Referring to fig. 1, a feed-forward microphone (FF MIC) of the earphone is disposed at an outer side of the earphone, and a feedback microphone (FB MIC) is disposed at an inner side of the earphone. When the earphone is in an in-ear state, a first noise signal picked up by a feedforward microphone of the earphone is obviously different from a second noise signal picked up by a feedback microphone. When the earphone is in the non-ear state, the first noise signal picked up by the feedforward microphone of the earphone is basically consistent with the second noise signal picked up by the feedback microphone. The wearing state of the earphone can be judged according to the first noise signal picked by the feedforward microphone and the second noise signal picked by the feedback microphone, the judgment accuracy can be improved, and the problem that the earphone is triggered by mistake is avoided.
It can be understood that the embodiments of the present disclosure may acquire the first noise signal and the processed second noise signal at each detection time, so as to detect the wearing state of the headset at each detection time. For example, the current wearing state of the earphone is determined according to the first noise signal at the current moment and the processed second noise signal. And determining the next wearing state of the earphone according to the first noise signal at the next moment and the processed second noise signal.
In one embodiment of the present disclosure, the performing of step S3100 may further include: steps S3110 to S3140.
In step S3110, a first noise signal picked up by a feedforward microphone of the headset is acquired.
In step S3120, a second noise signal picked up by a feedback microphone of the headset is acquired.
In this embodiment, at a preset sampling frequency, a first noise signal picked up by a feedforward microphone of the headset and a second noise signal picked up by a feedback microphone of the headset at each detection time are obtained. The first noise signal picked up by the feedforward microphone is an environment noise signal, and the second noise signal picked up by the feedback microphone comprises a noise signal between the earphone and the human ear and an audio signal emitted by a loudspeaker (SPK) of the earphone. That is, the first noise signal and the second noise signal at the respective detection timings can be acquired, thereby detecting the wearing state of the headphone at the respective detection timings.
It is understood that the sampling frequency refers to a frequency at which a noise signal is picked up, that is, the noise signal picked up by the microphone is acquired once every certain time. The sampling frequency may be preset, for example, acquired every 0.1 second, or acquired every 0.5 second, and the like, and the size of the sampling frequency is not specifically limited in the embodiment of the present disclosure. When the active noise reduction function of the earphone is not turned on, a lower sampling frequency can be selected, the sampling frequency is usually determined by the sampling frequency of the system, and in order to ensure that the sampled signal is not distorted, the sampling frequency of the microphone conforms to the nyquist criterion, for example, the sampling frequency of the system is 8kHz, and the sampling frequency of the microphone can not be lower than 4kHz at the lowest, so as to reduce the power consumption of the earphone.
In this embodiment, for different models of earphones, the first noise signal picked up by the feedforward microphone and the second noise signal picked up by the feedback microphone have a significant difference in different frequency bands. Based on this, the first noise signal picked up by the feedforward microphone may be the first noise signal at the preset frequency band picked up by the feedforward microphone. The second noise signal picked up by the acquisition feedback microphone may be a second noise signal at a preset frequency band picked up by the acquisition feedback microphone. The preset frequency band can be set according to a simulation test result. For example, referring to fig. 4, when the earphone is in the in-ear state, the difference between the first noise signal picked up by the feedforward microphone and the second noise signal picked up by the feedback microphone is large at a high frequency band. Referring to fig. 5, when the earphone is in the out-of-ear state, the difference between the first noise signal picked up by the feedforward microphone and the second noise signal picked up by the feedback microphone is small in the high frequency range, and the noise signal of 1kHz to 3kHz may be selected for analysis.
Step S3130, filtering the audio signal in the second noise signal to obtain a processed second noise signal.
Since the second noise signal picked up by the feedback microphone includes the noise signal from the earphone to the human ear and the audio signal emitted by the Speaker (SPK) of the earphone when the earphone plays the audio signal, the embodiment of the present disclosure needs to filter the audio signal in the second noise signal picked up by the feedback microphone in order to determine the current wearing state of the earphone by comparing the first noise signal picked up by the feedforward microphone with the second noise signal picked up by the feedback microphone. In specific implementation, the echo cancellation module filters the audio signal in the second noise signal to obtain a processed second noise signal. Further, the current wearing state of the earphone can be determined according to the first noise signal and the processed second noise signal.
Step S3140, according to the signal intensity difference between the first noise signal and the processed second noise signal, in at least two preset wearing states, determining one wearing state as the current wearing state of the earphone.
When the earphone is in an in-ear state, the first noise signal and the processed second noise signal have obvious difference. Based on the above, the wearing state of the earphone can be determined according to the signal strength difference value between the first noise signal and the processed second noise signal.
In a more specific example, the performing of step S3140 may further include: steps S3141 to S3143.
Step S3141, the signal intensity difference value is compared with a preset intensity threshold value.
Step S3142, determining the in-ear state as the current wearing state of the earphone when the signal intensity difference is greater than or equal to the preset intensity threshold.
Step S3143, under the condition that the signal intensity difference is smaller than the preset intensity threshold, the ear state is determined to be the current wearing state of the earphone.
In this embodiment, when the signal strength difference is greater than or equal to the preset strength threshold, it indicates that the strength of the first noise signal picked up by the feedforward microphone is much greater than the strength of the processed second noise signal obtained by the feedback microphone, and at this time, the earphone may be considered to be in an in-ear state. When the signal intensity difference is smaller than the preset intensity threshold, it indicates that the intensity of the first noise signal picked up by the feedforward microphone is very close to the intensity of the processed second noise signal obtained by the feedback microphone, and at this time, the earphone can be considered to be in an ear-out state. The preset intensity threshold may be different for different models of headphones. The intensity threshold may be set according to simulation test results.
Step S3200, acquiring a last wearing state of the earphone.
In this embodiment, different wearing states of the headset may be represented by different values, and after determining the current wearing state of the headset, the value corresponding to the wearing state may be stored to facilitate obtaining the last wearing state of the headset. For example, "1" indicates an in-ear state, and "0" indicates an ear state.
During specific implementation, a value corresponding to the last wearing state of the earphone is read, and the last wearing state of the earphone is determined according to the value corresponding to the last wearing state of the earphone. For example, if the read value corresponding to the last wearing state of the earphone is "1", it is determined that the last wearing state of the earphone is an in-ear state, and if the read value corresponding to the last wearing state of the earphone is "0", it is determined that the last wearing state of the earphone is an out-of-ear state.
And a step S3300 of outputting a control signal corresponding to the current wearing state when the current wearing state is inconsistent with the last wearing state.
And under the condition that the current wearing state is inconsistent with the last wearing state, the wearing state of the earphone is changed, and at the moment, a control signal for the current wearing state is output to control the earphone to perform corresponding operation, such as stopping playing the audio or continuing playing the audio.
And under the condition that the current wearing state is consistent with the last wearing state, the wearing state of the earphone is not changed, and the next wearing state of the earphone is continuously detected.
For example, if the signal intensity difference at the current detection time is greater than the preset intensity threshold, it is determined that the current wearing state of the headset is an in-ear state, a value "1" corresponding to the current wearing state is stored, if the read value corresponding to the last wearing state of the headset is "1", that is, the current wearing state is consistent with the last wearing state, and if the read value corresponding to the last wearing state of the headset is "0", that is, the current wearing state is inconsistent with the last wearing state. According to the embodiment of the disclosure, the current wearing state of the earphone is determined according to the first noise signal picked up by the feedforward microphone and the noise signal output by the feedback microphone, so that the judgment accuracy can be improved, and the false triggering rate can be reduced. Furthermore, the current wearing state and the last wearing state are compared, so that the corresponding control signal is output under the condition that the current wearing state is inconsistent with the last wearing state, the situation that the earphone is controlled repeatedly to execute corresponding operation is avoided, and the user experience is improved.
In addition, the present embodiment of the disclosure identifies the current wearing state of the headset based on the original feedforward microphone and feedback microphone in the headset, and does not need to add components such as a sensor, which can save space, reduce hardware cost, and is beneficial to reducing the overall size of the electronic device and improving the portability of the electronic device.
In order to further improve the accuracy of detection and reduce the false triggering rate, in an embodiment of the present disclosure, the method for detecting the wearing state of the headset may further include: steps S4100-S4200.
Step S4100 determines the next wearing state of the headphone when the current wearing state does not match the previous wearing state.
In this embodiment, the next wearing state of the headphone may be determined based on the first noise signal picked up by the feedforward microphone and the second noise signal picked up by the feedback microphone at the next detection timing. In specific implementation, the in-ear state is determined as the next wearing state of the earphone when the signal intensity difference is greater than or equal to the preset intensity threshold, and the ear state is determined as the next wearing state of the earphone when the signal intensity difference is less than the preset intensity threshold.
In step S4200, when the next wearing state coincides with the current wearing state, a control signal corresponding to the current wearing state is output.
And under the condition that the next wearing state is consistent with the current wearing state, the earphone is stable in the current wearing state, and at the moment, a control signal for the current wearing state is output to control the earphone to perform corresponding operation, such as stopping playing the audio or continuing playing the audio. Under the condition that the next wearing state is inconsistent with the current wearing state, it is described that the wearing state of the earphone may be changed due to external interference, and at this time, the control signal corresponding to the current wearing state is not output, so that the influence on user experience caused by repeatedly controlling the earphone to execute corresponding operations is avoided.
For example, if the signal intensity difference at the current detection time is greater than the preset intensity threshold, it is determined that the current wearing state of the headset is an in-ear state, a value "1" corresponding to the current wearing state is stored, and a value corresponding to the last wearing state of the headset is read as "0", that is, the current wearing state is inconsistent with the last wearing state. Further, if the signal intensity difference value at the next detection moment is greater than a preset intensity threshold value, determining that the next wearing state of the earphone is still in an in-ear state, and outputting a control signal corresponding to the in-ear state; and if the signal intensity difference value at the next detection moment is smaller than the preset intensity threshold value, determining that the next wearing state of the earphone is in an ear-out state, and continuing to perform the next detection at the moment.
According to the embodiment of the disclosure, under the condition that the current wearing state is inconsistent with the previous wearing state, the current wearing state and the next wearing state of the earphone are compared, and under the condition that the next wearing state is consistent with the current wearing state, the control signal corresponding to the current wearing state is output, so that the accuracy of judgment can be improved, the earphone is prevented from being controlled repeatedly to execute corresponding operations, and the user experience is improved.
In order to further improve the accuracy of the judgment and avoid repeatedly controlling the earphone to execute corresponding operations, for example, switching back and forth between continuously playing the audio and stopping playing the audio, under the condition that the current wearing state is inconsistent with the previous wearing state, further continuously determining the next wearing state of the earphone for multiple times, and determining whether to output a control signal corresponding to the current wearing state according to the continuously detected next wearing state, so that the accuracy of the judgment can be improved, misoperation caused by external interference is avoided, and user experience is improved.
In an embodiment of the present disclosure, the method for detecting the wearing state of the headset may further include: and S5100-S5200.
In step S5100, when the current wearing state is inconsistent with the previous wearing state, the next wearing state of the headset is determined.
In step S5200, if the number of times of continuous occurrence of the situation in which the next wearing state is consistent with the current wearing state reaches a preset number-of-times threshold, a control signal corresponding to the current wearing state is output.
If the number of times of the situation that the next wearing state is consistent with the current wearing state reaches the preset number threshold, it can be understood that the number of times of the same wearing state reaches the preset threshold, that is, the wearing state of the earphone does not change within a certain time.
The preset time threshold can be set by those skilled in the art according to actual needs. For example, the preset number of times is 3, which is not limited in the embodiment of the present disclosure.
For example, it is determined that the current wearing state of the headset is an in-ear state, and the read value corresponding to the last wearing state of the headset is "0", that is, the current wearing state is inconsistent with the last wearing state. Further, the next wearing state for a plurality of times is continuously detected, and if the next wearing state for a plurality of times is the in-ear state, the control signal corresponding to the in-ear state is output.
According to the embodiment of the disclosure, under the condition that the current wearing state is inconsistent with the previous wearing state, the next wearing state of the earphone is continuously determined for a plurality of times, if the number of times of continuously appearing the same wearing state reaches the preset threshold value, the control signal corresponding to the current wearing state is output, the accuracy of judgment can be improved, misoperation caused by external interference is avoided, and user experience is improved.
In an embodiment of the present disclosure, the method for detecting the wearing state of the headset may further include: steps S6100 to S6200.
In step S6100, when it is determined that the in-ear state is the current wearing state of the earphone, a first control signal is output.
And S6200, outputting a second control signal under the condition that the ear state is determined to be the current wearing state of the earphone.
For example, in the case that the in-ear state is determined to be the current wearing state of the headset, a high level signal is output, and in the case that the in-ear state is determined to be the current wearing state of the headset, a low level signal is output, so that the headset performs a corresponding operation according to the output control signal.
In an embodiment of the present disclosure, the method for detecting the wearing state of the headset may further include: steps S7100-S7200.
And S7100, generating a first control instruction according to the first control signal, and controlling the earphone to continue playing the audio according to the first control instruction.
And step S7200, generating a second control instruction according to the second control signal, and controlling the earphone to stop playing the audio according to the second control instruction.
According to the embodiment of the disclosure, the earphone generates a corresponding first control instruction according to the output first control signal, and controls the earphone to continue playing the audio according to the first control instruction, so that the audio playing can be automatically recovered when a user wears the earphone, manual operation of the user is not required, and the earphone is convenient for the user to use. The earphone generates a corresponding second control instruction according to the output second control signal, and controls the earphone to stop playing the audio or to enter a sleep mode according to the second control instruction, so that the audio can be stopped playing when a user takes off the earphone but forgets to pause the playing, the power consumption is reduced, and the service life of the earphone is prolonged.
The following describes a method for detecting the wearing state of the headphone by using a specific example. Referring to fig. 6, the method for detecting the wearing state of the headset includes the following steps.
In step S601, a first noise signal picked up by a feedforward microphone of the headphone is acquired.
Step S602, obtaining a second noise signal picked up by a feedback microphone of the earphone, and filtering an audio signal in the second noise signal to obtain a processed second noise signal.
In step S603, a signal strength difference between the first noise signal and the processed second noise signal is determined.
Step S604, determining whether the signal strength difference is greater than or equal to a preset strength threshold, if so, performing step S605, otherwise, performing step S608.
Step S605, determining whether the last wearing state of the earphone is in-ear state, if yes, returning to step S601, otherwise, executing step S606.
Step S606, determining whether the number of times of the in-ear state continuously occurring reaches a preset number threshold, if so, executing step S607, otherwise, returning to step S601.
In step S607, the first control signal is output.
Step S608, determining whether the last wearing state of the earphone is in an out-of-ear state, if so, returning to step S601, otherwise, executing step S609.
And step S609, judging whether the frequency of the continuous appearance of the ear state reaches a preset frequency threshold value, if so, executing step S610, otherwise, returning to step S601.
Step S610, outputting a second control signal.
According to the example, the current wearing state of the earphone is determined through the first noise signal picked up by the feedforward microphone and the noise signal output by the feedback microphone, so that the judgment accuracy can be improved, and the false triggering rate can be reduced.
< apparatus embodiment >
Referring to fig. 7, the embodiment of the present disclosure provides a device 700 for detecting a wearing state of a headset, where the device 700 for detecting a wearing state of a headset includes a determining module 710, an obtaining module 720, and a processing module 730.
The determining module 710 is configured to determine, according to a first noise signal picked up by a feedforward microphone and a second noise signal picked up by a feedback microphone of the headset, one wearing state as a current wearing state of the headset in at least two preset wearing states, where the at least two wearing states include an in-ear state and an out-ear state.
In one embodiment, the determination module 710 includes a first acquisition unit, a second acquisition unit, an echo cancellation unit, and a determination unit.
The first acquisition unit is used for acquiring a first noise signal picked up by a feed-forward microphone of the earphone.
The second acquisition unit is used for acquiring a second noise signal picked up by a feedback microphone of the earphone.
The echo cancellation unit is used for filtering the audio signal in the second noise signal to obtain a processed second noise signal.
The determining unit is configured to determine, according to a signal strength difference between the first noise signal and the processed second noise signal, one wearing state as a current wearing state of the earphone in at least two preset wearing states, where the at least two wearing states include an in-ear state and an out-of-ear state.
In a specific example, the determining unit is specifically configured to compare the signal strength difference value with a preset strength threshold.
The determining unit is further specifically configured to determine that the in-ear state is the current wearing state of the earphone when the signal strength difference is greater than or equal to a preset strength threshold.
The determining unit is further specifically configured to determine that the ear state is the current wearing state of the earphone when the signal strength difference is smaller than a preset strength threshold.
The obtaining module 720 is configured to obtain a last wearing status of the headset.
The processing module 730 is configured to output a control signal corresponding to the current wearing state when the current wearing state is inconsistent with the previous wearing state.
In one embodiment, the determining module 710 is further configured to determine a next wearing state of the headset if the current wearing state is inconsistent with the previous wearing state.
The processing module 730 is further configured to output a control signal corresponding to the current wearing state when the next wearing state is consistent with the current wearing state.
In one embodiment, the determining module 710 is further configured to determine a next wearing state of the headset if the current wearing state is inconsistent with the previous wearing state.
The processing module 730 is further configured to output a control signal corresponding to the current wearing state if the number of times of continuous occurrence of the situation that the next wearing state is consistent with the current wearing state reaches a preset number threshold.
In one embodiment, outputting a control signal corresponding to the current wearing state includes:
outputting a first control signal under the condition that the in-ear state is determined to be the current wearing state of the earphone;
and outputting a second control signal under the condition that the ear state is determined to be the current wearing state of the earphone.
In an embodiment, the processing module 730 is further configured to generate a first control instruction according to the first control signal, and control the earphone to continue playing audio according to the first control instruction.
In one embodiment, the processing module 730 generates a second control instruction according to the second control signal, and controls the earphone to stop playing audio according to the second control instruction.
According to the detection device for the wearing state of the earphone, provided by the embodiment of the disclosure, the current wearing state of the earphone is determined according to the first noise signal picked up by the feedforward microphone and the noise signal output by the feedback microphone, so that the judgment accuracy can be improved, and the false triggering rate can be reduced. Furthermore, the current wearing state and the last wearing state are compared, so that the corresponding control signal is output under the condition that the current wearing state is inconsistent with the last wearing state, the situation that the earphone is controlled repeatedly to execute corresponding operation is avoided, and the user experience is improved.
< earphone embodiment >
Referring to fig. 8, an embodiment of the present disclosure further provides an earphone 800. The headset 800 may be, for example, the headset 1000 shown in fig. 2.
The headset 800 includes a processor 810 and a memory 820.
The memory 820 is used to store executable computer programs.
The processor 810 is configured to execute the method for detecting the wearing state of the headset according to any one of the preceding method embodiments, according to the control of the executable computer program.
In one embodiment, the headset 800 includes a feed-forward microphone and a feedback microphone. The earphone 800 may be, for example, an ANC (Active Noise Cancellation) earphone.
According to the earphone provided by the embodiment of the disclosure, the current wearing state of the earphone is determined according to the first noise signal picked up by the feedforward microphone and the noise signal output by the feedback microphone, so that the judgment accuracy can be improved, and the false triggering rate can be reduced. Furthermore, the current wearing state and the last wearing state are compared, so that the corresponding control signal is output under the condition that the current wearing state is inconsistent with the last wearing state, the situation that the earphone is controlled repeatedly to execute corresponding operation is avoided, and the user experience is improved.
< computer-readable storage Medium >
The embodiment of the present disclosure also provides a computer-readable storage medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the method for detecting the wearing state of the headset provided by the embodiment of the present disclosure is performed.
The disclosed embodiments may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement aspects of embodiments of the disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations for embodiments of the present disclosure may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the disclosed embodiments by personalizing the custom electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of the computer-readable program instructions.
Various aspects of embodiments of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the embodiments of the present disclosure is defined by the appended claims.

Claims (10)

1. A method for detecting a wearing state of an earphone, the method comprising:
according to a first noise signal picked up by a feedforward microphone and a second noise signal picked up by a feedback microphone of the earphone, determining one wearing state as the current wearing state of the earphone in at least two preset wearing states, wherein the at least two wearing states comprise an in-ear state and an out-ear state;
acquiring the last wearing state of the earphone;
and outputting a control signal corresponding to the current wearing state when the current wearing state is inconsistent with the last wearing state.
2. The method of claim 1, further comprising:
determining the next wearing state of the earphone under the condition that the current wearing state is inconsistent with the last wearing state;
and outputting a control signal corresponding to the current wearing state when the next wearing state is consistent with the current wearing state.
3. The method of claim 1, further comprising:
determining the next wearing state of the earphone under the condition that the current wearing state is inconsistent with the last wearing state;
and if the frequency of the continuous occurrence of the condition that the next wearing state is consistent with the current wearing state reaches a preset frequency threshold value, outputting a control signal corresponding to the current wearing state.
4. The method according to any one of claims 1 to 3, wherein the outputting a control signal corresponding to the current wearing state includes:
outputting a first control signal under the condition that the in-ear state is determined to be the current wearing state of the earphone;
and outputting a second control signal under the condition that the ear state is determined to be the current wearing state of the earphone.
5. The method of claim 4, further comprising:
generating a first control instruction according to the first control signal, and controlling the earphone to continue playing audio according to the first control instruction;
and generating a second control instruction according to the second control signal, and controlling the earphone to stop playing audio according to the second control instruction.
6. The method of claim 1, wherein the determining one wearing state as the current wearing state of the headset according to the first noise signal picked up by a feedforward microphone and the second noise signal picked up by a feedback microphone of the headset in at least two wearing states comprises:
acquiring a first noise signal picked up by a feedforward microphone of the headset;
acquiring a second noise signal picked up by a feedback microphone of the headset;
filtering an audio signal in the second noise signal to obtain a processed second noise signal;
and determining one wearing state as the current wearing state of the earphone in at least two preset wearing states according to the signal intensity difference between the first noise signal and the processed second noise signal, wherein the at least two wearing states comprise an in-ear state and an out-ear state.
7. The method according to claim 6, wherein the determining, according to the signal strength difference between the first noise signal and the processed second noise signal, one wearing state as the current wearing state of the headset in at least two wearing states includes:
comparing the signal intensity difference value with a preset intensity threshold value;
determining that the in-ear state is the current wearing state of the earphone under the condition that the signal intensity difference is larger than or equal to a preset intensity threshold;
and under the condition that the signal intensity difference is smaller than a preset intensity threshold value, determining that the ear state is the current wearing state of the earphone.
8. An apparatus for detecting a wearing state of a headphone, comprising:
the earphone comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining one wearing state as the current wearing state of the earphone in at least two preset wearing states according to a first noise signal picked up by a feedforward microphone and a second noise signal picked up by a feedback microphone of the earphone, and the at least two wearing states comprise an in-ear state and an out-ear state;
the acquisition module is used for acquiring the last wearing state of the earphone;
and the processing module is used for outputting a control signal corresponding to the current wearing state under the condition that the current wearing state is inconsistent with the last wearing state.
9. A headset comprising a processor and a memory, the memory storing computer instructions which, when executed by the processor, perform the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon computer instructions which, when executed by a processor, perform the method of any of claims 1-7.
CN202110106411.9A 2021-01-26 2021-01-26 Earphone wearing state detection method and device and earphone Pending CN112752186A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110106411.9A CN112752186A (en) 2021-01-26 2021-01-26 Earphone wearing state detection method and device and earphone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110106411.9A CN112752186A (en) 2021-01-26 2021-01-26 Earphone wearing state detection method and device and earphone

Publications (1)

Publication Number Publication Date
CN112752186A true CN112752186A (en) 2021-05-04

Family

ID=75653133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110106411.9A Pending CN112752186A (en) 2021-01-26 2021-01-26 Earphone wearing state detection method and device and earphone

Country Status (1)

Country Link
CN (1) CN112752186A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938782A (en) * 2021-09-30 2022-01-14 安克创新科技股份有限公司 Earphone in-ear state recognition and earphone mode self-adaptive adjustment method and earphone
CN114040285A (en) * 2021-09-26 2022-02-11 北京小米移动软件有限公司 Method and device for generating parameters of feedforward filter of earphone, earphone and storage medium
CN114567849A (en) * 2022-02-28 2022-05-31 恒玄科技(上海)股份有限公司 Detection method and device, wireless earphone and storage medium

Citations (4)

* 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
WO2020108059A1 (en) * 2018-11-29 2020-06-04 歌尔科技有限公司 Earphone and worn detection device thereof
CN111294719A (en) * 2020-01-20 2020-06-16 北京声加科技有限公司 Method and device for detecting in-ear state of ear-wearing type device and mobile terminal
CN111787452A (en) * 2020-07-29 2020-10-16 歌尔科技有限公司 TWS earphone, TWS earphone control method, TWS earphone control device and computer readable storage medium

Patent Citations (4)

* 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
WO2020108059A1 (en) * 2018-11-29 2020-06-04 歌尔科技有限公司 Earphone and worn detection device thereof
CN111294719A (en) * 2020-01-20 2020-06-16 北京声加科技有限公司 Method and device for detecting in-ear state of ear-wearing type device and mobile terminal
CN111787452A (en) * 2020-07-29 2020-10-16 歌尔科技有限公司 TWS earphone, TWS earphone control method, TWS earphone control device and computer readable storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040285A (en) * 2021-09-26 2022-02-11 北京小米移动软件有限公司 Method and device for generating parameters of feedforward filter of earphone, earphone and storage medium
CN114040285B (en) * 2021-09-26 2024-02-06 北京小米移动软件有限公司 Method and device for generating feedforward filter parameters of earphone, earphone and storage medium
CN113938782A (en) * 2021-09-30 2022-01-14 安克创新科技股份有限公司 Earphone in-ear state recognition and earphone mode self-adaptive adjustment method and earphone
CN113938782B (en) * 2021-09-30 2023-10-31 安克创新科技股份有限公司 Method for identifying in-ear state of earphone and self-adaptive adjusting mode of earphone and earphone
CN114567849A (en) * 2022-02-28 2022-05-31 恒玄科技(上海)股份有限公司 Detection method and device, wireless earphone and storage medium
CN114567849B (en) * 2022-02-28 2024-01-12 恒玄科技(上海)股份有限公司 Detection method and device, wireless earphone and storage medium

Similar Documents

Publication Publication Date Title
CN112752186A (en) Earphone wearing state detection method and device and earphone
CN112770214B (en) Earphone control method and device and earphone
EP2961195B1 (en) Do-not-disturb system and apparatus
CN106060690B (en) Audio headset with adaptable equipment
CN111148009B (en) Earphone wearing state determining method and device and earphone
CN111149369A (en) On-ear state detection for a headset
JP2017538341A (en) Volume control method, system, device and program
KR20160099640A (en) Systems and methods for feedback detection
CA2771533C (en) Electronic device and audio accessory having a plurality of passive switches for controlling the audio device
CN105120063A (en) Volume prompting method of input voice and electronic device
CN103873988A (en) External device recognition circuit, method, device and system based on headphone jack
CN107147767B (en) In Call control method, device, storage medium and terminal
US20200143788A1 (en) Interference generation
US10681449B2 (en) Earpiece with added ambient environment
WO2012087314A1 (en) Audio control system
KR20200097590A (en) Electronic device and method for detecting block of microphone
US9666041B2 (en) Haptic microphone
CN115038009A (en) Audio control method, wearable device and electronic device
CN103905588A (en) Electronic device and control method
CN108228038B (en) Noise canceling device, noise canceling method, computer-readable storage medium, and electronic apparatus
US20210012787A1 (en) Detection and restoration of distorted signals of blocked microphones
CN110753285A (en) Method, device and equipment for processing sound signal of noise reduction earphone and storage medium
CN114827805A (en) Earphone wearing state detection method and device, earphone and readable storage medium
CN111615036B (en) Data processing method and device and electronic equipment
CN105934931B (en) A kind of terminal installation

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210504