Disclosure of Invention
The invention aims to provide an audio adjustment method and device suitable for a user wearing a mask, which are used for identifying whether the user wears the mask by comparing the consistency of resonance curves so as to selectively perform audio compensation.
In order to achieve the above object, the present invention discloses a sound effect adjusting method suitable for a user wearing a mask, in which a micro motor for generating preset vibration is provided in an earphone, the sound effect adjusting method suitable for the user wearing the mask includes the following steps:
 S1, detecting in-place of the earphone;
 S2, if the earphone is in place, carrying out resonance detection on the earphone to obtain an in-ear resonance curve;
 s3, comparing the consistency of the in-ear resonance curve and the initial resonance curve, wherein the in-ear resonance curve and the initial resonance curve respectively have vibration intensity values which correspond to different frequency values one by one;
 And S4, compensating the sound effect of the earphone according to the comparison result.
Preferably, before the step S1, the method further includes:
 S101, detecting vibration of the earphone when the earphone is started up to obtain the initial resonance curve.
Preferably, the step S3 specifically includes:
 S31, acquiring a first frequency value f1 corresponding to the in-ear resonance curve in a preset frequency range when a peak value appears for the first time and a second frequency value f2 corresponding to the initial resonance curve when the peak value appears for the first time;
 S32, calculating according to a formula mu= |f1-f2|/f1 to obtain a first judgment factor mu;
 s33, if the first judging factor mu is smaller than 50%, identifying that the earphone generates auricle resonance.
Preferably, the step S3 specifically includes:
 S301, acquiring a first frequency value f1 corresponding to the in-ear resonance curve in a preset frequency range when a peak value appears for the first time and a second frequency value f2 corresponding to the initial resonance curve when the peak value appears for the first time;
 S302, acquiring a first vibration intensity value M1 corresponding to the first frequency value f1 in an in-ear resonance curve, and acquiring a second vibration intensity value M2 corresponding to the second frequency value f2 in an initial resonance curve;
 S303, calculating to obtain a second judgment factor lambda according to a formula lambda= |M 1-M2|/M1;
 S304, if the second judging factor lambda is more than 20% and less than 50%, and the first vibration intensity value M1 is more than 0, identifying that the earphone generates auricle resonance.
Preferably, the step S4 specifically includes:
 s41, if the earphone generates auricle resonance, enhancing and compensating the sound effect of the earphone.
Specifically, the step S41 specifically includes:
 and performing enhancement compensation on the uplink recorded sound of the earphone and/or performing distortion compensation on a low frequency band in the downlink playing sound of the earphone.
Preferably, the compensation parameters of a plurality of gears are preset, the consistency of the in-ear resonance curve and the initial resonance curve is divided into a plurality of consistency grades, and each consistency grade corresponds to the compensation parameter of one gear.
Preferably, the preset frequency range is between 30Hz and 1 KHz.
Preferably, the earpiece is in-ear detected in place by a combination of one or more of optical detection, barometric pressure detection, or capacitive detection.
Correspondingly, the invention also discloses a sound effect adjusting device suitable for wearing the mask user, a micro motor used for generating preset vibration is arranged in the earphone, and the sound effect adjusting device suitable for wearing the mask user comprises:
 the first detection module is configured to detect in-ear in-place of the earphone;
 the second detection module is configured to carry out resonance detection on the earphone if the earphone is in place so as to obtain an in-ear resonance curve;
 the comparison module is configured to compare the consistency of the in-ear resonance curve and the initial resonance curve, wherein the in-ear resonance curve and the initial resonance curve respectively have vibration intensity values which are in one-to-one correspondence with different frequency values;
 and the execution module is configured to compensate the sound effect of the earphone according to the comparison result.
Compared with the prior art, the miniature motor for generating preset vibration is arranged in the earphone, the resonance quantity of the earphone is changed through the vibration generated by the miniature motor, the earphone is subjected to resonance detection under the condition that the earphone is in place to obtain the in-ear resonance curve, the consistency of the in-ear resonance curve and the initial resonance curve is compared, the sound effect of the earphone is compensated according to the comparison result, whether a user wears the mask or not is identified in a mode of comparing the resonance curve to selectively conduct sound effect compensation, the method has higher identification sensitivity, the reliability of sound effect adjustment can be effectively improved, the influence on the sound effect of the earphone due to misidentification of the wearing condition of the mask of the user is avoided, and the use experience is effectively improved.
Detailed Description
In order to describe the technical content, the constructional features, the achieved objects and effects of the present invention in detail, the following description is made in connection with the embodiments and the accompanying drawings.
Referring to fig. 1, the method for adjusting the sound effect of a user wearing a mask according to the present embodiment can be applied to identify the wearing condition of the mask of the user, so as to adjust the sound effect of the earphone according to the wearing condition of the mask of the user, where the wearing condition of the mask is specifically that whether the user wears the mask, and the earphone is specifically a wireless bluetooth earphone, and is installed in a battery case for storage and charging when not in use.
The earphone is internally provided with a micro motor for generating preset vibration, the micro motor is electrically connected with an internal circuit of the earphone, and the micro motor generates the preset vibration when the earphone is started and in-place, so that the resonance quantity of the earphone is changed through the vibration. Of course, the earphone can also continuously vibrate in the process of starting up to in-place, and details are not repeated here.
Preferably, the micro motor is arranged at other positions except for the edge position of the right central position of the earphone in the earphone, so that vibration generated by the micro motor can effectively act on the whole earphone, and the follow-up resonance detection effect is improved.
The sound effect adjusting method suitable for the user wearing the mask comprises the following steps:
 S1, in-ear detection is carried out on the earphone.
It will be appreciated that the present embodiment may perform in-ear detection of the headset by a combination of one or more of optical detection, air pressure detection, or capacitive detection. Of course, in other embodiments, an in-ear button may be disposed on the earphone or an application program corresponding to the earphone, and when the user places the earphone in the ear, the user may send an in-ear signal to the earphone by controlling the in-ear button to notify the earphone to perform a subsequent operation.
S2, if the earphone is in place, carrying out resonance detection on the earphone to obtain an in-ear resonance curve.
S3, comparing the consistency of the in-ear resonance curve and the initial resonance curve, wherein the in-ear resonance curve and the initial resonance curve respectively have vibration intensity values corresponding to different frequency values one by one, and preferably, for better description, the vibration intensity values are expressed in decibels so as to represent the vibration intensity through the decibels.
Preferably, before the step S1, the method further includes:
 S101, detecting vibration of the earphone when the earphone is started up to obtain the initial resonance curve.
It can be understood that when the battery box is opened, that is, the default earphone enters the power-on state, the embodiment detects the vibration of each time the earphone is powered on, that is, the current initial resonance curve is recorded under the current power-on state, so as to ensure that the initial resonance curve has timeliness and improve the detection precision.
While the theoretical initial resonance curve is a constant curve as shown in fig. 2, which has been determined at the shipment of the earphone. Specifically, when the battery box is opened, namely the default earphone enters a starting state, at this time, because the earphone is still located in the battery box, the environment where the earphone is located is relatively stable, and the initial resonance curve cannot be subjected to resonance interference caused by external interference, namely the initial resonance curve obtained by opening detection every time is the same. Therefore, in order to simplify the steps, in other preferred embodiments, the initial resonance curve is recorded at the time of leaving the factory of the earphone, and detection is not required every time the earphone is turned on.
Since the auricles are located on both sides of the head, the front part is concave and the back part is convex, and is beneficial to collecting sound waves. Most of the auricles above the auricles are made of elastic cartilage as a bracket and covered by skin, so that the auricles have little subcutaneous tissue, are rich in blood vessels and nerves and are sensitive to sense. Therefore, the auricle has high elasticity, and the expansion of the vibration effect is facilitated. After the user wears the mask, the auricle is internally rolled and extruded, so that the space in the ear is changed, and a resonance change curve shown in figure 3 is generated under the combined action of the auricle and the human brain. As can be seen from fig. 3, the offset is also large in different frequency bands (especially in low frequency bands), and the resonance effect is obvious.
When the earphone is in the ear, the audio output work is started, if the user does not wear the mask, the vibration generated by the micro motor almost has no interference except the concha cavity, so the resonance quantity generated by the micro motor is little, and compared with the initial resonance curve, the vibration generated by the micro motor almost has no change and deviation. In addition, the resonance quantity generated by the action of the human brain is not high, the curve deformation degree is very small, and the curve deformation degree is neglected. Therefore, it can be considered that the in-ear resonance curve is close in height to the initial resonance curve without the mask being worn by the user; when a user wears the mask, the auricle can be internally rolled by the hanging rope of the mask, and the earphone is extruded by the auricle due to the internal rolling, so that the resonance quantity of the earphone is changed, and the in-ear resonance curve is offset to a certain extent relative to the initial resonance curve. Therefore, the embodiment completely has a theoretical basis by detecting the offset generated by the in-ear resonance curve relative to the initial resonance curve so as to realize the consistency comparison of the in-ear resonance curve and the initial resonance curve.
In order to achieve an efficient comparison of the in-ear resonance curve to the consistency comparison of the initial resonance curve, the present embodiment introduces a first judgment factor μ. Specifically, the step S3 specifically includes:
 S31, acquiring a first frequency value f1 corresponding to the in-ear resonance curve in a preset frequency range when a peak value appears for the first time and a second frequency value f2 corresponding to the initial resonance curve when the peak value appears for the first time;
 S32, calculating according to a formula mu= |f1-f2|/f1 to obtain a first judgment factor mu;
 s33, if the first judging factor mu is smaller than 50%, identifying that the earphone generates auricle resonance.
Preferably, the preset frequency range is between 30Hz and 1 KHz.
It can be understood that the vibration of too high frequency is easily absorbed by auricle cartilage, so that the wearing condition of the mask cannot be well identified, and the resonance peak of the low frequency point can be well identified and sensed, so that the frequency interception range of the first frequency value f1 is limited between 30Hz and 1KHz, the identification precision can be ensured, and the resonance deviation to a high frequency section along with the auricle resonance can be ensured, wherein the deviation amount is not more than 500Hz.
In addition, according to the preset frequency range determined by practical experience, according to experience, when any condition of the scheme is achieved, the generation of auricle resonance is identified, and the user is judged to wear the mask, and the sound effect of the earphone needs to be adjusted. Theoretically, the higher the extrusion degree of the earphone by the auricle (the big head of a person and the short string of the earphone), the higher the tension degree of the mask (for example, the tension degree of the string of KN95 is larger than that of the string of the disposable mask), the larger the resonance offset of the in-ear resonance curve relative to the initial resonance curve, namely, the more obvious the generated auricle resonance phenomenon is, namely, the larger mu is, the more obvious the auricle resonance phenomenon is, and the more accurate the mask wearing condition is detected.
In other preferred ways, the effective comparison of the coincidence comparison of the in-ear resonance curve with the initial resonance curve may be achieved by introducing a second judgment factor λ, specifically, the step S3 specifically includes:
 S301, acquiring a first frequency value f1 corresponding to the in-ear resonance curve in a preset frequency range when a peak value appears for the first time and a second frequency value f2 corresponding to the initial resonance curve when the peak value appears for the first time;
 S302, acquiring a first vibration intensity value M1 corresponding to the first frequency value f1 in an in-ear resonance curve, and acquiring a second vibration intensity value M2 corresponding to the second frequency value f2 in an initial resonance curve;
 S303, calculating to obtain a second judgment factor lambda according to a formula lambda= |M 1-M2|/M1;
 S304, if the second judging factor lambda is more than 20% and less than 50%, and the first vibration intensity value M1 is more than 0, identifying that the earphone generates auricle resonance.
Preferably, the preset frequency range is between 30Hz and 1 KHz.
It can be understood that the vibration of too high frequency is easily absorbed by auricle cartilage, so that the wearing condition of the mask cannot be well identified, and the resonance peak of the low frequency point can be well identified and sensed, so that the frequency interception range of the first frequency value f1 is limited between 30Hz and 1KHz, the identification precision can be ensured, and the resonance deviation to a high frequency section along with the auricle resonance can be ensured, wherein the deviation amount is not more than 500Hz.
In addition, according to the preset frequency range determined by practical experience, according to experience, when any condition of the scheme is achieved, the generation of auricle resonance is identified, and the user is judged to wear the mask, and the sound effect of the earphone needs to be adjusted. Theoretically, the higher the extrusion degree of the earphone by the auricle (the big head of a person and the short string of the earphone), the higher the tension degree of the mask (for example, the tension degree of the string of KN95 is larger than that of the string of the disposable mask), the larger the resonance offset of the in-ear resonance curve relative to the initial resonance curve, namely, the more obvious the generated auricle resonance phenomenon, namely, the larger the lambda, the more obvious the auricle resonance phenomenon, and the more accurate the mask wearing condition detection.
And S4, compensating the sound effect of the earphone according to the comparison result.
Preferably, the step S4 specifically includes:
 s41, if the earphone generates auricle resonance, enhancing and compensating the sound effect of the earphone.
In order to obtain a more targeted sound effect compensation effect, specifically, the step S41 includes:
 and performing enhancement compensation on the uplink recorded sound of the earphone and/or performing distortion compensation on a low frequency band in the downlink playing sound of the earphone.
It will be appreciated that this step compensates, in particular, the upstream microphone input to compensate for the audio energy masked by the mask. In addition, by combining with the actual use condition, the low frequency band of the downlink sound can be properly subjected to distortion compensation so as to improve the user experience.
Further, the compensation parameters of a plurality of gears are preset, the consistency of the in-ear resonance curve and the initial resonance curve is divided into a plurality of consistency grades, and each consistency grade corresponds to the compensation parameter of one gear, namely, the compensation degree is defined according to the resonance quantity.
Specifically, different values of the first judgment factor μ/second judgment factor λ may cause different compensation amounts, such as dividing the possible values of the first judgment factor μ/second judgment factor λ into three sections, and dividing the shift positions of the compensation parameters into a light compensation range, a medium compensation range, and a heavy compensation range. Further, 20% or less of the maximum value of the first judgment factor μ/second judgment factor λ may correspond to the light compensation range, 20% to 40% of the maximum value of the first judgment factor μ/second judgment factor λ may correspond to the medium compensation range, and 40% or more of the maximum value of the first judgment factor μ/second judgment factor λ may correspond to the heavy compensation range. Of course, the division of the interval and the number of gear can be customized according to the actual requirement, and will not be described herein.
Referring to fig. 4, correspondingly, the invention also discloses a sound effect adjusting device suitable for wearing a mask user, a micro motor for generating preset vibration is arranged in an earphone, the micro motor is electrically connected with an internal circuit of the earphone, and the sound effect adjusting device suitable for wearing the mask user comprises:
 a first detection module 10 configured to detect in-ear presence of the earphone;
 A second detection module 20 configured to perform resonance detection on the earphone if the earphone is in place, so as to obtain an in-ear resonance curve;
 A comparison module 30 configured to compare the in-ear resonance curve with an initial resonance curve, wherein the in-ear resonance curve and the initial resonance curve each have vibration intensity values that correspond one-to-one at different frequency values;
 The execution module 40 is configured to compensate the sound effect of the earphone according to the comparison result.
With reference to fig. 1-4, the invention firstly carries out resonance detection on the earphone under the condition that the earphone is in place to obtain an in-ear resonance curve, then compares the consistency of the in-ear resonance curve with the initial resonance curve, compensates the sound effect of the earphone according to the comparison result, and adopts a mode of comparing the consistency of the resonance curve to identify whether a user wears the mask to selectively carry out sound effect compensation.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the scope of the claims, which follow, as defined in the claims.