Earphone Wearing Looseness Detection Method, Device, Electronic Device and Readable Storage Medium

By obtaining the audio data collected by the feedforward microphone and feedback microphone of the headset, determining the current transfer function of the headset and comparing it with the preset function, the problem of low timeliness of headset drop detection in the existing technology is solved, and the function of predicting the drop of headsets in advance is realized.

CN115119129BActive Publication Date: 2025-05-30GEER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210758360.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2025-05-30
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

In the prior art, the timeliness of headphone drop detection is low, and it is impossible to predict whether the headphone is about to fall out in advance.

Method used

By obtaining the audio data collected by the feedforward microphone and feedback microphone, the current transfer function of the headset's passive noise reduction is determined, and compared with the preset passive noise reduction transfer function to detect whether the headset is loosely worn.

Benefits of technology

It realizes the advance prediction of whether the headphones will fall, which improves the timeliness of headphone drop detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115119129B_ABST
    Figure CN115119129B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and readable storage medium for detecting loose headphone wearing, which is applied to a headphone. The headphone includes a feedforward microphone and a feedback microphone. The method for detecting loose headphone wearing includes: obtaining first received audio data collected by the feedforward microphone and second received audio data collected by the feedback microphone; determining a current transfer function of passive noise reduction of the headphone according to the first received audio data and the second received audio data; and detecting whether the headphone has loose wearing according to the current transfer function and a preset passive noise reduction transfer function. The present application solves the technical problem of low timeliness of headphone drop detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of earphones, and particularly to a method, device, electronic device and readable storage medium for detecting loose earphone wearing. Background Art

[0002] With the continuous development of technology, earphones have gradually become commonly used audio devices for people. More and more users like to listen to music during exercise. However, earphones are prone to looseness during exercise, and it is difficult for users to directly perceive the looseness of the earphones. When the looseness is too large, the earphones will inevitably fall off. Currently, earphone wearing detection usually occurs after the earphones have fallen off. Therefore, it is impossible to predict in advance whether the earphones are about to fall off before they fall, and the timeliness of earphone fall detection is relatively low. Summary of the Invention

[0003] The main purpose of this application is to provide a method, device, electronic device and readable storage medium for detecting loose earphone wearing, aiming to solve the technical problem of low timeliness of earphone fall detection in the prior art.

[0004] To achieve the above object, this application provides a method for detecting loose earphone wearing, which is applied to an earphone. The earphone includes a feedforward microphone and a feedback microphone. The method for detecting loose earphone wearing includes:

[0005] Obtain first received audio data collected by the feedforward microphone and second received audio data collected by the feedback microphone;

[0006] Determine the current transfer function of the passive noise reduction of the earphone according to the first received audio data and the second received audio data;

[0007] Detect whether the earphone is loosely worn according to the current transfer function and a preset passive noise reduction transfer function.

[0008] Optionally, the earphone includes a speaker. The step of determining the current transfer function of the passive noise reduction of the earphone according to the first received audio data and the second received audio data includes:

[0009] If the earphone is in an audio playback state, obtain first playback audio data played by the earphone, and an audio playback transfer function corresponding to the audio propagation path from the speaker to the feedback microphone;

[0010] Determine the current transfer function according to the second received audio data, the first playback audio data, the audio playback transfer function and the first received audio data;

[0011] If the earphone is not in the audio playback state, determine the current transfer function according to the deviation between the first received audio data and the second received audio data.

[0012] Optionally, the step of determining the current transfer function according to the second received audio data, the first played audio data, the audio playback transfer function, and the first received audio data includes:

[0013] Estimate the residual noise audio data received by the feedback microphone according to the second received audio data, the first played audio data, and the audio playback transfer function;

[0014] Determine the current transfer function according to the deviation between the residual noise audio data and the first received audio data.

[0015] Optionally, the step of detecting whether the earphone is loose in wearing according to the current transfer function and the preset passive noise reduction transfer function includes:

[0016] Calculate the transfer function deviation between the current transfer function and the preset passive noise reduction transfer function;

[0017] If the transfer function deviation is greater than the preset transfer function deviation threshold, it is determined that the earphone is loose in wearing;

[0018] If the transfer function deviation is not greater than the preset transfer function deviation threshold, it is determined that the earphone is not loose in wearing.

[0019] Optionally, the earphone wearing looseness detection method further includes:

[0020] When the earphone is not loose in wearing, obtain the third received audio data collected by the feedforward microphone and the fourth received audio data collected by the feedback microphone while keeping the speaker of the earphone in the mute state;

[0021] Determine the preset passive noise reduction transfer function according to the deviation between the third received audio data and the fourth received audio data.

[0022] Optionally, after the step of determining the preset passive noise reduction transfer function according to the deviation between the third received audio data and the fourth received audio data, the earphone wearing looseness detection method further includes:

[0023] When playing the second played audio data through the speaker of the earphone, obtain the fifth received audio data collected by the feedforward microphone and the sixth received audio data collected by the feedback microphone;

[0024] Eliminate the residual noise data in the sixth received audio data according to the fifth received audio data and the preset passive noise cancellation transfer function, so as to obtain the seventh received audio data;

[0025] Determine the audio playback transfer function corresponding to the audio propagation path from the speaker to the feedback microphone according to the deviation between the seventh received audio data and the second played audio data.

[0026] Optionally, after the step of detecting whether the earphone is loose according to the current transfer function and the preset passive noise cancellation transfer function, the earphone loose detection method further includes:

[0027] If it is detected that the earphone is loose, play an earphone loose prompt message through the speaker of the earphone.

[0028] To achieve the above object, the present application also provides an earphone loose detection device, which is applied to an earphone. The earphone includes a feedforward microphone and a feedback microphone. The earphone loose detection device includes:

[0029] An audio acquisition module, configured to acquire the first received audio data collected by the feedforward microphone and the second received audio data collected by the feedback microphone;

[0030] A transfer function determination module, configured to determine the current transfer function of the earphone passive noise cancellation according to the first received audio data and the second received audio data;

[0031] A loose detection module, configured to detect whether the earphone is loose according to the current transfer function and the preset passive noise cancellation transfer function.

[0032] Optionally, the earphone includes a speaker, and the transfer function determination module is further configured to:

[0033] If the earphone is in an audio playback state, acquire the first played audio data played by the earphone, and the audio playback transfer function corresponding to the audio propagation path from the speaker to the feedback microphone;

[0034] Determine the current transfer function according to the second received audio data, the first played audio data, the audio playback transfer function and the first received audio data;

[0035] If the earphone is not in an audio playback state, determine the current transfer function according to the deviation between the first received audio data and the second received audio data.

[0036] Optionally, the transfer function determination module is further configured to:

[0037] Estimate the residual noise audio data received by the feedback microphone according to the second received audio data, the first played audio data, and the audio playback transfer function;

[0038] Determine the current transfer function according to the deviation between the residual noise audio data and the first received audio data.

[0039] Optionally, the loose detection module is further configured to:

[0040] Calculate the transfer function deviation between the current transfer function and the preset passive noise reduction transfer function;

[0041] If the transfer function deviation is greater than a preset transfer function deviation threshold, it is determined that the earphone is loosely worn;

[0042] If the transfer function deviation is not greater than the preset transfer function deviation threshold, it is determined that the earphone is not loosely worn.

[0043] Optionally, the earphone loose wearing detection device is further configured to:

[0044] When the earphone is not loosely worn, obtain the third received audio data collected by the feedforward microphone and the fourth received audio data collected by the feedback microphone while keeping the speaker of the earphone in a mute state;

[0045] Determine the preset passive noise reduction transfer function according to the deviation between the third received audio data and the fourth received audio data.

[0046] Optionally, the earphone loose wearing detection device is further configured to:

[0047] When playing the second played audio data through the speaker of the earphone, obtain the fifth received audio data collected by the feedforward microphone and the sixth received audio data collected by the feedback microphone;

[0048] According to the fifth received audio data and the preset passive noise reduction transfer function, remove the residual noise data in the sixth received audio data to obtain the seventh received audio data;

[0049] Determine the audio playback transfer function corresponding to the audio propagation path from the speaker to the feedback microphone according to the deviation between the seventh received audio data and the second played audio data.

[0050] Optionally, the earphone loose wearing detection device is further configured to:

[0051] If it is detected that the earphone is loosely worn, play an earphone loose prompt message through the speaker of the earphone.

[0052] The present application further provides an electronic device, which is a physical device. The electronic device includes: a memory, a processor, and a program of the earphone wearing looseness detection method stored on the memory and executable on the processor. When the program of the earphone wearing looseness detection method is executed by the processor, the steps of the earphone wearing looseness detection method as described above can be implemented.

[0053] The present application further provides a computer-readable storage medium, on which a program for implementing the earphone wearing looseness detection method is stored. When the program of the earphone wearing looseness detection method is executed by the processor, the steps of the earphone wearing looseness detection method as described above are implemented.

[0054] The present application further provides a computer program product, including a computer program. When the computer program is executed by the processor, the steps of the earphone wearing looseness detection method as described above are implemented.

[0055] The present application provides an earphone wearing looseness detection method, device, electronic device and readable storage medium. First, first received audio data collected by the feedforward microphone and second received audio data collected by the feedback microphone are obtained; according to the first received audio data and the second received audio data, a current transfer function of passive noise reduction of the earphone is determined; according to the current transfer function and a preset passive noise reduction transfer function, it is detected whether the earphone is worn loosely. Since the feedforward microphone is used to collect external environmental noise, and the feedback microphone is used to collect the sound heard by the user in the ear canal, therefore, in the present application, by comparing the first received audio data collected by the feedforward microphone and the second received audio data collected by the feedback microphone, the current transfer function of passive noise reduction of the earphone in the current wearing state can be determined. Thus, according to the deviation between the current transfer function and the preset passive noise reduction transfer function, the degree of earphone wearing looseness can be quantitatively detected. If the degree of looseness is relatively high, it can be determined that the earphone is worn loosely and is about to fall off. Therefore, the embodiments of the present application can realize predicting in advance whether the earphone will fall off, improving the timeliness of earphone fall detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0058] Figure 1 It is a schematic flowchart of the first embodiment of the method for detecting loose wearing of the earphone in this application;

[0059] Figure 2 It is a schematic flowchart of the second embodiment of the method for detecting loose wearing of the earphone in this application;

[0060] Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the method for detecting loose wearing of the earphone in the embodiment of this application.

[0061] The realization of the purpose, functional features and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments

[0062] To make the above objects, features and advantages of this application more obvious and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of this application without creative efforts shall fall within the protection scope of this application.

[0063] Embodiment 1

[0064] The embodiment of this application provides a method for detecting loose wearing of an earphone, which is applied to the earphone. The earphone includes a feedforward microphone and a feedback microphone. Refer to Figure 1 , in the first embodiment of the method for detecting loose wearing of the earphone in this application, the method for detecting loose wearing of the earphone includes:

[0065] Step S10, obtaining first received audio data collected by the feedforward microphone and second received audio data collected by the feedback microphone;

[0066] Step S20, determining the current transfer function of the passive noise reduction of the earphone according to the first received audio data and the second received audio data;

[0067] Step S30, detecting whether the earphone is loosely worn according to the current transfer function and the preset passive noise reduction transfer function.

[0068] In this embodiment, it should be noted that the earphone is provided with a feedforward microphone and a feedback microphone. Among them, the feedforward microphone is used to collect external environmental noise, and the feedback microphone is used to collect sound signals in the ear canal. Both the first received audio data and the second received audio data can be sound signal data in the frequency domain. Specifically, the time-domain sound signals collected by the feedforward microphone and the feedback microphone can be converted from the time domain to the frequency domain.

[0069] As an example, steps S10 to S30 include: acquiring first received audio data collected by the feedforward microphone and second received audio data collected by the feedback microphone; calculating a current transfer function of passive noise reduction of the earphone according to a deviation between the first received audio data and the second received audio data; and detecting whether the earphone is loosened in wearing according to a deviation between the current transfer function and a preset passive noise reduction transfer function.

[0070] Among them, the step of calculating the current transfer function of passive noise reduction of the earphone according to the deviation between the first received audio data and the second received audio data includes:

[0071] Performing feature extraction on the first received audio data to obtain a first sound amplitude vector, and performing feature extraction on the second received audio data to obtain a second sound amplitude vector; calculating a ratio between the first sound amplitude vector and the second sound amplitude vector to obtain the current transfer function of passive noise reduction of the earphone. Among them, the first sound amplitude vector may be composed of sound amplitudes at multiple preset sound frequencies in the first received audio data, and the second sound amplitude vector may be composed of sound amplitudes at multiple preset sound frequencies in the second received audio data. For example, assuming that the preset sound frequencies are A, B, and C respectively, the sound amplitude corresponding to A in the first received audio data is a, the sound amplitude corresponding to B in the first received audio data is b, and the sound amplitude corresponding to C in the first received audio data is c, then the first sound amplitude vector is (a, b, c), the sound amplitude corresponding to A in the second received audio data is e, the sound amplitude corresponding to B in the second received audio data is f, and the sound amplitude corresponding to C in the second received audio data is g, then the second sound amplitude vector is (e, f, g).

[0072] Among them, the earphone includes a speaker, and the step of determining the current transfer function of passive noise reduction of the earphone according to the first received audio data and the second received audio data includes:

[0073] Step S21, if the earphone is in an audio playing state, acquiring first played audio data played by the earphone and an audio playing transfer function corresponding to an audio propagation path from the speaker to the feedback microphone;

[0074] Step S22, determining the current transfer function according to the second received audio data, the first played audio data, the audio playing transfer function, and the first received audio data;

[0075] Step S23: If the earphone is not in the audio playback state, determine the current transfer function according to the deviation between the first received audio data and the second received audio data.

[0076] As an example, steps S21 to S23 include: If the earphone is in the audio playback state, obtain the first playback audio data played by the speaker of the earphone, and the audio playback transfer function corresponding to the audio propagation path from the speaker to the feedback microphone; based on the first playback audio data and the audio playback transfer function, eliminate the audio data associated with the first playback audio data from the second received audio data to obtain the residual noise audio data received by the feedback microphone, and calculate the current transfer function according to the deviation between the residual noise audio data and the first received audio data; if the earphone is not in the audio playback state, calculate the ratio between the first received audio data and the second received audio data to obtain the current transfer function of the passive noise reduction of the earphone.

[0077] Among them, the step of determining the current transfer function according to the second received audio data, the first playback audio data, the audio playback transfer function, and the first received audio data includes:

[0078] Step S221: Estimate the residual noise audio data received by the feedback microphone according to the second received audio data, the first playback audio data, and the audio playback transfer function.

[0079] Step S222: Determine the current transfer function according to the deviation between the residual noise audio data and the first received audio data.

[0080] In this embodiment, it should be noted that the audio playback transfer function is used to characterize the audio propagation ability of the audio propagation path from the speaker to the feedback microphone.

[0081] As an example, steps S221 to S222 include: Calculate the product of the first playback audio data and the audio playback transfer function to obtain the playback audio frequency domain data received by the feedback microphone; calculate the difference between the second received audio data and the playback audio frequency domain data to obtain the residual noise audio data received by the feedback microphone; calculate the ratio between the residual noise audio data and the first received audio data to obtain the current transfer function.

[0082] As an example, when the earphone is in the audio playback state, the calculation formula of the current transfer function is as follows:

[0083] H 1 =(FB - PB * H2 ) / FF

[0084] where H 1 is the current transfer function, FB is the second received audio data, PB is the first played audio data, and H 2 is the audio playback transfer function, and FF is the first received audio data.

[0085] When the earphone is not in the audio playback state, the calculation formula of the current transfer function is as follows:

[0086] H 1 = FB / FF

[0087] where H 1 is the current transfer function, FB is the second received audio data, and FF is the first received audio data.

[0088] where the step of detecting whether the earphone is worn loosely according to the current transfer function and the preset passive noise reduction transfer function includes:

[0089] Step S31, calculating the transfer function deviation between the current transfer function and the preset passive noise reduction transfer function;

[0090] Step S32, if the transfer function deviation is greater than the preset transfer function deviation threshold, it is determined that the earphone is worn loosely;

[0091] Step S33, if the transfer function deviation is not greater than the preset transfer function deviation threshold, it is determined that the earphone is not worn loosely.

[0092] As an example, steps S31 to S33 include: calculating the difference between the current transfer function and the preset passive noise reduction transfer function to obtain a transfer function deviation; if the transfer function deviation is greater than a preset transfer function deviation threshold, it proves that the wearing state of the earphone has changed, and thus it is determined that the earphone is loose; if the transfer function deviation is not greater than the preset transfer function deviation threshold, it proves that the wearing state of the earphone has not changed, and thus it is determined that the earphone is not loose. Among them, since the current transfer function is the transfer function of the earphone's passive noise reduction, when the earphone is worn well (not loose) with the ear canal, there is basically no gap between the earphone and the ear canal, and the value of the transfer function is relatively large. When the earphone is loose, there will be a gap between the earphone and the ear canal, and external noise will directly pass through the gap to the feedback microphone, resulting in a rapid increase in the residual noise received by the feedback microphone, and thus a rapid decrease in the value of the transfer function. Therefore, once there is a gap between the earphone and the ear canal, the value of the passive noise reduction transfer function will change greatly, and this change can be used to immediately detect the change in the wearing state of the earphone when the earphone and the ear canal start to loosen, and it is possible to detect the earphone being loose before it falls off.

[0093] Among them, after the step of detecting whether the earphone is loose according to the current transfer function and the preset passive noise reduction transfer function, the earphone loose detection method further includes:

[0094] Step S40, if it is detected that the earphone is loose, play a headphone loose prompt message through the earphone's speaker.

[0095] As an example, step S40 includes: if it is detected that the earphone is loose, play a voice prompt message through the earphone's speaker, and this voice prompt message is used to prompt that the earphone is loose.

[0096] An embodiment of the present application provides a method for detecting loose wearing of earphones. First, first received audio data collected by the feedforward microphone and second received audio data collected by the feedback microphone are obtained; according to the first received audio data and the second received audio data, a current transfer function of passive noise reduction of the earphones is determined; according to the current transfer function and a preset passive noise reduction transfer function, it is detected whether the earphones are worn loosely. Since the feedforward microphone is used to collect external environmental noise, and the feedback microphone is used to collect the sound heard by the user in the ear canal, in the embodiment of the present application, by comparing the first received audio data collected by the feedforward microphone and the second received audio data collected by the feedback microphone, the current transfer function of passive noise reduction of the earphones in the current wearing state can be determined. Thus, according to the deviation between the current transfer function and the preset passive noise reduction transfer function, the degree of loose wearing of the earphones can be quantitatively detected. If the degree of looseness is relatively high, it can be determined that the earphones are worn loosely and about to fall off. Therefore, the embodiment of the present application can realize predicting in advance whether the earphones will fall off, improving the timeliness of earphone fall detection.

[0097] Embodiment 2

[0098] Referring to Figure 2 , based on the first embodiment of the present application, in another embodiment of the present application, the method for detecting loose wearing of the earphones further includes:

[0099] Step A10, when the earphones are not worn loosely, third received audio data collected by the feedforward microphone and fourth received audio data collected by the feedback microphone are obtained while keeping the speakers of the earphones in a mute state;

[0100] Step A20, a preset passive noise reduction transfer function is determined according to the deviation between the third received audio data and the fourth received audio data.

[0101] In this embodiment, it should be noted that the third received audio data and the fourth received audio data may be sound signal data in the frequency domain, and the preset passive noise reduction transfer function is the transfer function corresponding to the audio propagation path from the outside of the earphones to the feedback microphone when the earphones are not worn loosely, that is, the transfer function of passive noise reduction of the earphones.

[0102] As an example, steps A10 to A20 include: when the earphones are not worn loosely, keep the speakers of the earphones in a mute state, and obtain third received audio data collected by the feedforward microphone and fourth received audio data collected by the feedback microphone; calculate the ratio between the third received audio data and the fourth received audio data to obtain a preset passive noise reduction transfer function. Among them, both the third received audio data and the fourth received audio data may be sound amplitude vectors.

[0103] After the step of determining the preset passive noise reduction transfer function according to the deviation between the third received audio data and the fourth received audio data, the headphone wearing looseness detection method further includes:

[0104] Step A30: When playing the second playback audio data through the speaker of the headphone, obtain the fifth received audio data collected by the feedforward microphone and the sixth received audio data collected by the feedback microphone;

[0105] Step A40: Based on the fifth received audio data and the preset passive noise reduction transfer function, eliminate the residual noise data in the sixth received audio data to obtain the seventh received audio data;

[0106] Step A50: Determine the audio playback transfer function corresponding to the audio propagation path from the speaker to the feedback microphone according to the deviation between the seventh received audio data and the second playback audio data.

[0107] In this embodiment, it should be noted that the fifth received audio data, the sixth received audio data, and the second playback audio data can all be sound signals in the frequency domain. Specifically, the original collected time-domain sound signal can be converted to the frequency domain to obtain the occasional sound signal.

[0108] As an example, steps A30 to A50 include: When the headphone is not worn loosely, play the second playback audio data through the speaker of the headphone, and obtain the fifth received audio data collected by the feedforward microphone and the sixth received audio data collected by the feedback microphone; calculate the product between the fifth received audio data and the preset passive noise reduction transfer function to obtain the residual noise data received by the feedback microphone; eliminate the residual noise data in the sixth received audio data by calculating the difference between the sixth received audio data and the residual noise data to obtain the seventh received audio data; calculate the ratio between the seventh received audio data and the second playback audio data to obtain the audio playback transfer function corresponding to the audio propagation path from the speaker to the feedback microphone.

[0109] As an example, the calculation formula for calculating the audio playback transfer function is as follows:

[0110] H 2 =(FB - FF * H 1 T ) / PB

[0111] where, H 2is the audio playback transfer function, FB is the sixth received audio data, and FF is the fifth received audio data. is the preset passive noise cancellation transfer function, and PB is the second played audio data. is the seventh received audio data.

[0112] An embodiment of the present application provides a method for calculating a preset passive noise cancellation transfer function and an audio playback transfer function. That is, when the headset is not loose, the third received audio data collected by the feedforward microphone and the fourth received audio data collected by the feedback microphone are obtained while keeping the speaker of the headset in a mute state; according to the deviation between the third received audio data and the fourth received audio data, the preset passive noise cancellation transfer function is determined; when playing the second played audio data through the speaker of the headset, the fifth received audio data collected by the feedforward microphone and the sixth received audio data collected by the feedback microphone are obtained; based on the fifth received audio data and the preset passive noise cancellation transfer function, the residual noise data in the sixth received audio data is removed to obtain the seventh received audio data; according to the deviation between the seventh received audio data and the second played audio data, the audio playback transfer function corresponding to the audio propagation path from the speaker to the feedback microphone is determined. The embodiment of the present application realizes calculating the preset passive noise cancellation transfer function of the passive noise cancellation of the headset in the state where the headset is not loose, and the audio propagation transfer function corresponding to the audio propagation path from the speaker to the feedback microphone when the headset is not loose. Thus, the current transfer function of the passive noise cancellation of the headset can be detected by using the audio propagation transfer function, and whether the headset is loose can be detected by using the current transfer function and the preset passive noise cancellation transfer function, laying a foundation for realizing the early prediction of whether the headset will fall.

[0113] Embodiment III

[0114] The present application also provides a headset wearing looseness detection device, which is applied to a headset. The headset includes a feedforward microphone and a feedback microphone. The headset wearing looseness detection device includes:

[0115] An audio acquisition module, configured to obtain the first received audio data collected by the feedforward microphone and the second received audio data collected by the feedback microphone;

[0116] A transfer function determination module, configured to determine the current transfer function of the passive noise cancellation of the headset according to the first received audio data and the second received audio data;

[0117] A looseness detection module, configured to detect whether the headset is loose according to the current transfer function and the preset passive noise cancellation transfer function.

[0118] Optionally, the earphone includes a speaker, and the transfer function determination module is further configured to:

[0119] If the earphone is in an audio playback state, obtain first playback audio data played by the earphone, and an audio playback transfer function corresponding to an audio propagation path from the speaker to the feedback microphone;

[0120] Determine the current transfer function according to the second received audio data, the first playback audio data, the audio playback transfer function, and the first received audio data;

[0121] If the earphone is not in an audio playback state, determine the current transfer function according to a deviation between the first received audio data and the second received audio data.

[0122] Optionally, the transfer function determination module is further configured to:

[0123] Estimate residual noise audio data received by the feedback microphone according to the second received audio data, the first playback audio data, and the audio playback transfer function;

[0124] Determine the current transfer function according to a deviation between the residual noise audio data and the first received audio data.

[0125] Optionally, the loose detection module is further configured to:

[0126] Calculate a transfer function deviation between the current transfer function and the preset passive noise reduction transfer function;

[0127] If the transfer function deviation is greater than a preset transfer function deviation threshold, determine that the earphone has become loose during wearing;

[0128] If the transfer function deviation is not greater than the preset transfer function deviation threshold, determine that the earphone has not become loose during wearing.

[0129] Optionally, the earphone wearing loose detection device is further configured to:

[0130] When the earphone has not become loose during wearing, obtain third received audio data collected by the feedforward microphone and fourth received audio data collected by the feedback microphone while keeping the speaker of the earphone in a mute state;

[0131] Determine the preset passive noise reduction transfer function according to a deviation between the third received audio data and the fourth received audio data.

[0132] Optionally, the earphone wearing loose detection device is further configured to:

[0133] When playing the second playback audio data through the speaker of the earphone, obtain the fifth received audio data collected by the feedforward microphone and the sixth received audio data collected by the feedback microphone;

[0134] According to the fifth received audio data and the preset passive noise cancellation transfer function, eliminate the residual noise data in the sixth received audio data to obtain the seventh received audio data;

[0135] Determine the audio playback transfer function corresponding to the audio propagation path from the speaker to the feedback microphone according to the deviation between the seventh received audio data and the second playback audio data.

[0136] Optionally, the earphone wearing looseness detection device is further configured to:

[0137] If it is detected that the earphone is worn loosely, play an earphone looseness prompt message through the speaker of the earphone.

[0138] The earphone wearing looseness detection device provided by this application adopts the earphone wearing looseness detection method in the above embodiment, and solves the technical problem of low timeliness of earphone drop detection. Compared with the prior art, the beneficial effects of the earphone wearing looseness detection device provided by the embodiment of this application are the same as those of the earphone wearing looseness detection method provided by the above embodiment, and other technical features in this earphone wearing looseness detection device are the same as those disclosed in the method of the above embodiment, and will not be elaborated here.

[0139] Embodiment 4

[0140] The embodiment of this application provides an electronic device. The electronic device can be an earphone or a terminal device carrying an earphone. The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the earphone wearing looseness detection method in Embodiment 1 above.

[0141] Refer to the following Figure 3 , which shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc. and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.

[0142] AsFigure 3 As shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, the ROM, and the RAM are connected to each other through a bus. An input / output (I / O) interface is also connected to the bus.

[0143] Generally, the following systems may be connected to the I / O interface: input devices including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices including, for example, a magnetic tape, a hard disk, etc.; and a communication device. The communication device may allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows an electronic device having various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be implemented or had alternatively.

[0144] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from a storage device, or installed from the ROM. When the computer program is executed by the processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0145] The electronic device provided by this application adopts the earphone wearing looseness detection method in the above embodiment, and solves the technical problem of low timeliness of earphone drop detection. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of this application are the same as those of the earphone wearing looseness detection method provided by the first embodiment above, and other technical features in this electronic device are the same as the features disclosed in the above embodiment method, and will not be elaborated here.

[0146] It should be understood that each part of the present disclosure may be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in a suitable manner in any one or more embodiments or examples.

[0147] As described above, it is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claimed rights.

[0148] Embodiment 5

[0149] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the method for detecting loose wearing of the earphone in the first embodiment above.

[0150] The computer-readable storage medium provided by the embodiments of the present application may be, for example, a USB flash drive, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium may be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0151] The above computer-readable storage medium may be included in an electronic device; or it may exist separately without being assembled into the electronic device.

[0152] The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed by an electronic device, the electronic device is caused to: obtain first received audio data collected by the feedforward microphone and second received audio data collected by the feedback microphone; determine a current transfer function of the passive noise reduction of the earphone according to the first received audio data and the second received audio data; and detect whether the earphone is loosened in wearing according to the current transfer function and a preset passive noise reduction transfer function.

[0153] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0154] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0155] The modules described in the embodiments of the present disclosure may be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.

[0156] The computer-readable storage medium provided by the present application stores computer-readable program instructions for performing the above-mentioned earphone wearing looseness detection method, which solves the technical problem of low timeliness of earphone drop detection. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiments of the present application are the same as those of the earphone wearing looseness detection method provided by the above embodiments, and will not be elaborated here.

[0157] Embodiment Six

[0158] The present application also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of the earphone wearing looseness detection method as described above.

[0159] The computer program product provided by the present application solves the technical problem of low timeliness of earphone drop detection. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiments of the present application are the same as those of the earphone wearing looseness detection method provided by the above embodiments, and will not be elaborated herein.

[0160] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent scope of the present application.

Claims

1. A method for detecting loose wearing of headphones, characterized in that, applied to headphones, the headphones include a feedforward microphone and a feedback microphone, and the method for detecting loose wearing of headphones includes: Obtaining first received audio data collected by the feedforward microphone and second received audio data collected by the feedback microphone; Determining a current transfer function of passive noise reduction of the headphones according to the first received audio data and the second received audio data; Detecting whether the headphones are loosely worn according to the current transfer function and a preset passive noise reduction transfer function; The calculation formula of the current transfer function is as follows: H 1 = (FB1 - PB1 * H 2 ) / FF1 Among them, H 1 is the current transfer function, FB1 is the received audio data collected by the feedback microphone when the earphone plays the first playback audio data, PB1 is the first playback audio data played by the earphone, H 2 is the audio playback transfer function corresponding to the audio propagation path from the speaker to the feedback microphone, and FF1 is the received audio data collected by the feedforward microphone when the earphone plays the first playback audio data; The calculation formula of the audio playback transfer function is as follows: Among them, H 2 is the audio playback transfer function, FB2 is the received audio data collected by the feedback microphone when the second playback audio data is played by the headset, and FF2 is the received audio data collected by the feedforward microphone when the second playback audio data is played by the headset. is the preset passive noise reduction transfer function, and PB2 is the second playback audio data played by the headset; The calculation formula of the preset passive noise reduction transfer function is as follows: Among them, is the preset passive noise cancellation transfer function, FB3 is the received audio data collected by the feedback microphone when the headset is not loose and not in the audio playback state, and FF3 is the received audio data collected by the feedforward microphone when the headset is not loose and not in the audio playback state.

2. The method for detecting loose wearing of headphones according to claim 1, characterized in that, the headphones include a speaker, and the step of determining the current transfer function of passive noise reduction of the headphones according to the first received audio data and the second received audio data includes: If the headphones are in the audio playback state, obtaining first playback audio data played by the headphones, and an audio playback transfer function corresponding to the audio propagation path from the speaker to the feedback microphone; Determining the current transfer function according to the second received audio data, the first playback audio data, the audio playback transfer function and the first received audio data; If the headphones are not in the audio playback state, determining the current transfer function according to the deviation between the first received audio data and the second received audio data.

3. The method for detecting loose wearing of headphones according to claim 2, characterized in that, the step of determining the current transfer function according to the second received audio data, the first playback audio data, the audio playback transfer function and the first received audio data includes: Estimating residual noise audio data received by the feedback microphone according to the second received audio data, the first playback audio data and the audio playback transfer function; Determining the current transfer function according to the deviation between the residual noise audio data and the first received audio data.

4. The method for detecting loose wearing of headphones according to claim 1, characterized in that, the step of detecting whether the headphones are loosely worn according to the current transfer function and a preset passive noise reduction transfer function includes: Calculating a transfer function deviation between the current transfer function and the preset passive noise reduction transfer function; If the transfer function deviation is greater than a preset transfer function deviation threshold, it is determined that the headphones are loosely worn; If the transfer function deviation is not greater than the preset transfer function deviation threshold, it is determined that the headphones are not loosely worn.

5. The method for detecting loose wearing of headphones according to any one of claims 1 to 4, characterized in that, the method for detecting loose wearing of headphones further includes: When the headphones are not loosely worn, obtaining third received audio data collected by the feedforward microphone and fourth received audio data collected by the feedback microphone while keeping the speaker of the headphones in a mute state; Determine a preset passive noise reduction transfer function according to the deviation between the third received audio data and the fourth received audio data.

6. The headphone wearing looseness detection method according to claim 5, wherein, after the step of determining the preset passive noise reduction transfer function according to the deviation between the third received audio data and the fourth received audio data, the headphone wearing looseness detection method further includes: when playing second playback audio data through a speaker of the headphone, obtaining fifth received audio data collected by the feedforward microphone and sixth received audio data collected by the feedback microphone; eliminating residual noise data in the sixth received audio data according to the fifth received audio data and the preset passive noise reduction transfer function to obtain seventh received audio data; determining an audio playback transfer function corresponding to the audio propagation path from the speaker to the feedback microphone according to the deviation between the seventh received audio data and the second playback audio data.

7. The headphone wearing looseness detection method according to claim 1, wherein, after the step of detecting whether the headphone is worn loosely according to the current transfer function and the preset passive noise reduction transfer function, the headphone wearing looseness detection method further includes: if it is detected that the headphone is worn loosely, playing a headphone looseness prompt message through a speaker of the headphone.

8. A headphone wearing looseness detection device, wherein, applied to a headphone, the headphone includes a feedforward microphone and a feedback microphone, and the headphone wearing looseness detection device applies the method according to claim 1, and includes: an audio acquisition module, configured to obtain first received audio data collected by the feedforward microphone and second received audio data collected by the feedback microphone; a transfer function determination module, configured to determine a current transfer function of passive noise reduction of the headphone according to the first received audio data and the second received audio data; a looseness detection module, configured to detect whether the headphone is worn loosely according to the current transfer function and the preset passive noise reduction transfer function.

9. An electronic device, wherein, the electronic device includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the headphone wearing looseness detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium, wherein, a program for implementing a headphone wearing looseness detection method is stored on the computer-readable storage medium, and the program for implementing the headphone wearing looseness detection method is executed by a processor to implement the steps of the headphone wearing looseness detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for detecting earphone wearing state and earphone

    CN109195045A

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

    CN111629297A