CN118018904A - In-out ear detection method, in-out ear detection device, in-out ear detection equipment and computer readable storage medium - Google Patents

In-out ear detection method, in-out ear detection device, in-out ear detection equipment and computer readable storage medium Download PDF

Info

Publication number
CN118018904A
CN118018904A CN202410096922.0A CN202410096922A CN118018904A CN 118018904 A CN118018904 A CN 118018904A CN 202410096922 A CN202410096922 A CN 202410096922A CN 118018904 A CN118018904 A CN 118018904A
Authority
CN
China
Prior art keywords
signal
microphone
earphone
similarity
microphone signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410096922.0A
Other languages
Chinese (zh)
Inventor
沙军琴
黄烈超
赵于成
陈信文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Tongli Software Development Co ltd
Original Assignee
Xi'an Tongli Software Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Tongli Software Development Co ltd filed Critical Xi'an Tongli Software Development Co ltd
Priority to CN202410096922.0A priority Critical patent/CN118018904A/en
Publication of CN118018904A publication Critical patent/CN118018904A/en
Pending legal-status Critical Current

Links

Landscapes

  • Headphones And Earphones (AREA)

Abstract

The application relates to the technical field of headphones, in particular to an in-out ear detection method, an in-out ear detection device and a computer readable storage medium, wherein the method comprises the following steps: outputting a low-frequency test signal through a speaker of the earphone under the condition that the wearing state of the earphone is determined to be changed; acquiring a first microphone signal acquired by a feedforward microphone of the earphone when the loudspeaker outputs a low-frequency test signal, acquiring a second microphone signal acquired by a feedback microphone of the earphone when the loudspeaker outputs the low-frequency test signal, and determining microphone signal similarity of the first microphone signal and the second microphone signal; if the signal similarity is smaller than a preset similarity threshold, determining that the earphone is in an in-ear state; if the signal similarity is greater than or equal to a preset similarity threshold, determining that the earphone is in an out-of-ear state. The application realizes the determination of the in-out ear state of the earphone based on the feedback microphone and the difference between the signals acquired by the feedback microphone, thereby improving the accuracy of in-out ear detection.

Description

In-out ear detection method, in-out ear detection device, in-out ear detection equipment and computer readable storage medium
Technical Field
The present application relates to the field of headphones, and in particular, to a method, apparatus, device, and computer readable storage medium for detecting an in/out ear.
Background
The in-out ear detection technology is a technology for detecting whether the earphone is worn on the ear of the user, and whether the user is using the earphone can be intelligently identified through in-out ear detection, so that functions of playing or pausing music, answering a call and the like are automatically controlled according to the using state of the earphone.
At present, in-out ear detection mainly depends on sensors such as a touch sensor or an acceleration sensor to detect, however, misjudgment may occur when the in-out ear state of the earphone is detected through the sensors, for example, when the earphone is placed in a pocket or on a table and touched by a user, the touch sensor detects that the earphone is touched, and may misdetect the earphone as being worn, thereby causing misjudgment of the in-out ear state, and the accuracy of the intelligent control process of the earphone is affected by misjudgment of the in-out ear state, so that the user uses the earphone.
Disclosure of Invention
The application mainly aims to provide an in-out ear detection method, an in-out ear detection device, an in-out ear detection equipment and a computer readable storage medium, aiming at improving the accuracy of in-out ear detection of a headset.
In order to achieve the above object, the present application provides an in-out ear detection method, which includes the following steps:
Outputting a low-frequency test signal through a speaker of the earphone under the condition that the earphone wearing state of the earphone is determined to be changed, wherein the earphone wearing state comprises a worn state and an unworn state;
Acquiring a first microphone signal acquired by a feedforward microphone of the earphone when the loudspeaker outputs the low-frequency test signal, acquiring a second microphone signal acquired by a feedback microphone of the earphone when the loudspeaker outputs the low-frequency test signal, and determining microphone signal similarity of the first microphone signal and the second microphone signal;
If the signal similarity is smaller than a preset similarity threshold, determining that the earphone is in an in-ear state;
And if the signal similarity is greater than or equal to the preset similarity threshold, determining that the earphone is in an out-of-ear state.
Optionally, the step of determining the signal similarity of the first microphone signal and the second microphone signal comprises:
Dividing the first microphone signal into first segment signals of a plurality of frequency bands based on a preset frequency band division rule, and dividing the second microphone signal into second segment signals of a plurality of frequency bands based on the frequency band division rule;
Determining the segment signal similarity of the target first segment signal and the target second segment signal for any target first segment signal in the first segment signals, wherein the target second segment signal is a second segment signal in the same frequency band as the target first segment signal in the second segment signals;
microphone signal similarities for the first microphone signal and the second microphone signal are determined based on the respective segmented signal similarities.
Optionally, the step of determining the microphone signal similarity of the first microphone signal and the second microphone signal based on the respective segment signal similarities comprises:
If the wearing state of the earphone is changed from the wearing state to the unworn state, carrying out weighted average processing on each segmented signal similarity through a preset weight coefficient corresponding to each segmented signal similarity, and determining microphone signal similarity based on the signal similarity obtained by the weighted average processing;
And if the wearing state of the earphone is changed from the unworn state to the worn state, determining the microphone signal similarity according to the segmented signal similarity corresponding to a target frequency band in the segmented signal similarities, wherein the target frequency band is the frequency band in which the low-frequency test signal is located.
Optionally, the method for detecting an in-out ear further includes:
if the signal similarity is smaller than a preset similarity threshold, acquiring a third microphone signal acquired by the feedback microphone within a first preset time period from the moment when the earphone is detected to be worn, and detecting whether a transient noise signal exists in the third microphone signal;
and if the transient noise signal does not exist in the third microphone signal, determining that the earphone is in an in-ear state.
Optionally, the method for detecting an in-out ear further includes:
If the signal similarity is greater than or equal to the preset similarity threshold, repeatedly acquiring a new first microphone signal and a new second microphone signal, and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time;
and when the microphone signal similarity determined by the continuous preset times is greater than or equal to the preset similarity threshold, determining that the earphone is in an out-of-ear state.
Optionally, if the signal similarity is greater than or equal to the preset similarity threshold, repeating the steps of acquiring a new first microphone signal and a new second microphone signal, and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time, including:
If the signal similarity is greater than or equal to the preset similarity threshold, acquiring a fourth microphone signal acquired by the feedback microphone within a second preset time period from the moment when the earphone is detected to be worn, and detecting whether a transient noise signal exists in the fourth microphone signal;
And if the transient noise signal does not exist in the fourth microphone signal, repeatedly acquiring a new first microphone signal and a new second microphone signal, and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time.
Optionally, the method for detecting an in-out ear further includes:
Outputting the low-frequency test signal through the loudspeaker under the condition that the triggering threshold is determined to be customized, and prompting a user to operate the earphone to be in the ear;
Acquiring a feedforward microphone signal acquired by the feedforward microphone when the loudspeaker outputs the low-frequency test signal, acquiring a feedback microphone signal acquired by the feedback microphone when the loudspeaker outputs the low-frequency test signal, and determining target signal similarity of the feedforward microphone signal and the feedback microphone signal;
Prompting a user to operate the earphone to come into the ear after coming out of the ear, and executing the steps of acquiring a feedforward microphone signal acquired by the feedforward microphone when the loudspeaker outputs the low-frequency test signal, acquiring a feedback microphone signal acquired by the feedback microphone when the loudspeaker outputs the low-frequency test signal, and determining target signal similarity of the feedforward microphone signal and the feedback microphone signal until the number of acquired target signal similarity reaches a preset number;
And determining the preset similarity threshold value based on the similarity of each target signal.
In order to achieve the above object, the present application further provides an in-out ear detection device, including:
The output module is used for outputting a low-frequency test signal through a loudspeaker of the earphone under the condition that the earphone wearing state of the earphone is determined to be changed, wherein the earphone wearing state comprises a worn state and an unworn state;
The acquisition module is used for acquiring a first microphone signal acquired by a feedforward microphone of the earphone when the loudspeaker outputs the low-frequency test signal, acquiring a second microphone signal acquired by a feedback microphone of the earphone when the loudspeaker outputs the low-frequency test signal, and determining microphone signal similarity of the first microphone signal and the second microphone signal;
The first determining module is used for determining that the earphone is in an in-ear state if the signal similarity is smaller than a preset similarity threshold;
And the second determining module is used for determining that the earphone is in an out-of-ear state if the signal similarity is greater than or equal to the preset similarity threshold.
In order to achieve the above object, the present application also provides an in-out ear detection apparatus, including: the device comprises a memory, a processor and an in-out ear detection program which is stored in the memory and can run on the processor, wherein the in-out ear detection program realizes the steps of the in-out ear detection method when being executed by the processor.
In addition, in order to achieve the above object, the present application also proposes a computer-readable storage medium having stored thereon an in-out ear detection program which, when executed by a processor, implements the steps of the in-out ear detection method described above.
In the application, a low-frequency test signal is output through a loudspeaker of the earphone under the condition that the wearing state of the earphone is changed, wherein the wearing state of the earphone comprises a worn state and an unworn state; acquiring a first microphone signal acquired by a feedforward microphone of the earphone when the loudspeaker outputs a low-frequency test signal, acquiring a second microphone signal acquired by a feedback microphone of the earphone when the loudspeaker outputs the low-frequency test signal, and determining microphone signal similarity of the first microphone signal and the second microphone signal; if the signal similarity is smaller than a preset similarity threshold, determining that the earphone is in an in-ear state; if the signal similarity is greater than or equal to a preset similarity threshold, determining that the earphone is in an out-of-ear state.
When the wearing state of the earphone is changed, a low-frequency test signal is output through a loudspeaker of the earphone, whether the feedback microphone and the feedback microphone are in the same environment or not is determined according to the microphone signal similarity between sound signals acquired by the feedback microphone and the feedback microphone of the earphone, and when the microphone signal similarity is smaller than a preset similarity threshold value, the feedback microphone and the feedback microphone are determined to be in different environments, namely, the feedback microphone is positioned in an auditory canal of a user, namely, the earphone is determined to be in an in-ear state; when the microphone signal similarity is greater than or equal to a preset similarity threshold, determining that the feedback microphone and the feedback microphone are in the same environment, namely, the feedback microphone is also in the external environment, namely, determining that the earphone is in an ear-out state.
Compared with the method that whether the earphone is worn or not is detected through the sensor so as to determine the in-out ear state of the earphone, the method and the device for detecting the in-out ear state of the earphone, based on the difference between the feedback microphone and the signals acquired by the feedback microphone, determine the environment where the feedback microphone is located, further determine the in-out ear state of the earphone, and improve the accuracy of in-out ear detection.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present application;
FIG. 2 is a flowchart of a first embodiment of an in-out ear detection method according to the present application;
FIG. 3 is a flowchart of a second embodiment of the ear in/out detection method of the present application;
FIG. 4 is a flowchart of a third embodiment of an in-out ear detection method according to the present application;
fig. 5 is a schematic diagram of an earphone control device according to an embodiment of the in-out ear detection method of the present application;
FIG. 6 is a schematic flow chart of an embodiment of an in-out ear detection method according to the present application;
fig. 7 is a schematic flow chart of an embodiment of the method for detecting an in-out ear of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Referring to fig. 1, fig. 1 is a schematic device structure of a hardware running environment according to an embodiment of the present application.
It should be noted that, in the embodiment of the present application, the in-out ear detection device may be an earphone, or may be a device that establishes a communication connection with the earphone, for example, a smart phone, a personal computer, etc., which is not limited herein.
As shown in fig. 1, the in-out ear detection device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the device structure shown in fig. 1 is not limiting of the in-out ear detection device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and an in-out ear detection program may be included in the memory 1005, which is a type of computer storage medium. An operating system is a program that manages and controls the hardware and software resources of the device, supporting the running of in-ear detection programs and other software or programs. In the device shown in fig. 1, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing communication connection with a server; and the processor 1001 may be configured to call the in-out ear detection program stored in the memory 1005, and perform the following operations:
Outputting a low-frequency test signal through a speaker of the earphone under the condition that the earphone wearing state of the earphone is determined to be changed, wherein the earphone wearing state comprises a worn state and an unworn state;
Acquiring a first microphone signal acquired by a feedforward microphone of the earphone when the loudspeaker outputs the low-frequency test signal, acquiring a second microphone signal acquired by a feedback microphone of the earphone when the loudspeaker outputs the low-frequency test signal, and determining microphone signal similarity of the first microphone signal and the second microphone signal;
If the signal similarity is smaller than a preset similarity threshold, determining that the earphone is in an in-ear state;
And if the signal similarity is greater than or equal to the preset similarity threshold, determining that the earphone is in an out-of-ear state.
Further, the step of determining the signal similarity of the first microphone signal and the second microphone signal includes:
Dividing the first microphone signal into first segment signals of a plurality of frequency bands based on a preset frequency band division rule, and dividing the second microphone signal into second segment signals of a plurality of frequency bands based on the frequency band division rule;
Determining the segment signal similarity of the target first segment signal and the target second segment signal for any target first segment signal in the first segment signals, wherein the target second segment signal is a second segment signal in the same frequency band as the target first segment signal in the second segment signals;
microphone signal similarities for the first microphone signal and the second microphone signal are determined based on the respective segmented signal similarities.
Further, the step of determining microphone signal similarities of the first microphone signal and the second microphone signal based on the respective segment signal similarities includes:
If the wearing state of the earphone is changed from the wearing state to the unworn state, carrying out weighted average processing on each segmented signal similarity through a preset weight coefficient corresponding to each segmented signal similarity, and determining microphone signal similarity based on the signal similarity obtained by the weighted average processing;
And if the wearing state of the earphone is changed from the unworn state to the worn state, determining the microphone signal similarity according to the segmented signal similarity corresponding to a target frequency band in the segmented signal similarities, wherein the target frequency band is the frequency band in which the low-frequency test signal is located.
Further, the in-out ear detection method further comprises the following steps:
if the signal similarity is smaller than a preset similarity threshold, acquiring a third microphone signal acquired by the feedback microphone within a first preset time period from the moment when the earphone is detected to be worn, and detecting whether a transient noise signal exists in the third microphone signal;
and if the transient noise signal does not exist in the third microphone signal, determining that the earphone is in an in-ear state.
Further, the in-out ear detection method further comprises the following steps:
If the signal similarity is greater than or equal to the preset similarity threshold, repeatedly acquiring a new first microphone signal and a new second microphone signal, and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time;
and when the microphone signal similarity determined by the continuous preset times is greater than or equal to the preset similarity threshold, determining that the earphone is in an out-of-ear state.
Further, if the signal similarity is greater than or equal to the preset similarity threshold, repeating the steps of acquiring a new first microphone signal and a new second microphone signal, and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time, including:
If the signal similarity is greater than or equal to the preset similarity threshold, acquiring a fourth microphone signal acquired by the feedback microphone within a second preset time period from the moment when the earphone is detected to be worn, and detecting whether a transient noise signal exists in the fourth microphone signal;
And if the transient noise signal does not exist in the fourth microphone signal, repeatedly acquiring a new first microphone signal and a new second microphone signal, and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time.
Further, the in-out ear detection method further comprises the following steps:
Outputting the low-frequency test signal through the loudspeaker under the condition that the triggering threshold is determined to be customized, and prompting a user to operate the earphone to be in the ear;
Acquiring a feedforward microphone signal acquired by the feedforward microphone when the loudspeaker outputs the low-frequency test signal, acquiring a feedback microphone signal acquired by the feedback microphone when the loudspeaker outputs the low-frequency test signal, and determining target signal similarity of the feedforward microphone signal and the feedback microphone signal;
Prompting a user to operate the earphone to come into the ear after coming out of the ear, and executing the steps of acquiring a feedforward microphone signal acquired by the feedforward microphone when the loudspeaker outputs the low-frequency test signal, acquiring a feedback microphone signal acquired by the feedback microphone when the loudspeaker outputs the low-frequency test signal, and determining target signal similarity of the feedforward microphone signal and the feedback microphone signal until the number of acquired target signal similarity reaches a preset number;
And determining the preset similarity threshold value based on the similarity of each target signal.
Based on the above-described structure, various embodiments of an in-out ear detection method are presented.
Referring to fig. 2, fig. 2 is a flow chart of a first embodiment of the ear in/out detection method according to the present application.
Embodiments of the present application provide embodiments of methods of in-out ear detection, it being noted that although a logical sequence is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in a different order than that illustrated herein. In this embodiment, the execution body of the in-out ear detection method may be an earphone, or may be a device that establishes communication connection with the earphone, for example, a personal computer, a smart phone, or other devices, which is not limited in this embodiment, and for convenience of description, the execution body is omitted from description of each embodiment. In this embodiment, the in-out ear detection method includes steps S10 to S40.
Step S10, outputting a low-frequency test signal through a loudspeaker of the earphone under the condition that the earphone wearing state of the earphone is determined to be changed, wherein the earphone wearing state comprises a worn state and an unworn state.
In this embodiment, the earphone may be any one of a pair of earphones, and before the earphone is subjected to the in-out ear detection, whether the earphone wearing state of the earphone is changed is detected, and under the condition that the earphone wearing state is changed, the in-out ear detection is performed on the earphone.
The wearing state of the earphone includes a worn state and an unworn state, and the change of the wearing state of the earphone may be that the earphone is changed from the unworn state to the worn state, or that the earphone is changed from the worn state to the unworn state. The specific process of detecting the wearing state of the earphone is not described herein, and may be detection by a touch sensor, an acceleration sensor, an infrared sensor, etc., and specifically set according to the hardware device and the actual requirement of the earphone, which is not limited herein.
Further, in a possible implementation, the change may occur in the wearing state of the earphone: when the earphone is in an unworn state to a worn state, the in-out ear detection is performed, and when the earphone is in a worn state, the earphone is changed to: when the earphone is changed from the worn state to the unworn state, the earphone is determined to be in the out-of-ear state.
In this embodiment, the low-frequency test signal is preset in the in-out ear detection device, the frequency upper limit value of the low-frequency test signal is lower than the preset frequency, specifically, the preset frequency can be set according to actual requirements, and in an exemplary possible implementation, the preset frequency can be the lowest frequency that can be perceived by the human ear, for example, 20 Hz.
Step S20, acquiring a first microphone signal acquired by a feedforward microphone of the earphone when the speaker outputs the low-frequency test signal, acquiring a second microphone signal acquired by a feedback microphone of the earphone when the speaker outputs the low-frequency test signal, and determining a microphone signal similarity of the first microphone signal and the second microphone signal.
In this embodiment, the earphone includes a feedforward microphone and a feedback microphone, and acquires a first microphone signal acquired by the feedback microphone and acquires a second microphone signal acquired by the feedback microphone. The microphone signal is a sound signal of the external environment where the microphone collects, and the sound signal comprises a signal obtained by collecting an output low-frequency test signal.
Signal similarities of the first microphone signal and the second microphone signal, hereinafter referred to as microphone signal similarities, are determined to illustrate the distinction. The manner of determining the microphone signal similarity is not limited herein, and in a possible implementation manner, signal feature comparison may be performed on the first microphone signal and the second microphone signal, where the signal feature is a signal feature characterizing the microphone signal, such as frequency, energy, and the like, and then the microphone signal similarity is determined according to the difference degree of the same signal feature, where the difference degree of the signal feature is inversely proportional to the microphone signal similarity, that is, the smaller the difference degree of the signal feature is, the higher the microphone signal similarity is; in another possible embodiment, the microphone signal similarity may also be determined based on an interaction between the first microphone signal and the second microphone signal, e.g. a cross-correlation coefficient, a pi-ehter coefficient, etc., which characterizes the cross-correlation, wherein the cross-correlation is proportional to the microphone signal similarity.
The first microphone signal and the second microphone signal may each include sound signals of a plurality of frequency bands, and when the microphone signal similarity is determined, the signal similarity of the first microphone signal and the second microphone signal in the full frequency band may be taken as the microphone signal similarity; the signal similarity of a specific frequency band can be determined, and then the signal similarity of the specific frequency band is taken as the microphone signal similarity, for example, the specific frequency band can be the frequency band of the low-frequency test signal; the first microphone signal and the second microphone signal may be divided into a plurality of frequency bands, the signal similarity of each frequency band is determined, and then the microphone signal similarity is determined based on the signal similarity of each frequency band, for example, the signal similarity of each frequency band is weighted and averaged to obtain the microphone signal similarity; other possible manners may be used to determine the microphone signal similarity, which may be specifically set according to actual requirements, and is not limited herein.
Step S30, if the signal similarity is smaller than a preset similarity threshold, determining that the earphone is in an in-ear state.
When the earphone is in an in-ear state, the feedback microphone and the feedback microphone are in different environments, and signals acquired by the feedback microphone and the feedback microphone are different, namely, the similarity of microphone signals is lower; when the earphone is in an ear-out state, the feedback microphone and the feedback microphone are in the same environment, signals collected by the feedback microphone and the feedback microphone are derived from the same environment, and microphone signal similarity is high. In this embodiment, a similarity threshold is preset, and whether the earphone is in an in-ear state is detected by detecting whether the microphone signal similarity is smaller than the preset similarity threshold. It should be noted that the preset similarity threshold may be set based on laboratory test data, or may be set according to an actual effect of using the earphone by the user, which is not limited herein.
Specifically, when the signal similarity is determined to be smaller than a preset similarity threshold, the earphone is determined to be in an in-ear state.
Further, in a possible implementation manner, the signal similarity is smaller than the preset similarity threshold may also be that the feedback microphone is masked and the feedback microphone is not masked, so as to distinguish between the in-ear state and the masking state of the feedback microphone, when the signal similarity is determined to be smaller than the preset similarity threshold, transient noise detection is performed on the microphone signal acquired by the feedback microphone, and when the transient noise is not detected, the in-ear state of the earphone is determined.
Step S40, if the signal similarity is greater than or equal to the preset similarity threshold, determining that the earphone is in an out-of-ear state.
If the signal similarity is greater than or equal to a preset similarity threshold, determining that the earphone is in an out-of-ear state.
Further, in a possible implementation manner, when the signal similarity is greater than or equal to a preset similarity threshold, the in-out and out-of-ear detection is repeated for multiple times, and when the out-of-ear state of the earphone is continuously detected for multiple times, the earphone is determined to be in the out-of-ear state, so that the accuracy of the result of the out-of-ear state is ensured.
Further, in a possible implementation manner, the signal similarity is greater than or equal to the preset similarity threshold, which may be due to that the whole earphone is in a closed environment and the sound signal output by the speaker of the earphone leaks, for example, after the user wears the earphone, the user uses the earmuff to surround the whole earphone in a closed environment, so as to distinguish the situation from the ear-out state of the earphone, in this implementation manner, when the signal similarity is greater than or equal to the preset similarity threshold, transient noise detection is performed on the microphone signal acquired by the feedforward microphone, and when no transient noise is detected, the earphone is determined to be in the ear-out state.
Further, in a possible implementation manner, the in-out ear detection results of two earphones in the pair of earphones may be different or the same, and after the in-out ear detection results of the two earphones in the pair of earphones are obtained, the earphones may be controlled according to a preset earphone control rule, and the preset earphone control rule may be specifically set according to an actual requirement, which is not limited herein. For example, the preset headset control rules may include: when two earphones in the pair of earphones are in an ear-out state, controlling the two earphone speakers to pause outputting sound signals; as another example, the preset earphone control rule may further include: when one of the pair of headphones is in an in-ear state, the headphone speaker in the in-ear state is controlled to output a sound signal.
Further, in one possible embodiment, the in-out ear detection method further includes steps S50-S80.
And S50, outputting the low-frequency test signal through the loudspeaker under the condition that the triggering threshold value is determined to be customized, and prompting a user to operate the earphone in the ear.
In this embodiment, the similarity threshold is set according to the actual use situation of the user, so that the in-out ear detection can adapt to the actual use situation of the user, and the accuracy of in-out ear detection is improved.
Specifically, under the condition that the triggering threshold is determined to be customized, a low-frequency test signal is output through a loudspeaker, and a user is prompted to operate the earphone to enter the ear. The condition for triggering the threshold customization is not limited herein, and the triggering threshold customization may be the triggering threshold customization when a user command is received, or the triggering threshold customization may be the triggering threshold customization when the earphone is activated.
In this embodiment, the threshold value may be defined for two headphones of the pair of headphones separately, or the threshold value may be defined for two headphones of the pair of headphones simultaneously, which is not limited herein.
Step S60, acquiring a feedforward microphone signal acquired by the feedforward microphone when the loudspeaker outputs the low-frequency test signal, acquiring a feedback microphone signal acquired by the feedback microphone when the loudspeaker outputs the low-frequency test signal, and determining the target signal similarity of the feedforward microphone signal and the feedback microphone signal.
And acquiring a feedforward microphone signal acquired by the feedforward microphone when the loudspeaker outputs the low-frequency test signal, and acquiring a feedback microphone signal acquired by the feedback microphone when the loudspeaker outputs the low-frequency test signal.
The signal similarity between the feedforward microphone signal and the feedback microphone signal (hereinafter referred to as the target signal similarity for distinguishing) is determined, and the specific manner of determining the target signal similarity is not described herein, and reference may be made to the determination process of the microphone signal similarity.
Step S70, prompting a user to operate the earphone to insert the earphone after leaving the earphone, and executing the steps of acquiring the feedforward microphone signal acquired by the feedforward microphone when the speaker outputs the low-frequency test signal, acquiring the feedback microphone signal acquired by the feedback microphone when the speaker outputs the low-frequency test signal, and determining the target signal similarity of the feedforward microphone signal and the feedback microphone signal until the number of acquired target signal similarity reaches a preset number.
Prompting a user to operate the earphone to insert the earphone after the earphone is out of the ear so as to repeatedly acquire the target signal similarity, namely, executing the steps of acquiring a feedforward microphone signal acquired by a feedforward microphone when the loudspeaker outputs a low-frequency test signal and acquiring a feedback microphone signal acquired by a feedback microphone when the loudspeaker outputs the low-frequency test signal, and determining the target signal similarity of the feedforward microphone signal and the feedback microphone signal until the number of acquired target signal similarity reaches a preset number.
And S80, determining the preset similarity threshold value based on the similarity of each target signal.
In this embodiment, statistical processing may be performed on the similarity of each target signal, for example, a processing method such as weighted average or median calculation, and the processed value may be used as a preset similarity threshold.
In this embodiment, under the condition that it is determined that the wearing state of the earphone is changed, a low-frequency test signal is output through a speaker of the earphone, where an upper frequency limit value of the low-frequency test signal is lower than a preset frequency; acquiring a first microphone signal acquired by a feedforward microphone of the earphone when the loudspeaker outputs a low-frequency test signal and acquiring a second microphone signal by a feedback microphone of the earphone, and determining the microphone signal similarity of the first microphone signal and the second microphone signal; if the signal similarity is smaller than a preset similarity threshold, determining that the earphone is in an in-ear state; if the signal similarity is greater than or equal to a preset similarity threshold, determining that the earphone is in an out-of-ear state.
In this embodiment, when the wearing state of the earphone is changed, a low-frequency test signal is output through a speaker of the earphone, whether the feedback microphone and the feedback microphone are in the same environment or not is determined according to the microphone signal similarity between the feedback microphone of the earphone and sound signals collected when the low-frequency test signal is output by the speaker, and when the microphone signal similarity is smaller than a preset similarity threshold value, the feedback microphone and the feedback microphone are determined to be in different environments, namely, the feedback microphone is positioned in an auditory canal of a user, namely, the earphone is determined to be in an in-ear state; when the microphone signal similarity is greater than or equal to a preset similarity threshold, determining that the feedback microphone and the feedback microphone are in the same environment, namely, the feedback microphone is also in the external environment, namely, determining that the earphone is in an ear-out state. Compared with the method that whether the earphone is worn or not is detected through the sensor so as to determine the in-out ear state of the earphone, in the embodiment, the environment where the feedback microphone is located is determined based on the difference between signals collected by the feedback microphone and the feedforward microphone when the loudspeaker outputs the low-frequency test signal, and then the in-out ear state of the earphone is determined.
Further, based on the above-described first embodiment, a second embodiment of the present application is proposed, in which, referring to fig. 3, step S20: determining the signal similarity of the first microphone signal and the second microphone signal comprises steps S201-S203.
Step S201, dividing the first microphone signal into a first segment signal of a plurality of frequency bands based on a preset frequency band division rule, and dividing the second microphone signal into a second segment signal of a plurality of frequency bands based on the frequency band division rule.
In this embodiment, the first microphone signal is divided into a first segment signal of a plurality of frequency bands based on a preset frequency band division rule, and the second microphone signal is divided into a second segment signal of a plurality of frequency bands based on a preset frequency band division rule. The specific frequency band division rule is not limited herein, and may be set according to actual requirements.
Step S202, for any one of the first segment signals, determining a segment signal similarity between the first segment signal and a second segment signal, where the second segment signal is a second segment signal in the same frequency band as the first segment signal.
In this embodiment, any one of the first segment signals is referred to as a first segment signal, and a second segment signal in the same frequency band as the target first segment signal in the second segment signals is referred to as a target second segment signal.
The process of determining the similarity of the segment signals of the target first segment signal and the target second segment signal may refer to the microphone signal similarity, and will not be described herein.
Step S203, determining microphone signal similarities of the first microphone signal and the second microphone signal based on the respective segment signal similarities.
In this embodiment, statistical processing may be performed on the signal similarities of each segment, for example, after processing modes such as weighted average and median, the microphone signal similarity is determined based on the processed signal similarities; the microphone signal similarity may be determined by using the segment signal similarity corresponding to a specific frequency band, and may be specifically set according to actual requirements, which is not limited herein.
Further, in one possible embodiment, step S203: microphone signal similarities for the first microphone signal and the second microphone signal are determined based on the respective segmented signal similarities, comprising steps S2031-S2032.
Step S2031, if the wearing state of the earphone is changed from the worn state to the unworn state, performing weighted average processing on each of the segmented signal similarities through preset weight coefficients corresponding to each of the segmented signal similarities, and determining microphone signal similarities based on the signal similarities obtained by the weighted average processing.
In this embodiment, the microphone signal similarity is determined according to the change condition of the wearing state of the earphone, so that the microphone signal similarity can be adapted to the wearing state of the earphone, the accuracy of the microphone signal similarity is improved, and the accuracy of in-out ear detection is improved.
Specifically, in this embodiment, the respective weight coefficients of the segment signal similarities are preset correspondingly, and it should be noted that the respective preset weight coefficients of the segment signal similarities may be the same or different, which is not limited herein, and may be set according to actual requirements, and further, in a feasible implementation manner, the preset weight coefficient of the segment signal similarity corresponding to the frequency band where the low-frequency test signal is located may be set as the maximum weight coefficient in the respective preset weight coefficients, so as to improve the effect of the low-frequency test signal in the microphone signal similarity, thereby improving the accuracy of in-out ear detection.
And under the condition that the wearing state of the earphone is changed from the worn state to the unworn state, carrying out weighted average processing on the signal similarity of each segment through the preset weight coefficient corresponding to each segment signal similarity, and determining the microphone signal similarity based on the signal similarity obtained by the weighted average processing.
In the case that the worn state is changed to the unworn state, the earphone may be playing the audio signal, if the earphone is playing the audio signal, the audio signal leaks along with the change of the state of the earphone, in this embodiment, the microphone signal similarity is determined based on all the segment signal similarities, and the audio signal which the earphone may be playing is also used as a reference of the microphone signal similarity, thereby improving accuracy of microphone signal similarity and accuracy of in-out ear detection.
Step S2032, if the wearing state of the earphone is changed from the unworn state to the worn state, determining the microphone signal similarity according to the segment signal similarity corresponding to the target frequency band.
The frequency band corresponding to the low frequency test signal is hereinafter referred to as a target frequency band. And if the wearing state of the earphone is changed from the unworn state to the worn state, determining the microphone signal similarity according to the segmented signal similarity corresponding to the target frequency band. Under the condition that the unworn state is changed into the unworn state, the microphone signal similarity is determined based on the segment signal similarity of the target frequency band, so that interference of signals of other frequency bands easy to leak to the microphone signal similarity can be avoided, the accuracy of the microphone signal similarity is improved, and the accuracy of in-out ear detection is improved.
In this embodiment, the first microphone signal is divided into a first segment signal of a plurality of frequency bands based on a preset frequency band division rule, and the second microphone signal is divided into a second segment signal of a plurality of frequency bands based on a preset frequency band division rule; determining the similarity of the target first segmented signal and the segmented signal of the target second segmented signal for any target first segmented signal in each first segmented signal, wherein the target second segmented signal is a second segmented signal which is in the same frequency band as the target first segmented signal in each second segmented signal; microphone signal similarities for the first microphone signal and the second microphone signal are determined based on the respective segment signal similarities. In this embodiment, frequency bands of the first microphone signal and the second microphone signal are divided, signal similarity corresponding to each frequency band is determined respectively, and then microphone signal similarity is determined according to the segmented signal similarity.
Further, based on the first and/or second embodiments, a third embodiment of the in-out ear detection method according to the present application is provided, and in this embodiment, referring to fig. 4, the in-out ear detection method further includes steps a10-a20.
And step A10, if the signal similarity is smaller than a preset similarity threshold, acquiring a third microphone signal acquired by the feedback microphone within a first preset time period from the moment when the earphone is detected to be worn, and detecting whether a transient noise signal exists in the third microphone signal.
In this embodiment, if the signal similarity is smaller than the preset similarity threshold, a third microphone signal acquired by the feedback microphone when the speaker outputs the low-frequency test signal within a first preset duration from the moment when the earphone is detected to be worn is acquired, and whether a transient noise signal exists in the third microphone signal is detected. The specific manner of detecting the transient noise is not limited herein, and may be spectrum contrast, deep learning, or the like.
And step A20, if the transient noise signal does not exist in the third microphone signal, determining that the earphone is in an in-ear state.
And if the transient noise signal does not exist in the third microphone signal, determining that the earphone is in an in-ear state.
The signal similarity is smaller than the preset similarity threshold value may also be that the feedback microphone is covered and the feedback microphone is not covered, so as to distinguish between the in-ear state and the covered state of the earphone, when the signal similarity is smaller than the preset similarity threshold value, transient noise detection is performed on the microphone signal acquired by the feedback microphone, and when the transient noise is not detected, the earphone is determined to be in the in-ear state, so that the accuracy of in-out-in-ear detection is improved.
Further, in one possible embodiment, the in-out ear detection method further includes steps A30-A40.
And step A30, if the signal similarity is greater than or equal to the preset similarity threshold, repeatedly acquiring a new first microphone signal and a new second microphone signal, and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time.
And when the signal similarity is greater than or equal to a preset similarity threshold, repeatedly carrying out in-out detection for a plurality of times, and when the out-out of the earphone is continuously detected for a plurality of times, determining that the earphone is in an out-of-ear state so as to ensure the accuracy of the result of the out-of-ear state. Specifically, if the signal similarity is greater than or equal to a preset similarity threshold, repeatedly acquiring a new first microphone signal and a new second microphone signal, and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time.
And step A40, when the microphone signal similarity determined by the continuous preset times is greater than or equal to the preset similarity threshold value, determining that the earphone is in an out-of-ear state.
When the microphone signal similarity determined by the continuous preset times is greater than or equal to a preset similarity threshold, determining that the earphone is in an out-of-ear state, wherein the preset times can be set according to actual requirements, and the method is not limited.
Further, in one possible embodiment, step a30: and if the signal similarity is greater than or equal to the preset similarity threshold, repeating the steps of acquiring a new first microphone signal and a new second microphone signal, and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time, wherein the steps comprise steps A301-A302.
Step a301, if the signal similarity is greater than or equal to the preset similarity threshold, acquiring a fourth microphone signal acquired by the feedback microphone when the speaker outputs a low-frequency test signal within a second preset duration from the moment when the earphone is detected to be worn, and detecting whether a transient noise signal exists in the fourth microphone signal.
The signal similarity is greater than or equal to the preset similarity threshold, which may be due to that the earphone is entirely in a closed environment and the sound signal output by the earphone speaker leaks, for example, after the earphone is worn by the user, the earphone is entirely enclosed in a closed environment by using the earmuff, so as to distinguish the situation from the earphone ear-out state, in this embodiment, when the signal similarity is greater than or equal to the preset similarity threshold, transient noise detection is performed on the microphone signal acquired by the feedforward microphone, and when the transient noise is not detected, the earphone is determined to be in the ear-out state.
Specifically, if the signal similarity is greater than or equal to a preset similarity threshold, acquiring a fourth microphone signal acquired by a feedback microphone during a second preset time period from the moment when the earphone is detected to be worn when the speaker outputs a low-frequency test signal, and detecting whether a transient noise signal exists in the fourth microphone signal, wherein the specific process of detecting the transient noise signal is not described herein.
Step a302, if no transient noise signal exists in the fourth microphone signal, repeatedly acquiring a new first microphone signal and a new second microphone signal, and determining a microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time.
And if the transient noise signal does not exist in the fourth microphone signal, repeatedly acquiring the new first microphone signal and the new second microphone signal, and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time.
In this embodiment, if the signal similarity is smaller than a preset similarity threshold, a third microphone signal acquired when the low-frequency test signal is output by the speaker by the feedback microphone within a first preset duration from the moment when the earphone is detected to be worn is acquired, and whether a transient noise signal exists in the third microphone signal is detected; and if the transient noise signal does not exist in the third microphone signal, determining that the earphone is in an in-ear state. The embodiment can distinguish the two situations that the earphone is in the ear and the feedback microphone is covered, so that the accuracy of in-out ear detection is improved.
Illustratively, referring to fig. 5, the earphone in-out-in-ear control device may include: the sensor detection module is used for detecting the wearing state of the earphone according to the sensor data; the threshold value customization module is used for detecting and customizing the similarity threshold value under the condition of determining triggering threshold value customization; the in-out ear detection module is used for detecting in-out ears of the earphone; and the control module is used for controlling the signal output of the earphone according to the detection result of the in-out ear.
Illustratively, in a possible implementation, the in-ear and out-ear detection scheme of the in-ear earphone is implemented based on the touch sensor and the microphone, specifically, referring to fig. 6, the in-ear and out-ear detection flow may be:
(1) Whether the earphone is changed from an unworn state to a worn state is judged according to the touch sensor. If the state is changed from the unworn state to the worn state, the microphone is turned on, and the step (2) is entered for subsequent judgment and detection; if the earphone is changed from the worn state to the unworn state, the functions such as music pause or conversation silence are directly triggered.
(2) And (3) playing the low-frequency test signal, simultaneously acquiring the first microphone signal and the second microphone signal, determining the microphone signal similarity of the first microphone signal and the second microphone signal, and entering the step (3).
(3) And detecting whether the signal similarity is smaller than a preset similarity threshold value.
(4) If the signal similarity is smaller than a preset similarity threshold, determining that the earphone is in an in-ear state.
(5) If the signal similarity is greater than or equal to a preset similarity threshold, repeating the in-out and out-of-ear detection once, and determining that the earphone is in an out-of-ear state when the signal similarity is greater than or equal to the preset similarity threshold as the detection result of the two times (that is, if the signal similarity is greater than or equal to the preset similarity threshold, returning to execute the step of acquiring a first microphone signal acquired by a feedforward microphone of the earphone when the loudspeaker outputs a low-frequency test signal, and acquiring a second microphone signal acquired by a feedback microphone of the earphone, and determining that the earphone is in an out-of-ear state when the continuous times of detecting that the signal similarity is greater than or equal to the preset similarity threshold is greater than the preset times).
Illustratively, in one possible implementation, referring to fig. 7, the process of threshold customization may be:
(1) The user is prompted to operate the earphone in the ear through the key triggering threshold customization, and a low-frequency test signal is output through the loudspeaker (namely, under the condition that the triggering threshold customization is determined, the low-frequency test signal is output through the loudspeaker, and the user is prompted to operate the earphone in the ear).
(2) And acquiring a feedforward microphone signal acquired by the feedforward microphone when the loudspeaker outputs the low-frequency test signal, and acquiring a feedback microphone signal acquired by the feedback microphone when the loudspeaker outputs the low-frequency test signal.
(3) Target signal similarities for the feedforward microphone signal and the feedback microphone signal are determined.
(4) Prompting the user to go out the earphone and re-go in the earphone again, and executing three times in sequence (namely, until the number of acquired target signal similarity reaches the preset number).
(5) And analyzing the three target signal similarities to obtain a final similarity threshold value, and storing the final similarity threshold value, wherein the subsequent in-out ear detection is judged by using a self-defined threshold value (namely, a preset similarity threshold value is determined based on the similarity of each target signal). Further, in a possible embodiment, resetting the default threshold is also supported.
In addition, the embodiment of the application also provides an in-out ear detection device, and each embodiment of the in-out ear detection device can refer to each embodiment of the in-out ear detection method of the application, and the description is omitted herein.
In addition, an embodiment of the present application further provides a computer readable storage medium, where an in-out ear detection program is stored, where the in-out ear detection program when executed by a processor implements the steps of the in-out ear detection method described below.
Embodiments of the in-out ear detection device and the computer readable storage medium of the present application may refer to embodiments of the in-out ear detection method of the present application, and are not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. The method for detecting the in-out ears is characterized by comprising the following steps of:
Outputting a low-frequency test signal through a speaker of the earphone under the condition that the earphone wearing state of the earphone is determined to be changed, wherein the earphone wearing state comprises a worn state and an unworn state;
Acquiring a first microphone signal acquired by a feedforward microphone of the earphone when the loudspeaker outputs the low-frequency test signal, acquiring a second microphone signal acquired by a feedback microphone of the earphone when the loudspeaker outputs the low-frequency test signal, and determining microphone signal similarity of the first microphone signal and the second microphone signal;
If the signal similarity is smaller than a preset similarity threshold, determining that the earphone is in an in-ear state;
And if the signal similarity is greater than or equal to the preset similarity threshold, determining that the earphone is in an out-of-ear state.
2. The in-out ear detection method of claim 1, wherein the step of determining a signal similarity of the first microphone signal and the second microphone signal comprises:
Dividing the first microphone signal into first segment signals of a plurality of frequency bands based on a preset frequency band division rule, and dividing the second microphone signal into second segment signals of a plurality of frequency bands based on the frequency band division rule;
Determining the segment signal similarity of the target first segment signal and the target second segment signal for any target first segment signal in the first segment signals, wherein the target second segment signal is a second segment signal in the same frequency band as the target first segment signal in the second segment signals;
microphone signal similarities for the first microphone signal and the second microphone signal are determined based on the respective segmented signal similarities.
3. The in-out ear detection method according to claim 2, wherein the step of determining microphone signal similarities of the first microphone signal and the second microphone signal based on the respective segment signal similarities comprises:
If the wearing state of the earphone is changed from the wearing state to the unworn state, carrying out weighted average processing on each segmented signal similarity through a preset weight coefficient corresponding to each segmented signal similarity, and determining microphone signal similarity based on the signal similarity obtained by the weighted average processing;
And if the wearing state of the earphone is changed from the unworn state to the worn state, determining the microphone signal similarity according to the segmented signal similarity corresponding to a target frequency band in the segmented signal similarities, wherein the target frequency band is the frequency band in which the low-frequency test signal is located.
4. The in-out ear detection method according to claim 1, further comprising:
if the signal similarity is smaller than a preset similarity threshold, acquiring a third microphone signal acquired by the feedback microphone within a first preset time period from the moment when the earphone is detected to be worn, and detecting whether a transient noise signal exists in the third microphone signal;
and if the transient noise signal does not exist in the third microphone signal, determining that the earphone is in an in-ear state.
5. The in-out ear detection method according to claim 1, further comprising:
If the signal similarity is greater than or equal to the preset similarity threshold, repeatedly acquiring a new first microphone signal and a new second microphone signal, and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time;
and when the microphone signal similarity determined by the continuous preset times is greater than or equal to the preset similarity threshold, determining that the earphone is in an out-of-ear state.
6. The in-out ear detection method according to claim 5, wherein the step of repeatedly acquiring a new first microphone signal and a new second microphone signal and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal each acquired if the signal similarity is greater than or equal to the preset similarity threshold value comprises:
If the signal similarity is greater than or equal to the preset similarity threshold, acquiring a fourth microphone signal acquired by the feedback microphone within a second preset time period from the moment when the earphone is detected to be worn, and detecting whether a transient noise signal exists in the fourth microphone signal;
And if the transient noise signal does not exist in the fourth microphone signal, repeatedly acquiring a new first microphone signal and a new second microphone signal, and determining the microphone signal similarity of the new first microphone signal and the new second microphone signal acquired each time.
7. The in-out ear detection method according to any one of claims 1 to 6, characterized in that the in-out ear detection method further comprises:
Outputting the low-frequency test signal through the loudspeaker under the condition that the triggering threshold is determined to be customized, and prompting a user to operate the earphone to be in the ear;
Acquiring a feedforward microphone signal acquired by the feedforward microphone when the loudspeaker outputs the low-frequency test signal, acquiring a feedback microphone signal acquired by the feedback microphone when the loudspeaker outputs the low-frequency test signal, and determining target signal similarity of the feedforward microphone signal and the feedback microphone signal;
Prompting a user to operate the earphone to come into the ear after coming out of the ear, and executing the steps of acquiring a feedforward microphone signal acquired by the feedforward microphone when the loudspeaker outputs the low-frequency test signal, acquiring a feedback microphone signal acquired by the feedback microphone when the loudspeaker outputs the low-frequency test signal, and determining target signal similarity of the feedforward microphone signal and the feedback microphone signal until the number of acquired target signal similarity reaches a preset number;
And determining the preset similarity threshold value based on the similarity of each target signal.
8. An in-out ear detection device, characterized in that the in-out ear detection device comprises:
The output module is used for outputting a low-frequency test signal through a loudspeaker of the earphone under the condition that the earphone wearing state of the earphone is determined to be changed, wherein the earphone wearing state comprises a worn state and an unworn state;
The acquisition module is used for acquiring a first microphone signal acquired by a feedforward microphone of the earphone when the loudspeaker outputs the low-frequency test signal, acquiring a second microphone signal acquired by a feedback microphone of the earphone when the loudspeaker outputs the low-frequency test signal, and determining microphone signal similarity of the first microphone signal and the second microphone signal;
The first determining module is used for determining that the earphone is in an in-ear state if the signal similarity is smaller than a preset similarity threshold;
And the second determining module is used for determining that the earphone is in an out-of-ear state if the signal similarity is greater than or equal to the preset similarity threshold.
9. An in-out ear detection device, characterized in that the in-out ear detection device comprises: a memory, a processor, and an in-out ear detection program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the in-out ear detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein an in-out ear detection program is stored on the computer-readable storage medium, which when executed by a processor, implements the steps of the in-out ear detection method according to any one of claims 1 to 7.
CN202410096922.0A 2024-01-23 2024-01-23 In-out ear detection method, in-out ear detection device, in-out ear detection equipment and computer readable storage medium Pending CN118018904A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410096922.0A CN118018904A (en) 2024-01-23 2024-01-23 In-out ear detection method, in-out ear detection device, in-out ear detection equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410096922.0A CN118018904A (en) 2024-01-23 2024-01-23 In-out ear detection method, in-out ear detection device, in-out ear detection equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN118018904A true CN118018904A (en) 2024-05-10

Family

ID=90958861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410096922.0A Pending CN118018904A (en) 2024-01-23 2024-01-23 In-out ear detection method, in-out ear detection device, in-out ear detection equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN118018904A (en)

Similar Documents

Publication Publication Date Title
US10880647B2 (en) Active acoustic filter with location-based filter characteristics
CN108540906B (en) Volume adjusting method, earphone and computer readable storage medium
CN109688498B (en) Volume adjusting method, earphone and storage medium
CN102293012A (en) Acoustic in-ear detection for earpiece
US11218796B2 (en) Annoyance noise suppression
KR101535112B1 (en) Earphone and mobile apparatus and system for protecting hearing, recording medium for performing the method
CN113038337B (en) Audio playing method, wireless earphone and computer readable storage medium
CN114071308B (en) Headset self-adaptive tuning method and device, headset and readable storage medium
CN113194372B (en) Earphone control method and device and related components
CN112911441A (en) Noise reduction method, apparatus, audio device, and computer-readable storage medium
CN112087701A (en) Speaker emulation of microphone for wind detection
CN112013949A (en) Earphone wearing state determining method and device and earphone
CN113949956B (en) Noise reduction processing method and device, electronic equipment, earphone and storage medium
AU2020402822A1 (en) User hearing protection method, apparatus, and electronic device
WO2022233308A1 (en) Wearing detection method, wearable device and storage medium
CN113920975B (en) Noise reduction parameter setting method and device, earphone equipment and storage medium
CN107343095B (en) Call volume control method and device, storage medium and terminal
CN109361987B (en) Sports earphone and control method, device and equipment thereof
CN118018904A (en) In-out ear detection method, in-out ear detection device, in-out ear detection equipment and computer readable storage medium
CN113132885B (en) Method for judging wearing state of earphone based on energy difference of double microphones
CN114071307A (en) Earphone volume adjusting method, device, equipment and medium
CN115550781A (en) Volume adjusting method, device, equipment and readable storage medium
CN110139181B (en) Audio processing method and device, earphone, terminal equipment and storage medium
CN111757211B (en) Noise reduction method, terminal device and storage medium
CN114095835A (en) Method and device for controlling transparent mode of earphone, earphone equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination