Method and device for detecting earphone wearing state, earphone, and recording medium
The method enhances earphone wearing state detection accuracy and reduces power consumption by analyzing audio signals with a feedback microphone to set power thresholds, addressing inaccuracies in existing capacitance and optical sensor detection.
Patent Information
- Application Number
- JP2024560543
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-09
- Filing Date
- 2023-12-18
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2043-12-18
AI Technical Summary
Existing methods for detecting earphone wearing state, such as capacitance and optical sensor detection, often result in inaccurate wear detection and increased power consumption due to false determinations when earphones are removed or placed in pockets.
A method utilizing a feedback microphone to collect audio signals, analyze the power spectrum, and determine target power information to accurately differentiate between in-ear and out-ear states by setting power thresholds.
Improves the accuracy of earphone wearing state detection and reduces power consumption by accurately distinguishing between in-ear and out-ear states using audio signal analysis.
Smart Images

Figure 2025541631000001_ABST
Abstract
Description
[Technical Field]
[0001] This application claims priority to a Chinese patent application bearing application number 202311491064.1, filed on November 9, 2023, the entire contents of which are incorporated herein by reference.
[0002] The present application relates to the technical field of terminal control, and more particularly to a method, device, earphone, and recording medium for detecting an earphone wearing state. [Background technology]
[0003] In recent years, the market for TWS earphones (True Wireless Stereo, fully wireless stereo earphones) has been expanding. TWS earphones are popular among consumers because they are small, portable, and easy to use. Currently, mid- to high-end TWS earphones support in-ear detection, which makes it easy to automatically play music when worn and pause music when taken off, making the earphones smarter and more energy-efficient.
[0004] Currently, the mainstream methods for detecting whether TWS earphones are in use are mainly capacitance sensor detection and optical sensor detection. Capacitive sensor detection detects the capacitance of the human body to determine whether the earphones are in-ear. The advantages of capacitance sensor detection are low cost, no need to drill holes in the housing, and a neat appearance, but the disadvantage is a high rate of operation error. Optical sensor detection uses infrared light emission, reflection, and received level signals to determine whether the earphones are in-ear. Compared to capacitance sensor detection, optical sensor detection has the advantage of higher accuracy, but is more expensive, prone to operation errors in some situations, and places higher demands on production and assembly methods.
[0005] However, the above two solutions may erroneously determine that the earphones are in-ear mode. For example, when the earphones are removed and placed on a desk, picked up, or placed in a pocket, the optical or capacitive sensor may easily make a false determination and erroneously determine that the earphones are in-ear mode, resulting in inaccurate wear detection, which will affect the user experience and increase the power consumption of the earphones. Summary of the Invention [Problem to be solved by the invention]
[0006] The embodiments of the present application provide a method, device, earphone, and recording medium for detecting an earphone wearing state, which can improve the accuracy of detecting an earphone wearing state. [Means for solving the problem]
[0007] Regarding the first aspect, a method for detecting an earphone wearing state provided in an embodiment of the present application, comprising: receiving an earphone wearing state detection request; collecting audio via a feedback microphone of the earphone to obtain a feedback audio signal; determining a frequency of the audio; and determining a target frequency at which a power magnitude in the feedback audio signal satisfies a preset condition based on the frequency and an audio collection parameter of the feedback microphone; analyzing a power spectrum of the feedback audio signal to obtain a power spectrum of the feedback audio signal; determining target power information for the target frequency from the power spectrum; If the target power information is equal to or greater than a maximum power threshold set for the target frequency, determining that the wearing state of the earphone is an in-ear state.
[0008] Regarding the second aspect, an embodiment of the present application further provides an earphone wearing state detection device, comprising: a detection request acquisition module for acquiring a detection request for an earphone wearing state; a feedback audio signal acquisition module for collecting audio through a feedback microphone of the earphone to obtain a feedback audio signal; a target frequency determination module for determining a frequency of the audio signal, and determining a target frequency at which a power magnitude in the feedback audio signal satisfies a preset condition based on the frequency and an audio collection parameter of the feedback microphone; a power spectrum determination module for analyzing a power spectrum of the feedback audio signal to obtain a power spectrum of the feedback audio signal; a target power information determination module for determining target power information of the target frequency from the power spectrum; and a wearing state determining module for determining that the wearing state of the earphone is an in-ear state if the target power information is equal to or greater than a maximum power threshold set for the target frequency.
[0009] Regarding the third aspect, an earphone is further provided in an embodiment of the present application, and includes a memory in which a plurality of instructions are stored, and the processor loads the instructions from the memory to perform the steps of any one of the earphone wearing state detection methods provided in the embodiment of the present application.
[0010] Regarding the fourth aspect, a computer-readable recording medium is further provided in an embodiment of the present application, the computer-readable recording medium having a plurality of instructions recorded thereon, the instructions being suitable for being loaded by a processor to perform steps of any one of the earphone wearing state detection methods provided in the embodiment of the present application.
[0011] Regarding the fifth aspect, a computer program product is further provided in an embodiment of the present application, comprising a computer program or instructions, which, when executed by a processor, implements the steps of any one of the earphone wearing status detection methods provided in the embodiment of the present application. [Effects of the Invention]
[0012] According to an embodiment of the present application, a method for detecting an earphone wearing state can be performed, for example, by receiving an earphone wearing state detection request, collecting audio via a feedback microphone of the earphone to obtain a feedback audio signal, determining a frequency of the audio, determining a target frequency at which the power magnitude of the feedback audio signal satisfies a preset condition based on the frequency and audio collection parameters of the feedback microphone, analyzing a power spectrum of the feedback audio signal to obtain the power spectrum of the feedback audio signal, and determining target power information for the target frequency from the power spectrum, and determining that the earphone is in an in-ear state if the target power information is equal to or greater than a maximum power threshold set for the target frequency. By analyzing the power spectrum of the feedback audio signal collected by the feedback microphone, a target frequency at which the power magnitude of the feedback audio signal satisfies a preset condition can be determined, and analyzing the target power information for the target frequency can improve the accuracy of detecting the earphone wearing state.
[0013] In order to more clearly explain the technical solutions in the embodiments of the present application, the drawings necessary for describing the embodiments will be briefly described below. It is clear that the drawings in the following description are only drawings of some embodiments of the present application, and those skilled in the art can derive other drawings based on these drawings without any creative work. [Brief explanation of the drawings]
[0014] [Figure 1] 1 is a flowchart of an embodiment of a method for detecting an earphone wearing state according to an embodiment of the present application. [Figure 2] 1 is a diagram showing the configuration of an earphone wearing state detection device according to an embodiment of the present application; [Figure 3] 1 is a diagram showing a configuration of an earphone according to an embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION
[0015] Below, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. It is clear that the described embodiments are only a part of the embodiments of the present application, and do not constitute all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without any creative effort fall within the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, terms such as "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. Accordingly, a feature defined by "first" or "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, "plurality" means two or more, unless otherwise specifically and explicitly limited.
[0016] The embodiments of the present application provide a method, an apparatus, an earphone, and a computer-readable recording medium for detecting an earphone wearing state.
[0017] Specifically, this embodiment will be described from the perspective of an earphone wearing state detection device, which may be specifically integrated into the earphone, i.e., the earphone wearing state detection method of the embodiment may be performed by the earphone. In one embodiment, the earphone may be a terminal device with a data processing function. Here, the terminal device is an earphone, and is not limited to the type of earphone, and may be, for example, a wired earphone, a wireless earphone, a Bluetooth earphone, a headphone, etc. Here, the earphone may exist independently or as an accessory device on a device, such as a head-mounted display device, and this embodiment does not limit this.
[0018] For example, the earphone wearing state detection device may be specifically integrated into a TWS (True Wireless Stereo) earphone. Here, TWS earphones refer to earphones without conventional wires, including Bluetooth earphones and infrared earphones. TWS earphones support an in-ear detection function. In-ear detection, also known as a wearing detection function, is applied to TWS true wireless stereo earphones and realizes the main function of determining whether the user is wearing or removing the earphones. Currently, TWS earphone wearing detection methods are mainly realized using capacitive sensor detection methods and optical sensor detection methods. For the earphones of the embodiments of this application, wearing state detection is applied to a capacitive sensor detection method, an optical sensor detection method, or a combination or improved sensor detection method thereof.
[0019] Each of these steps is described in detail below with reference to the accompanying drawings. In this embodiment, the execution is performed by an earphone that can invoke the deduplication algorithm. The order in which the following embodiments are described is not intended to limit the preferred order of the embodiments. While a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that shown in the drawings.
[0020] Referring to FIG. 1, the specific flow of the method for detecting the wearing state of the earphones is as follows: Steps 101 to 106. In Step 101, a request to detect the wearing state of the earphones is acquired.
[0021] In this embodiment, the earphone wearing state detection request refers to a request to detect the earphone wearing state. The earphone wearing state includes, but is not limited to, an in-ear state and an out-ear state. Here, the in-ear state refers to a state in which the earphone is already worn and is inside the user's ear. The in-ear state includes a state in which the earphone has just been inserted into the user's ear, as well as a state in which the earphone remains inside the user's ear. The out-ear state refers to a state in which the earphone is not worn and is outside the user's ear. For example, when the earphone is in an earphone box, on a desk, in the user's hand, or in the user's pocket, the earphone is considered to be in the out-ear state.
[0022] In this embodiment, the earphone refers to the earphone that needs to be detected for the earphone wearing state in this embodiment, such as an active noise canceling earphone, or the earphone is a completely wireless stereo earbud earphone. Specifically, if the earphone is a completely wireless stereo earbud earphone, the wireless connection method between this earphone and another earphone or a smart device can be at least one of WIFI communication method, classic Bluetooth communication method, BLE communication method, LE Audio, ANT communication method, RF4CE communication method, Zigbee communication method, NFC communication method, and UWB communication method.
[0023] In one embodiment, the earphone wearing status detection request can be triggered according to the actual situation.
[0024] For example, the step of acquiring the request to detect the earphone wearing state specifically includes: periodically generating a request to detect whether the earphone is being worn; or The method may further include generating an earphone wearing state detection request when the sensor of the earphone identifies that the wearing state of the earphone has switched to an in-ear state.
[0025] In this example, a timer is used to determine the time, and an earphone wearing detection request is generated when the timer is triggered. The duration of the timer-determined time and the generation of the earphone wearing detection request when the timer is triggered can be adjusted according to actual circumstances. For example, the timer trigger time is 1.5 seconds, that is, the earphone wearing detection request is generated every 1.5 seconds. By generating the earphone wearing detection request at a reasonable regular interval, the earphone wearing detection request can be responded to quickly, improving the response efficiency of the earphone wearing detection and improving the user experience.
[0026] In this example, based on the type of earphone sensor, the earphone sensor collects a signal related to the type of earphone sensor, and determines whether the wearing state of the earphone has changed based on the collected signal. For example, if the earphone sensor is a capacitance sensor, the earphone capacitance sensor collects a capacitance value, and determines whether the wearing state of the earphone has changed based on a change in the capacitance value. For example, if the earphone sensor is an optical sensor, the earphone optical sensor collects a level signal, and determines whether the wearing state of the earphone has changed based on a change in the level signal. When the earphone sensor determines that the wearing state of the earphone has switched to the in-ear state based on the collected signal, a request for detecting the earphone wearing state is generated. Determining that the wearing state of the earphone has switched to the in-ear state may, for example, be a switch from the out-ear state to the in-ear state, or a switch from another state to the in-ear state. If the earphone sensor determines based on the collected signals that the wearing state of the earphone has switched to the out-ear state, or that the wearing state of the earphone is continuously in the out-ear state, or that the wearing state of the earphone is continuously in the in-ear state, the earphone sensor continues to collect signals, where a continuous out-ear state refers to the duration of the out-ear state exceeding a preset duration, and a continuous in-ear state refers to the duration of the in-ear state exceeding a preset duration, which is set according to actual circumstances, for example, the preset duration is 200 milliseconds.
[0027] In step 102, audio is collected by the feedback microphone of the earphone to obtain a feedback audio signal.
[0028] In this embodiment, the feedback microphone may be located at the tip of the speaker of the earphone to collect audio signals in the current environment, including but not limited to, a suggested sound, friction sounds between the earphone and the ear canal when the earphone is in-ear, and sounds from the external environment. The suggested sound can be played through the earphone, and the suggested sound has a preset frequency.
[0029] In this embodiment, when the audio includes a prompt sound, the feedback microphone of the earphone collects the audio for the prompt sound to obtain a feedback audio signal; when the audio includes an external environment sound, the feedback microphone of the earphone collects the audio for the external environment sound to obtain a feedback audio signal; specifically, the audio settings can be set according to actual situations.
[0030] In addition, when the audio includes friction noise between the earphone and the ear canal when the earphone is in-ear and sounds from the external environment, it is determined according to the specific situation of the earphone. For example, when the actual wearing state of the earphone is in-ear, the audio collected by the feedback microphone is mainly friction noise between the earphone and the ear canal when the earphone is in-ear. When the actual wearing state of the earphone is out-ear, the audio collected by the feedback microphone is mainly sounds from the external environment.
[0031] In this embodiment, when the audio is a prompt sound, the prompt sound is used to detect whether the earphone is being worn. The frequency of the prompt sound includes, but is not limited to, ultrasonic, subsonic, and audible sound. Here, ultrasonic refers to sound waves with a frequency range above 20,000 Hz, subsonic refers to sound waves with a frequency range below 20 Hz, and audible refers to sound waves with a frequency range between 20 Hz and 20,000 Hz, which is a frequency range audible to the human ear. As long as the frequency of the prompt sound is within the audible frequency range, the prompt sound can be set according to the actual situation. For example, the prompt sound may be a two-tone "ding ding" sound, or a prompt saying "activating the in-ear detection function." The frequency of the prompt sound can be set according to the specific situation. For example, a prompt sound with a frequency of 20 Hz or a prompt sound with a frequency of 10 Hz can be set. In one embodiment, subsonic sound is set as the prompt sound.
[0032] Furthermore, when the earphone speaker is used to play the secondary sound waves, the width of the secondary sound waves collected by the feedback microphone is significantly different when the earphone is inside the ear and when it is not inside the ear. When the earphone is inside the ear, the width of the secondary sound waves collected by the feedback microphone is significantly larger, and by using the secondary sound waves as the presentation sound, the wearing state of the earphone can be detected, and the detection result can be more accurate.
[0033] In step 103, a frequency of the audio is determined, and a target frequency at which the power magnitude in the feedback audio signal meets a preset condition is determined based on the frequency and an audio collection parameter of the feedback microphone.
[0034] In this embodiment, a suitable filter is adopted to select a band signal to be analyzed from the audio based on the frequency range of the band signal to be analyzed, and the frequency corresponding to the band signal is the frequency of the audio. The frequency range of the band signal to be analyzed determines the type of filter. For example, when the band signal to be analyzed is a low-frequency signal, the filter is a low-frequency filter.
[0035] In this embodiment, the audio collection parameters of the feedback microphone include, but are not limited to, signal length, signal sampling rate, and signal type. Here, signal length refers to the length of time for collecting an audio signal. For example, the collected signal length is 0.5 seconds to 1.2 seconds. Sampling rate refers to the number of audio signal samples per unit time. For example, a sampling rate of 16k means 16,000 samples per second. Signal type refers to the sound wave type of the audio signal. For example, the audio signal is ultrasonic or subsonic.
[0036] In this embodiment, the audio collection parameters of the feedback microphone may further be any one or combination of a time domain distribution parameter, a frequency domain distribution parameter, a time domain distribution parameter variation, a frequency domain distribution parameter variation, an energy in the time domain and / or the frequency domain, and an energy variation in the time domain and / or the frequency domain. Based on the similarity of the time domain distribution parameter, the frequency domain distribution parameter, and the energy in the time domain and / or the frequency domain, the parameters of the preset audio signal with the highest similarity can be selected.
[0037] In this embodiment, the target frequency refers to a frequency in the feedback audio signal for detecting the earphone wearing state. When the audio is a presentation sound, if this frequency is a preset frequency of the presentation sound, the target frequency is close to the frequency of the played presentation sound. The power magnitude satisfying the preset condition may be a frequency at which the power of this target frequency in the feedback audio signal is maximum, or the power of this target frequency may be a minimum power threshold set to indicate that the earphone is in an in-ear state. This preset condition can be adjusted according to actual situations. By determining a target frequency at which the power magnitude of the feedback audio signal satisfies the preset condition, the target frequency is analyzed, thereby improving the accuracy of detecting the earphone wearing state.
[0038] In one example, the audio collection parameters include a sampling rate, and the step of determining a target frequency at which the magnitude of power in the feedback audio signal satisfies a preset condition based on the frequency and the audio collection parameters of the feedback microphone includes: performing a power spectrum calculation on the feedback audio signal based on a sampling rate and a frequency; and determining the frequency with the maximum power as the target frequency based on the power spectrum.
[0039] In this embodiment, a Fourier transform is performed on the signal for each frame in the feedback audio signal based on the sampling rate and frequency, the frequency and power of the signal for each frame are determined, and the frequency corresponding to the maximum power is taken as the target frequency.
[0040] In another example, the audio collection parameters include a sampling rate, and the step of determining a target frequency at which a power magnitude in the feedback audio signal satisfies a preset condition based on the frequency and the audio collection parameters of the feedback microphone includes: calculating a frequency of maximum power in the audio signal collected by the feedback microphone based on the sampling rate; If the difference between the maximum frequency of the power and the frequency is greater than the frequency difference, adjusting the sampling rate until the difference is equal to or greater than the frequency difference, and setting the maximum frequency of the power as a target frequency; If the difference between the maximum frequency of the power and the frequency is not larger than the frequency difference, the maximum frequency of the power is set as the target frequency.
[0041] In this embodiment, the maximum power frequency refers to the frequency corresponding to the maximum power calculated from the audio signal collected by the feedback microphone. The frequency difference represents the maximum frequency difference between the maximum power frequency in the audio signal collected by the feedback microphone and the audio frequency. The sampling rate adjustment is, for example, adjusting the original sampling rate of 16k to 32k.
[0042] In step 104, a power spectrum is analyzed for the feedback audio signal to obtain a power spectrum of the feedback audio signal.
[0043] In this embodiment, the power spectrum is an abbreviation of power spectral density function, which is defined as the signal power per unit frequency band. It shows the change in signal power with frequency, i.e., the distribution of signal power in the frequency domain. The power spectrum shows the change in signal power with frequency.
[0044] In one embodiment, a filtering process is performed on the feedback audio signal based on the frequency of the audio, a power spectrum of the filtered feedback audio signal is determined, and power corresponding to audio signals of the same frequency in this power spectrum is averaged to obtain an average power spectrum of signals of several frames in this feedback audio signal.
[0045] In this embodiment, when the audio frequency is subharmonic, the feedback audio signal is low-pass filtered, for example, when the audio frequency is 20 Hz, the feedback audio signal is low-pass filtered to retain the frequency of 0-120 Hz in the feedback audio signal.
[0046] In this embodiment, the feedback audio signal collected by the feedback microphone is filtered and its power spectrum is analyzed to obtain the average power spectrum of a few frames of the feedback audio signal collected by the feedback microphone. The feedback audio signal has strong energy when in the in-ear state, and analyzing the power spectrum of this feedback audio signal improves the accuracy of detecting the earphone wearing state.
[0047] In step 105, target power information for the target frequency is determined from the power spectrum.
[0048] In this embodiment, the target power information refers to the power information of the target frequency. For example, when the target frequency is 32 Hz, the power corresponding to the frequency of 32 Hz in the power spectrum is the target power information.
[0049] When the power spectrum is an average power spectrum, there is a one-to-one relationship between the target frequency and the power spectrum, that is, there is a one-to-one relationship between the target frequency and the power information of the target frequency, and it can be understood that if the target frequency is known, the power information of the target frequency can be determined. Also, when the power spectrum is not an average power spectrum, all powers corresponding to the target frequency can be obtained from the power spectrum, and all powers can be used as target power information. The power in the target power information can be averaged or weighted averaged, and specifically can be set according to actual conditions.
[0050] In this embodiment, by determining the power information of the target frequency, the wearing state of the earphone can be determined by analyzing the power difference between the out-ear state and the in-ear state of the target frequency, thereby improving the accuracy of detecting the wearing state of the earphone.
[0051] In step 106, if the target power information is equal to or greater than the maximum power threshold set for the target frequency, it is determined that the wearing state of the earphone is an in-ear state.
[0052] In this embodiment, the maximum power threshold represents the power threshold at which the audio signal collected by the feedback microphone is determined to be in the in-ear state at the target frequency, i.e., if the target power information is equal to or greater than the power threshold at which the audio signal collected by the feedback microphone is determined to be in the in-ear state at the target frequency, it can be determined that the earphones are worn in the in-ear state.
[0053] It is understood that the maximum power threshold is obtained by experimentally measuring in advance. The purpose of setting the maximum power threshold is to identify whether the earphones are in an in-ear state by comparing the target power information with the maximum power threshold. When the earphones are switched to the in-ear state, the target power information and the maximum power threshold are used to determine whether the earphones are in an in-ear state, thereby improving the accuracy of detecting the earphones' wearing state.
[0054] In this embodiment, if the target power information is lower than the maximum power threshold set for the target frequency, the wearing state of the earphone can be determined according to the actual situation. For example, if the target power information is lower than the maximum power threshold set for the target frequency, the wearing state of the earphone is directly determined to be in the out-of-ear state. For example, if the target power information is lower than the maximum power threshold set for the target frequency, the wearing state of the earphone is determined by further analyzing the target power information. Based on the target power information and the maximum power threshold, it is determined whether the earphone is in the in-ear state, thereby improving the accuracy of detecting the wearing state of the earphone.
[0055] In one embodiment, after the step of determining that the wearing state of the earphone is an in-ear state if the target power information is equal to or greater than a maximum power threshold set for the target frequency, The method further includes determining that the wearing state of the earphone is an out-of-ear state if the target power information is lower than a minimum power threshold set for the target frequency.
[0056] In this example, the power thresholds set for the target frequency include a maximum power threshold and a minimum power threshold, the maximum power threshold representing the power threshold at which the in-ear state is determined under the target frequency in the audio signal collected by the feedback microphone, and the minimum power threshold representing the power threshold at which the out-ear state is determined under the target frequency in the audio signal collected by the feedback microphone. That is, if the target power information is equal to or greater than the maximum power threshold, it can be determined that the wearing state of the earphones is the in-ear state, and if the target power information is lower than the minimum power threshold, it can be determined that the wearing state of the earphones is the in-ear state. If the target power information is within the range between the minimum power threshold and the maximum power threshold, it cannot be determined that the earphones are wearing.
[0057] It is understood that the maximum power threshold and the minimum power threshold are obtained by experimentally measuring them in advance. The purpose of setting the maximum power threshold is to identify whether the earphones are worn in an in-ear state by comparing the target power information with the maximum power threshold. The purpose of setting the minimum power threshold is to identify whether the earphones are worn in an out-ear state by comparing the target power information with the minimum power threshold. When the earphones are switched to the in-ear state, the target power information and the maximum power threshold are used to determine whether the earphones are indeed in the in-ear state, or the target power information and the minimum power threshold are used to determine whether the earphones are worn in an out-ear state, thereby improving the accuracy of detecting the earphone wearing state.
[0058] In one embodiment, when collecting audio via a feedback microphone of the earphone, audio is also collected via a feedforward microphone of the earphone to obtain a feedforward audio signal; The earphone wearing state detection method includes: analyzing a difference feature for the feedforward audio signal and the feedback audio signal to obtain a difference feature value for the feedforward audio signal and the feedback audio signal; If the difference feature value is equal to or greater than a preset difference feature maximum threshold value representing a maximum difference feature value of the audio signals collected by the feedback microphone and the feedforward microphone in an in-ear state, determining that the wearing state of the earphone is an in-ear state.
[0059] In this embodiment, the feedforward microphone may be located on the earphone housing closer to the outside of the ear to collect audio signals from the external environment of the earphone. For example, when the earphone is actually worn in an in-ear state, the audio collected by the feedforward microphone is mainly frictional noise generated between the earphone and the ear canal. When the earphone is actually worn in an out-ear state, the audio collected by the feedforward microphone is the sound of the external environment.
[0060] In this embodiment, the term "difference feature analysis" refers to a process of analyzing the difference between the features of a feedforward audio signal and the features of a feedback audio signal. The dissimilarity feature analysis includes, but is not limited to, distance dissimilarity feature analysis, time domain dissimilarity feature analysis, and frequency domain dissimilarity feature analysis. Here, the term "distance dissimilarity feature analysis" refers to a process of analyzing the dissimilarity feature in the time domain coordinates of the feedforward audio signal and the feedback audio signal. The term "time domain dissimilarity feature analysis" refers to a process of analyzing the dissimilarity feature in the time domain of the feedforward audio signal and the time domain of the feedback audio signal, and the term "frequency domain dissimilarity feature analysis" refers to a process of analyzing the dissimilarity feature in the frequency domain of the feedforward audio signal and the frequency domain of the feedback audio signal.
[0061] In one example, a distance dissimilarity feature analysis is performed on the feedforward audio signal and the feedback audio signal to obtain dissimilarity feature values of the feedforward audio signal and the feedback audio signal.
[0062] In this example, the features of the feedforward audio signal and the features of the feedback audio signal are taken as two samples, and the distance difference between each of the two corresponding features in the two samples is calculated. Based on all the calculated distance difference features, the difference feature values of the feedforward audio signal and the feedback audio signal are determined.
[0063] In this example, the distance analysis may be implemented using, but not limited to, Euclidean distance and Bray-Curtis distance, and the Bray-Curtis distance may be used to perform distance difference feature analysis on the feedforward audio signal and the feedback audio signal.
[0064] In this embodiment, the maximum threshold value of the preset dissimilarity feature represents the maximum dissimilarity feature value of the audio signals collected by the feedback microphone and the feedforward microphone in the in-ear state, i.e., if the dissimilarity feature value is equal to or greater than the maximum threshold value of the preset dissimilarity feature, it can be determined that the earphones are worn in the in-ear state.
[0065] It is understood that the maximum threshold value of the preset distinctive feature is obtained by experimental measurement in advance. The purpose of setting the maximum threshold value of the preset distinctive feature is to identify whether the earphones are worn in an in-ear state by comparing the distinctive feature value with the maximum threshold value of the preset distinctive feature. When the earphones are switched to the in-ear state, the distinctive feature value and the maximum threshold value of the preset distinctive feature are used to determine whether the earphones are indeed worn in an in-ear state, thereby improving the accuracy of detecting the earphones' wearing state.
[0066] In one embodiment, before performing a differential feature analysis on the feedforward audio signal and the feedback audio signal, the earphone wearing state detection method includes: determining whether the target power information is lower than a minimum power threshold established for the target frequency; If the target power information is greater than or equal to a minimum power threshold set for the target frequency and less than or equal to a maximum power threshold set for the target frequency, performing a differential feature analysis on the feedforward audio signal and the feedback audio signal.
[0067] In this embodiment, the power thresholds set for the target frequency include a maximum power threshold and a minimum power threshold, the maximum power threshold representing the power threshold at which the in-ear state is determined at the target frequency in the audio signal collected by the feedback microphone, and the minimum power threshold representing the power threshold at which the out-ear state is determined at the target frequency in the audio signal collected by the feedback microphone. That is, if the target power information is equal to or greater than the maximum power threshold, it can be determined that the earphones are worn in the in-ear state. If the target power information is lower than the minimum power threshold, it can be determined that the earphones are worn in the in-ear state. If the target power information is within the range between the minimum power threshold and the maximum power threshold, it is not possible to determine that the earphones are worn in. That is, if the target power information is equal to or greater than the minimum power threshold set for the target frequency and less than the maximum power threshold set for the target frequency, a step of performing a differential feature analysis on the feedforward audio signal and the feedback audio signal is performed.
[0068] It is understood that the maximum power threshold and the minimum power threshold are obtained by experimentally measuring in advance. The purpose of setting the maximum power threshold is to identify whether the earphones are worn in an in-ear state by comparing the target power information with the maximum power threshold. The purpose of setting the minimum power threshold is to identify whether the earphones are worn in an out-ear state by comparing the target power information with the minimum power threshold. When the earphones are switched to the in-ear state, the target power information and the maximum power threshold are used to determine whether the earphones are indeed in the in-ear state, or the target power information and the minimum power threshold are used to determine whether the earphones are worn in an out-ear state, thereby improving the accuracy of detecting the earphone wearing state.
[0069] In one embodiment, the earphone wearing state detection method includes: if the dissimilarity feature value is lower than the maximum threshold value of the preset dissimilarity feature, performing a relevance analysis on the feedforward audio signal and the feedback audio signal to determine a relevance coefficient; If the distinctiveness feature value is higher than a preset distinctiveness feature minimum threshold and the relevance coefficient is lower than a preset relevance coefficient, determining that the wearing state of the earphones is an in-ear state; otherwise, determining that the wearing state of the earphones is an out-ear state; Here, the minimum threshold value of the preset dissimilarity feature represents the minimum dissimilarity feature value of the audio signals collected by the feedback microphone and the feedforward microphone in an in-ear state, and the preset relevance coefficient represents the maximum relevance of the audio signals collected by the feedback microphone and the feedforward microphone in an in-ear state.
[0070] In this embodiment, the preset relevance coefficient is intended to represent the maximum relevance of the audio signals collected by the feedback microphone and the feedforward microphone in an in-ear state.
[0071] When the earphones are worn in an out-of-ear state and the audio includes the presentation sound, the audio signal collected by the feedback microphone is mainly the sound of the external environment and the presentation sound, so it is understandable that the feedback audio signal is generated based on the sound of the external environment and the presentation sound. The audio signal collected by the feedforward microphone is mainly the sound of the external environment, so the feedforward audio signal is generated based on the sound of the external environment. Therefore, when the earphones are worn in an out-of-ear state, the correlation between the audio signal collected by the feedback microphone and the audio signal collected by the feedforward microphone is relatively large.
[0072] When the earphones are worn in the in-ear state and the audio includes a presentation sound, the audio signal collected by the feedback microphone is the presentation sound, and the feedback audio signal is generated based on this presentation sound. The audio signal collected by the feedforward microphone is the friction sound between the earphones and the ear canal when the earphones are worn in the in-ear state, and the feedforward audio signal is generated based on the friction sound between the earphones and the ear canal when the earphones are worn in the in-ear state. Therefore, when the earphones are worn in the in-ear state, the correlation between the audio signal collected by the feedback microphone and the audio signal collected by the feedforward microphone is relatively small.
[0073] It is understood that the preset relevance coefficient can be obtained by experimentally measuring in advance, for example, the preset relevance coefficient of the audio signal collected by the feedback microphone and the audio signal collected by the feedforward microphone when the earphones are worn in the in-ear state is set to 0.3, and the preset relevance coefficient of the audio signal collected by the feedback microphone and the audio signal collected by the feedforward microphone when the earphones are worn in the out-ear state is set to 0.8.
[0074] In this embodiment, the purpose of setting the preset relevance coefficient is to identify whether the wearing state of the earphone is in-ear by comparing the relevance coefficient of the feedforward audio signal and the feedback audio signal with the preset relevance coefficient. When the earphone is switched to the in-ear state, the relevance coefficient of the feedforward audio signal and the feedback audio signal and the preset relevance coefficient are used to determine whether the earphone is indeed in-ear. If the difference feature value is higher than the minimum threshold of the preset difference feature and the relevance coefficient is lower than the preset relevance coefficient, the wearing state of the earphone is determined to be in-ear; otherwise, the wearing state of the earphone is determined to be out-ear. By incorporating the difference feature and the relevance coefficient of the feedforward audio signal and the feedback audio signal, the accuracy of detecting the wearing state of the earphone is improved.
[0075] This embodiment further provides an earphone wearing state detection device, which may be specifically integrated into the earphone.
[0076] For example, as shown in FIG. 2, the device for detecting the state of earphone wearing: a detection request acquisition module 201 that acquires a detection request for an earphone wearing state; a feedback audio signal acquisition module 202 for collecting audio through a feedback microphone of the earphone to obtain a feedback audio signal; a target frequency determination module 203 for determining a frequency of the audio signal and determining a target frequency at which the power magnitude of the feedback audio signal satisfies a preset condition based on the frequency and an audio collection parameter of the feedback microphone; a power spectrum determination module 204 for performing a power spectrum analysis on the feedback audio signal to obtain a power spectrum of the feedback audio signal; a target power information determination module 205 for determining target power information of the target frequency from the power spectrum; The earphone may further include a wearing state determination module 206 that determines that the wearing state of the earphone is an in-ear state if the target power information is equal to or greater than a maximum power threshold set for the target frequency.
[0077] In the device according to the embodiment of the present application, when collecting audio through the feedback microphone of the earphone, the feedback audio signal acquisition module 202 also collects audio through the feedforward microphone of the earphone to obtain a feedforward audio signal; The device for detecting whether the earphone is worn is a distinctive feature value determining unit for performing distinctive feature analysis on the feedforward audio signal and the feedback audio signal to obtain distinctive feature values of the feedforward audio signal and the feedback audio signal; and a first wearing state determination unit for determining that the wearing state of the earphone is an in-ear state if the difference feature value is equal to or greater than a maximum threshold value of a preset difference feature, the maximum threshold value of the preset difference feature representing a maximum difference feature value of audio signals collected by the feedback microphone and the feedforward microphone in an in-ear state.
[0078] In the apparatus according to the embodiment of the present application, before performing a differential feature analysis on the feedforward audio signal and the feedback audio signal, the differential feature value determining unit: a determining unit for determining whether the target power information is lower than a minimum power threshold set for the target frequency; and a differential feature analysis execution unit that executes a step of performing differential feature analysis on the feedforward audio signal and the feedback audio signal if the target power information is equal to or greater than a minimum power threshold set for the target frequency and equal to or less than a maximum power threshold set for the target frequency.
[0079] In the device according to the embodiment of the present application, a relevance analysis unit for performing a relevance analysis on the feedforward audio signal and the feedback audio signal to determine a relevance coefficient if the dissimilarity feature value is lower than the maximum threshold value of the preset dissimilarity feature; a second wearing state determining unit for determining that the wearing state of the earphone is an in-ear state if the distinctiveness feature value is higher than a preset distinctiveness feature minimum threshold value and the relevance coefficient is lower than a preset relevance coefficient; otherwise, determining that the wearing state of the earphone is an out-ear state; Here, the minimum threshold value of the preset dissimilarity feature represents the minimum dissimilarity feature value of the audio signals collected by the feedback microphone and the feedforward microphone in an in-ear state, and the preset relevance coefficient represents the maximum relevance of the audio signals collected by the feedback microphone and the feedforward microphone in an in-ear state.
[0080] In the device according to the embodiment of the present application, after the wearing state determination module 206, The earphone may further include an out-ear state determining unit that determines that the wearing state of the earphone is an out-ear state when the target power information is lower than a minimum power threshold set for the target frequency.
[0081] In one embodiment, in the device according to the embodiment of the present application, the audio collection parameters include a sampling rate, and the target frequency determination module 203 is a frequency determination unit for calculating a frequency of maximum power in the audio signal collected by the feedback microphone based on the sampling rate; a first target frequency determination unit that, if a difference between the maximum power frequency and the frequency is greater than a frequency difference, adjusts the sampling rate until the difference is equal to or less than the frequency difference, and sets the maximum power frequency as a target frequency; and a second target frequency determination unit that sets the frequency with the maximum power as the target frequency if the difference between the frequency with the maximum power and the frequency is equal to or less than the frequency difference.
[0082] In one embodiment, in the device according to the embodiment of the present application, the detection request acquisition module 201 acquires the detection request of the earphone wearing state by: a first generating unit for periodically generating an earphone wearing state detection request; or The sensor of the earphone includes a second generating unit for generating an earphone wearing state detection request when the sensor of the earphone identifies that the wearing state of the earphone has switched to an in-ear state.
[0083] According to the device of this embodiment, by analyzing the power spectrum of the feedback audio signal collected by the feedback microphone, it is possible to determine the target frequency at which the power magnitude of the feedback audio signal satisfies a preset condition, and by analyzing the target power information of the target frequency, it is possible to improve the accuracy of detecting the wearing state of the earphone.
[0084] Accordingly, the embodiments of the present application further provide an earphone, and the type of the earphone is not limited, for example, a wired earphone, a wireless earphone, a Bluetooth earphone, a headphone, etc.
[0085] As shown in Figure 3, Figure 3 is a diagram illustrating the configuration of an earphone provided in an embodiment of the present application. The earphone 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable recording media, and a computer program stored in the memory 302 and runnable by the processor. The processor 301 and the memory 302 are electrically connected. Those skilled in the art will understand that the configuration of the earphone shown in the drawing is not limited to the earphone, and that the earphone may include more or fewer components than those shown, or may combine some components, or may have different component arrangements.
[0086] The processor 301 is the control center of the earphone 300, and connects each part of the entire earphone 300 using various interfaces and lines, and executes various functions of the earphone 300 and processes data by running or loading software programs and / or units stored in the memory 302 and by accessing data stored in the memory 302. The processor 301 may be a processor CPU, a network processor (NP), etc., and can realize or execute each method, step, and logic block diagram disclosed in the embodiments of the present application.
[0087] In the embodiment of the present application, the processor 301 in the earphone 300 loads instructions corresponding to the process of one or more applications into the memory 302 according to the following steps, and runs the applications stored in the memory 302 by the processor 301 to realize various functions, such as: Get a request to detect whether the earphone is being worn, Collecting audio through a feedback microphone of the earphone to obtain a feedback audio signal; determining a frequency of the audio; and determining a target frequency at which a power magnitude in the feedback audio signal satisfies a preset condition based on the frequency and an audio collection parameter of the feedback microphone; analyzing a power spectrum of the feedback audio signal to obtain a power spectrum of the feedback audio signal; determining target power information for the target frequency from the power spectrum; If the target power information is equal to or greater than a maximum power threshold set for the target frequency, the wearing state of the earphone is determined to be an in-ear state.
[0088] Furthermore, the applications stored in the memory 302 are run to realize various functions, which may be referred to in the description of the above-mentioned embodiments, and therefore will not be further described here.
[0089] The specific implementation of each of the above operations may be referred to in the previous embodiments, and will not be further described here.
[0090] In one embodiment, as shown in Fig. 3, the earphone 300 further includes an RF circuit 303, an audio circuit 304, an input unit 305, and a power supply 306. Here, the processor 301 is electrically connected to the RF circuit 303, the audio circuit 304, the input unit 305, and the power supply 306, respectively. Those skilled in the art will understand that the configuration of the earphone shown in Fig. 3 is not limited to an earphone, and may include more or fewer components than those shown, or may combine some components, or may have different component arrangements.
[0091] The RF circuit 303 may be for transmitting and receiving RF signals, so as to establish wireless communication with a network device or another earphone, e.g., a terminal, via wireless communication, and transmit and receive signals (e.g., audio signals, for realizing audio playback) between the network device or another earphone.
[0092] The audio circuit 304 may play and collect audio signals through a speaker and a microphone. The audio circuit 304 may convert received audio data into an electrical signal and transmit it to a speaker, which may then convert it into an audio signal and output it. Meanwhile, the microphone may convert the collected audio signal into an electrical signal, which may then be received by the audio circuit 304 and converted into audio data. The audio data may then be output to the processor 301 for processing, and then transmitted to, for example, another earphone via the RF circuit 303, or the audio data may be output to the memory 302 for processing.
[0093] The input unit 305 may receive input control information (e.g., volume control information, song change information, playback speed fast forward, fast reverse information, etc.) In one embodiment, the input unit may include mechanical buttons.
[0094] The power supply 306 is for powering each component of the earphone 300. In one embodiment, the power supply 306 may be logically connected to the processor 301 via a power management system, thereby realizing functions such as charging management, discharging management, and power consumption management through the power management system. The power supply 306 may include any components such as one or more DC or AC power sources, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, etc.
[0095] Although not shown in FIG. 3, the earphone 300 may include sensors (such as optical sensors and capacitive sensors), a wireless fidelity module, a Bluetooth module, and the like, which will not be further described herein.
[0096] In the above embodiments, the description of each embodiment is focused on, and for the parts not described in detail in one embodiment, reference may be made to the relevant descriptions of other embodiments.
[0097] Those skilled in the art will understand that all or some of the steps in the various methods of the above embodiments can be accomplished through instructions or by controlling related hardware through instructions, which may be stored in a computer-readable recording medium and loaded and executed by a processor.
[0098] Therefore, an embodiment of the present application provides a computer-readable recording medium, in which a plurality of computer programs are stored, and the computer programs can be loaded by a processor to execute any one of the methods for detecting an earphone wearing state provided in the embodiment of the present application. For example, the computer program can execute the steps of the method for detecting an earphone wearing state as follows: Get a request to detect whether the earphone is being worn, Collecting audio through a feedback microphone of the earphone to obtain a feedback audio signal; determining a frequency of the audio; and determining a target frequency at which the magnitude of power in the feedback audio signal satisfies a preset condition based on the frequency and an audio collection parameter of the feedback microphone; analyzing a power spectrum of the feedback audio signal to obtain a power spectrum of the feedback audio signal; determining target power information for the target frequency from the power spectrum; If the target power information is equal to or greater than a maximum power threshold set for the target frequency, the wearing state of the earphone is determined to be an in-ear state.
[0099] Furthermore, the detailed steps of the above method steps may be referred to the descriptions in the above embodiments, and therefore will not be further described here.
[0100] The specific implementation of each of the above operations may refer to the previous embodiment, so no further description will be given here.
[0101] Here, the computer-readable recording medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, or the like.
[0102] The computer program stored in this computer-readable recording medium can execute any one of the earphone wearing state detection methods provided in the embodiments of the present application, and can therefore achieve the beneficial effects that can be achieved by any one of the earphone wearing state detection methods provided in the embodiments of the present application; for details, please refer to the previous embodiments and no further description will be given here.
[0103] According to one aspect of the present application, there is further provided a computer program product or computer program, the computer program product or computer program including computer instructions stored in a computer-readable recording medium, the computer instructions being read by a processor of the earphone from the computer-readable recording medium, and the processor executing the computer instructions to cause the earphone to perform the methods provided in the various alternative embodiments of the above examples.
[0104] In the above embodiments relating to the earphone wearing state detection device, computer-readable recording medium, earphone, and computer program product, emphasis is placed on the description of each embodiment, and for parts not described in detail in one embodiment, reference may be made to the relevant descriptions in other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific operating processes and beneficial effects of the above-described earphone wearing state detection device, computer-readable recording medium, computer program product, earphone, and its corresponding units may refer to the description of the earphone wearing state detection method in the above embodiments. No further details will be provided herein.
[0105] The above provides a detailed description of the earphone wearing state detection method, device, earphone, computer-readable recording medium, and computer program product provided in the examples of the present application. Although specific examples have been given in the present text to describe the principles and embodiments of the present application, the description of the above examples is only intended to contribute to understanding of the method of the present application and its core idea. At the same time, those skilled in the art will understand that there may be changes in the specific embodiments and application scope depending on the idea of the present application. As such, it should be understood that the contents of this specification are not restrictive of the present application.
Claims
1. A method for detecting an earphone wearing state, comprising: receiving an earphone wearing state detection request; collecting audio via a feedback microphone of the earphone to obtain a feedback audio signal; determining a frequency of the audio; and determining a target frequency at which a power magnitude in the feedback audio signal satisfies a preset condition based on the frequency and an audio collection parameter of the feedback microphone; analyzing a power spectrum of the feedback audio signal to obtain a power spectrum of the feedback audio signal; determining target power information for the target frequency from the power spectrum; and determining that the wearing state of the earphone is an in-ear state if the target power information is equal to or greater than a maximum power threshold set for the target frequency. A method for detecting whether an earphone is worn.
2. When collecting audio through the feedback microphone of the earphone, audio is also collected through the feedforward microphone of the earphone to obtain a feedforward audio signal; performing a differential feature analysis on the feedforward audio signal and the feedback audio signal to obtain differential feature values of the feedforward audio signal and the feedback audio signal; determining that the wearing state of the earphone is an in-ear state if the dissimilarity feature value is equal to or greater than a preset dissimilarity feature maximum threshold value representing a maximum dissimilarity feature value of the audio signals collected by the feedback microphone and the feedforward microphone in an in-ear state; Also includes The method for detecting the wearing state of an earphone according to claim 1.
3. before performing differential feature analysis on the feedforward audio signal and the feedback audio signal; determining whether the target power information is lower than a minimum power threshold established for the target frequency; If the target power information is equal to or greater than a minimum power threshold set for the target frequency and equal to or less than a maximum power threshold set for the target frequency, performing a differential feature analysis on the feedforward audio signal and the feedback audio signal. The method for detecting an earphone wearing state according to claim 2.
4. if the dissimilarity feature value is lower than the maximum threshold value of the preset dissimilarity feature, performing a relevance analysis on the feedforward audio signal and the feedback audio signal to determine a relevance coefficient; determining that the wearing state of the earphones is an in-ear state if the distinctiveness feature value is higher than a preset distinctiveness feature minimum threshold value and the relevance coefficient is lower than a preset relevance coefficient; otherwise, determining that the wearing state of the earphones is an out-ear state; further comprising Here, the minimum threshold value of the preset dissimilarity feature represents a minimum dissimilarity feature value of the audio signals collected by the feedback microphone and the feedforward microphone in an in-ear state, and the preset relevance coefficient represents a maximum relevance of the audio signals collected by the feedback microphone and the feedforward microphone in an in-ear state. The method for detecting the wearing state of an earphone according to claim 2.
5. If the target power information is equal to or greater than a maximum power threshold set for the target frequency, it is determined that the wearing state of the earphone is an in-ear state, and then If the target power information is lower than a minimum power threshold set for the target frequency, determining that the wearing state of the earphone is an out-of-ear state. The method for detecting the wearing state of an earphone according to claim 1.
6. The audio collection parameters include a sampling rate, and the step of determining a target frequency at which the magnitude of power in the feedback audio signal satisfies a preset condition based on the frequency and the audio collection parameters of the feedback microphone includes: calculating a power spectrum for a feedback audio signal based on the sampling rate and frequency; and setting the frequency with the maximum power as the target frequency based on the power spectrum. The method for detecting the wearing state of an earphone according to any one of claims 1 to 5.
7. The audio collection parameters include a sampling rate, and the step of determining a target frequency at which the magnitude of power in the feedback audio signal satisfies a preset condition based on the frequency and the audio collection parameters of the feedback microphone includes: calculating a frequency of maximum power in the audio signal collected by the feedback microphone based on the sampling rate; If the difference between the maximum frequency of the power and the frequency is greater than the frequency difference, adjusting the sampling rate until the difference is equal to or less than the frequency difference, and setting the maximum frequency of the power as a target frequency; If the difference between the maximum frequency of the power and the frequency is equal to or less than the frequency difference, setting the maximum frequency of the power as the target frequency. The method for detecting the wearing state of an earphone according to any one of claims 1 to 5.
8. The step of obtaining a request to detect an earphone wearing state includes: periodically generating an earphone wearing state detection request; or generating an earphone wearing state detection request when the earphone sensor identifies that the wearing state of the earphone has switched to an in-ear state; The method for detecting the wearing state of an earphone according to any one of claims 1 to 5.
9. An earphone wearing state detection device, a detection request acquisition module that acquires a detection request for an earphone wearing state; a feedback audio signal acquisition module for collecting audio through a feedback microphone of the earphone to obtain a feedback audio signal; a target frequency determination module that determines a frequency of the audio, and determines a target frequency at which a power magnitude in the feedback audio signal satisfies a preset condition based on the frequency and an audio collection parameter of the feedback microphone; a power spectrum determination module for analyzing a power spectrum of the feedback audio signal to obtain a power spectrum of the feedback audio signal; a target power information determination module that determines target power information for the target frequency from the power spectrum; a wearing state determination module that determines that the wearing state of the earphone is an in-ear state if the target power information is equal to or greater than a maximum power threshold set for the target frequency. A device for detecting whether earphones are worn.
10. The feedback audio signal acquisition module is for collecting audio through a feedforward microphone of the earphone to obtain a feedforward audio signal. The device for detecting the wearing state of an earphone according to claim 9.
11. a dissimilarity feature value determining unit for performing dissimilarity feature analysis on the feedforward audio signal and the feedback audio signal to obtain dissimilarity feature values of the feedforward audio signal and the feedback audio signal; and a first wearing state determination unit for determining that the wearing state of the earphone is an in-ear state if the difference feature value is equal to or greater than a preset difference feature maximum threshold value representing a maximum difference feature value of the audio signals collected by the feedback microphone and the feedforward microphone in an in-ear state. The device for detecting the wearing state of an earphone according to claim 10.
12. a determining unit for determining whether the target power information is lower than a minimum power threshold set for the target frequency; a differential feature analysis performing unit that performs a differential feature analysis on the feedforward audio signal and the feedback audio signal when the target power information is equal to or greater than a minimum power threshold set for the target frequency and equal to or less than a maximum power threshold set for the target frequency. The device for detecting the wearing state of an earphone according to claim 11.
13. a relevance analysis unit for performing a relevance analysis on the feedforward audio signal and the feedback audio signal to determine a relevance coefficient if the dissimilarity feature value is lower than the maximum threshold value of the preset dissimilarity feature; a second wearing state determining unit for determining that the wearing state of the earphone is an in-ear state if the distinctiveness feature value is higher than a preset distinctiveness feature minimum threshold value and the relevance coefficient is lower than a preset relevance coefficient; otherwise, determining that the wearing state of the earphone is an out-ear state. The device for detecting the wearing state of an earphone according to claim 11.
14. An earphone, An earphone comprising a processor and a memory in which a plurality of instructions are stored, the processor loading instructions from the memory to perform steps of the method for detecting an earphone wearing state according to any one of claims 1 to 8.
15. A computer-readable recording medium, A computer-readable storage medium having stored thereon a plurality of instructions, said instructions being loaded by a processor to perform the steps of the method for detecting earphone wearing status of any one of claims 1 to 8.