Intelligent volume adjusting method and system based on MEMS earphone, and storage medium
By acquiring the sound signal characteristics of MEMS headphones and user historical preference data in real time and using DSP for digital gain control, the problems of cumbersome and insufficient volume adjustment of MEMS headphones are solved, adaptive volume adjustment is achieved, and convenience and sound quality performance are improved.
Patent Information
- Application Number
- CN202510580519.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-09-05
AI Technical Summary
The volume adjustment of MEMS headphones relies on an external human-computer interaction interface, which is cumbersome to operate and difficult to meet the needs of fast dynamic adjustment. In noisy environments or sports scenes, users cannot accurately control the volume, affecting convenience and comfort.
By acquiring the acoustic characteristics of sound signals in real time, combining them with the user's historical volume preference data, and using DSP for digital gain control, adaptive volume adjustment is achieved. This is built into the headphone and requires no external operation.
It realizes adaptive volume adjustment without taking out the machine or pressing buttons, which improves the convenience and comfort of use, can maintain stable volume output in different environments and content, and reduces circuit complexity and power consumption.
Smart Images

Figure CN120602828A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of volume adjustment, and in particular to a volume intelligent adjustment method system based on a MEMS earphone and a storage medium. Background Art
[0002] MEMS earphones utilize microelectromechanical systems (MEMS) technology, integrating micromechanical structures and electronic components into chip-level driver units to create a new type of audio output device. Compared to traditional dynamic coil or balanced armature earphones, MEMS earphones are lightweight, responsive, low-distortion, and offer excellent interference immunity and durability. These advantages facilitate mass production and cost control, and are being used in smartphones, wearable devices, and other applications, providing users with a high-fidelity, low-power listening experience.
[0003] In the existing technology, volume adjustment of MEMS earphones usually relies on an external human-computer interaction interface, such as a touch slider, physical buttons, or supporting apps on a smartphone. During use, users need to take out the device or repeatedly operate the device buttons to increase or decrease the volume. The operation process is cumbersome and interrupts the listening experience. In addition, traditional interfaces are mostly presented in linear scales with limited adjustment accuracy, which makes it difficult to meet the needs of fast dynamic adjustment. In noisy environments or sports scenes, users cannot accurately control the volume through blind operations, and it is easy to make the volume too loud or too low, affecting the convenience and comfort of use. Summary of the Invention
[0004] The purpose of the present invention is to provide a volume intelligent adjustment method system based on MEMS headphones and a storage medium to solve the following technical problems:
[0005] Volume adjustment in MEMS headphones usually relies on an external human-computer interaction interface, such as a touch slider, physical buttons, or a companion app on a smartphone. During use, users need to remove the device or repeatedly operate the device buttons to increase or decrease the volume. This operation process is cumbersome and interrupts the listening experience. In addition, traditional interfaces are mostly presented in linear scales with limited adjustment accuracy, making it difficult to meet the needs of fast dynamic adjustment. In noisy environments or sports scenes, users cannot accurately control the volume through blind operations, and the volume is easily too loud or too low, affecting convenience and comfort.
[0006] The purpose of the present invention can be achieved through the following technical solutions:
[0007] A method for intelligently adjusting volume of a MEMS headset includes the following steps:
[0008] Acquire a sound signal of the currently playing content in real time, obtain acoustic features of the sound signal within a predetermined time window, the acoustic features including peak value and root mean square value, and obtain actual sound intensity P of the currently playing content based on the acoustic features;
[0009] Obtaining historical volume preference data of the user based on the user's volume adjustment behavior data, and determining a target output volume for the currently playing content based on matching the actual sound intensity with the historical volume preference data of the user;
[0010] The target output volume is mapped to a driving voltage amplitude V corresponding to the MEMS diaphragm based on a preset mapping list, a digital domain gain coefficient is calculated in the DSP based on a preset reference voltage, and the digital domain gain coefficient is applied to the PCM audio sampling data to implement digital gain control;
[0011] The audio data after digital gain control is sent to a high-speed digital-to-analog converter, which outputs a corresponding analog voltage signal. Based on the analog voltage signal, the MEMS acoustic unit is controlled to output audio according to the target output volume.
[0012] As a further solution of the present invention, the process of obtaining the actual sound intensity of the currently playing content based on the acoustic characteristics includes:
[0013] Set the sampling frequency of the audio input channel and digitally sample the external sound signal through the built-in ADC;
[0014] Allocating a sample buffer area for the time window, wherein the length of the sample buffer area is determined by the sampling frequency and the length of the time window;
[0015] Initializing a peak register to zero at the beginning of the time window;
[0016] During the duration of the time window, each ADC sampling value is read in sequence, its absolute value is compared with the current peak register, and the larger of the two is retained. After the end of the time window, the value in the register is the peak value within the time window;
[0017] Initializing the square sum accumulator and the sample counter to zero at the beginning of the time window;
[0018] For each sample value within the time window, first square its value and then add it to the square sum accumulator, and at the same time increase the sample counter by one. After the time window ends, divide the square sum in the accumulator by the count of the sample counter to obtain the average square value. Perform an arithmetic square root operation on the average square value, and the result is the root mean square value within the time window.
[0019] As a further solution of the present invention, the process of obtaining the actual sound intensity of the currently played content based on the acoustic features further includes:
[0020] Calibrate the MEMS microphone built into the headset using a standard sound source with known sound pressure, measure the sound pressure corresponding to each count of its digital output, and save the calibration coefficient K, which is used to measure the conversion ratio between each digital output count and sound pressure;
[0021] Calculate the actual sound intensity P=ε*K*k1+(1-ε)*K*k2, where k1 and k2 represent the peak value and the root mean square value respectively, ε is a preset coefficient and ε∈[0.2, 0.4].
[0022] As a further solution of the present invention, obtaining the user's historical volume preference data based on the user's volume adjustment behavior data includes:
[0023] When the user manually adjusts the headphone volume, the actual sound intensity A1 calculated within the current time window is read, and the volume value A2 set by the user at this time is obtained to generate the coordinate point (A1, A2);
[0024] The coordinate points are grouped, and the horizontal coordinate difference of the coordinate points in the same group is less than the preset horizontal coordinate difference threshold, and an actual sound intensity interval [P1, P2] is generated. P1 and P2 represent the minimum horizontal coordinate and the maximum horizontal coordinate in the group respectively. All groups and corresponding actual sound intensity intervals are historical volume preference data.
[0025] As a further solution of the present invention, the process of determining the target output volume of the currently playing content includes:
[0026] Determine the actual sound intensity interval b in which the actual sound intensity P is located, record the coordinate points in the group corresponding to the actual sound intensity interval B as target points, and calculate the average vertical coordinate of the target points as the target output volume of the currently playing content.
[0027] As a further solution of the present invention, controlling the MEMS acoustic unit to output audio according to the target output volume based on the analog voltage signal includes:
[0028] After the analog voltage signal is low-pass filtered to remove the image component, it enters the power amplifier for amplification and biasing;
[0029] The amplified and biased drive voltage is directly applied to both ends of the MEMS diaphragm, causing it to vibrate proportionally and produce a sound pressure output that matches the target output volume.
[0030] As a further solution of the present invention, the process of entering the power amplifier for amplification and biasing includes:
[0031] Provide DC bias to ensure that the MEMS diaphragm operates at the midpoint position;
[0032] The analog voltage signal is superimposed on the bias, and the driving voltage is increased to a driving voltage amplitude V through an impedance matching network.
[0033] As a further solution of the present invention, the process of entering the power amplifier for amplification and biasing further includes:
[0034] If double-ended differential drive is used, the power amplifier outputs two signals with equal amplitude and opposite phase, and their instantaneous potentials are +V / 2 and –V / 2 respectively.
[0035] A volume intelligent adjustment system based on MEMS headphones, comprising:
[0036] Acquisition module: acquires the sound signal of the currently playing content in real time, obtains the acoustic features of the sound signal within a predetermined time window, the acoustic features including the peak value and the root mean square value, and obtains the actual sound intensity P of the currently playing content based on the acoustic features;
[0037] An analysis module is configured to obtain the user's historical volume preference data based on the user's volume adjustment behavior data, and to determine the target output volume of the currently playing content based on matching the actual sound intensity with the user's historical volume preference data;
[0038] A control module maps the target output volume to a driving voltage amplitude V corresponding to the MEMS diaphragm based on a preset mapping list, calculates a digital domain gain coefficient based on a preset reference voltage in the DSP, and applies the digital domain gain coefficient to the PCM audio sampling data to implement digital gain control;
[0039] Adjustment module: Sends the audio data after digital gain control to a high-speed digital-to-analog converter, outputs a corresponding analog voltage signal, and controls the MEMS acoustic unit based on the analog voltage signal to output audio according to the target output volume.
[0040] A volume intelligent adjustment storage medium based on a MEMS headset, wherein a computer program is stored on the readable storage medium. When the computer program is executed by a processor, the processor executes the steps of the volume intelligent adjustment method based on a MEMS headset.
[0041] The beneficial effects of the present invention are as follows:
[0042] 1) This invention integrates the volume adjustment logic entirely into the headphone DSP. A MEMS microphone collects acoustic features in real time and dynamically calculates the target output volume based on the user's historical behavior, achieving true "no-phone-removal, no-button" adaptive adjustment. Whether riding in a car, running, or concentrating on work, the user does not need to touch the phone interface or headphone buttons. The system automatically and smoothly adjusts the volume based on program content and environmental changes, avoiding the interruption and cumbersome operation caused by traditional manual sliders. Continuous and delicate gain transitions ensure a consistent listening experience without causing auditory discomfort due to sudden increases or decreases, significantly improving ease of use and immersion.
[0043] 2) The system uses an acoustic intensity criterion based on joint modeling of peak and root mean square, and introduces a user history partial coordinate grouping algorithm. This allows the system to automatically match the output level to suit individual habits when there are large differences in the dynamic range of different program types and playback tracks. The system accumulates data over time and gradually approaches the loudness range that the user actually prefers. Whether it is a weak segment in a classical piece or a transient impact in a game scene, it can maintain a comfortable and consistent subjective loudness, avoiding the "fluctuating loudness" or "fluctuating distance" caused by traditional fixed scale adjustment. This self-learning mechanism takes into account both individual and situational differences, protecting hearing while ensuring clear presentation of voice and music details.
[0044] 3) The present invention adopts a layered architecture of "variable gain in the digital domain + constant gain in the analog domain". All dynamic gain calculations are first completed in the DSP digital domain, and then the DAC output is boosted to the mapped drive voltage amplitude V by a fixed power amplifier, simplifying the variable factors of the analog link. This design avoids the risk of gain accumulation or offset brought about by traditional dual amplification, reduces the difficulty of circuit adjustment, and improves system stability; at the same time, because the power amplifier operates in a fixed optimal efficiency range, it can effectively control heat and power consumption, and extend battery life. Fine control on the digital end combined with the high linearity characteristics of the MEMS unit can also reduce distortion and noise floor, providing users with a purer and more dynamic sound quality performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The present invention will be further described below with reference to the accompanying drawings.
[0046] Figure 1 The present invention is a flow chart of a method for intelligently adjusting volume of a MEMS headset. DETAILED DESCRIPTION
[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0048] See also Figure 1 As shown, the present invention is a volume intelligent adjustment method based on MEMS headphones, comprising the following steps:
[0049] Acquire a sound signal of the currently playing content in real time, obtain acoustic features of the sound signal within a predetermined time window, the acoustic features including peak value and root mean square value, and obtain actual sound intensity P of the currently playing content based on the acoustic features;
[0050] In a preferred embodiment of the present invention, the process of obtaining the actual sound intensity of the currently playing content based on the acoustic characteristics includes:
[0051] Set the sampling frequency of the audio input channel and digitally sample the external sound signal through the built-in ADC;
[0052] Allocating a sample buffer area for the time window, wherein the length of the sample buffer area is determined by the sampling frequency and the length of the time window;
[0053] Initializing a peak register to zero at the beginning of the time window;
[0054] During the duration of the time window, each ADC sampling value is read in sequence, its absolute value is compared with the current peak register, and the larger of the two is retained. After the end of the time window, the value in the register is the peak value within the time window;
[0055] Initializing the square sum accumulator and the sample counter to zero at the beginning of the time window;
[0056] For each sample value within the time window, first square the value and then add it to the square sum accumulator, and at the same time increase the sample counter by one. After the end of the time window, divide the square sum in the accumulator by the count of the sample counter to obtain an average square value. Perform an arithmetic square root operation on the average square value, and the result is the root mean square value within the time window;
[0057] In a preferred embodiment of this embodiment, the process of obtaining the actual sound intensity of the currently played content based on the acoustic feature further includes:
[0058] Calibrate the MEMS microphone built into the headset using a standard sound source with known sound pressure, measure the sound pressure corresponding to each count of its digital output, and save the calibration coefficient K, which is used to measure the conversion ratio between each digital output count and sound pressure;
[0059] Calculate the actual sound intensity P = ε*K*k1+(1-ε)*K*k2, where k1 and k2 represent the peak value and the RMS value, respectively, and ε is a preset coefficient and ε∈[0.2, 0.4];
[0060] It should be noted that the sampling frequency is automatically matched according to the highest audio specification supported by the playback device or audio source file, and the corresponding ADC channel is opened in the DSP to complete the real-time digitization of the analog signal received at the headphone input. Subsequently, the software layer allocates a continuous buffer area in the on-chip RAM according to the pre-set analysis window duration. The peak register is cleared at the beginning of the window, and the ADC output is read point by point. The absolute value of each sample is compared with the current value in the register and the larger one is retained. The instantaneous peak value of the audio segment is obtained at the end of the window. At the same time, each sample is squared and added to the energy accumulator, and the sample counter is incremented synchronously. When the window ends, the accumulator is divided by the counter to obtain the mean square energy, and then the square root is converted to RMS amplitude. After extracting basic acoustic features, the sensitivity calibration results of the headphone's built-in MEMS microphone, performed using a standard sound source during the production phase, are used to read the coefficient representing the digital sound pressure corresponding to each count as a calibration factor. By multiplying the peak and RMS values by this factor and performing a convex combination based on empirically set weighting coefficients, an estimate of the comprehensive sound intensity within the current window is obtained. For example, when a significant loudsound transient is detected within the window, the peak value is given a higher weight in the combination formula to reflect the brief impact. For sustained speech or music passages, the RMS value is more heavily relied upon to ensure the accuracy of steady-state loudness. This provides reliable real-time acoustic input for the subsequent volume adaptation logic without interrupting playback.
[0061] Obtaining historical volume preference data of the user based on the user's volume adjustment behavior data, and determining a target output volume for the currently playing content based on matching the actual sound intensity with the historical volume preference data of the user;
[0062] In another preferred embodiment of the present invention, obtaining the user's historical volume preference data based on the user's volume adjustment behavior data includes:
[0063] When the user manually adjusts the headphone volume, the actual sound intensity A1 calculated within the current time window is read, and the volume value A2 set by the user at this time is obtained to generate the coordinate point (A1, A2);
[0064] The coordinate points are grouped, and the horizontal coordinate difference of the coordinate points in the same group is less than a preset horizontal coordinate difference threshold, and an actual sound intensity interval [P1, P2] is generated, where P1 and P2 represent the minimum horizontal coordinate and the maximum horizontal coordinate in the group, respectively. All the groups and the corresponding actual sound intensity intervals are the historical volume preference data;
[0065] It is worth noting that by simultaneously recording the actual sound intensity and the user's selected volume value every time the user manually increases or decreases the volume, the system can obtain a series of discrete samples reflecting "how loud the user likes to listen at this loudness"; these samples are then automatically grouped into several intervals based on the principle of similar sound intensity on the horizontal axis. This can avoid excessive model jitter caused by an accidental operation or minor measurement error, and can also cover a wider sound intensity range with less data. When a new program comes on, it only needs to find the historical interval in which its real-time sound intensity falls. It can quickly recall the volume level that the user most frequently selected within that interval and use this as the target output volume to achieve precise alignment with personal preferences. This approach not only avoids the complexity of large-scale machine learning models, but also maintains the lightweight nature of on-the-go learning, allowing the headphones to instantly present a comfortable loudness that suits the user's habits in different environments and content types, thereby significantly improving the accuracy of intelligent adjustment and user experience.
[0066] In a preferred embodiment of the present invention, the process of determining the target output volume of the currently playing content includes:
[0067] Determine an actual sound intensity interval B within which the actual sound intensity P lies, record the coordinate points in the group corresponding to the actual sound intensity interval B as target points, and calculate the average vertical coordinate of the target points as the target output volume of the currently playing content;
[0068] The target output volume is mapped to a driving voltage amplitude V corresponding to the MEMS diaphragm based on a preset mapping list, a digital domain gain coefficient is calculated in the DSP based on a preset reference voltage, and the digital domain gain coefficient is applied to the PCM audio sampling data to implement digital gain control;
[0069] The audio data after digital gain control is sent to a high-speed digital-to-analog converter to output a corresponding analog voltage signal, and the MEMS acoustic unit is controlled based on the analog voltage signal to output audio according to the target output volume;
[0070] In another preferred embodiment of the present invention, controlling the MEMS acoustic unit to output audio according to the target output volume based on the analog voltage signal includes:
[0071] After the analog voltage signal is low-pass filtered to remove the image component, it enters the power amplifier for amplification and biasing;
[0072] The amplified and biased drive voltage is applied directly to both ends of the MEMS diaphragm, causing it to vibrate proportionally, generating a sound pressure output that matches the target output volume.
[0073] In another preferred embodiment of the present invention, the process of entering the power amplifier for amplification and biasing includes:
[0074] Provide DC bias to ensure that the MEMS diaphragm operates at the midpoint position;
[0075] The analog voltage signal is superimposed on the bias, and the driving voltage is increased to a driving voltage amplitude V through an impedance matching network;
[0076] It should be noted that in the actual process, the system first stores a one-dimensional lookup table in the firmware, which maps the "volume level perceived by the human ear" to the peak-to-peak voltage required by the MEMS diaphragm. When the algorithm obtains the target output volume, the DSP immediately takes out the matching entry in the table to obtain the driving voltage amplitude V, and then reads the reference voltage value to compare the amplitude ratio of the two, calculates the digital domain gain coefficient and multiplies it to the entire frame of PCM sampling data in real time. For example, if the program sound intensity is low at this time and the user prefers a higher loudness, the gain coefficient will be calculated to be larger; the processed sample stream is sent to the high-speed DAC, which converts it into a continuous analog in a lossless mode. The voltage waveform is then removed by an on-chip or external passive low-pass filter to remove high-frequency images. The filtered baseband audio enters the power amplifier stage. A stable DC bias is superimposed on the amplifier input to position the MEMS diaphragm at a symmetrical operating point. The internal fully differential amplifier circuit then boosts the AC component to V by a fixed multiple, so that the output receives both positive and negative half-wave symmetrical signals, which are ultimately applied directly to both ends of the speaker electrode. If the target output volume is at a whisper level, the gain factor decreases accordingly. Although the amplifier maintains a fixed multiple, the diaphragm drive voltage decreases due to the smaller input amplitude, resulting in a low sound pressure consistent with user expectations.
[0077] All volume-dependent calculations are centralized in the DSP digital domain, enabling fine-grained adjustment of gain calculations in integer or floating-point precision. This allows the amplifier to maintain a fixed operating point, eliminating the need to dynamically adjust the amplification factor with volume, thereby maintaining a constant peak efficiency range and reducing heat loss and power consumption. Table lookup mapping avoids complex function calculations, improving real-time performance and enabling rapid adaptation to MEMS units of varying sizes or impedances during mass production by simply modifying table entries. Differential drive combined with DC bias ensures the diaphragm always operates in a symmetrical electric field, effectively suppressing secondary distortion and expanding the linear dynamic range. A filter located at the front end of the amplifier cuts PWM or Σ-Δ quantization noise outside the audible band. The overall link maintains a high signal-to-noise ratio and excellent transient response, providing a precisely controllable execution end for the subsequent adaptive volume algorithm. Ultimately, this allows users to enjoy a stable, detailed, low-distortion listening experience in a variety of content and environments.
[0078] It is understandable that the process of entering the power amplifier for amplification and biasing also includes:
[0079] If double-ended differential drive is used, the power amplifier outputs two signals with equal amplitude and opposite phase, and their instantaneous potentials are +V / 2 and –V / 2 respectively;
[0080] It should be noted that in differential drive mode, the system first generates a pair of baseband audio signals with equal amplitude and opposite phase at the amplifier input stage. A DC bias is then symmetrically superimposed on the amplifier's full-bridge output, ensuring that the upper output rail remains V / 2 above the center potential at every instant, while the lower output rail remains V / 2 below the center potential. This ensures that the peaks of the two signals are always mirrored about zero. Complementary MOSFETs or GaN devices form a half-bridge within the amplifier, ensuring that only the diagonal transistors are conductive at any given moment, preventing shoot-through. Closed-loop sampling also offsets imbalances caused by inconsistent device resistance. As the target output volume increases, the AC component amplified by the DSP increases, and the positive and negative swings of the two differential lines also expand outward. However, the center DC bias remains unchanged, ensuring that the diaphragm always vibrates near the mechanical symmetry point. To suppress differential-mode impedance imbalance caused by RF radiation and headphone cable length, a pair of matching resistor-capacitor networks can be added in parallel to the amplifier output to fine-tune the differential phase and amplitude, achieving ideal symmetry of +V / 2 and –V / 2 at the load.
[0081] Using differential drive and allowing the power amplifier to output a symmetrical ±V / 2 waveform can double the required peak-to-peak voltage under the same power supply voltage, reducing the need for single-ended power supply margin. At the same time, because the common-mode components of the two lines to ground are always the same, external electromagnetic interference can be easily offset, thereby improving the signal-to-noise ratio and reducing dependence on cable shielding. The completely symmetrical force on the diaphragm can reduce second harmonics and offset distortion, and polarization and mechanical drift are not likely to occur during long-term operation. In addition, with a fixed DC bias, the system can eliminate low-frequency attenuation without the need for large-capacity DC-blocking capacitors in series at the output, reducing component size and cost, improving power amplifier efficiency overall, reducing heat consumption and extending battery life, and providing strong support for the lightweight, low-power, and high-fidelity goals pursued by this solution.
[0082] A volume intelligent adjustment system based on MEMS headphones, comprising:
[0083] Acquisition module: acquires the sound signal of the currently playing content in real time, obtains the acoustic features of the sound signal within a predetermined time window, the acoustic features including the peak value and the root mean square value, and obtains the actual sound intensity P of the currently playing content based on the acoustic features;
[0084] An analysis module is configured to obtain the user's historical volume preference data based on the user's volume adjustment behavior data, and to determine the target output volume of the currently playing content based on matching the actual sound intensity with the user's historical volume preference data;
[0085] A control module maps the target output volume to a driving voltage amplitude V corresponding to the MEMS diaphragm based on a preset mapping list, calculates a digital domain gain coefficient based on a preset reference voltage in the DSP, and applies the digital domain gain coefficient to the PCM audio sampling data to implement digital gain control;
[0086] Adjustment module: Sends the audio data after digital gain control to a high-speed digital-to-analog converter, outputs a corresponding analog voltage signal, and controls the MEMS acoustic unit based on the analog voltage signal to output audio according to the target output volume.
[0087] A storage medium for intelligent volume adjustment based on a MEMS headset, wherein the readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the method for intelligent volume adjustment based on a MEMS headset.
[0088] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters and thresholds in the formulas are set by technicians in this field according to actual conditions.
[0089] The above is a detailed description of an embodiment of the present invention. However, the content described is only a preferred embodiment of the present invention and should not be considered to limit the scope of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A volume intelligent adjustment method based on MEMS earphones, characterized in that: The following steps are involved: Acquire a sound signal of the currently playing content in real time, obtain acoustic features of the sound signal within a predetermined time window, the acoustic features including peak value and root mean square value, and obtain actual sound intensity P of the currently playing content based on the acoustic features; Obtaining historical volume preference data of the user based on the user's volume adjustment behavior data, and determining a target output volume for the currently playing content based on matching the actual sound intensity with the historical volume preference data of the user; The target output volume is mapped to a driving voltage amplitude V corresponding to the MEMS diaphragm based on a preset mapping list, a digital domain gain coefficient is calculated in the DSP based on a preset reference voltage, and the digital domain gain coefficient is applied to the PCM audio sampling data to implement digital gain control; The audio data after digital gain control is sent to a high-speed digital-to-analog converter, which outputs a corresponding analog voltage signal. Based on the analog voltage signal, the MEMS acoustic unit is controlled to output audio according to the target output volume.
2. The volume intelligent adjustment method based on MEMS earphone according to claim 1, characterized in that: The process of obtaining the actual sound intensity of the currently played content based on the acoustic features includes: Set the sampling frequency of the audio input channel and digitally sample the external sound signal through the built-in ADC; Allocating a sample buffer area for the time window, wherein the length of the sample buffer area is determined by the sampling frequency and the length of the time window; Initializing a peak register to zero at the beginning of the time window; During the duration of the time window, each ADC sampling value is read in sequence, its absolute value is compared with the current peak register, and the larger of the two is retained. After the end of the time window, the value in the register is the peak value within the time window; Initializing the square sum accumulator and the sample counter to zero at the beginning of the time window; For each sample value within the time window, first square its value and then add it to the square sum accumulator, and at the same time increase the sample counter by one. After the time window ends, divide the square sum in the accumulator by the count of the sample counter to obtain the average square value. Perform an arithmetic square root operation on the average square value, and the result is the root mean square value within the time window.
3. The volume intelligent adjustment method based on MEMS earphone according to claim 2, characterized in that: The process of obtaining the actual sound intensity of the currently played content based on the acoustic features further includes: Calibrate the MEMS microphone built into the headset using a standard sound source with known sound pressure, measure the sound pressure corresponding to each count of its digital output, and save the calibration coefficient K, which is used to measure the conversion ratio between each digital output count and sound pressure; Calculate the actual sound intensity P=ε*K*k1+(1-ε)*K*k2, where k1 and k2 represent the peak value and the root mean square value respectively, ε is a preset coefficient and ε∈[0.2, 0.4].
4. The method for intelligent volume adjustment based on MEMS earphones according to claim 1, characterized in that: The user's historical volume preference data obtained based on the user's volume adjustment behavior data includes: When the user manually adjusts the headphone volume, the actual sound intensity A1 calculated within the current time window is read, and the volume value A2 set by the user at this time is obtained to generate the coordinate point (A1, A2); The coordinate points are grouped, and the horizontal coordinate difference of the coordinate points in the same group is less than the preset horizontal coordinate difference threshold, and an actual sound intensity interval [P1, P2] is generated. P1 and P2 represent the minimum horizontal coordinate and the maximum horizontal coordinate in the group respectively. All groups and corresponding actual sound intensity intervals are historical volume preference data.
5. The method for intelligent volume adjustment based on MEMS earphones according to claim 4, characterized in that: The process of determining the target output volume for the currently playing content includes: Determine the actual sound intensity interval b in which the actual sound intensity P is located, record the coordinate points in the group corresponding to the actual sound intensity interval B as target points, and calculate the average vertical coordinate of the target points as the target output volume of the currently playing content.
6. The method for intelligent volume adjustment based on MEMS earphones according to claim 1, characterized in that: Controlling the MEMS acoustic unit to output audio according to the target output volume based on the analog voltage signal includes: After the analog voltage signal is low-pass filtered to remove the image component, it enters the power amplifier for amplification and biasing; The amplified and biased drive voltage is directly applied to both ends of the MEMS diaphragm, causing it to vibrate proportionally and produce a sound pressure output that matches the target output volume.
7. The method for intelligent volume adjustment based on MEMS earphones according to claim 1, characterized in that: The process of entering the power amplifier for amplification and biasing includes: Provide DC bias to ensure that the MEMS diaphragm operates at the midpoint position; The analog voltage signal is superimposed on the bias, and the driving voltage is increased to a driving voltage amplitude V through an impedance matching network.
8. The method for intelligent volume adjustment based on MEMS earphones according to claim 7, characterized in that: The process of entering the power amplifier for amplification and biasing also includes: If double-ended differential drive is used, the power amplifier outputs two signals with equal amplitude and opposite phase, and their instantaneous potentials are +V / 2 and –V / 2 respectively.
9. A volume intelligent adjustment system based on MEMS earphones, characterized in that: include: Acquisition module: acquires the sound signal of the currently playing content in real time, obtains the acoustic features of the sound signal within a predetermined time window, the acoustic features including the peak value and the root mean square value, and obtains the actual sound intensity P of the currently playing content based on the acoustic features; An analysis module is configured to obtain the user's historical volume preference data based on the user's volume adjustment behavior data, and to determine the target output volume of the currently playing content based on matching the actual sound intensity with the user's historical volume preference data; A control module maps the target output volume to a driving voltage amplitude V corresponding to the MEMS diaphragm based on a preset mapping list, calculates a digital domain gain coefficient based on a preset reference voltage in the DSP, and applies the digital domain gain coefficient to the PCM audio sampling data to implement digital gain control; Adjustment module: Sends the audio data after digital gain control to a high-speed digital-to-analog converter, outputs a corresponding analog voltage signal, and controls the MEMS acoustic unit based on the analog voltage signal to output audio according to the target output volume.
10. A volume intelligent adjustment storage medium based on MEMS earphones, characterized in that: The readable storage medium stores a computer program. When the computer program is executed by the processor, the processor executes the steps of the method for intelligent volume adjustment based on MEMS headphones according to any one of claims 1 to 8.
Citation Information
Cited By
AVAS sound playing control method and device, program product and medium
CN121996198A