CN112866876A - In-ear detection method of TWS headset, and computer-readable storage medium - Google Patents

In-ear detection method of TWS headset, and computer-readable storage medium Download PDF

Info

Publication number
CN112866876A
CN112866876A CN202110274738.7A CN202110274738A CN112866876A CN 112866876 A CN112866876 A CN 112866876A CN 202110274738 A CN202110274738 A CN 202110274738A CN 112866876 A CN112866876 A CN 112866876A
Authority
CN
China
Prior art keywords
ear
tws
earphone
characteristic value
tws headset
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
CN202110274738.7A
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.)
Xian TCL Software Development Co Ltd
Original Assignee
Xian TCL Software Development 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 Xian TCL Software Development Co Ltd filed Critical Xian TCL Software Development Co Ltd
Priority to CN202110274738.7A priority Critical patent/CN112866876A/en
Publication of CN112866876A publication Critical patent/CN112866876A/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
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • 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

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Headphones And Earphones (AREA)

Abstract

The application discloses an in-ear detection method of a TWS headset, the TWS headset and a computer readable storage medium, the method comprises the following steps: acquiring motion data acquired by a first sensor and distance data acquired by a second sensor; when the motion data and the distance data respectively meet corresponding set conditions, playing a preset audio signal, and detecting characteristic parameters corresponding to the preset audio signal; and acquiring a time domain characteristic value and a frequency domain characteristic value in the characteristic parameters, and determining the in-ear condition of the TWS earphone according to the time domain characteristic value and the frequency domain characteristic value. The problem that when the existing TWS earphone is used for in-ear detection, misjudgment is easy to occur, detection is inaccurate and the like is solved, the accuracy of in-ear detection is improved, and misjudgment is reduced.

Description

In-ear detection method of TWS headset, and computer-readable storage medium
Technical Field
The present application relates to the field of wireless headset technologies, and in particular, to an in-ear detection method for a TWS headset, the TWS headset, and a computer-readable storage medium.
Background
With the rapid development of artificial intelligence technology, people pursue intellectualization, function diversification, humanization and the like of life ways more and more. The earphone is widely used by people as a main transmission tool of audio signals of intelligent electronic products. Traditional wired earphones can not meet the requirement of people for simple functions, the appearance of TWS (true wireless stereo) earphones subverts the experience and cognition of people on traditional earphones, and the TWS earphones are developed in an explosive manner by taking a express train in an 'intelligent' era with the help of AI (artificial intelligence) technology. AI technologies such as bone conduction, active noise reduction, voice recognition and the like are widely applied to the TWS headset, wherein the in-out-of-ear detection technology is a technical highlight of the TWS headset which is deeply loved by a user, but is also a difficulty of misjudgment of the TWS headset in-out-of-ear.
Regarding the in-out-of-ear detection method, the most common method is to adopt a P-sensor + G-sensor scheme, but the scheme can be misjudged as the action of the earphone going out of the ear and entering the ear in many scenes, for example, the earphone is covered by hands to do simple gesture action, and the earphone is put into a pocket of clothes, so that misjudgment can occur, which causes the problems of inaccurate wearing detection, influence on user experience, increase in power consumption of the earphone, and the like.
Disclosure of Invention
The embodiment of the application provides an in-ear detection method for a TWS earphone, the TWS earphone and a computer readable storage medium, and aims to solve the problems that when the existing TWS earphone is used for in-ear detection, misjudgment is easy to occur, detection is inaccurate, and the like.
In order to achieve the above object, an aspect of the present application provides an in-ear detection method for a TWS headset, including:
acquiring motion data acquired by a first sensor and distance data acquired by a second sensor, wherein the distance data is the distance between a TWS earphone and a human body;
when the motion data and the distance data respectively meet corresponding set conditions, playing a preset audio signal, and detecting characteristic parameters corresponding to the preset audio signal;
and acquiring a time domain characteristic value and a frequency domain characteristic value in the characteristic parameters, and determining the in-ear condition of the TWS earphone according to the time domain characteristic value and the frequency domain characteristic value.
In addition, to achieve the above object, another aspect of the present application further provides a TWS headset, where the TWS headset includes a processor, a memory, and an in-ear detection program of the TWS headset stored in the memory and operable on the processor, and the processor implements the steps of the method of in-ear detection of the TWS headset as above when executing the in-ear detection program of the TWS headset.
Further, to achieve the above object, another aspect of the present application provides a computer readable storage medium having stored thereon an in-ear detection program of a TWS headset, the in-ear detection program of the TWS headset being executed by a processor to implement the steps of the method of in-ear detection of the TWS headset as above.
In the embodiment, the motion data collected by the first sensor and the distance data collected by the second sensor are obtained, and the distance data is the distance between the TWS earphone and the human body; when the motion data and the distance data respectively meet corresponding set conditions, playing a preset audio signal, and detecting characteristic parameters corresponding to the preset audio signal; and acquiring a time domain characteristic value and a frequency domain characteristic value in the characteristic parameters, and determining the in-ear condition of the TWS earphone according to the time domain characteristic value and the frequency domain characteristic value. On the basis of the first sensor and the second sensor, the closed space formed by the human ears and the noise reduction earphones is utilized, a section of preset audio signal is played, the signal intensity or other characteristic values captured by the FB MIC are detected, whether the earphones enter the ears or not is judged through the difference between the characteristic values, meanwhile, the FB MIC is used as an auxiliary mode to improve the ear entrance and exit detection accuracy rate in certain scenes, and misjudgment is reduced.
Drawings
FIG. 1 is a schematic diagram of a TWS headset structure in a hardware operating environment according to an embodiment of the present application;
FIG. 2 is a schematic flowchart illustrating a first embodiment of a TWS headset in-ear detection method according to the present application;
FIG. 3 is a flowchart illustrating a second embodiment of an in-ear detection method for a TWS headset according to the present application;
FIG. 4 is a schematic flowchart illustrating a third exemplary embodiment of a TWS headset according to the present invention;
FIG. 5 is a schematic flow chart illustrating a TWS headset in motion state according to motion data in the method for detecting the presence of a TWS headset in an ear according to the present application;
FIG. 6 is a schematic flow chart of the TWS headset after determining that the TWS headset is in a moving state in the in-ear detection method for the TWS headset according to the present application;
fig. 7 is a schematic flowchart illustrating a process of detecting a characteristic parameter corresponding to a predetermined audio signal in the method for detecting an in-ear condition of a TWS headset according to the present application;
FIG. 8 is a schematic flowchart illustrating an in-ear condition of the TWS headset according to the time domain eigenvalue and the frequency domain eigenvalue in the in-ear detection method for the TWS headset of the present application;
fig. 9 is a schematic diagram of short-term energy detection for both in-ear and out-of-ear when the audio signal of the TWS headset of the present application is white noise.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The main solution of the embodiment of the application is as follows: acquiring motion data acquired by a first sensor and distance data acquired by a second sensor, wherein the distance data is the distance between a TWS earphone and a human body; when the motion data and the distance data respectively meet corresponding set conditions, playing a preset audio signal, and detecting characteristic parameters corresponding to the preset audio signal; and acquiring a time domain characteristic value and a frequency domain characteristic value in the characteristic parameters, and determining the in-ear condition of the TWS earphone according to the time domain characteristic value and the frequency domain characteristic value.
At present, the most common method is to adopt a P-sensor + G-sensor scheme for in-ear detection, but the scheme can be misjudged as the action of the earphone going out of the ear and into the ear in many scenes, for example, the earphone is covered by hands to do simple posture action, and the earphone is put into a pocket of clothes, so that misjudgment can occur, and the problems of inaccurate wearing detection, influence on user experience and the like are caused.
The method comprises the steps of acquiring motion data acquired by a first sensor and distance data acquired by a second sensor, wherein the distance data is the distance between a TWS earphone and a human body; when the motion data and the distance data respectively meet corresponding set conditions, playing a preset audio signal, and detecting characteristic parameters corresponding to the preset audio signal; and acquiring a time domain characteristic value and a frequency domain characteristic value in the characteristic parameters, and determining the in-ear condition of the TWS earphone according to the time domain characteristic value and the frequency domain characteristic value. On the basis of the first sensor and the second sensor, the closed space formed by the human ears and the noise reduction earphones is utilized, a section of preset audio signal is played, the signal intensity or other characteristic values captured by the FB MIC are detected, whether the earphones enter the ears or not is judged through the difference between the characteristic values, meanwhile, the FB MIC is used as an auxiliary mode to improve the ear entrance and exit detection accuracy rate in certain scenes, and misjudgment is reduced.
Fig. 1 is a schematic diagram of a TWS headset structure of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the TWS headset may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the TWS headset may also include a camera, RF (Radio Frequency) circuitry, sensors, remote controls, audio circuitry, WiFi modules, detectors, and the like. Of course, the TWS headset may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, and a temperature sensor, which are not described herein again.
Those skilled in the art will appreciate that the TWS headset structure shown in fig. 1 does not constitute a limitation of the TWS headset device and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, a user interface module, and an in-ear detection program of a TWS headset.
In the TWS headset shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and communicating data with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke an in-ear detection program for the TWS headset stored in the memory 1005 and perform the following operations:
acquiring motion data acquired by a first sensor and distance data acquired by a second sensor, wherein the distance data is the distance between a TWS earphone and a human body;
when the motion data and the distance data respectively meet corresponding set conditions, playing a preset audio signal, and detecting characteristic parameters corresponding to the preset audio signal;
and acquiring a time domain characteristic value and a frequency domain characteristic value in the characteristic parameters, and determining the in-ear condition of the TWS earphone according to the time domain characteristic value and the frequency domain characteristic value.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a first embodiment of an in-ear detection method for a TWS headset according to the present application.
While the embodiments of the present application provide an embodiment of an in-ear detection method for a TWS headset, it should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that here.
The in-ear detection method of the TWS earphone comprises the following steps:
step S10, the TWS earphone acquires the motion data collected by the first sensor and the distance data collected by the second sensor, and the distance data is the distance between the TWS earphone and the human body;
in the embodiment, the first sensor is an acceleration sensor (G-sensor), the second sensor is a distance sensor (P-sensor), the motion data of the TWS headset is collected by the acceleration sensor arranged in the TWS headset, the distance data between the TWS headset and the human body is collected by the distance sensor (P-sensor), and the intention and the action of the user wearing the TWS headset are deduced by the motion data and the distance data of the TWS headset.
In an embodiment, the G-sensor (acceleration sensor) may be a three-axis acceleration sensor, that is, has three sensors, so as to be capable of respectively detecting accelerations in three mutually orthogonal axes, that is, in the directions of the X axis, the Y axis, and the Z axis, and outputting the accelerations in the form of three independent signals; the acceleration sensor can also be four-axis or more acceleration sensors. When the user is ready to pick up the TWS headset from a place where the TWS headset is placed, such as a charging box, a desk, a floor, etc., the TWS headset is in a stationary state with a velocity of zero at the initial moment. In the process of picking up the TWS headset, the G-sensor (acceleration sensor) starts to collect the motion data of the TWS headset, the motion data may be the motion data in a period of time, it is understood that the duration of the period of time (which may be referred to as the detection duration) is a small value, and is only used for determining the motion state, and the motion data of how long time is collected in particular, and can be flexibly set according to the particular type of the TWS headset, wherein the motion data collected by the G-sensor includes X-axis data, Y-axis data and Z-axis data, so that a coordinate system in the TWS headset can be defined.
When detecting the motion data of the TWS headset, the P-sensor (distance sensor) is also collecting the distance data between the TWS headset and the human body, wherein the P-sensor (distance sensor) may be an optical distance sensor, an infrared distance sensor, an ultrasonic distance sensor, and the like. Specifically, the infrared distance sensor in the TWS headset has an infrared transmitting tube and an infrared receiving tube, and when the infrared rays emitted from the transmitting tube are received by the receiving tube, it indicates that the TWS headset is closer to the human body, and when the receiving tube does not receive the infrared rays emitted from the transmitting tube, it indicates that the TWS headset is farther from the human body. When the earphone is close to other parts such as the face and the ears of the user, the distance data between the TWS earphone and the human body can be detected through infrared reflection. The working principle of other types of distance sensors is also different, and the distance is judged by the emission and the reception of certain substances, and the emitted substances can be ultrasonic waves, light pulses and the like.
Step S20, when the motion data and the distance data respectively meet the corresponding set conditions, the TWS earphone plays a preset audio signal and detects the characteristic parameters corresponding to the preset audio signal;
after the TWS earphone acquires the motion data acquired by the G-sensor and the distance data acquired by the P-sensor, whether the TWS earphone is in a motion state or not is judged according to the motion data, if the TWS earphone is in the motion state, whether the distance data reaches a threshold value or not is further judged, and if the distance data reaches the threshold value, a preset audio signal is triggered to be played. And judging whether the TWS earphone is in a motion state or not based on the acceleration values of the X axis, the Y axis and the Z axis in the motion data. Referring to fig. 5, determining whether the TWS headset is in a motion state according to the motion data includes:
step S21, acquiring acceleration values corresponding to three axes in the motion data by the TWS earphone, wherein the three axes are an X axis, a Y axis and a Z axis respectively;
step S22, the TWS earphone compares the acceleration value with a target acceleration value to judge whether the acceleration value changes;
in step S23, if yes, the TWS headset determines that the TWS headset is in a motion state.
When the TWS headset is not changed, i.e. in a static state, the motion data collected by the G-sensor in a period of time is not changed, e.g. the acceleration values collected in half an hour are all (5, 3, 10), wherein the target acceleration data is the acceleration data collected by the TWS headset in the static state before the motion, e.g. the acceleration data collected by the TWS headset in 12: 30, the acceleration data is collected as (5, 3, 8), and at 12: and after 30, the moving state is achieved, and (5, 3, 8) is taken as target acceleration data.
When judging whether the TWS headset is in a moving state, comparing the currently acquired acceleration value with a target acceleration value to judge whether the currently detected acceleration value changes, if the currently detected acceleration value is different from the target acceleration value, it is indicated that the acceleration value changes, the TWS headset is in the moving state, and the moving state may include a walking state and a riding state, where the walking state may include a fast walking state, a slow walking state, a fast running state, a slow running state, and the like, and the riding state may include a riding state, a high-speed rail riding state, a subway riding state, and the like.
After determining the motion state of the TWS headset, it may also be determined whether the motion corresponding to the motion state is an in-ear motion based on the attitude angle, and referring to fig. 6, after determining that the TWS headset is in the motion state, the method further includes:
step S24, calculating the attitude angle of the TWS earphone through the acceleration value by the TWS earphone, and judging whether the attitude angle is in a preset angle range;
in step S25, if yes, the TWS headset infers that the motion corresponding to the motion state is an in-ear motion.
When the TWS headset is in an in-ear state, corresponding attitude angles, such as a pitch angle and a roll angle, exist, and the attitude angles change within a certain range, so the attitude angle of the TWS headset can be obtained by calculating the detected acceleration value, and if the calculated attitude angle is within a preset angle range, such as 30 ° < a < 50 °, it can be inferred that the user has an intention and an action to wear the TWS headset, for example, if the currently calculated attitude angle is 40 °, within the preset angle range of the attitude angle, it can be inferred that the user has an intention and an action to wear the TWS headset.
Further, if it is determined only by the acceleration value that whether the TWS headset is in the ear may be determined by mistake, it is also necessary to determine the distance between the TWS headset and the human body, specifically, a threshold value of the distance between the TWS headset and the human body is preset in the TWS headset, and the threshold value is a range value, such as 0-0.2 cm. And comparing the detected distance data with a threshold value, if the detected distance data reaches the threshold value, concluding that the P-sensor is shielded, and setting the P-sensor at the position of the TWS earphone in the ear, wherein when the motion data detected by the G-sensor and the distance data detected by the P-sensor meet the corresponding conditions at the same time, preliminarily judging that the TWS earphone is in the ear.
Optionally, the in-ear operation of the TWS headset may be preliminarily determined based on the G-sensor + light-sensitive sensor, in an embodiment, one light-sensitive sensor is disposed at an in-ear position of the TWS headset, another light-sensitive sensor is disposed at a position away from the in-ear position, the two light-sensitive sensors are used to detect first luminance data of the TWS headset at the in-ear position and second luminance data of the TWS headset at the position away from the in-ear position, the first luminance data and the second luminance data are further compared to obtain a comparison value, and when the comparison value meets a preset luminance range, such as 30-40, it is indicated that the difference between the luminance of the TWS headset at the in-ear position and the luminance of the TWS headset at the position away from the in-ear position is obvious, and it may be inferred that. When the motion data detected by the G-sensor and the brightness data detected by the light sensor simultaneously meet the corresponding set conditions, the TWS earphone can be preliminarily judged to be in-ear operated.
Optionally, the in-ear operation of the TWS headset can be preliminarily judged based on the G-sensor + temperature sensor, in an embodiment, a temperature sensor is arranged at the in-ear position of the TWS headset and is used for detecting the temperature of the human body, and the detected temperature data is compared with a preset temperature range (35.7-37.5 ℃) to judge whether the temperature data is within the preset temperature range; if the temperature is within the preset temperature range, the user is inferred to have the intention of wearing the earphone, and when the motion data detected by the G-sensor also meets the requirement, the TWS earphone can be preliminarily judged to be in-ear operated.
It should be noted that the TWS headset may also be preliminarily determined to be in-ear operated by using the acceleration sensor, the distance sensor, the light sensor, and the temperature sensor alone.
In some scenes, there may be misjudgment situations in the manner of performing in-ear detection through schemes such as P-Sensor + G-Sensor, G-Sensor + light Sensor, and G-Sensor + temperature Sensor, for example: when the TWS headset is preliminarily judged to be in the ear-in state, whether the wrong judgment condition exists or not needs to be further judged.
Specifically, when the TWS earphone is preliminarily determined to be in an in-ear state, a preset audio signal is played, the preset audio signal may be noise, white noise or other audio signals such as a stable piece of music, and the characteristic parameters of the preset audio signal in a sealed space formed by the human ear and the active noise reduction earphone are detected through the FB MIC. Among them, FB MIC (Feed Back MIC) is a feedback MIC, which is located inside the earphone, can accurately measure "net leakage noise" entering the user's ear, and can be handled cleanly. Further, referring to fig. 7, detecting a characteristic parameter corresponding to a preset audio signal includes:
step S26, the TWS earphone determines the audio type of the preset audio signal;
step S27, the TWS headset detects a characteristic parameter corresponding to the preset audio signal according to the audio type, and different characteristic parameters are detected corresponding to different audio types.
When a preset audio signal is played, the TWS headset needs to determine the audio type of the preset audio signal, such as pink noise, white noise, a section of stable music, and the like, and different audio types correspond to different characteristic parameters, so after the audio type is determined, detection is performed according to the characteristic parameters corresponding to the audio type. When detecting the characteristic parameters, the characteristic parameters are mainly detected under the condition that the earphone is worn or not worn, and the characteristic parameters are mainly detected from two aspects of time domain and frequency domain. It should be noted that, when detecting the characteristic parameters of the audio signal, the detection may be performed from the time domain, or from the frequency domain, or may be performed from both the time domain and the frequency domain, and the specific detection mode is set according to the requirement.
And step S30, the TWS earphone acquires the time domain characteristic value and the frequency domain characteristic value in the characteristic parameter, and determines the in-ear condition of the TWS earphone according to the time domain characteristic value and the frequency domain characteristic value.
After detecting the corresponding characteristic parameters, the TWS earphone acquires time domain characteristic values and frequency domain characteristic values in the characteristic parameters, and determines the in-ear condition of the TWS earphone according to the time domain characteristic values and the frequency domain characteristic values, wherein the time domain characteristic values comprise short-time energy, short-time average zero crossing rate, short-time autocorrelation coefficient, short-time average amplitude and the like; the frequency domain feature values include spectral characteristics, short-time power spectrum, bandwidth, and the like. Determining the in-ear condition of the TWS headset according to the feature value, wherein the feature value detected when the TWS headset is not in-ear needs to be compared with the currently detected feature value, and referring to fig. 8, the determining the in-ear condition of the TWS headset according to the time domain feature value and the frequency domain feature value includes:
step S31, the TWS earphone compares the time domain characteristic value with the first time domain characteristic value, and compares the frequency domain characteristic value with the first frequency domain characteristic value, the first time domain characteristic value and the first frequency domain characteristic value are both characteristic values of the TWS earphone when the TWS earphone is not inserted into the ear;
in step S32, if the time domain characteristic value is different from the first time domain characteristic value and the frequency domain characteristic value is different from the first frequency domain characteristic value, the TWS headset determines that the ear insertion condition of the TWS headset is successful.
The TWS earphone obtains a first time domain characteristic value and a first frequency domain characteristic value when the TWS earphone is not inserted into the ear, compares the currently detected time domain characteristic value with the first time domain characteristic value, and compares the currently detected frequency domain characteristic value with the first frequency domain characteristic value, if the currently detected time domain characteristic value is different from the first time domain characteristic value and the currently detected frequency domain characteristic value is different from the first frequency domain characteristic value, the TWS earphone determines that the TWS earphone is inserted into the ear successfully, namely, when the TWS earphone detects the TWS earphone through P-Sensor + G-Sensor, the phenomenon of misjudgment does not occur. And if the currently detected time domain characteristic value is the same as the first time domain characteristic value and the currently detected frequency domain characteristic value is the same as the first frequency domain characteristic value, determining that the TWS earphone fails to enter the ear, namely, when the TWS earphone detects the ear through P-Sensor + G-Sensor, the phenomenon of misjudgment occurs. In an embodiment, since the feature values and the determination rules of different audio signals are not consistent, the difference features and the determination methods between the wearing condition and the non-wearing condition need to be researched and counted according to specific sound source signals. Referring to fig. 9, fig. 9 shows the short-term energy detected by the FB MIC after the earphone is inserted into the ear and the short-term energy detected by the FB MIC without the earphone being inserted into the ear when the audio signal is white noise, and the difference between the time when the earphone is inserted into the ear and the time when the earphone is not inserted into the ear can be clearly seen from fig. 9, for example, when the earphone is inserted into the ear, the corresponding short-term energy floats above 40, and when the earphone is not inserted into the ear, the corresponding short-term energy floats below 40, and the difference is significant. The short-time energy of FB MIC detection after the earphone is inserted into the ear is obviously different from the short-time energy of FB MIC detection when the earphone is not inserted into the ear, so that the success of inserting the earphone into the ear can be determined. The method utilizes the FB MIC and combines different built-in sound sources to obtain the characteristic difference of audio signals captured by the FB MIC after the earphone is inserted into the ear and when the earphone is not inserted into the ear, thereby solving the problem of P-Sensor +to a certain extent
The problem of misjudgment of the G-Sensor in certain scenes improves the accuracy of the earphone in-ear detection.
In the embodiment, the motion data collected by the first sensor and the distance data collected by the second sensor are obtained, and the distance data is the distance between the TWS earphone and the human body; when the motion data and the distance data respectively meet corresponding set conditions, playing a preset audio signal, and detecting characteristic parameters corresponding to the preset audio signal; and acquiring a time domain characteristic value and a frequency domain characteristic value in the characteristic parameters, and determining the in-ear condition of the TWS earphone according to the time domain characteristic value and the frequency domain characteristic value. The detection scheme based on the P-sensor + G-sensor utilizes the closed space formed by human ears and the noise reduction earphones, detects the signal intensity or other characteristic values captured by the FB MIC by playing a section of preset audio signals to judge whether the earphones are in the ears, and meanwhile, the FB MIC is used as an auxiliary mode to improve the detection accuracy rate of the ear entrance and exit in certain scenes and reduce misjudgment.
Further, with reference to fig. 3, a second embodiment of the present application is presented of an in-ear detection method for a TWS headset.
The second embodiment of the in-ear detection method for a TWS headset differs from the first embodiment of the in-ear detection method for a TWS headset in that after determining the in-ear condition of the TWS headset based on the time domain feature value and the frequency domain feature value, the method further comprises:
step S33, the TWS earphone determines the work mode of the TWS earphone according to the ear-entering condition;
step S34, if the ear entering condition is successful, the TWS earphone determines that the working mode of the TWS earphone is the running mode; or,
in step S35, if the ear insertion condition is an ear insertion failure, the TWS headset determines that the operating mode of the TWS headset is the sleep mode.
Since the operation modes of the TWS headset corresponding to the ear-entering mode and the ear-not-entering mode are different, the operation modes include an operation mode, a sleep mode, a charging mode, and the like. When the in-ear condition of the earphone is successful in-ear, namely in an in-ear state, determining that the working mode of the earphone is an operation mode, and correspondingly controlling the microphone, the loudspeaker and the like of the earphone to work; when the in-ear condition of the earphone is in an in-ear failure state, namely in a non-in-ear state, determining that the working mode of the earphone is a sleep mode or a power-off mode, and correspondingly controlling a microphone, a loudspeaker and the like of the earphone to stop working.
The embodiment automatically switches different working modes based on the in-ear condition of the earphone, so that the earphone is more intelligent, and meanwhile, when the earphone is in a non-in-ear state, the working mode of the earphone is a dormant mode, so that the power consumption of the earphone is saved.
Further, with reference to fig. 4, a third embodiment of the present application is presented of an in-ear detection method for a TWS headset.
The third embodiment of the method for detecting the in-ear of the TWS headset differs from the first and second embodiments of the method for detecting the in-ear of the TWS headset in that after determining the in-ear condition of the TWS headset according to the time domain feature value and the frequency domain feature value, the method further comprises:
step S36, the TWS earphone acquires first motion data acquired by the first sensor and first distance data acquired by the second sensor;
in step S37, if the first motion data changes and the first distance data does not reach the threshold value, the TWS headset determines that the TWS headset is in a non-in-ear state.
The TWS earphone detects first motion data in an in-ear state in real time through the acceleration sensor, detects first distance data in the in-ear state in real time through the distance sensor, and compares the detected first motion data with target motion data, wherein the target motion data refers to the motion data of the earphone in the in-ear state; if the first motion data is different from the target motion data, the earphone is in a motion state, the attitude angle of the earphone is further calculated according to the first motion data, and if the attitude angle does not meet the preset angle range, the intention of the user to remove the earphone can be inferred; and further comparing the first distance data with a distance threshold value, and if the first distance data does not reach the distance threshold value and the calculated attitude angle does not meet a preset angle range, determining that the user removes the earphone, namely the earphone is in a non-in-ear state.
Alternatively, the number of earphones in the non-in-ear state may be detected, and the microphone, the speaker, and the like of the corresponding earphone may be controlled to operate based on the number. If the left earphone and the right earphone are detected to be simultaneously removed, controlling microphones, loudspeakers and the like in the left earphone and the right earphone to stop working; if only the left earphone is detected to be removed, controlling a microphone, a loudspeaker and the like in the left earphone to stop working; and if only the right earphone is detected to be removed, controlling a microphone, a loudspeaker and the like in the right earphone to stop working. Further, a short time period, such as 5s, may be further set, so as to determine whether the earphone is removed due to an accidental drop, and if it is detected that the removed earphone is not worn again within the preset time period, it indicates that the TWS earphone is not removed due to an accidental situation, and accordingly the microphone, the speaker, and the like in the earphone are turned off to stop working; if the situation that the removed earphone is worn again within the preset time period is detected, the TWS earphone is removed due to an unexpected situation, and normal work of the earphone is kept.
In the embodiment, the earphone is determined to be removed according to the first motion data detected by the acceleration sensor and the first distance data detected by the distance sensor, so that the working state of the earphone can be determined in time; meanwhile, the corresponding microphone, the corresponding loudspeaker and the like are controlled to stop working according to the condition that the earphone is removed, so that the power consumption is saved, and the cruising ability of the TWS earphone is further improved.
In addition, the present application also provides a TWS headset comprising a processor, a memory, and an in-ear detection program of the TWS headset stored on the memory and executable on the processor, wherein the TWS headset further comprises a FB MIC, a G-Sensor, and a P-Sensor;
FB MIC: the Feed Back MIC feeds Back the MIC, the MIC is positioned at the inner side of the earphone, the 'net leakage noise' entering the ears of a user can be accurately measured, and the processing is clean;
G-Sensor: the acceleration Sensor is positioned on the inner side (invisible) of the earphone, and when a user takes the earphone out of a charging box, a desktop and other places, the G-Sensor can sense the change of the speed of the earphone;
P-Sensor: and the distance Sensor can shield the P-Sensor when the user wears the earphone, the detected distance data can reach a threshold value, and the intention of the user to wear the earphone can be deduced.
The TWS earphone acquires motion data acquired by the G-Sensor and distance data acquired by the P-Sensor, wherein the distance data is the distance between the TWS earphone and a human body; acquiring an acceleration value in the motion data, calculating an attitude angle of the earphone according to the acceleration value, deducing the intention and the action of wearing the earphone by the user based on the attitude angle, simultaneously comparing the distance data with a corresponding threshold value, and if the distance data reaches the threshold value and the calculated attitude angle is within a preset angle range, preliminarily deducing that the earphone is in an in-ear state. At this time, the TWS headset automatically plays a preset audio signal, detects the time domain and frequency domain characteristic parameters in the audio signal, further obtains the time domain characteristic value and the frequency domain characteristic value in the characteristic parameters, compares the detected time domain characteristic value with the time domain characteristic value when the user is not in the ear, and compares the detected frequency domain characteristic value with the frequency domain characteristic value when the user is not in the ear, if the difference of the comparison result is large, the user is successful in entering the ear, no erroneous judgment occurs, and if the difference of the comparison result is small, the user is failed in entering the ear, and the erroneous judgment occurs.
The embodiment is based on a detection scheme of P-sensor + G-sensor, utilizes a closed space formed by human ears and noise reduction earphones, detects the signal intensity or other characteristic values captured by FB MIC (microphone array) by playing a section of preset audio signals, judges whether the earphones are in the ears or not through the difference between the characteristic values, and meanwhile improves the detection accuracy rate of coming in and going out of the ears in certain scenes by using the FB MIC as an auxiliary mode to reduce misjudgment.
Furthermore, the present application also provides a computer readable storage medium having stored thereon an in-ear detection program for a TWS headset, the in-ear detection program for a TWS headset implementing the steps of the method for in-ear detection of a TWS headset as described above when executed by a processor.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, 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 specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While alternative embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. An in-ear detection method of a TWS headset is characterized by comprising the following steps:
acquiring motion data acquired by a first sensor and distance data acquired by a second sensor, wherein the distance data is the distance between a TWS earphone and a human body;
when the motion data and the distance data respectively meet corresponding set conditions, playing a preset audio signal, and detecting characteristic parameters corresponding to the preset audio signal;
and acquiring a time domain characteristic value and a frequency domain characteristic value in the characteristic parameters, and determining the in-ear condition of the TWS earphone according to the time domain characteristic value and the frequency domain characteristic value.
2. The method of claim 1, wherein the determining the in-ear condition of the TWS headset from the time-domain eigenvalue and the frequency-domain eigenvalue comprises:
comparing the time domain characteristic value with a first time domain characteristic value, and comparing the frequency domain characteristic value with a first frequency domain characteristic value, wherein the first time domain characteristic value and the first frequency domain characteristic value are both characteristic values of the TWS headset when the TWS headset is not in the ear;
and if the time domain characteristic value is different from the first time domain characteristic value and the frequency domain characteristic value is different from the first frequency domain characteristic value, determining that the ear entering condition of the TWS earphone is successful.
3. The method according to claim 1, wherein the detecting the feature parameter corresponding to the preset audio signal comprises:
determining an audio type of the preset audio signal;
and detecting the characteristic parameters corresponding to the preset audio signals according to the audio types, and detecting different characteristic parameters corresponding to different audio types.
4. The method according to any one of claims 1 to 3, wherein before playing the preset audio signal, the method further comprises:
judging whether the TWS earphone is in a motion state or not according to the motion data;
if yes, judging whether the distance data reaches a threshold value;
and if so, triggering the operation of playing the preset audio signal.
5. The method of claim 4, wherein determining whether the TWS headset is in motion based on the motion data comprises:
acquiring acceleration values corresponding to three axes in the motion data, wherein the three axes are an X axis, a Y axis and a Z axis respectively;
comparing the acceleration value with a target acceleration value to judge whether the acceleration value changes;
and if so, determining that the TWS earphone is in a motion state.
6. The method of claim 5, wherein after the determining that the TWS headset is in a motion state, the method further comprises:
calculating the attitude angle of the TWS earphone according to the acceleration value, and judging whether the attitude angle is in a preset angle range;
if yes, the action corresponding to the motion state is inferred to be an in-ear action.
7. The method of any of claims 1-3, wherein after determining the in-ear condition of the TWS headset from the time-domain eigenvalue and the frequency-domain eigenvalue, the method further comprises:
determining the working mode of the TWS earphone according to the ear entering condition;
if the in-ear condition is successful in-ear, determining that the working mode of the TWS earphone is the running mode; or,
and if the in-ear condition is in-ear failure, determining that the working mode of the TWS earphone is a sleep mode.
8. The method of any of claims 1-3, wherein after determining the in-ear condition of the TWS headset from the time-domain eigenvalue and the frequency-domain eigenvalue, the method further comprises:
acquiring first motion data acquired by the first sensor and first distance data acquired by the second sensor;
and if the first motion data changes and the first distance data does not reach a threshold value, determining that the TWS earphone is in a non-in-ear state.
9. A TWS headset comprising a processor, a memory, and an in-ear detection program for a TWS headset stored in the memory and executable on the processor, the processor when executing the in-ear detection program for the TWS headset implementing the steps of the method of any of claims 1 to 8.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon an in-ear detection program of a TWS headset, which when executed by a processor implements the steps of the method according to any of claims 1 to 8.
CN202110274738.7A 2021-03-15 2021-03-15 In-ear detection method of TWS headset, and computer-readable storage medium Pending CN112866876A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110274738.7A CN112866876A (en) 2021-03-15 2021-03-15 In-ear detection method of TWS headset, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110274738.7A CN112866876A (en) 2021-03-15 2021-03-15 In-ear detection method of TWS headset, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN112866876A true CN112866876A (en) 2021-05-28

Family

ID=75994441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110274738.7A Pending CN112866876A (en) 2021-03-15 2021-03-15 In-ear detection method of TWS headset, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN112866876A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113286220A (en) * 2021-05-31 2021-08-20 潍坊歌尔电子有限公司 Wearing state detection method, wearable device and computer readable storage medium
CN113411714A (en) * 2021-07-01 2021-09-17 昆山睿翔讯通通信技术有限公司 Antenna signal intensity-based in-ear detection method for TWS (two way transmission) headset and TWS headset
CN113747299A (en) * 2021-08-24 2021-12-03 深圳市豪恩声学股份有限公司 Earphone and operation control method and system thereof
CN114040297A (en) * 2021-11-30 2022-02-11 歌尔科技有限公司 Earphone switch control method, device, equipment and storage medium
CN114143652A (en) * 2021-11-26 2022-03-04 歌尔科技有限公司 TWS earphone wearing state detection method, device, equipment and medium
CN114374906A (en) * 2021-12-16 2022-04-19 深圳创优声学科技有限公司 TWS earphone limb language operating system and using method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108966087A (en) * 2018-07-26 2018-12-07 歌尔科技有限公司 A kind of wear condition detection method, device and the wireless headset of wireless headset
CN111343534A (en) * 2020-03-02 2020-06-26 昆山众赢昌盛贸易有限公司 Wireless earphone in-ear detection method and wireless earphone
CN111372157A (en) * 2019-12-31 2020-07-03 歌尔科技有限公司 Wireless earphone, wearing detection method thereof and storage medium
CN112218196A (en) * 2019-07-10 2021-01-12 Oppo广东移动通信有限公司 Earphone and earphone control method
CN112272346A (en) * 2020-11-27 2021-01-26 歌尔科技有限公司 In-ear detection method, earphone and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108966087A (en) * 2018-07-26 2018-12-07 歌尔科技有限公司 A kind of wear condition detection method, device and the wireless headset of wireless headset
CN112218196A (en) * 2019-07-10 2021-01-12 Oppo广东移动通信有限公司 Earphone and earphone control method
CN111372157A (en) * 2019-12-31 2020-07-03 歌尔科技有限公司 Wireless earphone, wearing detection method thereof and storage medium
CN111343534A (en) * 2020-03-02 2020-06-26 昆山众赢昌盛贸易有限公司 Wireless earphone in-ear detection method and wireless earphone
CN112272346A (en) * 2020-11-27 2021-01-26 歌尔科技有限公司 In-ear detection method, earphone and computer readable storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113286220A (en) * 2021-05-31 2021-08-20 潍坊歌尔电子有限公司 Wearing state detection method, wearable device and computer readable storage medium
CN113286220B (en) * 2021-05-31 2022-09-20 潍坊歌尔电子有限公司 Wearing state detection method, wearable device and computer readable storage medium
CN113411714A (en) * 2021-07-01 2021-09-17 昆山睿翔讯通通信技术有限公司 Antenna signal intensity-based in-ear detection method for TWS (two way transmission) headset and TWS headset
CN113747299A (en) * 2021-08-24 2021-12-03 深圳市豪恩声学股份有限公司 Earphone and operation control method and system thereof
CN113747299B (en) * 2021-08-24 2024-05-14 深圳市豪恩声学股份有限公司 Earphone and operation control method and system thereof
CN114143652A (en) * 2021-11-26 2022-03-04 歌尔科技有限公司 TWS earphone wearing state detection method, device, equipment and medium
CN114040297A (en) * 2021-11-30 2022-02-11 歌尔科技有限公司 Earphone switch control method, device, equipment and storage medium
CN114374906A (en) * 2021-12-16 2022-04-19 深圳创优声学科技有限公司 TWS earphone limb language operating system and using method

Similar Documents

Publication Publication Date Title
CN112866876A (en) In-ear detection method of TWS headset, and computer-readable storage medium
US11871197B2 (en) Multifunctional earphone system for sports activities
US11871172B2 (en) Stand-alone multifunctional earphone for sports activities
US10582328B2 (en) Audio response based on user worn microphones to direct or adapt program responses system and method
US20170109131A1 (en) Earpiece 3D Sound Localization Using Mixed Sensor Array for Virtual Reality System and Method
US20210377648A1 (en) Different Head Detection In Headphones
CN109121038A (en) It is a kind of to inhibit to leak the wearable device of sound, inhibit leakage sound method and storage medium
US10747337B2 (en) Mechanical detection of a touch movement using a sensor and a special surface pattern system and method
EP2775738A1 (en) Orientation free handsfree device
WO2020207376A1 (en) Denoising method and electronic device
CN112822600B (en) Earphone step counting method, earphone and storage medium
CN105228041A (en) A kind of information processing method and audio output device
CN111683329B (en) Microphone detection method, device, terminal and storage medium
CN108696813A (en) Method for running hearing device and hearing device
WO2017031647A1 (en) Method and apparatus for detecting touch mode
CN110572600A (en) video processing method and electronic equipment
CN104956690B (en) A kind of is in the system for being adapted to voice signal with ear
CN110297543A (en) A kind of audio frequency playing method and terminal device
US10117604B2 (en) 3D sound positioning with distributed sensors
CN110049395B (en) Earphone control method and earphone device
CN109101101B (en) Wearable device control method and device, storage medium and wearable device
CN114264365A (en) Wind noise detection method and device, terminal equipment and storage medium
US20230260537A1 (en) Single Vector Digital Voice Accelerometer
US20240196125A1 (en) Earbud for authenticated sessions in computing devices
EP4322555A1 (en) Electronic device and method for providing ambient sounds when user is in danger

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