CN113596657A - Earphone in-ear detection method, terminal and computer readable storage medium - Google Patents

Earphone in-ear detection method, terminal and computer readable storage medium Download PDF

Info

Publication number
CN113596657A
CN113596657A CN202110817484.9A CN202110817484A CN113596657A CN 113596657 A CN113596657 A CN 113596657A CN 202110817484 A CN202110817484 A CN 202110817484A CN 113596657 A CN113596657 A CN 113596657A
Authority
CN
China
Prior art keywords
ear
data
detection
earphone
audio
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
CN202110817484.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.)
TCL Technology Electronics Huizhou Co Ltd
Original Assignee
TCL Technology Electronics Huizhou 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 TCL Technology Electronics Huizhou Co Ltd filed Critical TCL Technology Electronics Huizhou Co Ltd
Priority to CN202110817484.9A priority Critical patent/CN113596657A/en
Publication of CN113596657A publication Critical patent/CN113596657A/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
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1091Details not provided for in groups H04R1/1008 - H04R1/1083
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R5/00Stereophonic arrangements
    • H04R5/033Headphones for stereophonic communication

Abstract

The invention discloses an earphone in-ear detection method, a terminal and a computer readable storage medium, wherein the method comprises the following steps: acquiring in-ear detection data, and judging whether the in-ear detection data meets in-ear detection conditions; if the in-ear detection data meets the in-ear detection condition, audio source data is played, and in-ear audio data in the earphone is collected; and comparing the in-ear audio data with the audio source data, and determining the in-ear state of the earphone according to the comparison result. According to the method and the device, the in-ear detection data is acquired, and whether the current state of the earphone is in the in-ear state or not can be accurately judged by comparing the in-ear audio data played in the earphone with the audio source data in the in-ear state under the condition that the in-ear detection data in the earphone meets the in-ear detection condition by using an audio comparison mode, so that the accuracy of the in-ear detection of the earphone is improved.

Description

Earphone in-ear detection method, terminal and computer readable storage medium
Technical Field
The present invention relates to the field of terminal applications, and in particular, to an earphone in-ear detection method, a terminal and a computer-readable storage medium.
Background
In recent years, with the continuous development of the TWS (True Wireless Stereo) headset market and the continuous improvement of technology, the number of users of the TWS headset is continuously increased, and thus the experience requirement of the TWS headset is higher and higher; at present, the TWS headset is mainly in-ear type or semi-in-ear type; for the in-ear detection of TWS, most of the current market uses an optical detection method or a capacitive detection method.
Aiming at the mode of capacitance detection, the capacitance in the earphone is easily influenced by the ambient temperature, and particularly in high-latitude areas, the detection result is inaccurate; moreover, the detection mode is only to detect the capacitance change amount, and the detected capacitance change amount may be much larger than the actual capacitance change amount of the earphone, so that the phenomenon of misjudgment is very easy to occur, and the earphone wearing detection fails.
Therefore, the prior art has yet to be improved.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method, a terminal and a computer readable storage medium for detecting the earphone insertion to solve the technical problem of low accuracy of the existing earphone insertion detection.
The technical scheme adopted by the invention for solving the technical problem is as follows:
in a first aspect, the present invention provides a method for detecting an earphone entering an ear, including the following steps:
acquiring in-ear detection data, and judging whether the in-ear detection data meets in-ear detection conditions or not;
if the in-ear detection data meets the in-ear detection condition, audio source data is played, and in-ear audio data in the earphone is collected;
and comparing the in-ear audio data with the audio source data, and determining the in-ear state of the earphone according to the comparison result.
In one implementation, the in-ear detection data includes light data, and the in-ear detection condition is: the light ray data is smaller than a preset light ray threshold value;
the acquiring in-ear detection data previously comprises:
acquiring a plurality of groups of light ray data of the earphone in an in-ear state, which are acquired by a first sensor;
and determining the maximum value in the multiple groups of light ray data, and setting a preset light ray threshold value of the in-ear detection condition according to the maximum value.
In one implementation, the in-ear detection data further includes a capacitance detection value, and the in-ear detection condition is: the capacitance detection value exceeds the range of a preset capacitance value;
the acquiring of in-ear detection data further comprises:
acquiring a plurality of groups of capacitance detection values of the earphone in an in-ear state, which are acquired by a second sensor;
determining a maximum capacitance detection value and a minimum capacitance detection value in the plurality of groups of capacitance detection values;
and determining a preset capacitance range of the in-ear detection condition according to the maximum capacitance detection value and the minimum capacitance detection value.
In one implementation, the acquiring in-ear detection data and determining whether the in-ear detection data meets an in-ear detection condition includes:
acquiring light data collected by the first sensor;
judging whether the light ray data is smaller than the preset light ray threshold value or not;
and if the light ray data is smaller than the preset light ray threshold value, judging that the light ray data meets the in-ear detection condition.
In one implementation, the acquiring in-ear detection data and determining whether the in-ear detection data meets an in-ear detection condition includes:
acquiring a capacitance detection value acquired by the second sensor;
judging whether the capacitance detection value exceeds the preset capacitance value range or not;
and if the capacitance detection value exceeds the preset capacitance value range, judging that the capacitance detection value meets the in-ear detection condition.
In one implementation, if the in-ear detection data satisfies the in-ear detection condition, playing audio source data and collecting in-ear audio data in an earphone includes:
if the light data or the capacitance detection value meets the in-ear detection condition, acquiring the audio source data;
and playing the audio source data through a loudspeaker of the earphone, and acquiring an audio signal when the loudspeaker is played through a preset microphone of the earphone to obtain the in-ear audio data.
In one implementation, the comparing the in-ear audio data with the audio source data and determining the in-ear state of the headphone according to the comparison result includes:
comparing the in-ear audio data with the audio source data to obtain a difference value of the in-ear audio data and the audio source data;
acquiring a preset difference range, and judging whether the difference between the in-ear audio data and the audio source data is within the preset difference range;
if the difference value between the in-ear audio data and the audio source data is within the preset difference value range, judging that the current state of the earphone is in an in-ear state;
and if the difference value between the in-ear audio data and the audio source data is not within the preset difference value range, judging that the current state of the earphone is in an out-of-ear state.
In one implementation, the comparing the in-ear audio data with the audio source data to obtain a difference between the in-ear audio data and the audio source data includes:
acquiring a detection sound wave signal corresponding to the in-ear audio data according to the in-ear audio data;
acquiring a source sound wave signal corresponding to the audio source data according to the audio source data;
performing audio track comparison on the detection sound wave signal and the source sound wave signal to obtain a signal difference range of the detection sound wave signal and the source sound wave signal;
and determining the difference value of the in-ear audio data and the audio source data according to the signal difference range of the sound wave signal and the source sound wave signal.
In a second aspect, the present invention provides a terminal, comprising: a processor and a memory, the memory storing an earphone in-ear detection program, the earphone in-ear detection program being configured to implement the earphone in-ear detection method according to the first aspect when executed by the processor.
In a third aspect, the present invention provides a computer-readable storage medium storing a headphone in-ear detection program, which when executed by a processor, is configured to implement the headphone in-ear detection method according to the first aspect.
The invention adopts the technical scheme and has the following effects:
according to the method and the device, the in-ear detection data is acquired, and whether the current state of the earphone is in the in-ear state or not can be accurately judged by comparing the in-ear audio data played in the earphone with the audio source data in the in-ear state under the condition that the in-ear detection data in the earphone meets the in-ear detection condition by using an audio comparison mode, so that the accuracy of the in-ear detection of the earphone is improved.
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 structures shown in the drawings without creative efforts.
Fig. 1 is a flow chart of a method for detecting an in-ear condition of an earphone according to an embodiment of the present invention.
Fig. 2 is a functional schematic of a terminal in one implementation of the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Exemplary method
As shown in fig. 1, an embodiment of the present invention provides an earphone in-ear detection method, which includes the following steps:
step S100, obtaining in-ear detection data, and judging whether the in-ear detection data meets in-ear detection conditions.
In this embodiment, the method for detecting the earphone insertion into the ear is applied to a terminal, where the terminal may be an earphone or an earphone box connected to the earphone; the present embodiment takes an earphone as an example, and describes the earphone in-ear detection method.
In the present embodiment, the earphones include an in-ear TWS (True Wireless Stereo) earphone and a half-in-ear TWS earphone; moreover, the earphone has an in-ear detection function and an out-ear detection function; wherein, the in-ear detection function means that the earphone is equipped with a corresponding sensor (e.g. a photosensitive sensor and/or a capacitance detection sensor, etc.), and the sensor detects whether the head (i.e. the position of the earphone) of the earphone enters the ear of the user, so as to automatically sense whether the earphone is in a wearing (in-ear) state; the ear outgoing detection function is to automatically sense whether the earphone is not worn (in-ear) or not; in the actual use process of the earphone, if a user needs to pause the played content due to some things, at the moment, any one of the two earphones is taken down, the currently played content of the earphone can be automatically paused by detecting the current state of the earphone, and the currently paused content of the earphone can be automatically played when the earphone is subsequently worn, so that the power consumption of the earphone during the non-use period is reduced, and the actual use time of the earphone is effectively prolonged.
In order to improve the accuracy of the in-ear detection of the earphone, the in-ear state of the earphone is detected by adopting an optical detection and/or a capacitance detection mode to acquire in-ear detection data, and the error judgment phenomenon in the in-ear detection is reduced by combining an audio detection mode, so that the accuracy of the in-ear detection of the earphone is improved.
In the implementation of this embodiment, it is necessary to acquire in-ear detection data through a sensor in the earphone, and determine whether the in-ear detection data meets in-ear detection conditions; the in-ear detection data is data detected by the earphone in an in-ear state, and the data comprises light data and/or capacitance detection values; the light ray data is in-ear detection data acquired by a photosensitive sensor of the earphone, and whether the ambient light of the earphone meets an ear detection condition or not can be judged by acquiring the light ray data, so that the in-ear state of the earphone is detected in an optical detection mode; the capacitance detection value is in-ear detection data acquired by a capacitance detection sensor of the earphone, and whether the capacitance value of the earphone meets an ear detection condition can be judged by acquiring the capacitance detection value, so that the in-ear state of the earphone is detected in a capacitance detection mode; when judging whether the in-ear detection data meets in-ear detection conditions or not, and when the in-ear detection data is light data, the in-ear detection conditions are as follows: the light ray data is smaller than a preset light ray threshold value; when the in-ear detection data is a capacitance detection value, the in-ear detection condition is as follows: and the capacitance detection value exceeds the range of a preset capacitance value.
Before the implementation of the method for detecting the in-ear condition of the earphone of this embodiment, that is, before the in-ear detection data is obtained, a preset light threshold of the in-ear detection condition needs to be set; when the preset light threshold is set, in the factory stage of the earphone, the detection threshold of the photosensitive sensor (i.e., the first sensor) in the earphone in the in-ear state is set in a manner of optical detection, and the detection threshold of the photosensitive sensor is the preset light threshold of the in-ear detection condition in this embodiment.
When the preset light threshold value is set, a plurality of groups of light data of the earphone in an in-ear state can be acquired firstly; the light data comprises illuminance, and the preset light threshold comprises a preset illuminance threshold; when the plurality of sets of light ray data are acquired, the plurality of sets of light ray data can be acquired through a plurality of pairs of earphones or can be acquired through the same pair of earphones; for example, 10 sets of light data are acquired by 10 pairs of headphones, or 10 sets of light data may be acquired by 1 pair of headphones.
In another implementation manner of this embodiment, when the preset light threshold is determined, the light may be obtained based on light of an external environment; for example, multiple sets of light data are acquired by one or more pairs of headphones in the same light environment.
After the plurality of sets of light ray data are obtained, setting a light ray threshold value for light ray detection according to the plurality of sets of light ray data; specifically, the obtained multiple sets of light ray data may be compared to obtain a maximum value in the multiple sets of light ray data, and then the preset light ray threshold value is set according to the obtained maximum value, so as to use the preset light ray threshold value as a detection threshold value of the photosensor of the earphone; wherein the maximum value in the plurality of sets of light ray data is the maximum illumination value in the plurality of sets of light ray data; for example, if the current ambient light illuminance is 400Lux, and the maximum illuminance value is 80% of the current ambient light illuminance, the preset light threshold is 320 Lux.
That is, in one implementation manner of the present embodiment, step 100 includes the following steps before:
001, acquiring multiple groups of light ray data of the earphone in an in-ear state, which are acquired by a first sensor;
step 002, determining a maximum value in the plurality of sets of light ray data, and setting a preset light ray threshold value of the in-ear detection condition according to the maximum value.
In this embodiment, before implementing the method for detecting the in-ear condition of the earphone of this embodiment, that is, before acquiring the in-ear detection data, a preset capacitance range of the in-ear detection condition needs to be set; when the preset capacitance range is set, in a factory stage of the earphone, a capacitance sensing range of a capacitance detection sensor (namely a second sensor) in the earphone in an in-ear state is set; the capacitance range of the capacitance detection sensor is a preset capacitance range of the earphone in-ear detection condition.
In this embodiment, the detection principle of the capacitance detection sensor is as follows: the capacitance detection sensor may convert a change in a measured quantity (e.g., a measured quantity of size, pressure, distance, etc.) into a change in capacitance; it is understood that the distance between the earphone of the earphone and the ear of the user is measured in this embodiment, and whether the earphone is in the in-ear state is determined by the detected capacitance value.
When the preset capacitance value range is set, a plurality of groups of capacitance detection values of the earphone in an in-ear state can be acquired; the plurality of groups of capacitance detection values can be a plurality of groups of capacitance detection values acquired by a plurality of pairs of earphones, or a plurality of groups of capacitance detection values acquired by the same pair of earphones; for example, 10 sets of capacitance detection values are acquired by 10 pairs of earphones, or 10 sets of capacitance detection values are acquired by 1 pair of earphones.
In another implementation manner of this embodiment, when determining the preset capacitance range, the preset capacitance range may be obtained based on the same distance; for example, multiple sets of capacitance measurements are acquired by one or more pairs of headphones in the same phantom.
After the plurality of groups of capacitance detection values are obtained, a capacitance value range for capacitance detection can be set according to the obtained plurality of groups of capacitance detection values; specifically, the obtained multiple groups of capacitance detection values may be compared to obtain a maximum capacitance detection value and a minimum capacitance detection value in the multiple groups of capacitance detection values; then, setting the range of the preset capacitance value according to the maximum capacitance detection value and the minimum capacitance detection value; based on different capacitor models, the preset capacitance value ranges are different; in this embodiment, the preset capacitance value range may be 50uF to 60 uF.
That is, in an implementation manner of the present embodiment, step 100 further includes the following steps:
step 003, acquiring a plurality of groups of capacitance detection values of the earphone in an in-ear state, which are acquired by a second sensor;
step 004, determining a maximum capacitance detection value and a minimum capacitance detection value in the plurality of groups of capacitance detection values;
and 005, determining a preset capacitance range of the in-ear detection condition according to the maximum capacitance detection value and the minimum capacitance detection value.
In this embodiment, after the preset light threshold and/or the preset capacitance range is set, in-ear detection data can be obtained in an actual in-ear detection process, and whether the in-ear detection data meets an in-ear detection condition is determined; when the in-ear detection data is acquired, the in-ear state of the earphone can be detected through the detection mode of the photosensitive sensor and/or the detection mode of the capacitive sensor so as to preliminarily detect whether the earphone is worn in the ear of the user currently.
When the current state of the earphone is preliminarily detected, any one detection mode of the photosensitive sensor and the detection mode of the capacitance sensor can be adopted; of course, two detection modes, namely the detection mode of the photosensitive sensor and the detection mode of the capacitive sensor, can be adopted to improve the accuracy of the initial detection.
In this embodiment, when the detection mode of the photosensitive sensor is adopted, the light data in the earphone can be collected through the photosensitive sensor; the light data are light data of the area where the photosensitive sensor is located, and the light data of the area where the photosensitive sensor is located depend on the structure of the earphone; by acquiring the light data, whether the light data is smaller than the preset light threshold value or not can be judged, and if the light data is smaller than the preset light threshold value, the light data can be judged to meet the in-ear detection condition, so that the current state of the earphone is preliminarily judged to be in-ear state; it is worth mentioning that when the detection mode of the photosensitive sensor is adopted, the in-ear detection condition is as follows: and the light data detected by the photosensitive sensor is smaller than the preset light threshold value.
In addition, when the earphone is in the earphone box (the earphone box is closed), the detected light data is also smaller than the preset light threshold, and at this time, in order to avoid the occurrence of a misjudgment phenomenon, it is further necessary to exclude the case where the earphone is in a box-shaped state, that is, when the earphone box detects that the earphone is in the earphone box, it is determined that the light data does not satisfy the in-ear detection condition.
Specifically, when the detection mode of the photosensitive sensor is adopted, the light flux irradiating a preset area in the earphone can be collected through the photosensitive sensor arranged in the earphone cavity; wherein the luminous flux is the total amount of light irradiated in the preset area; the preset area is a setting area of the photosensitive sensor; for example, an earpiece region of the headset, in which the light sensitive sensor is arranged.
When the luminous flux of the preset region is collected, the area of the preset region can be obtained, wherein the preset region and the area thereof can be determined according to the structure of the earphone; for example, the area of the earpiece region of the headset; of course, the area of the preset area can also be a parameter value set in the earphone in a user-defined mode.
After the luminous flux of the preset area is collected, the illuminance in the earphone can be calculated according to the luminous flux and the area; wherein the illuminance is obtained by dividing the luminous flux by the area of the preset area; it is understood that the luminous flux is a unit of light measurement in a unit area to reflect the light intensity in a certain area; after the illuminance in the earphone is obtained through calculation, the illumination environment of the photosensitive sensor of the earphone can be preliminarily judged by judging whether the illuminance is smaller than the preset illuminance threshold value; for example, the preset light threshold is 320Lux, the calculated ambient light illuminance is 300Lux, and at this time, it may be preliminarily determined that the light environment of the photosensor in the earphone is a dark environment, and the earphone is currently in a wearing state.
That is, in an implementation manner of this embodiment, step S100 specifically includes the following steps:
step S110, acquiring light data collected by the first sensor;
step S120, judging whether the light ray data is smaller than the preset light ray threshold value;
step S130, if the light data is smaller than the preset light threshold, determining that the light data satisfies the in-ear detection condition.
The embodiment is characterized in that the luminous flux irradiating a preset area in the earphone is collected, the illuminance in the earphone can be calculated according to the luminous flux and the area, and then the illumination environment of the photosensitive sensor in the earphone is preliminarily judged according to the illuminance and the preset illuminance threshold value so as to preliminarily detect whether the earphone is currently worn in the ear of the user.
In this embodiment, when the detection mode of the capacitance sensor is adopted, a capacitance detection value of a preset capacitance in the earphone needs to be acquired; the preset capacitor is a detection capacitor in the capacitive sensor, the capacitive sensor can dynamically detect the distance between the earphone and the ear of the user, the detected distance is converted into a corresponding capacitance value, and the distance between the earphone and the ear of the user is dynamically displayed by the change of the capacitance value; the distance that capacitive sensor can be accurate to 0.1mm, through acquireing capacitive sensor's capacitance value in the earphone can improve the earphone goes into the ear and detects the precision.
Specifically, when the detection mode of the capacitance sensor is adopted, the preset capacitance range needs to be acquired; the preset capacitance value range can be 50 uF-60 uF; whether the capacitance detection value exceeds the preset capacitance value range or not can be judged by obtaining the preset capacitance value range, if the capacitance value of the capacitance sensor in the earphone exceeds the preset capacitance value range, the capacitance detection value is judged to meet the in-ear detection condition, and at the moment, the earphone is worn in the ear of the user currently; for example, if the capacitance value of the capacitive sensor is 70uF, the headset is currently worn in the ear of the user.
It is worth mentioning that, when the detection mode of the capacitance sensor is adopted, the in-ear detection condition is as follows: and the capacitance detection value detected by the capacitance sensor exceeds the preset capacitance value range.
That is, in an implementation manner of this embodiment, step S100 specifically includes the following steps:
step S140, acquiring light data collected by the first sensor;
step S150, judging whether the capacitance detection value exceeds the preset capacitance value range;
step S160, if the capacitance detection value exceeds the preset capacitance value range, determining that the capacitance detection value satisfies the in-ear detection condition.
In the embodiment, the current state of the earphone is detected by the capacitance value of the capacitive sensor by acquiring the capacitance value of the capacitive sensor, so that whether the earphone is currently worn in the ear of the user is preliminarily detected by the capacitance detection value of the capacitive sensor.
As shown in fig. 1, in an implementation manner of the embodiment of the present invention, the method for detecting the earphone insertion into the ear further includes the following steps:
and step S200, if the in-ear detection data meets the in-ear detection condition, playing audio source data and collecting in-ear audio data in the earphone.
In this embodiment, if the light data or the capacitance detection value meets an in-ear detection condition (that is, the light data is smaller than the preset light threshold, or the capacitance detection value exceeds the preset capacitance range), it is further required to determine whether the earphone is completely worn in the ear of the user in an audio comparison manner; and when audio comparison is carried out, acquiring in-ear audio data in the earphone, and simultaneously comparing the acquired audio data with the audio data in an in-ear state, so as to determine whether the earphone is completely worn in the ear of the user according to a comparison result.
Specifically, before acquiring in-ear audio data in the earphone, audio source data for in-ear detection needs to be acquired; the audio source data is preset audio data used for detecting an in-ear state; it is understood that the audio source data is standard audio data played in a state where the headphones are in the ear.
After the audio source data are acquired, a preset microphone of the earphone is turned on, and the audio source data are played through a loudspeaker in the earphone; at this time, the audio signal collected by the preset microphone in the earphone is the in-ear audio data.
When the earphone is provided with two or more noise reduction microphones, the noise reduction microphones of the earphone can be divided into a feedforward microphone (namely FF mic) and a feedback microphone (namely FB mic); the feedforward microphone is arranged on a microphone (namely the outer side of an earphone head of the earphone) at one side far away from the ear of a user, and is mainly used for acquiring noise of an external environment and then providing a feedforward active noise reduction function by utilizing a reverse noise reduction principle; the feedback microphone is arranged at a microphone close to one side of the ear of the user (namely the inner side of the earphone head of the earphone), and is mainly used for acquiring noise inside the earphone shell and then providing a feedback active noise reduction effect by utilizing a reverse noise reduction principle.
In this embodiment, the preset microphone is the feedback microphone (i.e., FB mic); when the audio source data is played, audio signals played by a loudspeaker in an earphone shell are collected through the feedback microphone, and then the in-ear audio data can be obtained; wherein the audio source data may be an alert tone of a specific frequency; for example, a cue tone with a cue duration of 5 seconds is presented once per second.
That is, in an implementation manner of this embodiment, the step S300 specifically includes the following steps:
step S210, if the light data or the capacitance detection value meets the in-ear detection condition, acquiring the audio source data;
step S220, the audio source data is played through the loudspeaker of the earphone, and the audio signal during the playing of the loudspeaker is collected through a preset microphone of the earphone, so that the in-ear audio data is obtained.
The present embodiment plays audio source data through a speaker in the headset, and collects audio data in the cavity of the headset using a feedback microphone to further determine whether the headset has been completely worn in the ear of the user in an audio contrast manner.
As shown in fig. 1, in an implementation manner of the embodiment of the present invention, the method for detecting the earphone insertion into the ear further includes the following steps:
step S300, comparing the in-ear audio data with the audio source data, and determining the in-ear state of the earphone according to the comparison result.
In this embodiment, after the in-ear audio data is obtained, the in-ear audio data may be compared with the audio source data, and the in-ear state of the earphone is determined according to the comparison result, so that under the preliminary detection of the detection data of the photosensitive sensor and/or the capacitive sensor, whether the earphone has been completely worn in the ear of the user is determined by using an audio comparison method, so as to improve the in-ear detection accuracy of the earphone.
Specifically, when comparing the in-ear audio data with the audio source data, the in-ear audio data may be compared with the audio source data to obtain a difference between the in-ear audio data and the audio source data; the audio frequency comparison mode can adopt a sound wave comparison mode, namely the ear-entering audio data and the audio source data are led into the same audio track, and the sound wave difference value of the ear-entering audio data and the audio source data at the same time point or time period is obtained by comparing sound wave signals at the same time point or time period.
After the difference value between the in-ear audio data and the audio source data is obtained, acquiring a preset difference value range, and judging whether the difference value between the in-ear audio data and the audio source data is within the preset difference value range; the preset difference range is set in the following mode: the earphone is in an ear-out state in advance, audio data in the ear-out state (namely, the audio data collected by the feedback microphone in the ear-out state) is collected, the collected audio data is compared with the audio source data, and a difference value between the ear-out audio data and the audio source data is obtained (the audio comparison mode can adopt the sound wave comparison mode), and the difference value between the ear-out audio data and the audio source data is a preset difference value; because the audio source data and the ear-out audio data are audio data in a certain time period, the difference value between the ear-out audio data and the audio source data has a maximum value and a minimum value, and the preset difference value range can be determined by acquiring the maximum value and the minimum value; for example, under a certain noise environment, the maximum value and the minimum value of the difference between the ear-emerging audio data and the audio source data are 7db and 2db, respectively, and the preset difference range may be 2db-7 db.
When judging whether the difference value between the in-ear audio data and the audio source data is within the preset difference value range, if the difference value between the in-ear audio data and the audio source data is within the preset difference value range, judging that the current state of the earphone is in an in-ear state; if the difference value is not within the preset difference value range, judging that the current state of the earphone is in an ear-out state; wherein the condition that the difference value between the in-ear audio data and the audio source data is within the preset difference value range is as follows: and under the condition of the same time point, the difference value between the sound wave signal of the in-ear audio data and the sound wave signal of the audio source data is within the preset difference value range.
That is, in an implementation manner of this embodiment, the step S400 specifically includes the following steps:
step S310, comparing the in-ear audio data with the audio source data to obtain a difference value between the in-ear audio data and the audio source data;
step S320, acquiring a preset difference value range, and judging whether the difference value between the in-ear audio data and the audio source data is within the preset difference value range;
step S330, if the difference value between the in-ear audio data and the audio source data is within the preset difference value range, judging that the current state of the earphone is in an in-ear state;
step S340, if the difference between the in-ear audio data and the audio source data is not within the preset difference range, determining that the current state of the earphone is an out-of-ear state.
In the embodiment, the in-ear audio data is compared with the audio source data, so that the in-ear detection precision of the earphone can be improved by utilizing the in-ear audio detection mode on the basis of the detection data of the photosensitive sensor and/or the capacitive sensor.
Specifically, in this embodiment, when performing the sound wave comparison, a detected sound wave signal corresponding to the in-ear audio data may be obtained according to the in-ear audio data, and a source sound wave signal corresponding to the audio source data may be obtained according to the audio source data; the detection sound wave signal and the source sound wave signal are both sound wave signals subjected to noise reduction, and the detection sound wave signal and the source sound wave signal are both frequency response curves corresponding to respective sinusoidal signals.
After the detection sound wave signal and the source sound wave signal are obtained, the detection sound wave signal and the source sound wave signal can be placed in the same sound track, so that the detection sound wave signal and the source sound wave signal are compared, and a signal difference range of the detection sound wave signal and the source sound wave signal is obtained; when sound wave comparison is carried out, corresponding decibel values can be determined according to respective sound wave signals, and the signal difference range is the decibel value difference range of the detected sound wave signal and the source sound wave signal under the same frequency; after the signal difference range between the detection sound wave signal and the source sound wave signal is obtained, the difference between the in-ear audio data and the audio source data can be determined according to the signal difference range between the sound wave signal and the source sound wave signal.
Step S311, acquiring a detection sound wave signal corresponding to the in-ear audio data according to the in-ear audio data;
step S312, acquiring a source sound wave signal corresponding to the audio source data according to the audio source data;
step 313, comparing the sound track of the detection sound wave signal with the sound track of the source sound wave signal to obtain a signal difference range of the detection sound wave signal and the source sound wave signal;
step S314, determining a difference between the in-ear audio data and the audio source data according to a signal difference range between the sound wave signal and the source sound wave signal.
In an implementation manner of this embodiment, after determining that the current state of the earphone is the in-ear state, the detection result may be sent to an APP of a corresponding terminal device to display the in-ear state of the earphone; or sending the detection result to a popup window of the corresponding terminal device so as to display the in-ear state of the earphone through the popup window.
This embodiment is through the light data and/or the electric capacity detected value of gathering in the earphone, and under the condition that light data and/or electric capacity detected value satisfy the pleasant detection condition, through the pleasant audio data and the audio source data in the contrast earphone, whether the current state of judging the earphone accurately is the pleasant state, has improved the precision that the earphone was gone into the ear and has detected.
Exemplary device
Based on the above embodiments, the present invention further provides a terminal, and a schematic block diagram thereof may be as shown in fig. 2.
The terminal includes: the system comprises a processor, a memory, an interface, a display screen and a communication module which are connected through a system bus; wherein the processor of the terminal is configured to provide computing and control capabilities; the memory of the terminal includes a computer-readable storage medium and an internal memory; the computer readable storage medium stores an operating system and a computer program; the internal memory provides an environment for the operation of an operating system and a computer program in the computer-readable storage medium; the interface is used for connecting external terminal equipment, such as mobile terminals and computers; the display screen is used for displaying corresponding in-ear detection information; the communication module is used for communicating with a cloud server or a mobile terminal.
The computer program is executed by a processor to implement a method for detecting an in-ear condition of a headset.
It will be understood by those skilled in the art that the block diagram of fig. 2 is a block diagram of only a portion of the structure associated with the inventive arrangements and is not intended to limit the terminals to which the inventive arrangements may be applied, and that a particular terminal may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a terminal is provided, which includes: the earphone in-ear detection program is used for realizing the earphone in-ear detection method when being executed by the processor.
In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores an in-ear headphone detection program, which when executed by a processor, is configured to implement the in-ear headphone detection method as above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, the computer program can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory.
In summary, the present invention provides an earphone in-ear detection method, a terminal and a computer-readable storage medium, wherein the method includes: acquiring in-ear detection data, and judging whether the in-ear detection data meets in-ear detection conditions; if the in-ear detection data meets the in-ear detection condition, audio source data is played, and in-ear audio data in the earphone is collected; and comparing the in-ear audio data with the audio source data, and determining the in-ear state of the earphone according to the comparison result. According to the method and the device, the in-ear detection data is acquired, and whether the current state of the earphone is in the in-ear state or not can be accurately judged by comparing the in-ear audio data played in the earphone with the audio source data in the in-ear state under the condition that the in-ear detection data in the earphone meets the in-ear detection condition by using an audio comparison mode, so that the accuracy of the in-ear detection of the earphone is improved.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (10)

1. An earphone in-ear detection method is characterized by comprising the following steps:
acquiring in-ear detection data, and judging whether the in-ear detection data meets in-ear detection conditions or not;
if the in-ear detection data meets the in-ear detection condition, audio source data is played, and in-ear audio data in the earphone is collected;
and comparing the in-ear audio data with the audio source data, and determining the in-ear state of the earphone according to the comparison result.
2. The method of claim 1, wherein the in-ear detection data comprises light data, and the in-ear detection condition is: the light ray data is smaller than a preset light ray threshold value;
the acquiring in-ear detection data previously comprises:
acquiring a plurality of groups of light ray data of the earphone in an in-ear state, which are acquired by a first sensor;
and determining the maximum value in the multiple groups of light ray data, and setting a preset light ray threshold value of the in-ear detection condition according to the maximum value.
3. The method of claim 1, wherein the in-ear detection data further comprises a capacitance detection value, and the in-ear detection condition is: the capacitance detection value exceeds the range of a preset capacitance value;
the acquiring of in-ear detection data further comprises:
acquiring a plurality of groups of capacitance detection values of the earphone in an in-ear state, which are acquired by a second sensor;
determining a maximum capacitance detection value and a minimum capacitance detection value in the plurality of groups of capacitance detection values;
and determining a preset capacitance range of the in-ear detection condition according to the maximum capacitance detection value and the minimum capacitance detection value.
4. The method for detecting the in-ear condition of the earphone according to claim 2, wherein the obtaining the in-ear detection data and determining whether the in-ear detection data satisfies an in-ear detection condition comprises:
acquiring light data collected by the first sensor;
judging whether the light ray data is smaller than the preset light ray threshold value or not;
and if the light ray data is smaller than the preset light ray threshold value, judging that the light ray data meets the in-ear detection condition.
5. The method for detecting the in-ear condition of the earphone according to claim 3, wherein the obtaining the in-ear detection data and determining whether the in-ear detection data satisfies an in-ear detection condition comprises:
acquiring a capacitance detection value acquired by the second sensor;
judging whether the capacitance detection value exceeds the preset capacitance value range or not;
and if the capacitance detection value exceeds the preset capacitance value range, judging that the capacitance detection value meets the in-ear detection condition.
6. The method as claimed in claim 4 or 5, wherein the playing audio source data and collecting the in-ear audio data in the earphone if the in-ear detection data satisfies the in-ear detection condition comprises:
if the light data or the capacitance detection value meets the in-ear detection condition, acquiring the audio source data;
and playing the audio source data through a loudspeaker of the earphone, and acquiring an audio signal when the loudspeaker is played through a preset microphone of the earphone to obtain the in-ear audio data.
7. A headphone in-ear detection method as claimed in any one of claims 1-6, wherein the comparing the in-ear audio data with the audio source data and determining the in-ear state of the headphones according to the comparison result comprises:
comparing the in-ear audio data with the audio source data to obtain a difference value of the in-ear audio data and the audio source data;
acquiring a preset difference range, and judging whether the difference between the in-ear audio data and the audio source data is within the preset difference range;
if the difference value between the in-ear audio data and the audio source data is within the preset difference value range, judging that the current state of the earphone is in an in-ear state;
and if the difference value between the in-ear audio data and the audio source data is not within the preset difference value range, judging that the current state of the earphone is in an out-of-ear state.
8. The headphone in-the-ear detection method of claim 7, wherein the comparing the in-the-ear audio data with the audio source data to obtain a difference between the in-the-ear audio data and the audio source data comprises:
acquiring a detection sound wave signal corresponding to the in-ear audio data according to the in-ear audio data;
acquiring a source sound wave signal corresponding to the audio source data according to the audio source data;
performing audio track comparison on the detection sound wave signal and the source sound wave signal to obtain a signal difference range of the detection sound wave signal and the source sound wave signal;
and determining the difference value of the in-ear audio data and the audio source data according to the signal difference range of the sound wave signal and the source sound wave signal.
9. A terminal, comprising: a processor and a memory, the memory storing an earphone in-ear detection program, the earphone in-ear detection program when executed by the processor being for implementing the earphone in-ear detection method as claimed in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores an earphone in-ear detection program, which when executed by a processor is configured to implement the earphone in-ear detection method according to any one of claims 1 to 8.
CN202110817484.9A 2021-07-19 2021-07-19 Earphone in-ear detection method, terminal and computer readable storage medium Pending CN113596657A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110817484.9A CN113596657A (en) 2021-07-19 2021-07-19 Earphone in-ear detection method, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110817484.9A CN113596657A (en) 2021-07-19 2021-07-19 Earphone in-ear detection method, terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113596657A true CN113596657A (en) 2021-11-02

Family

ID=78248341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110817484.9A Pending CN113596657A (en) 2021-07-19 2021-07-19 Earphone in-ear detection method, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113596657A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113825063A (en) * 2021-11-24 2021-12-21 珠海深圳清华大学研究院创新中心 Earphone voice recognition starting method and earphone voice recognition method
CN114554382A (en) * 2022-02-28 2022-05-27 恒玄科技(上海)股份有限公司 In-ear detection method and device, wireless earphone and storage medium
CN117528333A (en) * 2024-01-05 2024-02-06 九音科技(南京)有限公司 State detection method and device of ear-wearing type audio equipment, audio equipment and medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113825063A (en) * 2021-11-24 2021-12-21 珠海深圳清华大学研究院创新中心 Earphone voice recognition starting method and earphone voice recognition method
CN114554382A (en) * 2022-02-28 2022-05-27 恒玄科技(上海)股份有限公司 In-ear detection method and device, wireless earphone and storage medium
CN114554382B (en) * 2022-02-28 2023-09-22 恒玄科技(上海)股份有限公司 In-ear detection method and device, wireless earphone and storage medium
CN117528333A (en) * 2024-01-05 2024-02-06 九音科技(南京)有限公司 State detection method and device of ear-wearing type audio equipment, audio equipment and medium
CN117528333B (en) * 2024-01-05 2024-04-12 九音科技(南京)有限公司 State detection method and device of ear-wearing type audio equipment, audio equipment and medium

Similar Documents

Publication Publication Date Title
CN113596657A (en) Earphone in-ear detection method, terminal and computer readable storage medium
CN108810788B (en) Wearing condition detection method and device of wireless earphone and wireless earphone
WO2020228095A1 (en) Real-time voice wake-up audio device, operation method and apparatus, and storage medium
JP6096993B1 (en) Earphone sound effect compensation method, apparatus, and earphone
CN110418232B (en) Volume adjusting method and device and computer readable storage medium
CN108810693B (en) Wearable device and device control device and method thereof
US11632621B2 (en) Method for controlling volume of wireless headset, and computer-readable storage medium
CN113630708B (en) Method and device for detecting abnormal earphone microphone, earphone kit and storage medium
US11357424B2 (en) Method for hearing test and hearing test system
CN108810749A (en) player control method, device, terminal device and storage medium
WO2015117343A1 (en) Method and system for improving tone quality of voice, and mobile terminal
KR102595050B1 (en) Environmental and aggregate acoustic dosimetry
CN113746983B (en) Hearing aid method and device, storage medium and intelligent terminal
CN112468924A (en) Earphone noise reduction method and device
WO2021103260A1 (en) Control method for headphones and headphones
KR102407686B1 (en) Environmental and aggregate acoustic dosimetry
CN113920975B (en) Noise reduction parameter setting method and device, earphone equipment and storage medium
CN113949956A (en) Noise reduction processing method and device, electronic equipment, earphone and storage medium
CN109039355B (en) Voice prompt method and related product
CN114125639A (en) Audio signal processing method and device and electronic equipment
CN117440282A (en) Earphone wearing state detection method and device, earphone and storage medium
WO2023197474A1 (en) Method for determining parameter corresponding to earphone mode, and earphone, terminal and system
CN108810787B (en) Foreign matter detection method and device based on audio equipment and terminal
CN114567849B (en) Detection method and device, wireless earphone and storage medium
US20240152313A1 (en) Wearing detection method, wearable device, 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