Headphone wearing detection method and device
Through the signal difference detection between the in-ear microphone and the outside-the-ear microphone, combined with the AI algorithm, the problem of increased sensors and high misjudgment rate in the existing headphone wearing detection technology is solved, achieving sensor-free accurate wearing status judgment and cost reduction.
Patent Information
- Application Number
- CN202111452299.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-01
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-12-01
AI Technical Summary
Existing headphone wearing detection technology requires adding sensors or playing preset signals, resulting in high hardware costs, complex structures, and high misjudgment rates. In particular, there are challenges in temperature changes and miniaturization design.
By obtaining the difference in sound signals detected by the in-ear microphone and the outside-the-ear microphone, traditional signal processing and AI algorithms are used to determine the wearing status of the headset without adding additional sensors, reducing hardware costs and achieving accurate wearing status judgment.
It implements sensorless headphone wearing detection, reduces hardware cost and power consumption, and can accurately determine the wearing status, including not worn, worn and tightly worn, and is suitable for music playback control and ANC tuning.
Smart Images

Figure CN114157975B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of earphones, and in particular relates to an earphone wearing detection method and device. Background Art
[0002] There are in-ear detection solutions on the market, which are mainly implemented by adding sensors. The most common solution on the market is the optical solution. By drilling a hole in the surface of the earphone to let light through, the optical sensor determines whether the earphone is being worn by detecting the input of light. Some will also use a capacitive detection solution. Through a multi-channel capacitive sensor, the capacitance value in the earphone detection area is obtained and then the regional contact value is calculated to determine the wearing status of the earphone. Regarding the wearing status detection, it is mainly through controlling the audio output device to output a fixed frequency or preset audio signal, and the audio input device receives the audio signal. By comparing the difference in sound pressure level with the preset first threshold range corresponding to the environment type, the wearing status is fed back.
[0003] Currently, there is no pure software solution that can determine the in-ear wearing status based solely on the difference in external noise picked up by the microphone without adding sensors or playing preset signals. Summary of the Invention
[0004] Embodiments of the present invention provide a method and device for detecting whether an earphone is worn, which are used to solve at least one of the above-mentioned technical problems.
[0005] In a first aspect, an embodiment of the present invention provides a method for detecting earphone wearing, comprising: obtaining a difference in sound signals detected by the in-ear microphone and the external-ear microphone; and determining a wearing state of the earphone based on the difference in the sound signals, wherein the wearing state includes not being worn and being worn.
[0006] In a second aspect, an embodiment of the present invention provides an earphone wearing detection device, comprising: an acquisition program module, configured to obtain the difference in sound signals detected by the in-ear microphone and the external-ear microphone; a determination program module, configured to determine the wearing status of the earphone based on the difference in the sound signals, wherein the wearing status includes not worn and worn.
[0007] According to a third aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the headphone wearing detection method of any embodiment of the present invention.
[0008] In a fourth aspect, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer performs the steps of the headphone wearing detection method of any embodiment of the present invention.
[0009] The method and device of the present application obtain the difference in sound signals detected by the in-ear microphone and the external ear microphone and determine the wearing status of the earphone based on the difference in sound signals, thereby achieving the need to determine the wearing status of the earphone through traditional signal processing without adding additional sensors and reducing hardware costs. Furthermore, it can also be used for music playback control, ENC and ANC adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0011] Figure 1 A flowchart of a headphone wearing detection method provided by one embodiment of the present invention;
[0012] Figure 2 A flowchart of another headphone wearing detection method provided by one embodiment of the present invention;
[0013] Figure 3 A flowchart of another headphone wearing detection method provided by an embodiment of the present invention;
[0014] Figure 4 A flowchart of another headphone wearing detection method provided by one embodiment of the present invention;
[0015] Figure 5 A graph showing a capacitance change of a sensor, which is a specific example of a method for detecting earphone wearing in the prior art;
[0016] Figure 6 A diagram showing sound signals detected by an in-ear microphone and an external-ear microphone, which is a specific example of a headphone wearing detection method provided by an embodiment of the present invention;
[0017] Figure 7 This is a flowchart of a specific example of a headphone wearing detection method provided by one embodiment of the present invention;
[0018] Figure 8 A block diagram of an earphone wearing detection device provided by one embodiment of the present invention;
[0019] Figure 9 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0021] Please refer to Figure 1 , which shows a flow chart of an embodiment of an earphone wearing detection method of the present application, wherein the earphone includes an in-ear microphone and an out-ear microphone.
[0022] like Figure 1 As shown, in step 101, the difference between the sound signals detected by the in-ear microphone and the external-ear microphone is obtained;
[0023] In step 102, the wearing state of the earphone is determined based on the difference in the sound signals, where the wearing state includes not being worn and being worn.
[0024] In step 101, the headphone wearing detection device obtains the difference between the sound signals detected by the in-ear microphone and the sound signals detected by the external ear microphone. For example, when the user is not wearing the headphone, the difference between the sound signals detected by the in-ear microphone and the sound signals detected by the external ear microphone is not large. Only when the user is wearing the headphone, there is a relatively obvious difference in the sound signals detected by the in-ear microphone and the sound signals detected by the external ear microphone. For example, the tighter the headphone is worn, the smaller the sound signal detected by the in-ear microphone is. The frequency response difference of the sound signals detected by the in-ear microphone and the sound signals detected by the external ear microphone is calculated based on the frequency response of the sound signals detected by the in-ear microphone and the sound signals detected by the external ear microphone.
[0025] Afterwards, for step 102, the headphone wearing detection device determines the wearing state of the headphone based on the difference in sound signals, wherein the wearing state includes not wearing and wearing. For example, if the frequency response difference of the sound signals detected by the in-ear microphone and the outside-ear microphone is greater than a preset threshold, it can be determined that the wearing state of the headphone is the wearing state; if the frequency response difference of the sound signals detected by the in-ear microphone and the outside-ear microphone is less than the preset threshold, it can be determined that the wearing state of the headphone is the not wearing state.
[0026] The method of this embodiment obtains the difference between the sound signals detected by the in-ear microphone and the external ear microphone and determines the wearing status of the earphone based on the difference in the sound signals. This can achieve the purpose of determining the wearing status of the earphone through traditional signal processing without adding additional sensors and reducing hardware costs.
[0027] Further references Figure 2 , which shows a flow chart of another headphone wearing detection method provided by an embodiment of the present application. Figure 1 A flowchart of the steps further defined in the process of “determining the wearing state of the earphone based on the difference in the sound signal”, wherein the “worn” includes tightly worn.
[0028] like Figure 2 As shown, in step 201, it is determined whether the difference of the sound signal is greater than a first threshold;
[0029] In step 202, if the difference in the sound signal is greater than a first threshold, it is determined that the wearing state of the earphone is tightly fitted.
[0030] In this embodiment, in step 201, the headphone wearing detection device determines whether the difference in sound signals detected by the in-ear microphone and the external-ear microphone is greater than a first threshold. Then, in step 202, if the difference in sound signals is greater than the first threshold, the headphone wearing state is determined to be a tight fit. For example, after the user puts on the headphones, the ambient noise picked up by the in-ear microphone and the external-ear microphone differs significantly, and the sound signal detected by the in-ear microphone gradually begins to be lost. The tighter the headphones are worn, the smaller the sound signal detected by the in-ear microphone. When the difference in frequency response between the sound signal detected by the in-ear microphone and the sound signal detected by the external-ear microphone is greater than a first preset threshold, the headphones can be determined to be a tight fit.
[0031] The method of this embodiment determines whether the difference between the sound signals detected by the in-ear microphone and the external-ear microphone is greater than a first threshold, thereby determining the wearing status of the earphone.
[0032] Further references Figure 3 , which shows a flow chart of another headphone wearing detection method provided by an embodiment of the present application. Figure 2 A flowchart of the steps further defined in the process of “determining the wearing state of the earphone based on the difference in the sound signal”, wherein the wearing includes wearing in the ear.
[0033] like Figure 3 As shown, in step 301, it is determined whether the difference of the sound signal is greater than a second threshold and less than or equal to the first threshold, wherein the second threshold is less than the first threshold;
[0034] In step 302 , if the difference in the sound signal is greater than the second threshold and less than or equal to the first threshold, it is determined that the wearing state of the earphone is in-ear wearing.
[0035] In this embodiment, for step 301, the headphone wearing detection device determines whether the frequency response difference between the sound signals detected by the in-ear microphone and the external-ear microphone is greater than a second threshold and less than or equal to a first threshold, wherein the second threshold is less than the first threshold.
[0036] Then, in step 302, if the frequency response difference between the sound signals detected by the in-ear microphone and the external-ear microphone is greater than the second threshold and less than or equal to the first threshold, it is determined that the wearing state of the earphone is in-ear.
[0037] For example, the tighter the user wears the earphones, the smaller the sound signal detected by the in-ear microphone. If the frequency response difference between the sound signals detected by the in-ear microphone and the external ear microphone is greater than the second threshold and less than or equal to the first threshold, it means that the earphones are worn in the ears but not tightly, or are in a hanging state.
[0038] The method of this embodiment can accurately determine the wearing status of the earphone by determining whether the frequency response difference between the sound signals detected by the in-ear microphone and the external-ear microphone is greater than the second threshold and less than or equal to the first threshold.
[0039] In the method described in the above embodiment, after determining whether the difference in the sound signal is greater than the second threshold and less than or equal to the first threshold, the method further includes:
[0040] If the difference in the sound signals is less than or equal to the second threshold, it is determined that the wearing state of the earphone is not worn. For example, if the difference in the sound signals is less than or equal to the second threshold, it means that the frequency response difference of the sound signals detected by the in-ear microphone and the external ear microphone is not much different, or there is no difference.
[0041] The method of this embodiment can further determine the wearing status of the earphone by determining whether the difference in the sound signal is less than or equal to the second threshold.
[0042] Further references Figure 4 , which shows a flow chart of another headphone wearing detection method provided by an embodiment of the present application. Figure 1 A flowchart of the steps further defined in the process before "obtaining the difference in sound signals detected by the in-ear microphone and the outside-ear microphone", wherein if the earphone is in the charging case, both the in-ear microphone and the outside-ear microphone are turned off.
[0043] like Figure 4As shown, in step 401, it is detected whether the earphone is located in the charging compartment;
[0044] In step 402, if it is detected that the earphone is not in the charging compartment, the in-ear microphone is turned on to detect the strength of the sound signal;
[0045] In step 403, if the detected sound signal is strong, it is determined that the wearing state of the earphone is not worn.
[0046] In this embodiment, in step 401, the headphone wearing detection device detects whether the headphone is in the charging compartment. Then, in step 402, if the headphone is not in the charging compartment, the in-ear microphone is turned on to detect the strength of the sound signal. Finally, in step 403, if the detected sound signal is strong, the wearing status of the headphone is determined to be not being worn. For example, the in-ear microphone and the external ear microphone can be turned on at the same time, or only the in-ear microphone can be turned on. When the sound signal detected by the in-ear microphone is continuously very strong, it can be determined that the headphone is not being worn. If the sound signal detected by the in-ear microphone is weak, it can be determined that the headphone is probably being worn.
[0047] The method of this embodiment determines the wearing status of the earphone by turning on the in-ear microphone to detect the strength of the sound signal, thereby reducing the power consumption of the earphone.
[0048] In the method described in the above embodiment, after turning on the in-ear microphone to detect the strength of the sound signal, the method further includes:
[0049] If the detected sound signal is weak, turn on the outside-ear microphone to obtain the difference between the sound signals detected by the inside-ear microphone and the outside-ear microphone. For example, when the sound signal detected by the inside-ear microphone is relatively weak, the earphones may be worn. When the external noise is weak, the sound signal detected by the inside-ear microphone is also weak. Further, turn on the outside-ear microphone detection to obtain the frequency response difference between the sound signals detected by the inside-ear microphone and the outside-ear microphone.
[0050] The method of this embodiment determines the wearing status of the earphone by turning on the in-ear microphone to detect the strength of the sound signal, thereby reducing the power consumption of the earphone and reducing false triggering.
[0051] In the method described in the above embodiment, after detecting whether the earphone is located in the charging compartment, the method further includes:
[0052] If it is detected that the earphone is in the charging compartment, the in-ear microphone and the external ear microphone are turned off and the device enters the standby state. For example, from the moment the earphone is taken out of the charging compartment, the in-ear microphone and the external ear microphone are turned on to enter the detection state, and then when the earphone is put back into the charging compartment, the in-ear microphone and the external ear microphone are turned off to enter the standby state.
[0053] It should be noted that the above method steps are not used to limit the execution order of each step. In fact, some steps may be executed simultaneously or in the opposite order to the step limit. This application has no limitation on this.
[0054] The following describes some problems encountered by the inventor in the process of implementing the present invention and a specific embodiment of the solution finally determined, so that those skilled in the art can better understand the solution of the present application.
[0055] In the process of implementing this application, the inventors found that the defects in the prior art are mainly caused by the following reasons:
[0056] Please refer to Figure 5 , which shows a capacitance change diagram of a sensor of a specific example of a headphone wearing detection method in the prior art, wherein the ordinate is the raw counts of the sensor output (sensor output) and the abscissa is the time (time (second)).
[0057] like Figure 5 As shown, the capacitance detection technology is to connect the metal part of the earphone housing to the detection circuit, wherein the metal part of the earphone housing includes at least one of the following: a metal earphone housing, a metal component of the earphone housing, and a metal housing of the earphone speaker; by detecting whether the capacitance value between the metal part of the earphone housing and the human ear skin exceeds a preset threshold range, when it exceeds the preset threshold range, it is determined that the earphone has been inserted into the ear. The figure shows the change in capacitance of the sensor before and after no contact with the skin, from no contact (NOTouch) to contact (TOUCH).
[0058] Optical in-ear detection technology uses a hole in the earphone surface to allow light to pass through. When one IO port controls the infrared light-emitting part of the sensor, another IO port simultaneously measures whether there is a high level on the sensor's VOUT pin. After receiving the reflected signal, the VOUT pin outputs a corresponding linear voltage. The stronger the signal, the higher the voltage. When the earphone is worn, a high voltage is output, and the corresponding threshold is used to determine whether it is worn.
[0059] The preset signal sound pressure difference detection technology is that when a user wears headphones, the audio output device is controlled to output a first audio signal with a fixed frequency, and the audio input device is controlled to receive a second audio signal; the first sound pressure level corresponding to the first audio signal is the reference sound pressure level, and the second sound pressure level corresponding to the second audio signal matches the reference sound pressure level; if the sound pressure levels do not match, a prompt signal is issued to remind the user that the headphones are not worn properly.
[0060] Capacitive detection solutions are easily affected by temperature, especially in high-latitude regions. For example, in the cold winter in Northeast China, where temperatures can drop from -20 degrees Celsius outdoors to over 10 degrees Celsius indoors, it is very easy to misjudge the capacitance change, which can lead to wear detection failure.
[0061] The optical detection solution is mainly large in size. Due to structural space limitations on the earphones, it is difficult to stack the PCB in the earphone cavity, which is not conducive to the miniaturization of the earphones. In addition, the optical detection sensor requires drilling holes on the surface of the earphones to let light through, which is not conducive to the waterproof design of the earphones.
[0062] The preset signal sound pressure difference detection requires playing the preset audio or sound wave through the audio output device first, but it must be manually operated by the user, increasing user costs. It can only be used for earphone wearing seal detection and is meaningless for in-ear detection.
[0063] Although it is relatively mature to add sensors, the structure and stacking of the headset hardware must be changed, which poses great challenges to the already very small structure and greatly affects the design of the headset.
[0064] This is achieved by actively playing preset signals, which requires cooperation from the mobile phone and requires active operation from the user, otherwise continuous playback will increase power consumption.
[0065] Furthermore, the existing technology can only detect two states, worn and not worn, or tightly worn and not tightly worn.
[0066] The inventors also found that in order to reduce the volume of the in-ear detection sensor and its impact on the structure, the current approach is to combine multiple sensors into one, such as a single-chip solution of in-ear detection + touch control. This solution has higher integration, does not occupy the three-dimensional space of the headset, does not require drilling holes on the surface of the headset, and reduces the space occupied on the TWS (True Wireless Stereo) headset PCB, where every inch of space is valuable. However, it still cannot avoid occupying the volume. By implementing this solution through a pure software algorithm without adding any components to the existing headset design, it can be achieved by leveraging the differences between speaker playback and microphone capture, because the in-ear detection was originally designed to reduce power consumption, increase headset usage time, and improve user experience. However, relying on manual control of playback would violate the design, and relying solely on microphone capture or solely using speaker playback judgment would require deep learning algorithm implementation.
[0067] The solution of this application is designed and optimized mainly from the following aspects:
[0068] In-ear detection can be applied to TWS true wireless earphones or similar devices to achieve the following functions:
[0069] Determine whether the user is wearing / taking off the earphones and automatically play / pause music on the phone; if the user takes off the earphones and does not wear them for an extended period without returning them to the charging case, the earphones will automatically sleep / shut down to save power; this improves the experience of using true wireless earphones with one or both ears, making switching more seamless by taking one off while the other continues playing.
[0070] Currently, there are two ways for TWS earphones on the market to achieve in-ear detection functions. One is to use the principle of human body induction capacitance for judgment, and the other is to use the emission, reflection and reception of light for judgment. Both require sensors and control chips, and the design positions on TWS true wireless earphones are also different.
[0071] The capacitive solution determines whether the earphones are in the ear by sensing the capacitance of the human body. TWS earphones using the capacitive solution do not require holes in appearance, which makes them look more beautiful. However, the disadvantage is that the error rate is higher and the sensor layout needs to be optimized.
[0072] The optical detection solution utilizes a VCSEL laser emitter, emitting a 940nm infrared laser. The laser is directed in a specific direction and reflected back to form a loop. When a decoding chip in the receiving area receives a valid coded signal, it outputs a level signal to determine whether the earphones are in place. Compared to capacitive detection, optical detection offers the advantage of higher accuracy, but also places higher demands on earphone production and assembly.
[0073] However, both solutions must rely on sensors and control chips, which increases costs on the one hand, and on the other hand, whether holes are punched or not, it will add certain challenges in structural stacking. In particular, dual-feed active noise reduction on TWS headphones has become a trend, and some health and sports applications are gradually beginning to be added. If the wearing detection problem is solved directly through pure soft algorithms without adding sensors, it will be of great help to the ID design and structural stacking of headphone-like devices. Therefore, this solution is specially proposed.
[0074] This solution does not require additional sensors or artificial noise playback. It only needs to intermittently open the air conduction microphones inside and outside the ear to pick up environmental noise. Traditional signal processing is used to compare the frequency response differences of the audio picked up by the inner and outer ear microphones. In combination with AI algorithms, the ambient noise model picked up by the microphones under different groups of people, different environments, and different wearing methods is learned. The binaural transfer function is then used to make decisions and determine the current user's wearing status. There are three states:
[0075] When the user takes the device out of the charging box and prepares to wear it on the earphones, the microphone starts to pick up sound. At this time, the ambient noise picked up by the inner and outer ear microphones tends to be balanced, with small differences. The audio frequency response collected by the inner ear microphone is relatively balanced in low, medium and high frequencies.
[0076] When a user wears headphones, the ambient noise picked up by the inner and outer ear microphones is quite different. The high-frequency part of the audio collected by the inner ear microphone will gradually begin to be lost. The tighter the wearing, the less external noise is picked up. When the user speaks, the human voice collected by the inner and outer ears is related to the tightness of wearing.
[0077] When the user takes the earphones off their ears and prepares to put them into the charging box, the first state is restored until the earphones are placed in the charging box, at which time the earphones start charging and stop picking up sound.
[0078] Please refer to Figure 6 , which shows a diagram of sound signals detected by an in-ear microphone and an external-ear microphone in a specific example of a headphone wearing detection method provided by an embodiment of the present invention.
[0079] like Figure 6As shown in the figure, the three-microphone earphones based on the current mainstream dual-feed ANC (Active Noise Cancellation) solution on the market do not add any additional sensors. When the earphones are taken out of the charging box, the FB MIC (Feedback-microphone) in the ear and the FF MIC (FeedForward-microphone) outside the ear are used to monitor the external environmental noise. Under normal circumstances, when the earphones are placed on the table or held in the hand, the frequency responses collected by the two microphones are almost the same or the difference is not much. However, when the in-ear microphone is placed in the ear canal, the high-frequency energy loss is more serious, and the frequency response curves collected by the two microphones are quite different at this time. With the help of deep neural network learning, the frequency response curves in different wearing states are judged accordingly.
[0080] Please refer to Figure 7 , which shows a flowchart of a specific example of a headphone wearing detection method provided by an embodiment of the present invention.
[0081] like Figure 7 As shown, the algorithm detection module runs on the DSP (Digital Signal Processor) and returns the detection status to the earphones in real time. When the earphones are in the charging compartment, the detection module status is reset and stops detection. The earphones are only in the charging state. The detection module starts working when the earphones are taken out of the charging compartment. When the earphones are put back into the charging compartment, the first-level detection is turned off and the earphones enter the standby state.
[0082] To reduce power consumption, the algorithm detection module includes two detection models. By default, only the first-level monitoring is enabled. The FFMIC and FB MIC monitor external noise in real time. At this time, a simple model with low computational complexity is run. When the high-frequency audio signal detected by the FB MIC is continuously very strong, it is judged that the headset is not being worn and the wearing state is returned to 0. When the high-frequency audio signal detected by the FB MIC is weak, it is judged that the headset may have entered the wearing mode and the second-level detection is enabled. At this time, the frequency response differential operation model is calculated. This model presets two thresholds based on the characteristics of the headset. Threshold 1 (the second threshold) determines whether the headset is being worn, and threshold 2 (the first threshold) determines whether the headset is worn tightly.
[0083] If the first-level detection passes and the detection score of the second-level detection is less than threshold 1 (second threshold), it is considered a false trigger and the first-level detection re-enters the monitoring state. If the second-level detection score is greater than threshold 1 (second threshold) and less than threshold 2 (first threshold), it is considered that it has been worn, but it is an ordinary ear hook and not tight, and the wearing state returns to 1. If the second-level detection score is greater than threshold 2 (first threshold), it returns to wearing state 3, indicating that it has been worn tightly. At this time, the second-level detection module is reset and the first-level monitoring module is enabled again.
[0084] The inventors found that in the process of implementing the present invention, a deeper effect was achieved:
[0085] Effect 1: No additional sensors are required, and sound is picked up only by the built-in air conduction microphone. This is achieved through a purely soft approach, without increasing hardware costs. It enhances the aesthetics of the ID, and the miniaturization and stacking of the structure leave room for further development.
[0086] Effect 2: Through traditional signal processing and AI learning, in addition to detecting whether the earbuds are worn in the ears, it can also detect whether they are worn tightly and return to different states, which can be used for music playback control, ENC and ANC adjustment.
[0087] Effect 3: No manual intervention is required to send excitation signals or music through the headphone speakers, and judgment is made directly by picking up environmental noise, reducing user operation costs.
[0088] Please refer to Figure 8 , which shows a block diagram of an earphone wearing detection device provided by an embodiment of the present invention.
[0089] like Figure 8 As shown, the headphone wearing detection device 800 includes an acquisition program module 810 and a determination program module 820.
[0090] Among them, the acquisition program module 810 is configured to obtain the difference in sound signals detected by the in-ear microphone and the external-ear microphone; the determination program module 820 is configured to determine the wearing status of the headset based on the difference in the sound signals, and the wearing status includes not wearing and wearing.
[0091] It should be understood that Figure 8 Modules and references documented in Figure 1 、 Figure 2 、 Figure 3 and Figure 4 Therefore, the operations and features described above for the method and the corresponding technical effects also apply to Figure 8 The modules in it will not be described in detail here.
[0092] It is worth noting that the modules in the embodiments of the present disclosure are not intended to limit the solutions of the present disclosure. For example, the acquisition program module can be described as a module for obtaining the difference between the sound signals detected by the in-ear microphone and the external-ear microphone. In addition, related functional modules can also be implemented by a hardware processor, such as the acquisition program module, which can also be implemented by a processor, and will not be further described here.
[0093] In some other embodiments, embodiments of the present invention further provide a non-volatile computer storage medium storing computer-executable instructions, which can execute the headphone wearing detection method in any of the above method embodiments;
[0094] As an embodiment, the non-volatile computer storage medium of the present invention stores computer-executable instructions, and the computer-executable instructions are configured as follows:
[0095] Obtaining a difference between the sound signals detected by the in-ear microphone and the sound signals detected by the external-ear microphone;
[0096] A wearing state of the earphone is determined based on the difference in the sound signals, where the wearing state includes not being worn and being worn.
[0097] The non-volatile computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the headphone wearing detection device, etc. In addition, the non-volatile computer-readable storage medium may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the non-volatile computer-readable storage medium may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the headphone wearing detection device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0098] An embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes any of the above-mentioned headphone wearing detection methods.
[0099] Figure 9 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 9 As shown, the device includes: one or more processors 910 and a memory 920, Figure 9 A processor 910 is used as an example. The device of the headphone wearing detection method may further include: an input device 930 and an output device 940. The processor 910, the memory 920, the input device 930 and the output device 940 may be connected via a bus or other means. Figure 9The example of a bus connection is taken. The memory 920 is the non-volatile computer-readable storage medium mentioned above. The processor 910 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 920, that is, implements the headphone wearing detection method of the above method embodiment. The input device 930 can receive input digital or character information, and generate key signal input related to user settings and function control of the communication compensation device. The output device 940 may include a display device such as a display screen.
[0100] The above-mentioned product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0101] As an embodiment, the electronic device is applied to a headphone wearing detection device and is used for a client, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0102] Obtaining a difference between the sound signals detected by the in-ear microphone and the sound signals detected by the external-ear microphone;
[0103] A wearing state of the earphone is determined based on the difference in the sound signals, where the wearing state includes not being worn and being worn.
[0104] The electronic devices of the embodiments of the present application exist in various forms, including but not limited to:
[0105] (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and are primarily designed to provide voice and data communications. These terminals include smartphones (e.g., iPhones), multimedia phones, feature phones, and low-end phones.
[0106] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access. These terminals include PDAs, MIDs, and UMPCs, such as the iPad.
[0107] (3) Portable entertainment devices: These devices can display and play multimedia content. These devices include audio and video players (such as iPods), handheld game consoles, e-books, smart toys, and portable car navigation devices.
[0108] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.
[0109] (5) Other electronic devices with data interaction functions.
[0110] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0111] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or certain parts of the embodiment.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for detecting earphone wearing, for a TWS earphone, wherein the earphone comprises an in-ear microphone and an external-ear microphone, and the method comprises: Detecting whether the earphone is in the charging compartment; If the earphone is in the charging compartment, both the in-ear microphone and the external-ear microphone are turned off; If it is detected that the earphone is not in the charging compartment, the in-ear microphone is turned on and the strength of the sound signal is detected using a simple model; If the detected sound signal is strong, determining that the wearing state of the earphone is not worn; If the detected sound signal is weak, turning on the external ear microphone to obtain a difference between the sound signals detected by the internal ear microphone and the external ear microphone; Obtaining the frequency response difference between the sound signal detected by the in-ear microphone and the sound signal detected by the external-ear microphone through a frequency response difference operation model, wherein the simple model has a smaller amount of calculation than the frequency response difference operation model; The wearing state of the earphone is determined based on the difference in the sound signal, and the wearing state includes not being worn and being worn, wherein the frequency response difference in different wearing states is learned through a neural network, and the user's wearing state is judged according to the frequency response difference.
2. The method according to claim 1, wherein: The wearing includes tightly wearing, and the determining the wearing state of the headset based on the difference in the sound signal includes: Determining whether the difference of the sound signal is greater than a first threshold; If the difference of the sound signals is greater than a first threshold, it is determined that the wearing state of the earphone is tightly worn.
3. The method according to claim 2, wherein: The wearing includes wearing in the ear, and the determining the wearing state of the earphone based on the difference of the sound signal includes: Determine whether the difference of the sound signal is greater than a second threshold and less than or equal to the first threshold, wherein the second threshold is less than the first threshold; If the difference of the sound signals is greater than the second threshold and less than or equal to the first threshold, it is determined that the wearing state of the earphone is in-ear wearing.
4. The method according to claim 3, wherein: After determining whether the difference of the sound signal is greater than a second threshold and less than or equal to the first threshold, the method further includes: If the difference of the sound signals is less than or equal to the second threshold, it is determined that the wearing state of the earphone is not worn.
5. The method according to claim 1, wherein: After detecting whether the earphone is located in the charging compartment, the method further includes: If it is detected that the earphone is in the charging compartment, the in-ear microphone and the external-ear microphone are turned off and the device enters a standby state.
6. An earphone wearing detection device for a TWS earphone, the earphone comprising an in-ear microphone and an external-ear microphone, the device comprising: A detection program module, configured to detect whether the earphone is located in the charging compartment; If the earphone is in the charging compartment, both the in-ear microphone and the external-ear microphone are turned off; if it is detected that the earphone is not in the charging compartment, the in-ear microphone is turned on and the strength of the sound signal is detected using a simple model; if the detected sound signal is strong, it is determined that the wearing state of the earphone is not worn; if the detected sound signal is weak, the external-ear microphone is turned on to obtain the difference between the sound signals detected by the in-ear microphone and the external-ear microphone; An acquisition program module is configured to obtain the frequency response difference between the sound signal detected by the in-ear microphone and the sound signal detected by the external-ear microphone through a frequency response difference operation model, wherein the simple model has a smaller amount of calculation than the frequency response difference operation model; A determination program module is configured to determine a wearing state of the headset based on the difference in the sound signal, wherein the wearing state includes not being worn and being worn, wherein the frequency response difference in different wearing states is learned through a neural network, and the user's wearing state is judged according to the frequency response difference.
7. An electronic device, comprising: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the method described in any one of claims 1 to 5.
8. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
