Audio device frequency response calibration method and apparatus, storage medium, and electronic device
By selecting the extreme points of frequency response difference of audio devices and pre-defined frequency band division rules, filter parameters can be directly determined, resolving the contradiction between calibration efficiency and accuracy of audio devices, and achieving fast and accurate frequency response calibration, which is suitable for high-speed mass production scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAQIN TECH CO LTD
- Filing Date
- 2026-04-10
- Publication Date
- 2026-07-14
Smart Images

Figure CN122002185B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio signal processing technology, and in particular to an audio device frequency response calibration method, apparatus, storage medium and electronic device. Background Technology
[0002] With the widespread adoption of consumer electronics, users are demanding increasingly stringent standards for the standardization and consistency of audio device sound quality. In the mass production of audio components such as True Wireless Stereo (TWS) earphones, smartwatches, and neckband speakers, the stability of the frequency response curve directly determines the product's sound quality. However, due to variations in manufacturing precision and material variations in components, audio components produced in the same batch often exhibit varying degrees of frequency response deviation. This leads to issues such as insufficient low-frequency extension, mid-frequency distortion, or high-frequency attenuation in some products, making it difficult to meet standardized sound quality requirements. Therefore, production lines need to perform frequency response calibration on each audio component to correct individual deviations, ensure consistent sound quality, and improve product yield.
[0003] In related technologies, frequency response calibration of audio devices mainly employs intelligent optimization algorithms to achieve automatic matching of equalizer parameters. Specifically, firstly, the actual frequency response curve of the audio device and a preset target frequency response curve are obtained. Based on the differences between the actual and target frequency response curves at various frequency points, an objective function with equalizer parameters as variables is constructed. Then, the optimal combination of equalizer parameters that minimizes the objective function is solved using intelligent optimization algorithms, and this set of equalizer parameters is written into the equalizer module of the audio device to complete the frequency response calibration. Among these, intelligent optimization algorithms include global search algorithms represented by genetic algorithms and local iterative optimization algorithms represented by gradient descent.
[0004] However, using the above method for frequency response calibration has the problem of not being able to balance calibration efficiency and calibration accuracy, making it difficult to adapt to the high-speed mass production scenarios of audio devices. Summary of the Invention
[0005] This application provides a method, apparatus, storage medium, and electronic device for frequency response calibration of audio devices, which can achieve rapid calibration while improving calibration accuracy to meet the needs of high-speed mass production scenarios for audio devices.
[0006] In a first aspect, this application provides a method for calibrating the frequency response of an audio device, comprising:
[0007] Obtain the first frequency response difference curve of the audio device under test. The first frequency response difference curve reflects the frequency response difference of the audio device under test relative to the target frequency response curve at each frequency point.
[0008] After determining that the audio device under test meets the frequency response calibration conditions based on the first frequency response difference curve, the first extreme point in the first frequency response difference curve is identified. The first extreme point represents the frequency response difference to be calibrated after screening.
[0009] Based on the preset frequency band division and bandwidth calculation rules, the filter parameters corresponding to the audio device under test are determined according to the frequency response difference and frequency corresponding to the first extreme point. The frequency band division and bandwidth calculation rules are preset based on the characteristics of human hearing and the distribution law of production deviation on the production line.
[0010] Filters are designed based on filter parameters, and the frequency response of the audio device under test is calibrated.
[0011] In one possible implementation, the filter parameters include gain, quality factor, and center frequency. Based on preset frequency band division and bandwidth calculation rules, the filter parameters corresponding to the audio device under test are determined according to the frequency response difference and frequency corresponding to the first extreme point, including:
[0012] The frequency of the first extreme point is taken as the center frequency of the filter;
[0013] The frequency response difference at the first extreme point is used as the gain of the filter;
[0014] Based on the center frequency, the corresponding target frequency band is matched from the frequency band division and bandwidth calculation rules, and the bandwidth calculation rules corresponding to the target frequency band are obtained.
[0015] The bandwidth of the filter is determined based on the bandwidth calculation rules and the center frequency;
[0016] The quality factor of the filter is determined based on the center frequency, bandwidth, and gain.
[0017] In one possible implementation, identifying a first extreme point in the first frequency response difference curve includes:
[0018] Extract at least one second extreme point from the first frequency response difference curve where the absolute value of the frequency response difference is greater than or equal to the frequency response tolerance threshold.
[0019] Sort at least one second extreme point in descending order of the absolute value of the frequency response difference;
[0020] The top N second extreme points are all designated as first extreme points, where N is less than or equal to the number of available filters in the audio device under test.
[0021] In one possible implementation, the frequency response calibration conditions include:
[0022] The absolute value of the frequency response difference corresponding to each frequency point on the first frequency response difference curve is less than or equal to the calibration threshold threshold, and there is at least one frequency point on the first frequency response difference curve whose absolute value of the frequency response difference is greater than or equal to the frequency response tolerance threshold.
[0023] Among them, the calibration threshold is greater than the frequency response tolerance threshold.
[0024] In one possible implementation, the audio device frequency response calibration method further includes:
[0025] Repeat the following steps until the iterative calibration stop condition is met:
[0026] Obtain the calibrated frequency response curve;
[0027] Based on the target frequency response curve and the calibrated frequency response curve, determine the second frequency response difference curve;
[0028] The third extreme point in the second frequency response difference curve is identified when there is at least one frequency point on the second frequency response difference curve whose absolute value of the frequency response difference is greater than or equal to the frequency response tolerance threshold, and the number of filters used in the audio device under test is less than the number of available filters.
[0029] Based on the frequency band division and bandwidth calculation rules, the filter parameters corresponding to the third extreme point are determined according to the frequency response difference and frequency corresponding to the third extreme point.
[0030] The filter is designed based on the filter parameters corresponding to the third extreme point. The frequency response of the already calibrated audio device under test is then recalibrated, and the calibrated frequency response curve is updated.
[0031] The iterative calibration stopping conditions include: the number of filters used is equal to the number of available filters, and / or, the absolute value of the frequency response difference corresponding to each frequency point on the second frequency response difference curve is less than the frequency response tolerance threshold.
[0032] In one possible implementation, the audio device frequency response calibration method further includes:
[0033] When the iterative calibration stop condition is met, the filter parameters determined during the iteration process are written into the hardware filter bank of the audio device under test.
[0034] Secondly, this application provides an audio device frequency response calibration apparatus, comprising:
[0035] The acquisition module is used to acquire the first frequency response difference curve of the audio device under test. The first frequency response difference curve reflects the frequency response difference of the audio device under test relative to the target frequency response curve at each frequency point.
[0036] The identification module is used to identify the first extreme point in the first frequency response difference curve when it is determined that the audio device under test meets the frequency response calibration conditions based on the first frequency response difference curve. The first extreme point represents the frequency response difference to be calibrated after screening.
[0037] The determination module is used to determine the filter parameters of the audio device under test based on the preset frequency band division and bandwidth calculation rules, according to the frequency response difference and frequency corresponding to the first extreme point. The frequency band division and bandwidth calculation rules are preset based on the characteristics of human hearing and the distribution law of production deviation on the production line.
[0038] The calibration module is used to design filters based on filter parameters and calibrate the frequency response of the audio device under test.
[0039] In one possible implementation, the filter parameters include gain, quality factor, and center frequency. The determination module is specifically used to: use the frequency of the first extreme point as the center frequency of the filter; use the frequency response difference of the first extreme point as the gain of the filter; match the corresponding target frequency band from the frequency band division and bandwidth calculation rules according to the center frequency, and obtain the bandwidth calculation rules corresponding to the target frequency band; determine the bandwidth of the filter according to the bandwidth calculation rules and the center frequency; and determine the quality factor of the filter according to the center frequency, bandwidth, and gain.
[0040] In one possible implementation, the identification module is specifically used to: extract at least one second extreme point from the first frequency response difference curve where the absolute value of the frequency response difference is greater than or equal to the frequency response tolerance threshold; sort the at least one second extreme point in descending order of the absolute value of the frequency response difference; and determine the top N second extreme points as first extreme points, where N is less than or equal to the number of available filters in the audio device under test.
[0041] In one possible implementation, the frequency response calibration conditions include: the absolute value of the frequency response difference corresponding to each frequency point on the first frequency response difference curve is less than or equal to the calibration threshold, and at least one frequency point on the first frequency response difference curve has an absolute value of the frequency response difference greater than or equal to the frequency response tolerance threshold; wherein the calibration threshold is greater than the frequency response tolerance threshold.
[0042] In one possible implementation, the audio device frequency response calibration device further includes an iterative processing module for repeatedly performing the following operations until the iterative calibration stop condition is met: acquiring the calibrated frequency response curve; determining a second frequency response difference curve based on the target frequency response curve and the calibrated frequency response curve; identifying a third extreme point in the second frequency response difference curve when at least one frequency point on the second frequency response difference curve has an absolute value of frequency response difference greater than or equal to the frequency response tolerance threshold, and the number of filters used in the audio device under test is less than the number of available filters; determining the filter parameters corresponding to the third extreme point based on the frequency band division and bandwidth calculation rules, according to the frequency response difference and frequency corresponding to the third extreme point; designing a filter based on the filter parameters corresponding to the third extreme point, performing frequency response calibration again on the calibrated audio device under test, and updating the calibrated frequency response curve; wherein the iterative calibration stop condition includes: the number of filters used is equal to the number of available filters, and / or, the absolute value of the frequency response difference corresponding to each frequency point on the second frequency response difference curve is less than the frequency response tolerance threshold.
[0043] In one possible implementation, the iterative processing module is further configured to: write the filter parameters determined during the iteration process into the hardware filter bank of the audio device under test when the iterative calibration stop condition is met.
[0044] Thirdly, this application provides an electronic device, including: a memory and a processor;
[0045] The memory stores the instructions that the computer executes;
[0046] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0047] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible embodiments of the first aspect.
[0048] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0049] The audio device frequency response calibration method, apparatus, storage medium, and electronic device provided in this application include: acquiring a first frequency response difference curve of the audio device under test, the first frequency response difference curve reflecting the frequency response difference of the audio device under test relative to the target frequency response curve at each frequency point; after determining that the audio device under test meets the frequency response calibration conditions based on the first frequency response difference curve, identifying a first extreme point in the first frequency response difference curve, the first extreme point representing the frequency response difference to be calibrated after screening; determining the filter parameters corresponding to the audio device under test based on preset frequency band division and bandwidth calculation rules, according to the frequency response difference and frequency corresponding to the first extreme point, wherein the frequency band division and bandwidth calculation rules are preset based on the characteristics of human hearing and the distribution law of production deviation on the production line; designing a filter based on the filter parameters, and calibrating the frequency response of the audio device under test. After obtaining the frequency response difference curve, this application pre-judges the frequency response calibration conditions to screen out the audio devices to be calibrated, avoiding invalid calibration of audio devices that do not meet the frequency response calibration conditions and improving the calibration efficiency of the production line. Secondly, it selects key deviation frequency bands by locating extreme points, thereby using limited filter hardware resources to focus on the area with large difference in the frequency response difference curve for frequency response correction, avoiding redundant calibration across the entire frequency band and improving the effective utilization of the filter. In addition, based on the preset frequency band division and bandwidth calculation rules, the filter parameters are directly determined according to the frequency response difference and frequency of the extreme points, without the need for global search or multi-round iterative optimization of intelligent optimization algorithms, which greatly shortens the calibration time. At the same time, by pre-setting segmented bandwidth rules, based on the characteristics of human hearing and the distribution law of production line deviations, the corresponding bandwidth calculation method is matched for different frequency bands to ensure that the filter parameters are accurately adapted to the actual deviation characteristics, effectively improving the calibration accuracy. Thus, high-efficiency calibration is achieved while ensuring calibration accuracy, solving the "time-consuming-accuracy" contradiction in the mass production of audio devices and meeting the dual requirements of improved calibration efficiency and product sound quality assurance in high-speed mass production scenarios. Attached Figure Description
[0050] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0051] Figure 1 A schematic diagram illustrating a scenario for the audio device frequency response calibration method provided in this application embodiment;
[0052] Figure 2 A flowchart illustrating the audio device frequency response calibration method provided in this application embodiment. Figure 1 ;
[0053] Figure 3 This application provides a schematic diagram of the frequency response calibration results for audio devices in an embodiment of the present application. Figure 1 ;
[0054] Figure 4 This application provides a schematic diagram of the frequency response calibration results for audio devices in an embodiment of the present application. Figure 2 ;
[0055] Figure 5 This application provides a schematic diagram of the frequency response calibration results for audio devices in an embodiment of the present application. Figure 3 ;
[0056] Figure 6 A flowchart illustrating the audio device frequency response calibration method provided in this application embodiment. Figure 2 ;
[0057] Figure 7 Schematic diagram of the audio device frequency response calibration device provided in the embodiments of this application Figure 1 ;
[0058] Figure 8 Schematic diagram of the audio device frequency response calibration device provided in the embodiments of this application Figure 2 ;
[0059] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0060] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0061] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0062] The terms “first,” “second,” etc., used in the specification and claims of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, products, or apparatus.
[0063] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0064] Currently, frequency response calibration of audio devices mainly employs intelligent optimization algorithms to automatically match equalizer parameters. These intelligent optimization algorithms include global search algorithms, represented by genetic algorithms, and local iterative optimization algorithms, represented by gradient descent. Genetic algorithms search for optimal equalizer parameters in the solution space by simulating natural selection and genetic mutation processes. However, their global search characteristics lead to high computational complexity, with a single calibration typically taking at least 60 seconds, making them unsuitable for the efficiency requirements of large-scale mass production. Iterative gradient descent, by iteratively approximating the minimum of the objective function, is faster than genetic algorithms in convergence speed, but still requires approximately 30 seconds of computation time. Furthermore, it is sensitive to initial parameter settings and is prone to getting trapped in local optima, affecting the stability of calibration accuracy.
[0065] Furthermore, the aforementioned algorithms typically aim for full-band optimization. Specifically, they usually perform logarithmic calculations on the frequencies across the entire frequency band and then distribute the filters evenly. However, with a limited number of filters, it is difficult to achieve a comprehensive bias correction across the entire frequency band. Moreover, these algorithms are sensitive to initial parameters; if the initial parameters are not set appropriately, they are prone to getting trapped in local optima, resulting in incomplete correction of frequency response bias. Because multiple rounds of population iteration and frequency response bias calculation are required, a single calibration typically takes more than 30 seconds, even exceeding 60 seconds, which is completely unsuitable for the "second-level cycle time" efficiency requirements of mass production lines. They are only suitable for small-batch sample calibration in laboratories and are difficult to apply to large-scale production lines.
[0066] However, wearable audio devices (such as TWS earphones, smartwatches, and neckband speakers) typically require high-speed mass production, with the production cycle of a single device often controlled within a few seconds. Currently, there is a significant conflict between the time-consuming nature of calibration methods and the efficiency requirements of the production line: excessively long calibration times can lead to production bottlenecks and reduce overall capacity; conversely, simplifying the calibration process in pursuit of efficiency may sacrifice the accuracy of frequency response correction, compromising the consistency of product sound quality.
[0067] Therefore, there is an urgent need for a technical solution that can complete the frequency response calibration of audio devices within a few seconds. This solution must meet the efficiency requirements of mass production while ensuring that the calibration accuracy is sufficient to correct frequency response deviations generated during the production process, thereby achieving a balance between production efficiency and sound quality.
[0068] To address the aforementioned technical issues, this application provides an audio device frequency response calibration scheme. By acquiring the frequency response difference curve of the audio device under test, and selecting extreme points as the frequency response difference to be calibrated when calibration conditions are met, the scheme utilizes preset frequency band division and bandwidth calculation rules (which are pre-set based on human hearing characteristics and production line deviation distribution patterns). Filter parameters are directly determined based on the frequency response difference and frequency of the extreme points, achieving a rapid and direct mapping from the frequency response difference curve to the filter parameters. This eliminates the need for iterative searches or multiple rounds of optimization, shortening calibration time while maintaining calibration accuracy. It resolves the "time-accuracy" contradiction in mass production scenarios, balancing production line efficiency with product sound quality consistency.
[0069] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0070] First, the application scenarios of the audio device frequency response calibration method provided in this application embodiment will be described. The application scenarios of this audio device frequency response calibration method include, but are not limited to, the following fields: mass production frequency response calibration of wearable devices (such as TWS earphones, smartwatches, and neckband speakers), production line calibration of consumer electronic audio products (such as smartphones, tablets, laptops, smart speakers, and car audio systems), production calibration of audio modules and components (such as the production calibration of audio components such as speaker units, microphones, and headphone horns), sample debugging in laboratories and R&D stages, and after-sales repair and on-site calibration services.
[0071] Figure 1 This is a schematic diagram illustrating a scenario for the audio device frequency response calibration method provided in this application embodiment, such as... Figure 1 As shown, the application scenario includes a host control and electroacoustic analysis system 11, a soundproof box 12, and a measuring microphone 13, a simulated mouth 14, a fixture 15, and a device under test (DUT) 16 disposed inside the soundproof box 12. In this embodiment of the application, DUT refers to the audio device to be tested, such as a microphone, a speaker, or a complete device.
[0072] The host control and electroacoustic analysis system 11 is deployed in the control host and is used to execute the audio device frequency response calibration method provided in this application embodiment, and to accurately analyze the collected acoustic signals to achieve frequency response performance evaluation and calibration of the audio device. The control host can be a production line integrated testing device or a personal computer. For example, the control host integrates a device control module, a sound card control module, and a frequency response calibration algorithm module. The device control module manages the working status of the soundproof enclosure 12, the sound card control module controls the digital-to-analog conversion and amplitude of the audio signals, and the frequency response calibration algorithm module executes the audio device frequency response calibration method provided in this application embodiment.
[0073] For example, the soundproof enclosure 12 provides a low-noise testing environment to isolate external ambient noise from interfering with acoustic testing. The soundproof enclosure 12 is connected to the host control and electroacoustic analysis system 11 via a hardware link (such as USB, Ethernet, serial port, etc.) to receive control commands and transmit the collected frequency response data back.
[0074] For example, a measuring microphone 13 is disposed inside the soundproof enclosure 12 for high-sensitivity acquisition of acoustic signals played by the audio device under test (DUT), providing accurate input data for frequency response analysis. A simulated mouth 14 is disposed inside the soundproof enclosure 12 to simulate a real acoustic environment, providing a standard acoustic excitation signal for microphone testing of the DUT or calibration of two-way audio equipment. A clamp 15 is disposed inside the soundproof enclosure 12 to flexibly adapt to different forms of DUTs (such as TWS earphones, smartwatches, neckband speakers, etc.), ensuring the DUT's position is fixed and its acoustic coupling is consistent during testing. The DUT is placed inside the soundproof enclosure 12 and fixed by the clamp 15.
[0075] In practical production line applications, the host control and electroacoustic analysis system 11 and the soundproof enclosure 12 are typically integrated into a single testing device, equipped with a display screen and an operable interface. Operators can initiate the calibration process, monitor the calibration status, and view the calibration results through the interface. In laboratory or R&D debugging scenarios, the soundproof enclosure 12 can function as an independent enclosure, connected to a personal laptop via a communication interface. The laptop loads and runs the control program and calibration algorithm program, enabling communication and calibration control with the soundproof enclosure 12.
[0076] Through the above-described scenario deployment, the audio device frequency response calibration method provided in this application embodiment can be flexibly adapted to both high-speed mass production calibration on production lines and laboratory sample debugging, demonstrating good versatility and scalability.
[0077] It should be noted that, Figure 1 The scenario shown is merely an illustrative example of this embodiment and does not constitute a limitation on the scope of application of this application.
[0078] Figure 2A flowchart illustrating the audio device frequency response calibration method provided in this application embodiment. Figure 1 ,like Figure 2 As shown, the frequency response calibration method for this audio device includes:
[0079] S201. Obtain the first frequency response difference curve of the audio device under test. The first frequency response difference curve reflects the frequency response difference of the audio device under test relative to the target frequency response curve at each frequency point.
[0080] The first frequency response difference curve is formed by the difference between the target frequency response curve and the actual frequency response curve of the audio device under test at each frequency point. A positive frequency response difference value indicates that the target frequency response is higher than the actual frequency response (i.e., the curve is convex); a negative frequency response difference value indicates that the target frequency response is lower than the actual frequency response (i.e., the curve is concave).
[0081] Understandably, the actual frequency response curve is the actual frequency response characteristics of the audio device under test obtained through measuring equipment (such as an audio analyzer). The target frequency response curve can be regarded as an ideal frequency response curve pre-set according to the product's sound quality design goals, such as the Harman curve, the JBL curve, or a target curve customized for the product.
[0082] In one implementation, at the production line testing station, an audio analyzer is used to collect the actual frequency response curve of the audio device under test when playing test signals (such as pink noise or sweep frequency signals), and the curve is subtracted from the pre-stored target frequency response curve point by point to generate the first frequency response difference curve.
[0083] In another implementation, the actual frequency response curve and the target frequency response curve are read from the database and the first frequency response difference curve is generated by calculation.
[0084] By obtaining the first frequency response difference curve, the frequency response deviation can be quantitatively characterized, avoiding the sensitivity difference problem caused by directly using the absolute sound pressure level for calibration.
[0085] S202. After determining that the audio device under test meets the frequency response calibration conditions based on the first frequency response difference curve, identify the first extreme point in the first frequency response difference curve. The first extreme point represents the frequency response difference to be calibrated after screening.
[0086] Among them, frequency response calibration conditions can be understood as the judgment rules for determining whether the audio device under test needs to enter the calibration process and whether calibration is feasible.
[0087] In this embodiment, the first extreme point includes local maxima (protrusions) and local minima (depressions) extracted from the first frequency response difference curve, whose frequency response difference exceeds the preset frequency response tolerance range (the frequency response tolerance range refers to the allowable deviation range preset for each frequency point based on the target frequency response curve, i.e., the area defined by the upper and lower boundaries of the target frequency response curve) and used for subsequent calibration after screening. Each first extreme point corresponds to a key deviation frequency band that needs to be corrected.
[0088] In the first implementation, the frequency response calibration condition includes: the absolute value of the frequency response difference at any frequency point on the first frequency response difference curve is greater than or equal to the frequency response tolerance threshold. That is, if the absolute value of the frequency response difference at any frequency point on the first frequency response difference curve is greater than or equal to the frequency response tolerance threshold, the audio device under test is determined to meet the frequency response calibration condition and requires calibration; otherwise, it is determined to be qualified and does not require a standard.
[0089] In the second implementation, the frequency response calibration conditions include: the absolute value of the frequency response difference corresponding to each frequency point on the first frequency response difference curve is less than or equal to the calibration threshold, and there is at least one frequency point on the first frequency response difference curve whose absolute value of the frequency response difference is greater than or equal to the frequency response tolerance threshold; wherein, the calibration threshold is greater than the frequency response tolerance threshold.
[0090] In the above implementation, the frequency response tolerance threshold represents the product quality acceptance standard (e.g., the frequency response tolerance threshold for low and medium frequencies is 1.5dB, and the frequency response tolerance threshold for high frequencies is 3dB), which is used to determine whether the frequency response deviation of the audio device under test has reached the level that requires calibration, thereby screening products that need calibration; the calibration threshold represents the upper limit of hardware correction capability (e.g., 10dB), which is used to determine whether the frequency response deviation of the audio device under test exceeds the upper limit of hardware correction capability, thereby excluding abnormal products that exceed the hardware correction capability.
[0091] It should be noted that the frequency response tolerance threshold can be set based on the characteristics of human hearing and the product's sound quality design requirements to ensure that the sound quality of the calibrated product meets user expectations and guarantees the consistency of sound perception in key frequency bands. Furthermore, the frequency response tolerance threshold can be dynamically adjusted based on historical calibration data. For example, if the frequency response deviation of a batch of audio devices is generally small (e.g., the peak value of the frequency response difference curve is concentrated within ±1dB), the frequency response tolerance threshold can be lowered (e.g., adjusted from 1.5dB to 1dB) to filter out more potential deviation frequency bands. If the frequency response deviation of a batch of devices is large (e.g., the peak value is concentrated within ±3dB), the frequency response tolerance threshold can be increased (e.g., adjusted to 2dB) to avoid wasting hardware filter resources due to over-screening. This algorithm dynamically adapts the threshold range by statistically analyzing the production line deviation distribution characteristics.
[0092] The calibration threshold can be set based on the correction capability of the hardware filter bank in the audio device under test. At the same time, the calibration threshold can be flexibly adjusted according to the hardware capabilities of different products (e.g., it can be tightened to 8dB for high-end products and relaxed to 12dB for low-end products) to adapt to diverse mass production needs.
[0093] The second implementation method only calibrates the audio device under test when its frequency response deviation is within the upper limit of the hardware correction capability and reaches a level requiring calibration. This dual-condition judgment method can accurately identify the audio device under test that needs calibration, while ensuring that its frequency response deviation is within the hardware correction range. This avoids invalid calibration of qualified products and also avoids invalid processing of abnormal products that exceed the correction capability, thereby effectively saving computing resources and improving the calibration efficiency of the production line.
[0094] After determining that the audio device under test meets the frequency response calibration conditions, a preset algorithm is used to identify the first extreme point in the first frequency response difference curve, thereby discretizing the key deviation frequency band in the full-band continuous curve into a finite number of first extreme points.
[0095] S203. Based on the preset frequency band division and bandwidth calculation rules, determine the filter parameters corresponding to the audio device under test according to the frequency response difference and frequency corresponding to the first extreme point. The frequency band division and bandwidth calculation rules are preset based on the characteristics of human hearing and the distribution law of production deviation on the production line.
[0096] The frequency band division and bandwidth calculation rules are a pre-defined set of rules used to determine filter parameters. These rules are pre-calibrated based on the characteristics of human hearing and the distribution patterns of production deviations on the production line, dividing the entire frequency band into multiple sub-bands and pre-setting a corresponding bandwidth calculation method for each sub-band.
[0097] Understandably, in practical applications, the above frequency band division and bandwidth calculation rules can be adaptively adjusted according to actual needs, taking into account different production batches, audio device types, usage scenarios, or product positioning. For example, the distribution of deviation frequency bands may change due to fluctuations in the production process of different batches of speakers (e.g., if the deviation concentration of a certain batch of products in the high-frequency band (>8.5kHz) is significantly higher than that of other batches, then the starting frequency of the high-frequency band will be adjusted from 8.5kHz to 8kHz, and the bandwidth calculation rules for each frequency band will be redefined). The division boundary or bandwidth ratio coefficient of each sub-band can be adjusted accordingly. This strategy drives the frequency band division through historical calibration data, ensuring that the frequency band division is accurately adapted to the deviation characteristics of the current batch, thereby improving the calibration effect. Different types of audio devices (such as TWS earphones, smartwatches, and neckband speakers) have differences in their acoustic structure, speaker size, and target sound quality positioning. The frequency band division and bandwidth calculation rules can be fine-tuned based on their respective production line deviation statistics and listening evaluation results. Furthermore, the frequency response requirements of the same product may differ under different usage scenarios (such as music playback and call mode), and scenario adaptation can be achieved by adjusting the rule parameters. Through the above adaptive adjustments, the frequency response calibration method provided in this application embodiment can flexibly adapt to diverse mass production needs, taking into account the differentiated requirements of different product lines while ensuring calibration efficiency and accuracy.
[0098] In this step, the filter parameters can be determined as follows. For example, in one possible implementation, the filter parameters include gain, quality factor, and center frequency. Based on preset frequency band division and bandwidth calculation rules, the filter parameters corresponding to the audio device under test are determined according to the frequency response difference and frequency corresponding to the first extreme point. Specifically, this includes:
[0099] Step 2031: Use the frequency of the first extreme point as the center frequency of the filter.
[0100] Among them, the center frequency (i.e. The frequency at which the filter operates is determined. It should be noted that the type of filter is determined by the hardware filter bank already installed in the audio device under test. That is, for a given product model, the supported filter types (such as peak filters, low-profile filters, high-profile filters, etc.) are known in advance and do not need to be reselected during the calibration process.
[0101] Step 2032: Use the frequency response difference at the first extreme point as the gain of the filter.
[0102] Among them, the gain determines the amount of boost or attenuation of the filter at that frequency point.
[0103] In this step, the frequency response difference is obtained by subtracting the actual frequency response curve from the target frequency response curve point by point. For a bulge (positive frequency response difference), the filter gain is set to a positive value to boost the frequency response; for a dip (negative frequency response difference), the filter gain is set to a negative value to attenuate the frequency response.
[0104] Step 2033: Based on the center frequency, match the corresponding target frequency band from the frequency band division and bandwidth calculation rules, and obtain the bandwidth calculation rules corresponding to the target frequency band.
[0105] In other words, based on the frequency band where the center frequency of the first extreme point is located, the corresponding bandwidth calculation method is matched from the preset frequency band division and bandwidth calculation rules.
[0106] For example, the frequency band allocation and bandwidth calculation rules can be set as follows:
[0107] when hour, ;
[0108] when hour, ;
[0109] when hour, ;
[0110] when hour, ;
[0111] In the formula, Indicates bandwidth.
[0112] Step 2034: Determine the bandwidth of the filter according to the bandwidth calculation rules and the center frequency.
[0113] For example, if If the frequency is 100Hz, then the corresponding bandwidth calculation rule is as follows: Thus, the bandwidth of the filter at the first extreme point is calculated to be 70Hz.
[0114] Step 2035: Determine the quality factor of the filter based on the center frequency, bandwidth, and gain.
[0115] Among them, the quality factor (i.e. The bandwidth of the filter is determined by the filter.
[0116] For example, assuming the filter type is a peak filter, the quality factor is calculated as follows:
[0117]
[0118] In the formula, For linear amplitude ratio, .
[0119] To prevent Extreme values can be constrained. To avoid due to An excessively high value can cause filter instability or phase distortion.
[0120] This implementation method simplifies the calculation logic and optimizes the calibration process (combining methods such as building a frequency response deviation database, identifying extreme points, and dividing key frequency bands of the frequency response curve). While ensuring calibration accuracy, it simplifies the calculation process and significantly reduces calibration time; for example, it shortens the calculation time for a single calibration from 30-60 seconds in related technologies to less than 3 seconds, achieving a breakthrough in efficiency. Furthermore, the segmented preset bandwidth rules ensure that the filter bandwidth matches the actual deviation characteristics, avoiding problems caused by unreasonable parameter allocation (such as adjusting multiple filters in the same frequency band).
[0121] S204. Design a filter based on the filter parameters and calibrate the frequency response of the audio device under test.
[0122] It should be understood that calibrating the frequency response of an audio device under test (AUT) involves configuring one or more defined filter parameters into the hardware filter bank of the AUT, or verifying the calibration effect through software simulation. The hardware filter bank is a digital signal processing unit within the AUT used to adjust the frequency response, and typically contains a limited number of filters (such as a 5-band or 10-band parametric equalizer).
[0123] For example, the filter parameters corresponding to each first extreme point are configured as an equalizer configuration file, and the equalizer configuration file is written into the hardware filter bank of the audio device under test at once to complete the frequency response calibration.
[0124] In this embodiment, after obtaining the frequency response difference curve, the audio devices to be calibrated are selected by pre-judging the frequency response calibration conditions, avoiding invalid calibration of audio devices that do not meet the frequency response calibration conditions and improving the calibration efficiency of the production line. Secondly, key deviation frequency bands are selected by locating extreme points, thereby using limited filter hardware resources to focus on the area with large difference in the frequency response difference curve for frequency response correction, avoiding redundant calibration across the entire frequency band and improving the effective utilization of the filter. In addition, based on the preset frequency band division and bandwidth calculation rules, the filter parameters are directly determined according to the frequency response difference and frequency of the extreme points, without the need for global search or multi-round iterative optimization of intelligent optimization algorithms, which greatly shortens the calibration time. At the same time, by pre-setting segmented bandwidth rules, based on the characteristics of human hearing and the distribution law of production line deviations, corresponding bandwidth calculation methods are matched for different frequency bands to ensure that the filter parameters are accurately matched with the actual deviation characteristics, effectively improving the calibration accuracy. Thus, high-efficiency calibration is achieved while ensuring calibration accuracy, solving the "time-consuming-accuracy" contradiction in the mass production of audio devices and meeting the dual requirements of improved calibration efficiency and product sound quality assurance in high-speed mass production scenarios.
[0125] In some embodiments, identifying a first extreme point in a first frequency response difference curve includes: extracting at least one second extreme point from the first frequency response difference curve whose absolute value of the frequency response difference is greater than or equal to a frequency response tolerance threshold; sorting the at least one second extreme point in descending order of the absolute value of the frequency response difference; and determining the top N second extreme points as first extreme points, where N is less than or equal to the number of available filters in the audio device under test.
[0126] For example, the audio device under test is a TWS earphone. Its audio processing chip integrates a hardware filter bank containing a 5-band parametric equalizer, meaning there are 5 usable filters. The frequency response tolerance threshold is set as follows: 1.5dB for low to mid frequencies (<6300Hz) and 3dB for high frequencies (≥6300Hz). Assume that the second extreme points in the first frequency response difference curve that satisfy the condition that the absolute value of the frequency response difference is greater than or equal to the frequency response tolerance threshold include: P1 (80Hz, +7.5dB), P2 (250Hz, -4.0dB), P4 (3kHz, +5.2dB), P5 (6kHz, +4.5dB), and P7 (12kHz, -3.5dB), a total of 5 second extreme points. Then, these 5 second extreme points are sorted from largest to smallest by the absolute value of the frequency response difference: P1, P4, P5, P2, P7. Since the audio device under test has 5 usable filters, N=5. The top 5 second extreme points are selected, meaning all 5 second extreme points are determined as first extreme points.
[0127] Assuming there are 8 available filters, but only 5 extracted second extreme points, the top 5 second extreme points are all determined as first extreme points, and the remaining 3 filter resources are reserved for use in the next round of iterative calibration or left unused.
[0128] Assuming there are 4 available filters and 7 extracted second extreme points, only the top 4 second extreme points are selected as the first extreme points. The other second extreme points are discarded due to their lower ranking and insufficient filter resources, thus improving resource utilization.
[0129] In this embodiment, a frequency response tolerance threshold screening mechanism is used to quickly focus on key deviation frequency bands and avoid invalid calculations for minor fluctuations. By sorting the absolute values of frequency response differences, the frequency bands with the most significant deviations are processed first, ensuring that limited filter resources are used for the positions that need the most correction and improving the calibration effect. By constraining the value of N, the number of extreme points screened does not exceed the number of hardware filters, which fully considers the engineering reality that audio processing chips integrate a limited number of filters due to cost and power consumption limitations.
[0130] To further improve calibration accuracy with limited hardware resources and fully utilize the correction capability of each filter segment, some embodiments of the audio device frequency response calibration method further include: repeatedly performing the operations of steps 301 to 305 until the iterative calibration stop condition is met, wherein the iterative calibration stop condition includes: the number of filters used is equal to the number of available filters, and / or, the absolute value of the frequency response difference corresponding to each frequency point on the second frequency response difference curve is less than the frequency response tolerance threshold.
[0131] In other words, after the initial calibration, if the frequency response difference curve of the audio device under test still does not meet the standard and there are still remaining filter resources, the next round of iterative calibration will be automatically executed, gradually approaching the target frequency response curve. This achieves efficient utilization of hardware filter resources while ensuring calibration accuracy.
[0132] Specifically, the iterative calibration process includes:
[0133] Step 301: Obtain the calibrated frequency response curve.
[0134] For example, the frequency response curve of the audio device under test is obtained after calibration with existing filters. In the first iteration, this calibrated frequency response curve is the frequency response curve after the first round of calibration; in subsequent iterations, this calibrated frequency response curve is the updated frequency response curve after the previous round of calibration. The calibrated frequency response curve can be obtained through software simulation, that is, calculated by superimposing all the determined filter parameters.
[0135] Step 302: Determine the second frequency response difference curve based on the target frequency response curve and the calibrated frequency response curve.
[0136] For example, the target frequency response curve is subtracted from the calibrated frequency response curve point by point to generate a second frequency response difference curve. This second frequency response difference curve reflects the residual frequency response deviation that still exists after the current calibration.
[0137] Step 303: When there is at least one frequency point on the second frequency response difference curve whose absolute value of the frequency response difference is greater than or equal to the frequency response tolerance threshold, and the number of filters used in the audio device under test is less than the number of available filters, identify the third extreme point in the second frequency response difference curve.
[0138] Among them, if the absolute value of the frequency response difference corresponding to at least one frequency point on the second frequency response difference curve is greater than or equal to the frequency response tolerance threshold, it indicates that there are still frequency bands that have not met the qualified standard; if the number of filters used in the audio device under test is less than the number of available filters, it indicates that the hardware filter resources have not been exhausted.
[0139] In other words, when the iteration conditions are met, the third extreme point is identified from the second frequency response difference curve. The method for identifying the third extreme point is the same as that for identifying the first extreme point in the initial calibration, both based on sorting by the absolute value of the frequency response difference. Furthermore, the value of N is dynamically adjusted during the iteration process to adapt to the remaining filter resources. For details, please refer to the aforementioned embodiments, which will not be repeated here.
[0140] Step 304: Based on the frequency band division and bandwidth calculation rules, determine the filter parameters corresponding to the third extreme point according to the frequency response difference and frequency corresponding to the third extreme point.
[0141] The filter parameters are determined in the same way as in the initial calibration, referring to steps 2031 to 2035.
[0142] Step 305: Design a filter based on the filter parameters corresponding to the third extreme point, perform frequency response calibration on the calibrated audio device under test again, and update the calibrated frequency response curve.
[0143] For example, the filter parameters determined in step 304 are added to the existing filter parameter set, and the calibrated frequency response curve is updated by software simulation (i.e., the total response of all existing filters and the newly added filter is superimposed).
[0144] The aforementioned iterative calibration fully utilizes remaining filter resources by further screening for new extreme points and designing filter parameters. For example, if three filters remain after the initial calibration, a second iteration is used to screen for new extreme points and optimize parameters, further reducing the deviation between the calibrated frequency response curve and the target frequency response curve, thus improving calibration accuracy.
[0145] In some embodiments, the audio device frequency response calibration method further includes: when the iterative calibration stop condition is met, writing the filter parameters determined during the iteration process into the hardware filter bank of the audio device under test.
[0146] For example, after the iterative calibration process terminates, all filter parameters determined from the initial calibration to the last iteration are acquired. These filter parameters are stored in list form, with each filter parameter entry including: center frequency, gain, and quality factor. All acquired filter parameters are encapsulated according to the hardware filter bank interface specification to generate an equalizer configuration file, which is then written to the hardware filter bank of the audio device under test in one go via a communication interface (such as I2C, SPI, USB, etc.) to ensure that the calibration parameters are actually effective in the hardware. The equalizer configuration file contains address mapping rules for the filter parameters (e.g., I2C addresses 0x20~0x2F correspond to 5 filter parameter segments), ensuring that the parameter writing is compatible with the register structure of the hardware filters.
[0147] In this embodiment, after the iterative calibration process meets the iterative calibration stop condition, all filter parameters determined during the iteration process are written into the hardware filter bank of the audio device under test at once, completing a complete calibration closed loop from software simulation optimization to actual hardware effectiveness. This ensures calibration accuracy while avoiding efficiency loss caused by frequent writing.
[0148] Next, combined Figures 3 to 5 The effects of applying the audio device frequency response calibration method provided in the embodiments of this application are illustrated by way of example. This example is based on an actual production line application scenario, with eight available hardware filters. To ensure the frequency response stability of the audio device, all filters are peak filters for calibration.
[0149] Figure 3 This application provides a schematic diagram of the frequency response calibration results for audio devices in an embodiment of the present application. Figure 1 , Figure 3 In the figure, (a) is the frequency response difference curve, with the horizontal axis representing frequency (in Hz) and the vertical axis representing frequency response difference (in dB). Figure 3 (b) in the figure is a comparison graph of frequency response curves, with the horizontal axis representing frequency (in Hz) and the vertical axis representing frequency response amplitude (in dB). Figure 3 As shown in (b), the first curve 1 is the actual frequency response curve of the audio device under test before calibration, the second curve 2 is the target frequency response curve, the third curve 3 is the frequency response curve after calibration, and the fourth curve 4 is the frequency response difference curve calculated based on the target frequency response curve and the calibrated frequency response curve. In this example, the first round of calibration uses 5 peak filters. After calibration, the third curve 3 is basically consistent with the second curve 2, achieving the equalizer calibration target.
[0150] Figure 4This application provides a schematic diagram of the frequency response calibration results for audio devices in an embodiment of the present application. Figure 2 Since only 5 peak filters were used after the first round of calibration, and the hardware still had 3 peak filters available, a second round of iterative calibration was performed. Figure 4 The calibration results shown indicate that after the second round of calibration, the difference between the third curve 3 and the second curve 2 was further reduced, and the calibration accuracy was further improved, fully demonstrating the effective utilization of the remaining filter resources by the iterative calibration mechanism.
[0151] Figure 5 This application provides a schematic diagram of the frequency response calibration results for audio devices in an embodiment of the present application. Figure 3 , Figure 5 (a) is the frequency response difference curve, with the horizontal axis representing frequency (in Hz) and the vertical axis representing the frequency response difference (in dB). Figure 5 (b) in the figure is a comparison graph of frequency response curves, with the horizontal axis representing frequency (in Hz) and the vertical axis representing frequency response amplitude (in dB). Figure 5 As shown in (a), the frequency response difference curve shows that the frequency response difference at the extreme points is large and there are many extreme points, making calibration more difficult. Figure 5 (b) shows the result after calibration using all 8 peak filters. The third curve 3 and the second curve 2 are basically in agreement, achieving the equalizer calibration target and verifying the effectiveness of the method provided in this application embodiment in handling complex deviation scenarios.
[0152] Next, the audio device frequency response calibration method of this application will be described in detail through a specific embodiment.
[0153] Figure 6 A flowchart illustrating the audio device frequency response calibration method provided in this application embodiment. Figure 2 ,like Figure 6 As shown, the frequency response calibration method for audio devices includes the following steps:
[0154] S601. Obtain the target frequency response curve and the actual frequency response curve of the audio device under test.
[0155] S602. Determine the first frequency response difference curve of the audio device under test based on the target frequency response curve and the actual frequency response curve.
[0156] S603. Determine whether the audio device under test meets the frequency response calibration conditions.
[0157] The frequency response calibration conditions include: the absolute value of the frequency response difference corresponding to each frequency point on the first frequency response difference curve is less than or equal to the calibration threshold, and there is at least one frequency point on the first frequency response difference curve whose absolute value of the frequency response difference is greater than or equal to the frequency response tolerance threshold.
[0158] If satisfied, execute S604;
[0159] If the conditions are not met, then S613 is executed, meaning no calibration is performed. In other words, if the first frequency response difference curve is within the area defined by the upper and lower bounds of the target frequency response curve, it indicates that the actual frequency response curve is qualified and frequency response calibration is not required; if the absolute value of the frequency response difference at any frequency point on the first frequency response difference curve is greater than the calibration threshold, it indicates that the actual frequency response curve deviation is too large, exceeding the upper limit of the hardware correction capability, and frequency response calibration is not necessary.
[0160] S604. Extract all extreme points from the first frequency response difference curve.
[0161] Extreme points are either convex or concave points on the frequency response difference curve.
[0162] S605. Select extreme points from all extreme points whose absolute value of frequency response difference is greater than or equal to the frequency response tolerance threshold, and sort the selected extreme points in descending order of absolute value of frequency response difference.
[0163] S606. Take the top N extreme points in order, where N is less than or equal to the number M of available filters in the audio device under test.
[0164] Assuming the number of available filters is M, then N M.
[0165] The filter is designed by taking the frequency of the extreme point as the center frequency of the filter.
[0166] S607. Based on the preset frequency band division and bandwidth calculation rules, determine the filter parameters at the extreme point according to the frequency response difference and frequency corresponding to the extreme point.
[0167] The frequency of the extreme point is taken as the center frequency of the filter; the frequency response difference of the extreme points is taken as the gain of the filter; based on the center frequency, the corresponding target frequency band is matched from the frequency band division and bandwidth calculation rules, and the bandwidth calculation rules corresponding to the target frequency band are obtained; based on the bandwidth calculation rules and the center frequency, the bandwidth of the filter is determined; based on the center frequency, bandwidth and gain, the quality factor of the filter is determined.
[0168] S608. Design a filter based on filter parameters and calibrate the frequency response of the audio device under test.
[0169] S609. Calculate the difference between the target frequency response curve and the calibrated frequency response curve to obtain the second frequency response difference curve.
[0170] S610. Determine whether the second frequency response difference curve is within the region defined by the upper and lower boundaries of the target frequency response curve.
[0171] That is, whether the absolute value of the frequency response difference corresponding to all frequency points on the second frequency response difference curve is less than the frequency response tolerance threshold.
[0172] If yes, it indicates that the calibration has passed, then proceed to step S612;
[0173] If not, it indicates that the calibration failed, and S611 is executed.
[0174] S611. Determine whether the number of filters used in the audio device under test is less than the number of available filters.
[0175] If so, it indicates that there are remaining filters, so a second round of calibration is performed, updating the number of available filters to M. N, and extract all extreme points from the second frequency response difference curve, that is, return to execute S604 until the number of hardware filters is exhausted.
[0176] If not, it indicates that the filter resources have been exhausted, and the filter parameters determined by S607 are written into the hardware filter bank of the audio device under test.
[0177] S612. Write the filter parameters into the hardware filter bank of the audio device under test.
[0178] This application's embodiments effectively resolve the "time-consuming vs. accuracy" contradiction in the mass production of audio devices. Regarding efficiency, firstly, after obtaining the frequency response difference curve, the audio devices to be calibrated are selected through pre-judgment of frequency response calibration conditions, avoiding invalid calibration of audio devices that do not meet the frequency response calibration conditions and improving production line calibration efficiency. Secondly, based on preset frequency band division and bandwidth calculation rules, filter parameters are directly determined according to the frequency response difference and frequency at extreme points, eliminating the need for global search or multi-round iterative optimization using intelligent optimization algorithms, significantly shortening calibration time. The core calibration calculation time is reduced from 30-60 seconds to within 3 seconds, perfectly matching the mass production calibration requirements of wearable device production lines. In terms of accuracy, firstly, key deviation frequency bands are located and screened by using extreme points (the center frequency of the designed filter), and frequency response correction is performed by focusing on the areas with large differences in the frequency response difference curve, avoiding redundant calibration across the entire frequency band; secondly, by using segmented preset bandwidth rules, based on the characteristics of human hearing and the distribution law of production deviations on the production line, corresponding bandwidth calculation methods are matched for different frequency bands, ensuring that the filter parameters are accurately adapted to the actual deviation characteristics. The calibration effect can reach or even surpass intelligent global search methods and local iterative optimization methods.
[0179] Figure 7 Schematic diagram of the audio device frequency response calibration device provided in the embodiments of this application Figure 1 ,like Figure 7As shown, the audio device frequency response calibration device 70 provided in this embodiment includes: an acquisition module 71, an identification module 72, a determination module 73, and a calibration module 74. Wherein:
[0180] The acquisition module 71 is used to acquire the first frequency response difference curve of the audio device under test. The first frequency response difference curve reflects the frequency response difference of the audio device under test relative to the target frequency response curve at each frequency point.
[0181] The identification module 72 is used to identify the first extreme point in the first frequency response difference curve when it is determined that the audio device under test meets the frequency response calibration conditions based on the first frequency response difference curve. The first extreme point represents the frequency response difference to be calibrated after screening.
[0182] The determination module 73 is used to determine the filter parameters corresponding to the audio device under test based on the preset frequency band division and bandwidth calculation rules, according to the frequency response difference and frequency corresponding to the first extreme point. The frequency band division and bandwidth calculation rules are preset based on the characteristics of human hearing and the distribution law of production deviation on the production line.
[0183] The calibration module 74 is used to design filters based on filter parameters and calibrate the frequency response of the audio device under test.
[0184] In one possible implementation, the filter parameters include gain, quality factor, and center frequency. The determining module 73 is specifically used to: use the frequency of the first extreme point as the center frequency of the filter; use the frequency response difference of the first extreme point as the gain of the filter; match the corresponding target frequency band from the frequency band division and bandwidth calculation rules according to the center frequency, and obtain the bandwidth calculation rules corresponding to the target frequency band; determine the bandwidth of the filter according to the bandwidth calculation rules and the center frequency; and determine the quality factor of the filter according to the center frequency, bandwidth, and gain.
[0185] In one possible implementation, the identification module 72 is specifically used to: extract at least one second extreme point from the first frequency response difference curve where the absolute value of the frequency response difference is greater than or equal to the frequency response tolerance threshold; sort the at least one second extreme point in descending order of the absolute value of the frequency response difference; and determine the top N second extreme points as first extreme points, where N is less than or equal to the number of available filters in the audio device under test.
[0186] In one possible implementation, the frequency response calibration conditions include: the absolute value of the frequency response difference corresponding to each frequency point on the first frequency response difference curve is less than or equal to the calibration threshold, and at least one frequency point on the first frequency response difference curve has an absolute value of the frequency response difference greater than or equal to the frequency response tolerance threshold; wherein the calibration threshold is greater than the frequency response tolerance threshold.
[0187] like Figure 8As shown, in one possible implementation, the audio device frequency response calibration device 70 further includes an iterative processing module 75, which repeatedly performs the following operations until the iterative calibration stop condition is met: acquiring the calibrated frequency response curve; determining a second frequency response difference curve based on the target frequency response curve and the calibrated frequency response curve; identifying a third extreme point in the second frequency response difference curve when at least one frequency point on the second frequency response difference curve has an absolute value of frequency response difference greater than or equal to the frequency response tolerance threshold, and the number of filters used in the audio device under test is less than the number of available filters; determining the filter parameters corresponding to the third extreme point based on the frequency band division and bandwidth calculation rules, according to the frequency response difference and frequency corresponding to the third extreme point; designing a filter based on the filter parameters corresponding to the third extreme point, performing frequency response calibration again on the calibrated audio device under test, and updating the calibrated frequency response curve; wherein, the iterative calibration stop condition includes: the number of filters used is equal to the number of available filters, and / or, the absolute value of the frequency response difference corresponding to each frequency point on the second frequency response difference curve is less than the frequency response tolerance threshold.
[0188] In one possible implementation, the iterative processing module 75 is further configured to: write the filter parameters determined during the iteration process into the hardware filter bank of the audio device under test when the iterative calibration stop condition is met.
[0189] The audio device frequency response calibration device provided in this embodiment can perform the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0190] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 9 As shown, the electronic device 90 provided in this embodiment (e.g., the control host in the aforementioned embodiment) includes at least one processor 901 and a memory 902. Optionally, the electronic device 90 further includes a communication component 903. The processor 901, memory 902, and communication component 903 are connected via a bus 904.
[0191] In a specific implementation, at least one processor 901 executes computer execution instructions stored in memory 902, causing at least one processor 901 to perform the above-described method.
[0192] The specific implementation process of processor 901 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0193] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0194] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0195] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0196] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0197] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0198] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0199] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0200] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0201] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0202] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0203] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0204] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0205] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for calibrating the frequency response of an audio device, characterized in that, include: Obtain the first frequency response difference curve of the audio device under test, which reflects the frequency response difference of the audio device under test relative to the target frequency response curve at each frequency point; After determining that the audio device under test meets the frequency response calibration conditions based on the first frequency response difference curve, the first extreme point in the first frequency response difference curve is identified. The first extreme point represents the frequency response difference to be calibrated after screening. The number of the first extreme points does not exceed the number of available filters in the audio device under test, and the type of the filter is the type of the hardware filter bank that has been fixed in the audio device under test; Based on preset frequency band division and bandwidth calculation rules, the filter parameters corresponding to the audio device under test are determined according to the frequency response difference and frequency corresponding to the first extreme point. The frequency band division and bandwidth calculation rules are preset based on human hearing characteristics and production line deviation distribution patterns. These rules indicate the division of frequency bands and the bandwidth calculation rules for each band. The frequency corresponding to the first extreme point is used to determine the frequency band corresponding to the first extreme point. Design a filter based on the filter parameters and calibrate the frequency response of the audio device under test; The filter parameters include gain, quality factor, and center frequency. The determination of the filter parameters for the audio device under test based on preset frequency band division and bandwidth calculation rules, according to the frequency response difference and frequency corresponding to the first extreme point, includes: The frequency of the first extreme point is taken as the center frequency of the filter; The frequency response difference at the first extreme point is used as the gain of the filter; Based on the center frequency, the corresponding target frequency band is matched from the frequency band division and bandwidth calculation rules, and the bandwidth calculation rules corresponding to the target frequency band are obtained; The bandwidth of the filter is determined according to the bandwidth calculation rules and the center frequency. The quality factor of the filter is determined based on the center frequency, the bandwidth, and the gain.
2. The audio device frequency response calibration method according to claim 1, characterized in that, The identification of the first extreme point in the first frequency response difference curve includes: Extract at least one second extreme point from the first frequency response difference curve where the absolute value of the frequency response difference is greater than or equal to the frequency response tolerance threshold. Sort the at least one second extreme point in descending order of the absolute value of the frequency response difference; The top N second extreme points are all determined as first extreme points, where N is less than or equal to the number of available filters in the audio device under test.
3. The audio device frequency response calibration method according to claim 1 or 2, characterized in that, The frequency response calibration conditions include: The absolute value of the frequency response difference corresponding to each frequency point on the first frequency response difference curve is less than or equal to the calibration threshold threshold, and there is at least one frequency point on the first frequency response difference curve whose absolute value of the frequency response difference is greater than or equal to the frequency response tolerance threshold. Wherein, the calibration threshold is greater than the frequency response tolerance threshold.
4. The audio device frequency response calibration method according to claim 1 or 2, characterized in that, Also includes: Repeat the following steps until the iterative calibration stop condition is met: Obtain the calibrated frequency response curve; Based on the target frequency response curve and the calibrated frequency response curve, determine the second frequency response difference curve; When there is at least one frequency point on the second frequency response difference curve whose absolute value of the frequency response difference is greater than or equal to the frequency response tolerance threshold, and the number of filters used in the audio device under test is less than the number of available filters, the third extreme point in the second frequency response difference curve is identified. Based on the frequency band division and bandwidth calculation rules, the filter parameters corresponding to the third extreme point are determined according to the frequency response difference and frequency corresponding to the third extreme point. Based on the filter parameters corresponding to the third extreme point, a filter is designed, and the frequency response of the already calibrated audio device under test is calibrated again, and the calibrated frequency response curve is updated. The iterative calibration stopping conditions include: the number of filters used is equal to the number of available filters, and / or the absolute value of the frequency response difference corresponding to each frequency point on the second frequency response difference curve is less than the frequency response tolerance threshold.
5. The audio device frequency response calibration method according to claim 4, characterized in that, Also includes: When the iterative calibration stop condition is met, the filter parameters determined during the iteration process are written into the hardware filter bank of the audio device under test.
6. An audio device frequency response calibration device, characterized in that, include: The acquisition module is used to acquire the first frequency response difference curve of the audio device under test, which reflects the frequency response difference of the audio device under test relative to the target frequency response curve at each frequency point. The identification module is used to identify the first extreme point in the first frequency response difference curve after determining that the audio device under test meets the frequency response calibration conditions based on the first frequency response difference curve. The first extreme point represents the frequency response difference to be calibrated after screening. The number of the first extreme points does not exceed the number of available filters in the audio device under test, and the type of the filter is the type of the hardware filter bank that has been fixed in the audio device under test; The determination module is used to determine the filter parameters corresponding to the audio device under test based on preset frequency band division and bandwidth calculation rules, according to the frequency response difference and frequency corresponding to the first extreme point. The frequency band division and bandwidth calculation rules are preset based on human hearing characteristics and production line deviation distribution patterns, and are used to indicate the bandwidth calculation rules corresponding to each frequency band. The frequency corresponding to the first extreme point is used to determine the frequency band corresponding to the first extreme point. A calibration module is used to design a filter based on the filter parameters and calibrate the frequency response of the audio device under test. The filter parameters include gain, quality factor, and center frequency; The determining module is specifically configured to: use the frequency of the first extreme point as the center frequency of the filter; use the frequency response difference of the first extreme point as the gain of the filter; match the corresponding target frequency band from the frequency band division and bandwidth calculation rules according to the center frequency, and obtain the bandwidth calculation rules corresponding to the target frequency band; determine the bandwidth of the filter according to the bandwidth calculation rules and the center frequency; and determine the quality factor of the filter according to the center frequency, the bandwidth, and the gain.
7. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the audio device frequency response calibration method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed, are used to implement the audio device frequency response calibration method as described in any one of claims 1 to 5.
9. A computer program product, characterized in that, It includes a computer program that, when executed, implements the audio device frequency response calibration method according to any one of claims 1 to 5.