Earphone wearing state detection method, device, earphone, and storage medium

The earphone wearing state detection method enhances accuracy by analyzing audio signals through a feedback microphone to determine energy content index values within specific frequency bands, addressing the inaccuracies of existing capacitive and optical sensor methods.

JP2026506709APending Publication Date: 2026-02-25SHENZHEN TONGLI SCI & TECH DEV CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2025547849
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-09
Filing Date
2023-11-21
Publication Date
2026-02-25

AI Technical Summary

Technical Problem

Current methods for detecting the wearing state of TWS earphones, such as capacitive and optical sensors, often inaccurately determine that the earphones are in-ear when they are not, leading to reduced accuracy and increased power consumption.

Method used

An earphone wearing state detection method that utilizes a feedback microphone to collect audio signals, analyze the power spectrum and energy content index values within specific frequency bands to accurately determine if the earphones are in-ear or out-ear.

Benefits of technology

Improves the accuracy of earphone wearing state detection by reliably distinguishing between in-ear and out-ear states, reducing misoperations and power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026506709000001_ABST
    Figure 2026506709000001_ABST
Patent Text Reader

Abstract

The present application discloses an earphone wearing state detection method, device, earphone, and storage medium, which includes receiving an earphone wearing state detection request, collecting audio using a feedback microphone of the earphone, obtaining a feedback audio signal, determining the frequency of the audio, determining a target frequency band in the feedback audio signal based on the frequency, the target frequency band satisfying a predetermined condition, determining a power spectrum of the feedback audio signal, and determining an energy amount index value of the feedback audio signal within the target frequency band based on the power spectrum. If the energy amount index value is equal to or greater than a predetermined minimum energy threshold corresponding to an in-ear state, the wearing state of the earphone is determined to be an in-ear state, thereby improving the accuracy of earphone wearing state detection.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present application relates to the field of terminal control technology, and more particularly to a method, device, earphone, and storage medium for detecting an earphone wearing state. [Background technology]

[0002] In recent years, the TWS (True Wireless Stereo) earphone market has grown rapidly. TWS earphones are small, lightweight, portable, and easy to use, making them popular with consumers. Currently, mid- to high-end TWS earphones are equipped with wear detection, which allows them to automatically play music when worn and pause music when removed, making the earphones smarter and reducing power consumption. Summary of the Invention [Problem to be solved by the invention]

[0003] Currently, the mainstream methods for detecting the wearing of TWS earphones are mainly capacitive sensor detection and optical sensor detection. Capacitive sensor detection detects the capacitance value of the human body to determine whether the earphones are worn in the ears. The advantages of capacitive sensor detection are low cost and aesthetic appeal, as there is no need to drill holes in the housing. The disadvantage of capacitive sensor detection is a high rate of misoperation. Optical detection uses infrared light emission, reflection, and received level signals to determine whether the earphones are worn in the ears. Compared to capacitive sensor detection, the advantage of optical detection is higher accuracy, but it is relatively expensive, prone to misoperation in certain scenarios, and places high demands on the manufacturing and assembly process.

[0004] However, the above two methods tend to easily determine that the earphones are in-ear. For example, in common scenarios such as when the earphones are placed on a desk, held in the hand, or in a pocket, optical and capacitive sensors tend to mistakenly determine that the earphones are in-ear, resulting in reduced wearing detection accuracy, negatively impacting the user experience and increasing the power consumption of the earphones. [Means for solving the problem]

[0005] The embodiments of the present application provide a method, device, earphone, and storage medium for detecting earphone wearing status, which can improve the accuracy of earphone wearing status detection.

[0006] In a first aspect, an embodiment of the present application provides an earphone wearing state detection method, the earphone wearing state detection method comprising: Obtaining an earphone wearing state detection request; collecting audio through a feedback microphone of the earphone to obtain a feedback audio signal; determining a frequency of the audio signal, and determining a target frequency band in the feedback audio signal based on the frequency, the target frequency band having a frequency range that satisfies a predetermined condition; determining a power spectrum of the feedback audio signal; determining an energy content index value of the feedback audio signal within the target frequency band range based on the power spectrum; If the energy amount index value is equal to or greater than a predetermined minimum energy threshold corresponding to an in-ear state, determining the wearing state of the earphone as an in-ear state.

[0007] As a second aspect, an embodiment of the present application further provides an earphone wearing state detection device, the earphone wearing state detection device comprising: a detection request acquisition module used to acquire an earphone wearing state detection request; a feedback audio signal determining module, used for collecting audio through the feedback microphone of the earphone to obtain a feedback audio signal; a target frequency band determining module, which is used to determine a frequency of the audio signal, and determine a target frequency band in the feedback audio signal, the frequency range of which satisfies a predetermined condition, based on the frequency; a power spectrum determination module for determining the power spectrum of the feedback audio signal; an energy quantity index value determining module, which is used to determine an energy quantity index value of the feedback audio signal within the target frequency band range based on the power spectrum; a wearing state determination module, used for determining the wearing state of the earphone as an in-ear state when the energy amount index value is equal to or greater than a predetermined minimum energy threshold corresponding to an in-ear state.

[0008] In a third aspect, an embodiment of the present application further provides an earphone, the earphone including a memory storing a plurality of instructions, and a processor loading the instructions from the memory to perform any one of the steps of the earphone wearing state detection method provided in the embodiment of the present application.

[0009] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, the computer-readable storage medium storing a plurality of instructions, the instructions being loaded by a processor to perform any one of the steps of the earphone wearing state detection method provided in the embodiment of the present application.

[0010] In a fifth aspect, an embodiment of the present application further provides a computer program product, the computer program product including a computer program or instructions, which, when executed by a processor, realizes any one of the steps of the earphone wearing state detection method provided in the embodiment of the present application. [Effects of the Invention]

[0011] According to the solution of the embodiment of the present application, an earphone wearing state detection request is received, audio is collected by a feedback microphone of the earphone to obtain a feedback audio signal, the frequency of the audio is determined, a target frequency band in the feedback audio signal whose frequency range satisfies a predetermined condition is determined based on the frequency, a power spectrum of the feedback audio signal is determined, an energy amount index value in the target frequency band range of the feedback audio signal is determined based on the power spectrum, and if the energy amount index value is equal to or greater than a predetermined minimum energy threshold corresponding to the in-ear state, the wearing state of the earphone is determined to be an in-ear state. A power spectrum analysis is performed on the feedback audio signal collected by the feedback microphone to determine a target frequency band in the feedback audio signal whose frequency range satisfies a predetermined condition and an energy amount index value in the target frequency band range, and the wearing state of the earphone is determined by comparing the energy amount index value in the target frequency band range with the predetermined minimum energy threshold corresponding to the in-ear state, thereby improving the detection accuracy of the earphone wearing state. [Brief explanation of the drawings]

[0012] In order to more clearly explain the technical solutions in the embodiments of the present application, the following briefly describes the drawings necessary for describing the embodiments. Obviously, the following drawings are only some embodiments of the present application, and those skilled in the art can obtain other drawings from these drawings without any creative efforts.

[0013] [Figure 1] 1 is a flow diagram illustrating an embodiment of a method for detecting an earphone wearing state provided in an embodiment of the present application. [Figure 2] 1 is a schematic diagram showing the structure of an earphone wearing state detection device provided in an embodiment of the present application. [Figure 3] 1 is a schematic diagram showing the structure of an earphone provided in an embodiment of the present application. DETAILED DESCRIPTION OF THE INVENTION

[0014] Hereinafter, the technical solutions of the embodiments of the present application will be clearly and completely described with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments that can be obtained by a person skilled in the art based on the embodiments of the present application without creative effort fall within the scope of protection of the present application. Furthermore, in the description of the embodiments of the present application, terms such as "first" and "second" are used only for distinction and should not be understood as indicating or implying importance. Therefore, features such as "first" and "second" can 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 clearly defined.

[0015] The embodiments of the present application provide a method, a device, an earphone, and a computer-readable storage medium for detecting an earphone wearing state.

[0016] Specifically, this embodiment will be described from the perspective of an earphone wearing state detection device. This earphone wearing state detection device may be specifically integrated into an earphone, i.e., the earphone wearing state detection method according to the embodiment of the present application may be executed by the earphone. Optionally, the earphone may be a terminal device with a data processing function. Here, the terminal device is an earphone, and the type of the earphone is not limited, and may be, for example, a wired earphone, a wireless earphone, a Bluetooth earphone, a headphone, etc. Here, the earphone may be configured independently or as an accessory device to a device such as a head-mounted display, and this embodiment is not limited thereto.

[0017] For example, the earphone wearing status 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 are equipped with an in-ear detection function. In-ear detection, also known as a wearing detection function, is applied to TWS true wireless earphones to realize the main function of determining whether the user is wearing the earphones. Currently, the main methods for realizing TWS earphone wearing detection are capacitive sensor detection and optical sensor detection. The wearing status detection for earphones in the embodiments of this application is performed using a capacitive sensor detection method, an optical sensor detection method, or a combination or improvement thereof.

[0018] The following detailed description will be given with reference to the drawings. In this embodiment, the execution entity is an earphone that can invoke the deduplication algorithm. Note that the order of description of the following embodiment does not limit the order of priority of the embodiment. Although the flow diagram shows a logical order, in some cases, steps may be performed in an order different from the order shown in the drawings.

[0019] Referring to FIG. 1, the specific flow of this earphone wearing state detection method may be as follows: Steps 101 to 106.

[0020] In step 101, a request to detect the wearing state of the earphone is acquired.

[0021] In this embodiment, the earphone wearing state detection request refers to a request for detecting 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 in 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 is continuously in 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 wearing state of the earphone is considered to be the out-ear state.

[0022] In this embodiment, the earphone refers to an earphone that needs to be detected for its wearing state in this embodiment, for example, the earphone is an active noise canceling earphone or one earphone of a true wireless pair of earphones. Specifically, if the earphone is one earphone of a true wireless pair of earphones, the wireless connection method between this earphone and the other earphone or the wireless connection method between this earphone and a smart device may be at least one communication method of WiFi (registered trademark) communication method, traditional Bluetooth communication method, BLE communication method, LE voice, ANT communication method, RF4CE communication method, Zigbee communication method, NFC communication method, and UWB communication method.

[0023] Alternatively, the earphone wearing state detection request may be triggered according to the actual situation.

[0024] For example, obtaining an earphone wearing state detection request specifically includes the following steps: generating an earphone wearing state detection request at predetermined time intervals; Alternatively, the method may include generating an earphone wearing state detection request when a 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 set to generate an earphone wearing status detection request when the timer is triggered. The time at which the timer is set to generate an earphone wearing status detection request when the timer is triggered may be adjusted according to actual conditions. For example, if the timer is triggered for 1.5 seconds, an earphone wearing status detection request is generated every 1.5 seconds. By generating earphone wearing status detection requests at appropriate predetermined time intervals, it is possible to respond quickly to earphone wearing status detection requests, improve the response efficiency of wearing detection, and enhance the user experience.

[0026] In this example, depending 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. Or, 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. If the earphone sensor determines based on the collected signal that the wearing state of the earphone has switched to an in-ear state, an earphone wearing state detection request is generated. The switching of the wearing state of the earphone to an in-ear state may, for example, mean a switch from an out-ear state to an in-ear state, or a switch from another state to an in-ear state. If the earphone sensor determines based on the collected signal that the wearing state of the earphone has switched to an out-ear state, or if the wearing state of the earphone is a persistent out-ear state, or if the wearing state of the earphone is a persistent in-ear state, the earphone sensor continues to collect signals. Here, the sustained out-ear state refers to a sustained time in the out-ear state exceeding a predetermined sustained time, and the sustained in-ear state refers to a sustained time in the in-ear state exceeding a predetermined sustained time, which may be set according to actual circumstances, for example, the predetermined sustained time is 200 milliseconds.

[0027] In step 102, the feedback microphone of the earphone collects the sound to obtain a feedback sound signal.

[0028] In this embodiment, the feedback microphone may be located in front of the speaker of the earphone and is used to collect audio signals from the current environment, including but not limited to prompt sounds, friction sounds between the earphone and the ear canal when the earphone is worn, external environmental sounds, etc. The prompt sounds are played by the earphone and have a predetermined frequency.

[0029] In this embodiment, if the audio includes a prompt sound, the feedback microphone of the earphone collects the prompt sound to obtain a feedback audio signal. If the audio includes an external environmental sound, the feedback microphone of the earphone collects the external environmental sound to obtain a feedback audio signal. Specifically, the audio may be set according to the actual situation.

[0030] As can be understood, the sound, including friction sounds between the earphone and the ear canal when the earphone is worn in the ear and external environmental sounds, is determined according to the specific scenario of the earphone. For example, when the actual wearing state of the earphone is in-ear, the sound collected by the feedback microphone is mainly friction sounds between the earphone and the ear canal when the earphone is worn in the ear. When the actual wearing state of the earphone is out-ear, the sound collected by the feedback microphone is mainly external environmental sounds.

[0031] In this embodiment, if the sound is a prompt sound, the prompt sound is used to detect the wearing status of the earphone. The frequency of the prompt sound includes, but is not limited to, ultrasonic, low-frequency sound, and audible sound. Here, ultrasonic refers to sound waves with a frequency range greater than 20,000 Hz, low-frequency sound refers to sound waves with a frequency range less than 20 Hz, and audible sound refers to sound waves in the frequency range audible to the human ear between 20 Hz and 20,000 Hz. If the frequency of the prompt sound is within the frequency range audible to the human ear, the prompt sound may be set according to the actual situation, for example, the prompt sound may be two "ping pong, ping pong" sounds, or the prompt sound may be "activate in-ear detection function." The frequency of the prompt sound may be set according to the specific situation, for example, a prompt sound with a frequency of 20 Hz may be set, or a prompt sound with a frequency of 10 Hz may be set. Preferably, a low-frequency sound is set as the prompt sound.

[0032] As can be seen, when a low-frequency sound is played using a speaker in an earphone, the amplitude of the low-frequency sound collected by the feedback microphone is significantly different when the earphone is inside the ear and when the earphone is outside the ear. When the earphone is inside the ear, the amplitude of the low-frequency sound collected by the feedback microphone is significantly larger, and the low-frequency sound is used as a prompt sound to detect the wearing state of the earphone, thereby improving the accuracy of the detection result.

[0033] In this embodiment, parameters may be preset for the audio collection. These predetermined parameters include, but are not limited to, the signal length and sampling rate of the audio signal. The signal length refers to the time for collecting the audio signal. For example, the collected signal length is 0.5 seconds to 1.2 seconds. The sampling rate refers to the number of times the audio signal is sampled within a unit time. For example, a sampling rate of 16k means 16,000 samples per second.

[0034] In step 103, a frequency of the audio is determined, and a target frequency band in the feedback audio signal, whose frequency range satisfies a predetermined condition, is determined based on the frequency.

[0035] In this embodiment, a frequency band signal to be analyzed is selected from the audio using an appropriate filter depending on the frequency range of the frequency band signal to be analyzed. The frequencies corresponding to the frequency band signal are the frequencies of the audio. The frequency range of the frequency band signal to be analyzed relates to the type of filter. For example, if the frequency band signal to be analyzed is a low-frequency signal, the filter is a low-frequency filter.

[0036] In this embodiment, the target frequency band refers to a frequency band in the feedback audio signal that satisfies a predetermined condition for the frequency range used to detect earphone wearing status. If the audio is a prompt sound with a predetermined frequency, the frequency range satisfying the predetermined condition means that the frequency range of the target frequency band includes the frequency at which the prompt sound is played. The predetermined condition can be adjusted according to actual circumstances. For example, the starting point of the frequency range of the target frequency band is the frequency at which the prompt sound is played, or the center frequency of the frequency range of the target frequency band is the frequency at which the prompt sound is played.

[0037] Optionally, when a center frequency of a frequency range of the target frequency band is a frequency of a voice as a predetermined condition, determining a target frequency band in the feedback voice signal, the frequency range of which satisfies the predetermined condition, based on the frequency, Obtaining a frequency band length of a target frequency band awaiting determination; determining a target frequency band from the feedback audio signal based on the frequency band length and centered at the frequency.

[0038] In this example, the frequency band length refers to the length from the start frequency to the end frequency in the frequency range of the target frequency band. For example, if the frequency range of the target frequency band is (10 Hz, 30 Hz), the frequency band length is 20 units.

[0039] In this embodiment, if the center frequency of the frequency range of the target frequency band is the frequency of the voice as a predetermined condition, the frequency is set as the center frequency, and a target frequency band having this frequency band length is determined from the feedback voice signal.

[0040] For example, if the frequency is 40 Hz and the frequency band length is 20 units, 40 Hz is set as the center frequency, and a target frequency band (30 Hz, 50 Hz) having a length of this frequency band length is determined from the feedback audio signal. Optionally, if the predetermined condition is that the frequency range of the target frequency band includes the frequency of the audio, determining a target frequency band in the feedback audio signal whose frequency range satisfies the predetermined condition based on the frequency can be: Obtaining a frequency band length of a target frequency band awaiting determination; determining a target frequency band that includes the frequency and has a length equal to the frequency band length based on the frequency and the frequency band length.

[0041] In this example, the frequency band length refers to the length from the start frequency to the end frequency in the frequency range of the target frequency band. For example, if the frequency range of the target frequency band is (10 Hz, 30 Hz), the frequency band length is 20 units.

[0042] In this embodiment, if the predetermined condition is that the frequency range of the target frequency band includes the frequency of an audio signal, a target frequency band that includes the frequency and has a length equal to the frequency band length is determined based on the frequency and frequency band length.

[0043] For example, if the frequency is 40 Hz and the frequency band length is 20 units, a target frequency band that is 20 units long and includes 40 Hz is determined from the feedback audio signal.

[0044] In this embodiment, a target frequency band in the feedback audio signal, whose frequency range satisfies a predetermined condition, is determined, and this target frequency band is analyzed, thereby improving the accuracy of detecting the earphone wearing state.

[0045] In step 104, the power spectrum of the feedback audio signal is determined.

[0046] In this embodiment, the power spectrum is an abbreviation for power spectral density function, and is defined as the signal power per unit frequency band. The power spectrum shows how the signal power varies with frequency, i.e., how the signal power is distributed in the frequency band. The power spectrum shows the relationship in which the signal power varies with frequency.

[0047] In this embodiment, the feedback audio signal is subjected to frame processing and window processing, and then a Fourier transform is performed on the signal obtained by the frame processing and window processing to obtain a frequency band signal. The absolute value of the frequency band signal is then taken to determine the power spectrum of the feedback audio signal. The power spectrum of the feedback audio signal is then determined based on the obtained power spectrum. Here, the frequency band is a coordinate system used to represent the frequency characteristics of a signal. The power spectrum is also called power spectral density, which indicates how the energy of a signal or time sequence is distributed according to frequency. The power spectrum is the square of the Fourier transform of the original signal.

[0048] In this embodiment, a feedback audio signal is filtered using the audio frequency to obtain a power spectrum of the filtered feedback audio signal, and the power corresponding to audio signals of the same frequency in this power spectrum is averaged to obtain an average power spectrum of the feedback audio signal, which is composed of audio signals of different frequencies.

[0049] In step 105, an energy content index value of the feedback audio signal within the target frequency band range is determined based on the power spectrum.

[0050] In this embodiment, the energy index value is an index value used to indicate the energy amount of the feedback audio signal in the target frequency band range. This energy index value is a root mean square (RMS) value. The RMS value, also known as a square root value, is used to indicate the energy amount of a signal. The energy index value is obtained by obtaining a parameter in the power spectrum and determining the energy amount of the parameter in the power spectrum. Here, the parameter in the power spectrum is the power corresponding to each frequency in the feedback audio signal.

[0051] Furthermore, determining an energy amount index value of the feedback audio signal within the target frequency band range based on the power spectrum includes: determining a power of the feedback audio signal within the frequency band of interest based on the power spectrum; and performing a square root calculation on the power within the frequency band range of interest to determine an energy content index value.

[0052] In this embodiment, the power of the feedback audio signal within a target frequency band range is determined, and this power includes power corresponding to multiple frequencies. The square root calculation refers to the process of adding the squares of the power of each frequency within the target frequency band range, dividing the result by the total number of frequencies, and then calculating the square root. The total number of frequencies refers to the number of frequencies in the target frequency band range.

[0053] In this embodiment, an energy amount index value within a target frequency band range of the feedback audio signal is determined, and this energy amount index value is compared with an energy threshold value corresponding to the power spectrum in different earphone wearing states, thereby accurately determining the earphone wearing state and improving the accuracy of earphone wearing state detection.

[0054] In step 106, if the energy amount index value is equal to or greater than a predetermined minimum energy threshold corresponding to an in-ear state, the wearing state of the earphone is determined to be an in-ear state.

[0055] In this embodiment, the predetermined minimum energy threshold is used to indicate the minimum energy threshold in the power spectrum after the sound is collected by the feedback microphone when the earphone is in the in-ear state, that is, when the energy index value is equal to or greater than the predetermined minimum energy threshold corresponding to the in-ear state, the wearing state of the earphone can be determined as the in-ear state.

[0056] As can be seen, the predetermined minimum energy threshold can be measured in advance through experiments. The purpose of setting the predetermined minimum energy threshold is to identify whether the earphone is in an in-ear state by comparing both the energy amount index value and the predetermined minimum energy threshold. When the earphone is switched to an in-ear state, the energy amount index value and the predetermined minimum energy threshold can be used to reliably determine whether the earphone is in an in-ear state, thereby improving the accuracy of earphone wearing state detection.

[0057] When the feedback microphone of the earphone collects the sound, the feedforward microphone of the earphone also collects the sound to obtain a feedforward sound signal.

[0058] The above method is performing a sound pressure level analysis on the feedforward audio signal and the feedback audio signal to determine a first sound pressure level of the feedforward audio signal and a second sound pressure level of the feedback audio signal; determining a sound pressure level difference between the first sound pressure level and the second sound pressure level; The method further includes determining the wearing state of the earphone as an in-ear state if the sound pressure level difference is equal to or greater than a maximum threshold value for sound pressure level difference, and determining the wearing state of the earphone as an out-ear state if the sound pressure level difference is smaller than a maximum threshold value for sound pressure level difference.

[0059] In this embodiment, the feedforward microphone may be installed on the outer side of the earphone housing and is used to collect sound signals from the environment outside the earphone. For example, when the earphone is actually worn in an in-ear state, the sound collected by the feedforward microphone is mainly friction noise generated between the earphone and the ear canal. When the earphone is actually worn in an out-ear state, the sound collected by the feedforward microphone is external environmental sound.

[0060] In this embodiment, the sound pressure level analysis refers to a process of performing sound pressure level analysis on a feedforward audio signal collected by a feedforward microphone and a feedback audio signal collected by a feedback microphone. The sound pressure level is used to indicate the amount of energy in the collected audio signals. The first sound pressure level refers to the sound pressure level corresponding to the feedforward audio signal collected by the feedforward microphone after performing sound pressure level analysis on the feedforward audio signal. The second sound pressure level refers to the sound pressure level corresponding to the feedback audio signal collected by the feedback microphone after performing sound pressure level analysis on the feedback audio signal.

[0061] In this embodiment, the sound pressure level difference may be the difference between two sound pressure levels or the difference between the absolute values ​​of two sound pressure levels. The method for calculating the sound pressure level difference may be adjusted according to actual conditions. Preferably, in this application, the sound pressure level difference is determined by calculating the difference between the absolute values ​​of the first sound pressure level and the second sound pressure level. By calculating the difference between the absolute values ​​of the first sound pressure level and the second sound pressure level, the energy difference between the first sound pressure level corresponding to the audio signal collected by the feedforward microphone and the second sound pressure level of the audio signal collected by the feedback microphone can be more accurately obtained. By comparing the energy difference with the maximum threshold value of the sound pressure level difference, the accuracy of earphone wearing status detection can be improved.

[0062] In this embodiment, the maximum threshold value of the sound pressure level difference is used to indicate the difference in maximum sound pressure level between the second sound pressure level corresponding to the audio signal collected by the feedback microphone in the out-ear state and the first sound pressure level corresponding to the audio signal collected by the feedforward microphone, that is, when the sound pressure level difference is equal to or greater than the maximum threshold value of the sound pressure level difference, the wearing state of the earphones can be determined as the in-ear state.

[0063] As can be seen, the maximum threshold for the sound pressure level difference can be measured in advance through experiments. The purpose of setting the maximum threshold for the sound pressure level difference is to identify whether the earphones are in an in-ear state by comparing both the maximum threshold for the sound pressure level difference and the sound pressure level difference. When the earphones are switched to an in-ear state, the maximum threshold for the sound pressure level difference and the sound pressure level difference can be used to determine whether the earphones are in an in-ear state, thereby improving the accuracy of earphone wearing state detection.

[0064] Optionally, performing a sound pressure level analysis on the feedforward audio signal and the feedback audio signal comprises: If the energy content index value is less than the predetermined minimum energy threshold, performing a sound pressure level analysis on the feedforward audio signal and the feedback audio signal.

[0065] In this example, the energy amount index value is compared with a predetermined minimum energy threshold. If the energy amount index value is smaller than the predetermined minimum energy threshold, the current earphone wearing state cannot be clearly determined. A sound pressure level analysis is performed on the feedforward audio signal and the feedback audio signal. By performing a sound pressure level analysis on the feedforward audio signal collected by the feedforward microphone and the feedback audio signal collected by the feedback microphone, the sound pressure level difference between the feedforward audio signal collected by the feedforward microphone and the feedback audio signal collected by the feedback microphone can be determined. Based on the sound pressure level difference, the earphone wearing state is further determined. By combining power spectrum analysis and sound pressure level analysis, the accuracy of earphone wearing state detection is improved.

[0066] Optionally, determining a first sound pressure level of the feedforward audio signal and a second sound pressure level of the feedback audio signal comprises: performing a spectral analysis on the feedforward audio signal and the feedback audio signal to determine a first spectrum of the feedforward audio signal and a second spectrum of the feedback audio signal; modifying spectral parameters of the first spectrum and spectral parameters of the second spectrum; determining a first sound pressure level of the feedforward audio signal and a second sound pressure level of the feedback audio signal based on the modified first spectrum and the modified second spectrum.

[0067] In this embodiment, spectrum analysis refers to the process of performing a Fourier transform on the feedforward audio signal collected by the feedforward microphone and the feedback audio signal collected by the feedback microphone, and analyzing the Fourier-transformed signal. This spectrum includes an amplitude spectrum and a phase spectrum. The amplitude spectrum is a spectrum composed of the amplitude at each frequency point, and the phase spectrum is a spectrum composed of the phase at each frequency point. Here, the first spectrum is used to represent the distribution of signal frequencies after the Fourier transform of the feedforward audio signal. The second spectrum is used to represent the distribution of signal frequencies after the Fourier transform of the feedback audio signal.

[0068] In this embodiment, the spectral parameters are related to the type of spectrum. If the spectrum is an amplitude spectrum, the spectral parameters are the amplitude values ​​at each frequency point. If the spectrum is a phase spectrum, the spectral parameters are the phase values ​​at each frequency point. Specific settings may be made according to actual conditions. Modification methods include, but are not limited to, A-weighting, B-weighting, and C-weighting. Other modification methods may also be used. Here, in this embodiment, weighting refers to modifying the spectral parameters according to specific rules. A-weighting simulates the frequency characteristics that the human ear has for low-intensity sounds below 55 dB. B-weighting simulates the frequency characteristics that the human ear has for medium-intensity sounds between 55 dB and 85 dB. C-weighting simulates the frequency characteristics that the human ear has for high-intensity sounds above 85 dB. The selected modification method is related to the frequency of the audio. If the audio is low-frequency audio, the A-weighting method is preferably used for modification.

[0069] In this embodiment, spectral analysis is performed on the feedforward audio signal and the feedback audio signal, the spectral parameters of the first spectrum and the spectral parameters of the second spectrum are modified, and the first sound pressure level of the feedforward audio signal and the second sound pressure level of the feedback audio signal are determined based on the modified first spectrum and the modified second spectrum, and the accuracy of earphone wearing state detection is improved by combining power spectrum analysis and sound pressure level analysis.

[0070] This embodiment further provides an earphone wearing state detection device, which may be specifically integrated into the earphone.

[0071] For example, as shown in FIG. 2, this earphone wearing state detection device: a detection request acquisition module 201 used to acquire an earphone wearing state detection request; a feedback audio signal determining module 202, used for collecting audio through the feedback microphone of the earphone to obtain a feedback audio signal; a target frequency band determining module 203, which is used to determine a frequency of the audio signal, and determine a target frequency band in the feedback audio signal whose frequency range satisfies a predetermined condition according to the frequency; a power spectrum determination module 204 used to determine the power spectrum of the feedback audio signal; an energy quantity index value determining module 205, which is used to determine an energy quantity index value of the feedback audio signal within the target frequency band range based on the power spectrum; a wearing state determination module 206, used for determining the wearing state of the earphone as an in-ear state when the energy amount index value is equal to or greater than a predetermined minimum energy threshold corresponding to an in-ear state.

[0072] Optionally, in the device of the embodiment of the present application, when the feedback microphone of the earphone collects the sound, the feedforward microphone of the earphone also collects the sound to obtain a feedforward sound signal.

[0073] the earphone wearing state detection device, a sound pressure level analysis unit used for performing a sound pressure level analysis on the feedforward audio signal and the feedback audio signal to determine a first sound pressure level of the feedforward audio signal and a second sound pressure level of the feedback audio signal; a sound pressure level difference determining unit used to determine a sound pressure level difference between the first sound pressure level and the second sound pressure level; and a wearing state determination unit, which is used to determine the wearing state of the earphone as an in-ear state if the sound pressure level difference is equal to or greater than a maximum threshold value of the sound pressure level difference, and to determine the wearing state of the earphone as an out-ear state if the sound pressure level difference is less than the maximum threshold value of the sound pressure level difference.

[0074] Optionally, in the device according to the embodiment of the present application, in the sound pressure level analysis unit, performing a sound pressure level analysis on the feedforward audio signal and the feedback audio signal includes: If the energy content index value is less than the predetermined minimum energy threshold, performing a sound pressure level analysis on the feedforward audio signal and the feedback audio signal.

[0075] Optionally, in the apparatus according to the embodiment of the present application, in the sound pressure level analysis unit, determining the first sound pressure level of the feedforward sound signal and the second sound pressure level of the feedback sound signal may include: performing, by a spectral analysis unit, spectral analysis on the feedforward audio signal and the feedback audio signal to determine a first spectrum of the feedforward audio signal and a second spectrum of the feedback audio signal; modifying spectral parameters of the first spectrum and spectral parameters of the second spectrum by a modifying unit; and determining, by a sound pressure level determination unit, a first sound pressure level of the feedforward sound signal and a second sound pressure level of the feedback sound signal based on the modified first spectrum and the modified second spectrum.

[0076] Optionally, in the device of the embodiment of the present application, the target frequency band determining module 203 determines a target frequency band in the feedback audio signal, the frequency range of which satisfies a predetermined condition, based on the frequency, by: Acquiring a frequency band length of a target frequency band awaiting determination by a frequency band length acquisition unit; and determining, by a target frequency band determination unit, a target frequency band that includes the frequency and has a length equal to the frequency band length, based on the frequency and the frequency band length.

[0077] Optionally, in the device of the embodiment of the present application, in the energy quantity index value determination module 205, determining an energy quantity index value in the target frequency band range of the feedback audio signal based on the power spectrum may include: determining, by a power determination unit, a power of the feedback audio signal within the target frequency band range based on the power spectrum; and performing a square root calculation on the power within the target frequency band range by an energy amount index value determining unit to determine an energy amount index value.

[0078] Optionally, in the device of the embodiment of the present application, the detection request acquisition module 201 acquires the earphone wearing state detection request by: generating an earphone wearing state detection request at predetermined time intervals by a first generating unit; Or, The second generating unit generates 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.

[0079] Using the device of this embodiment, the earphone wearing state is determined by comparing the energy amount index value within the target frequency band range with a predetermined minimum energy threshold corresponding to the in-ear state, thereby improving the accuracy of detecting the earphone wearing state.

[0080] Accordingly, an embodiment of the present application further provides an earphone, the type of which is not limited, and may be, for example, a wired earphone, a wireless earphone, a Bluetooth earphone, a headphone, etc.

[0081] As shown in Figure 3, Figure 3 is a schematic diagram illustrating the structure of an earphone provided in an embodiment of the present application. The earphone 300 includes one or more processors 301 for processing cores, one or more memories 302 in a computer-readable storage medium, and a computer program stored in the memories 302 and executable by the processors. Here, the processors 301 are electrically connected to the memories 302. As will be understood by those skilled in the art, the earphone structure shown in the figure is not intended to limit the earphone, and the earphone may include more or fewer components than those shown, or may combine certain components, or have a different component arrangement.

[0082] The processor 301 is the control center of the earphone 300, and connects each part of the entire earphone 300 using various interfaces and wiring, executes or loads software programs and / or units stored in the memory 302, and accesses data stored in the memory 302, thereby performing various functions and processing data of the earphone 300. The processor 301 may be a processor CPU, a network processor (NP), etc., which can realize or execute each method, step, and logic flowchart disclosed in the embodiments of the present application.

[0083] In the embodiment of the present application, the processor 301 in the earphone 300 loads instructions corresponding to the processes of one or more applications into the memory 302 according to the following steps, and causes the processor 301 to execute the applications stored in the memory 302 to realize various functions. For example, Acquires an earphone wearing state detection request, collecting audio through a feedback microphone of the earphone to obtain a feedback audio signal; determining a frequency of the audio signal; and determining a target frequency band in the feedback audio signal, the target frequency band being a frequency range that satisfies a predetermined condition, based on the frequency; determining a power spectrum of the feedback audio signal; determining an energy content index value of the feedback audio signal within the target frequency band range based on the power spectrum; If the energy amount index value is equal to or greater than a predetermined minimum energy threshold corresponding to an in-ear state, the wearing state of the earphone is determined to be an in-ear state.

[0084] Furthermore, various functions are realized by executing applications stored in the memory 302. The description of the above embodiment may be referred to, and the description will be omitted here.

[0085] For specific embodiments relating to each of the above steps, the description of the above examples may be referred to, and the description will be omitted here.

[0086] Optionally, as shown in Fig. 3, the earphone 300 further includes a radio frequency circuit 303, an audio circuit 304, an input unit 305, and a power source 306. Here, the processor 301 is electrically connected to the radio frequency circuit 303, the audio circuit 304, the input unit 305, and the power source 306, respectively. As can be understood by those skilled in the art, the earphone structure shown in Fig. 3 is not limiting, and the earphone may include more or fewer components than shown, or may combine certain components, or may have a different component arrangement.

[0087] The radio frequency circuit 303 transmits and receives radio frequency signals to establish wireless communication with a network device or another earphone, such as a terminal, through wireless communication, and realizes transmission and reception of signals (e.g., audio signals for realizing audio playback) with the network device or another earphone.

[0088] The audio circuit 304 is used to play and collect audio signals through a speaker and a microphone. The audio circuit 304 receives an electrical signal converted from audio data and transmits it to the speaker, which then converts the signal into an audio signal and outputs it. Meanwhile, the microphone converts the collected audio signal into an electrical signal, which the audio circuit 304 receives and converts into audio data. The audio data is then output to the processor 301 for processing, and then the radio frequency circuit 303 transmits the audio data to, for example, the other earphone, or outputs the audio data to the memory 302 for further processing.

[0089] The input unit 305 is used to receive input control information (e.g., volume adjustment information, song switching information, playback speed fast forward or rewind information, etc.), and optionally, the input unit may include mechanical buttons.

[0090] The power supply 306 is used to supply power to each component of the earphone 300. Optionally, the power supply 306 is logically connected to the processor 301 through a power management system to realize functions such as charge / discharge management and power consumption management through the power management system. The power supply 306 may further include one or more components such as one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, etc.

[0091] Although not shown in FIG. 3, the earphone 300 may also include a sensor (e.g., an optical sensor, a capacitance sensor, etc.), a WiFi module, a Bluetooth module, etc., the description of which will be omitted here.

[0092] In the above embodiments, the description of each embodiment is focused on its own, and for parts not described in detail in one embodiment, reference may be made to the relevant descriptions of other embodiments.

[0093] As can be understood by those skilled in the art, all or part of the steps of each method in the above embodiments may be performed by instructions or by controlling related hardware with instructions, which may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0094] Therefore, an embodiment of the present application provides a computer-readable storage medium storing a plurality of computer programs, which are loaded by a processor to execute any one of the earphone wearing status detection methods provided in the embodiment of the present application. For example, the computer program executes the following steps of the earphone wearing status detection method:

[0095] Acquires a request to detect earphone wearing status.

[0096] The feedback microphone of the earphone collects the sound to obtain a feedback sound signal.

[0097] A frequency of the audio is determined, and a target frequency band in the feedback audio signal, whose frequency range satisfies a predetermined condition, is determined based on the frequency.

[0098] A power spectrum of the feedback audio signal is determined.

[0099] An energy content index value of the feedback audio signal within the target frequency band range is determined based on the power spectrum.

[0100] If the energy amount index value is equal to or greater than a predetermined minimum energy threshold corresponding to an in-ear state, the wearing state of the earphone is determined to be an in-ear state.

[0101] Furthermore, for the specific steps of the above method steps, you may refer to the description of the above embodiment, and the description will be omitted here.

[0102] For specific embodiments of each of the above steps, the description of the above examples may be referred to, and the description will be omitted here.

[0103] Here, the computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, or the like.

[0104] The computer program stored in this computer-readable storage medium can execute any one of the earphone wearing status detection methods provided in the embodiments of the present application, thereby realizing the effects of the invention that can be realized by any one of the earphone wearing status detection methods provided in the embodiments of the present application. For details, please refer to the above embodiments and the description will be omitted here.

[0105] The present application further provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium, and a processor of the earphone reads the computer instructions from the computer-readable storage medium and executes the computer instructions, thereby causing the earphone to perform the methods provided in the implementations of the above embodiments.

[0106] In the above embodiments of the earphone wearing state detection device, computer-readable storage medium, earphone, and computer program product, the description of each embodiment is focused on its own, and for parts not described in detail in one embodiment, reference may be made to the relevant descriptions of other embodiments. As can be understood by those skilled in the art, for convenience and simplification of explanation, the specific operating processes of the above-described earphone wearing state detection device, computer-readable storage medium, computer program product, earphone, and corresponding units, as well as the obtained effects of the invention, may refer to the description of the earphone wearing state detection method in the above embodiments, and description thereof will be omitted here.

[0107] The earphone wearing state detection method, device, earphone, computer-readable storage medium, and computer program product provided in the embodiments of the present application have been described in detail above. This specification uses specific examples to explain the principles and embodiments of the present application. The description of the above examples is intended only to facilitate understanding of the method and core idea of ​​the present application. Furthermore, those skilled in the art may modify specific embodiments and application scopes based on the ideas of the present application. In summary, the description in this specification should not be interpreted as limiting the present application.

Claims

1. Obtaining an earphone wearing state detection request; collecting audio through a feedback microphone of the earphone to obtain a feedback audio signal; determining a frequency of the audio signal, and determining a target frequency band in the feedback audio signal based on the frequency, the target frequency band having a frequency range that satisfies a predetermined condition; determining a power spectrum of the feedback audio signal; determining an energy content index value of the feedback audio signal within the target frequency band range based on the power spectrum; determining the wearing state of the earphone as an in-ear state if the energy amount index value is equal to or greater than a predetermined minimum energy threshold corresponding to an in-ear state. A method for detecting earphone wearing status.

2. When collecting sound through the feedback microphone of the earphone, further collecting sound through the feedforward microphone of the earphone to obtain a feedforward sound signal; The earphone wearing state detection method includes: performing a sound pressure level analysis on the feedforward audio signal and the feedback audio signal to determine a first sound pressure level of the feedforward audio signal and a second sound pressure level of the feedback audio signal; determining a sound pressure level difference between the first sound pressure level and the second sound pressure level; determining the wearing state of the earphones as an in-ear state when the sound pressure level difference is equal to or greater than a maximum threshold value for sound pressure level difference, and determining the wearing state of the earphones as an out-ear state when the sound pressure level difference is smaller than a maximum threshold value for sound pressure level difference. The earphone wearing state detection method according to claim 1 .

3. performing a sound pressure level analysis on the feedforward audio signal and the feedback audio signal, performing a sound pressure level analysis on the feedforward audio signal and the feedback audio signal if the energy content index value is less than the predetermined minimum energy threshold. The earphone wearing state detection method according to claim 2 .

4. Determining a first sound pressure level of the feedforward audio signal and a second sound pressure level of the feedback audio signal comprises: performing a spectral analysis on the feedforward audio signal and the feedback audio signal to determine a first spectrum of the feedforward audio signal and a second spectrum of the feedback audio signal; modifying spectral parameters of the first spectrum and spectral parameters of the second spectrum; determining a first sound pressure level of the feedforward audio signal and a second sound pressure level of the feedback audio signal based on the modified first spectrum and the modified second spectrum. The earphone wearing state detection method according to claim 2 .

5. Determining a target frequency band in the feedback audio signal, the frequency range of which satisfies a predetermined condition, based on the frequency, includes: Obtaining a frequency band length of a target frequency band awaiting determination; determining a target frequency band that includes the frequency and has a length of the frequency band length based on the frequency and the frequency band length; The earphone wearing state detection method according to any one of claims 1 to 4.

6. determining an energy amount index value of the feedback audio signal within the target frequency band range based on the power spectrum, determining a power of the feedback audio signal within the frequency band of interest based on the power spectrum; performing a square root calculation on the power within the frequency band range of interest to determine an energy content index value; The earphone wearing state detection method according to any one of claims 1 to 4.

7. The receiving of the earphone wearing state detection request includes: generating an earphone wearing state detection request at predetermined time intervals; or generating an earphone wearing state detection request when a sensor of the earphone identifies that the wearing state of the earphone has switched to an in-ear state. The earphone wearing state detection method according to any one of claims 1 to 4.

8. a detection request acquisition module used to acquire an earphone wearing state detection request; a feedback audio signal determining module, used for collecting audio through the feedback microphone of the earphone to obtain a feedback audio signal; a target frequency band determining module, which is used to determine a frequency of the audio signal, and determine a target frequency band in the feedback audio signal, the frequency range of which satisfies a predetermined condition, based on the frequency; a power spectrum determination module for determining the power spectrum of the feedback audio signal; an energy quantity index value determining module, which is used to determine an energy quantity index value of the feedback audio signal within the target frequency band range based on the power spectrum; a wearing state determination module, which is used to determine the wearing state of the earphone as an in-ear state when the energy amount index value is equal to or greater than a predetermined minimum energy threshold corresponding to an in-ear state; Earphone wearing status detection device.

9. a processor and a memory, the memory storing a plurality of instructions, the processor loading the instructions from the memory and executing the steps of the earphone wearing state detection method according to any one of claims 1 to 7; Earphones.

10. A plurality of instructions are stored, which are loaded by a processor and execute the steps of the earphone wearing state detection method according to any one of claims 1 to 7. A computer-readable storage medium.

Citation Information

Patent Citations

  • In-ear state detection method and device for ear-mounted device, and mobile terminal

    CN111294719A

  • Wearing detection method, wearable device and storage medium

    CN115314804A

  • Information processing device, wearable apparatus, information processing method, and storage medium

    WO2020129196A1