Sound system automatic debugging method, device and computer equipment
By obtaining the actual frequency response curve and target curve of the audio system, using the first loss function and iterative process to optimize the filter, gain and frequency division points, combined with the equalizer parameters, the automatic debugging of the audio system is realized, solving the cumbersome and complex problems of existing debugging methods, and reducing the user's operating time and learning costs.
Patent Information
- Application Number
- CN202411681818.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The existing audio system debugging methods are complicated and complex, and the user's professional knowledge reserve requirements are high, so it cannot effectively reduce workload and time costs.
By obtaining the actual frequency response curve and target curve of the audio system, the target filter is determined using the first loss function, and the gain and frequency division points are adjusted through the iterative process, combined with equalizer parameter optimization, automatic debugging of the audio system is realized.
It realizes rapid automatic debugging of the audio system, reduces user operation time and learning costs, and improves debugging efficiency.
Smart Images

Figure CN119545226B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of audio equipment, and in particular to a method, device and computer equipment for automatic debugging of an audio system. Background Art
[0002] The current conventional debugging method for an audio system composed of active speakers is as follows: (1) first adjust the input and output processing parameters of the digital signal processor of a single speaker, such as equalizer, delay, gain, crossover, etc.; (2) test the effect of the audio system, and adjust the parameters of the digital signal processor of the relevant speakers based on experience and further refinement of test data; (3) test the overall effect of the audio system again, and adjust the parameters of the digital signal processor of the active speakers again based on the test results. In other words, to achieve a better system acoustic effect, it is necessary to repeatedly adjust the parameters of the digital signal processor of each speaker based on the overall acoustic effect.
[0003] This audio system debugging method has the following problems: since many factors affect the acoustic effect of the system, there is no fixed rule as to which speakers to adjust and which parameters to adjust. Therefore, adjustments can only be made speaker by speaker or area by area, and then each speaker must be readjusted according to the test results. Therefore, the above debugging operation is tedious and complicated, with a large workload, and requires a high level of professional knowledge from the user. Summary of the Invention
[0004] Based on this, it is necessary to provide a method, device and computer equipment for automatic debugging of the audio system to address the above technical problems, so as to realize automatic debugging of the speaker system, replace manual operation, and reduce user time cost and technical threshold.
[0005] In a first aspect, the present application provides a method for automatically debugging an audio system. The method comprises:
[0006] Obtain the actual frequency response curve of the sound system at the site and obtain the target curve;
[0007] Obtain a first loss function between the frequency response curves and the target curve under different filters, and determine the target filter according to the first loss function;
[0008] Determine the current target crossover point based on the target filter and enter an iterative process, the iterative process including: using the gain as a variable and determining the current target gain based on the current target crossover point; using the crossover point as a variable and determining the current target crossover point based on the current target gain;
[0009] When the preset conditions are met, the iteration is stopped, and the current target frequency division point when the iteration is stopped is obtained as the global target frequency division point, and the current target gain when the iteration is stopped is obtained as the global target gain;
[0010] The sound system can be debugged according to the target filter, global target crossover point and global target gain.
[0011] In one embodiment, determining the current target gain based on the current target crossover point includes:
[0012] Based on the current target crossover point, the gain is adjusted with a first preset gain interval as a step size, and a gradient algorithm is used to obtain the current target gain;
[0013] Determining the current target crossover point based on the current target gain includes:
[0014] Based on the current target gain, the crossover point is adjusted with a preset frequency interval as the step size, and the current target crossover point is obtained using a gradient algorithm.
[0015] In one embodiment, after determining the target filter, the global target crossover frequency point, and the global target gain, the method further includes: automatically debugging equalizer parameters in the audio system; wherein the equalizer parameters include center frequency, Q value, and equalization gain;
[0016] Automatically adjust the equalizer parameters in the sound system including:
[0017] Find the corresponding frequencies of the areas that deviate from the target curve from the frequency response curve and obtain several center frequencies;
[0018] For different center frequencies, the target Q value and target equalization gain are obtained.
[0019] In one embodiment, searching for frequencies corresponding to regions deviating from a target curve from the frequency response curve to obtain a plurality of center frequencies includes:
[0020] Adjusting the equalization gain with a second preset gain interval as a step size, adjusting the target curve based on the equalization gain, and obtaining a left intersection frequency and a right intersection frequency corresponding to when the target curve intersects the frequency response curve at different equalization gains;
[0021] According to each group of left-intersection frequencies and right-intersection frequencies, the corresponding center frequency is determined.
[0022] In one embodiment, for different center frequencies, obtaining a target Q value and a target equalization gain includes:
[0023] For each center frequency, the equalizer parameters are adjusted with a first preset Q value interval as a step size and a third preset gain interval as a step size, and the local equalizer parameters corresponding to the center frequency are obtained based on a second loss function between the frequency response curve and the target curve under different equalizer parameters;
[0024] Comparing the second loss function between the frequency response curve after the local equalizer parameters are adjusted and the target curve, screening the center frequencies corresponding to the local equalizer parameters, and obtaining several target center frequencies;
[0025] For each target center frequency, the equalizer parameters are adjusted with a second preset Q value interval as a step size and a fourth preset gain interval as a step size, and the target Q value and target equalization gain corresponding to the target center frequency are obtained according to a second loss function between the frequency response curve and the target curve under different equalizer parameters.
[0026] In one embodiment, after obtaining the target Q value and the target equalization gain, the method further includes:
[0027] Determine an evaluation value based on the target Q value and the target equalization gain; the evaluation value is the product of the square of the target Q value and the target equalization gain;
[0028] The evaluation value is compared with the first threshold and the second threshold. If the evaluation value is not greater than the first threshold, the target Q value and the target equalization gain corresponding equalizer parameters are retained; if the evaluation value is greater than the first threshold and not greater than the second threshold, the target equalization gain is reduced by one, and the target Q value and the adjusted target equalization gain corresponding equalizer parameters are retained; if the evaluation value is greater than the second threshold, the target Q value and the target equalization gain corresponding equalizer parameters are discarded.
[0029] In one embodiment, after determining the target filter, the global target crossover point, and the global target gain, the method further includes: automatically adjusting the phase in the sound system.
[0030] In a second aspect, the present application also provides a device for automatically debugging a sound system. The device comprises:
[0031] The acquisition module is used to obtain the actual frequency response curve of the sound system at the site and obtain the target curve;
[0032] A filter selection module is used to obtain a first loss function between the frequency response curve and the target curve under different filters, and determine the target filter according to the first loss function;
[0033] An iterative calculation module is used to determine the current target crossover point based on the target filter and enter an iterative process. The iterative process includes: using the gain as a variable and determining the current target gain based on the current target crossover point; using the crossover point as a variable and determining the current target crossover point based on the current target gain;
[0034] The frequency division module is used to stop the iteration when the preset condition is reached, obtain the current target frequency division point when the iteration stops as the global target frequency division point, and obtain the current target gain when the iteration stops as the global target gain;
[0035] The output module is used to debug the sound system according to the target filter, global target crossover point and global target gain.
[0036] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned automatic debugging method for the audio system when executing the computer program.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned method for automatically debugging an audio system.
[0038] In a fifth aspect, the present application further provides a computer program product, which includes a computer program that implements the steps of the above-mentioned method for automatically debugging an audio system when executed by a processor.
[0039] The above-mentioned audio system automatic debugging method, device and computer equipment obtain the actual frequency response curve of the audio system at the site and obtain the target curve; obtain a first loss function between the frequency response curve and the target curve under different filters, and determine the target filter based on the first loss function; determine the current target crossover point based on the target filter, and enter an iterative process, the iterative process including: using gain as a variable and determining the current target gain based on the current target crossover point; using crossover point as a variable and determining the current target crossover point based on the current target gain; stopping the iteration when a preset condition is met, obtaining the current target crossover point at the time of iteration stopping as the global target crossover point, and obtaining the current target gain at the time of iteration stopping as the global target gain; and debugging the audio system based on the target filter, the global target crossover point and the global target gain. The present invention sets the target curve and the first loss function, and in multiple iterative operations, makes the frequency response curve approach the target curve under the multiple influences of the filter, crossover point and gain, thereby achieving rapid automatic debugging of the audio system, saving the user's operation time and reducing the user's learning cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 1 is a flow chart of a method for automatically debugging an audio system according to an embodiment;
[0041] Figure 2 is a schematic diagram of a target curve in an audio system according to an embodiment;
[0042] Figure 3 A schematic diagram of a frequency division effect in one embodiment;
[0043] Figure 4is a schematic diagram showing the position of the center frequency in one embodiment;
[0044] Figure 5 A schematic diagram showing the comparison before and after phase adjustment in one embodiment;
[0045] Figure 6 FIG. 1 is a structural block diagram of an automatic debugging device for an audio system in one embodiment. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0047] The embodiment of the present application provides a method for automatically debugging an audio system, such as Figure 1 As shown, the following steps are included:
[0048] Step 102: Obtain the actual frequency response curve of the sound system at the site and obtain the target curve.
[0049] A frequency response curve is a graphical representation of a device's response to sound signals of varying frequencies within an audio system. Frequency response curves are typically measured within the range of 20 Hz to 20 kHz, which is the frequency range perceptible to the human ear. The frequency response curve is generated by connecting an audio signal generator, a microphone, and the audio system under test. The signal generator generates a test signal (such as white noise or a swept frequency signal) and plays it through the audio system under test. The microphone receives the sound signal from the audio system and transmits it to an audio analyzer or computer. Audio analysis software is then used to process the received signal.
[0050] The target curve is a curve that has been created and saved. You can freely select or customize the target curve according to the preset scene. Figure 2 Shown is a full-frequency target curve.
[0051] Step 104 : Obtain a first loss function between the frequency response curves under different filters and the target curve, and determine the target filter according to the first loss function.
[0052] Among them, the audio system includes various filters, such as high-pass filters, low-pass filters, shelf filters, etc., as well as LR (Linkwitz-Riley) filters, BW (ButterWorth) filters, BS (Bessel) filters, etc.
[0053] In this embodiment, the user can first set a rough expected crossover point according to the desired crossover effect. For example, for a two-way frequency division, an expected crossover point is set at the middle position to divide the full-frequency frequency response curve into two frequency bands, which requires a high-pass filter and a low-pass filter; for a three-way frequency division, two expected crossover points are set to divide the full-frequency frequency response curve into three frequency bands, which requires a high-pass filter, a low-pass filter and a band-pass filter.
[0054] The filter range is roughly defined based on the expected crossover point. Then, the filters within the corresponding range are processed one by one on the frequency response curve and the target curve. By calculating the first loss function between the frequency response curve after filter processing and the target curve, the target filter is finally determined among various types of filters.
[0055] In this embodiment, M is defined as A-T+F+G. The first loss function is the sum of the absolute values of each element of the M array, denoted as X, where A represents the frequency curve array, T represents the target curve array, G represents the gain array, and F represents the filter array. These arrays are all taken from a frequency response graph, where the horizontal axis of the frequency response graph is frequency and the vertical axis is amplitude. The frequency response graph is sampled to obtain the frequency curve array, target curve array, gain array, and filter array. It should be noted that in step 104, the gain array is first considered a constant, and the filter array is considered a variable.
[0056] Through the loop, the first loss function corresponding to all types of filters is calculated, and the filter corresponding to the minimum loss function X is selected as the target filter.
[0057] Different filters have different slopes, such as -6dB, -12dB, -36dB, etc. The slope determines the attenuation degree of the filter to signals of different frequencies and is an important parameter for measuring the performance and selectivity of the filter. Therefore, when determining the target filter, it is also necessary to determine the slope corresponding to the filter. This embodiment uses a logarithmic interpolation algorithm to obtain a slope curve. While calculating the first loss function corresponding to all types of filters, the slope curve obtained by the logarithmic interpolation algorithm is also used as a variable to calculate the corresponding first loss function in sequence, thereby determining the slope of the target filter.
[0058] Step 106 , determining the current target crossover point based on the target filter, and entering an iterative process, which includes: determining the current target gain based on the current target crossover point with the gain as a variable; and determining the current target crossover point based on the current target gain with the crossover point as a variable.
[0059] In step 104, the target filter is determined based on the expected crossover point, and the approximate range of the crossover point is also determined. When the target filter and the filter slope are determined, the first loss function still has two variables, the first is the gain, and the second is the filter crossover point.
[0060] At this point, the expected crossover frequency point is used as the current target crossover frequency point for the first iteration. First, using the gain as a variable, find the gain when the first loss function is minimized as the current target gain. Then, using the current target gain as a constant and the crossover frequency point as a variable, find the crossover frequency point when the first loss function is minimized as the current target crossover frequency point, completing the first iteration. The current target crossover frequency point output from the first iteration is used as the current target crossover frequency point input for the next iteration.
[0061] Step 108 : When a preset condition is met, the iteration is stopped, and the current target frequency division point when the iteration is stopped is obtained as the global target frequency division point, and the current target gain when the iteration is stopped is obtained as the global target gain.
[0062] The iteration method of step 104 is iterated until a preset condition is met and the iteration is stopped. The preset condition here may refer to the number of iterations, for example, the iteration is stopped when the number of iterations reaches five or six. The current target crossover frequency point at the time of the iteration stop is set as the global target crossover frequency point, and the current target gain at the time of the iteration stop is set as the global target gain.
[0063] Step 110 , debugging the sound system according to the target filter, the global target crossover point, and the global target gain.
[0064] The frequency response curve is processed according to the target filter, the global target crossover point and the global target gain, so that the first loss function between the frequency response curve and the target curve is relatively small, that is, the frequency response curve approaches the target curve, thereby achieving the debugging of the speaker system.
[0065] After the steps disclosed in this embodiment are processed, a better crossover point can be automatically found under the limitation of the expected crossover point, thereby achieving efficient and better sound system debugging. Figure 3 As shown, the set target crossover frequency is 2490 Hz, but the more appropriate crossover frequency found through this embodiment is 2676 Hz.
[0066] The user can fill in the parameter target filter, global target crossover point and global target gain into the processor manually or using the copy function.
[0067] In one embodiment, in step 106, determining the current target gain based on the current target crossover point includes: adjusting the gain based on the current target crossover point with a first preset gain interval as a step size, and acquiring the current target gain using a gradient algorithm.
[0068] During an iteration, based on the current target crossover point, the gain is adjusted starting from 0 with a first preset gain interval as the step size. For example, the first preset gain interval is 0.1. First, the first loss function values X corresponding to 0, 0.1, and -0.1 are calculated. The direction of decreasing values can be determined from the three X values. The gain is then adjusted in the decreasing direction with the first preset gain interval as the step size. The gain that minimizes X is found as the current target gain for this iteration.
[0069] In one embodiment, in step 106, determining the current target crossover point based on the current target gain includes: adjusting the crossover point based on the current target gain with a preset frequency interval as a step size, and acquiring the current target crossover point using a gradient algorithm.
[0070] During an iteration, based on the current target gain, the crossover frequency is adjusted in steps of a preset frequency interval, starting from the current target crossover frequency output from the previous iteration. For example, if the preset frequency interval is 1 / 48 octet bandwidth, the minimum loss function value X is calculated for each frequency before or after the crossover frequency. Comparing the X values before and after the crossover frequency, if they decrease, it indicates that the gradient is decreasing. When X begins to increase, the X value before the increase is the local minimum loss function within the current range, and the corresponding crossover frequency is the local optimal solution.
[0071] Because the frequency is not high, through verification of multiple different types of curves, in this embodiment, it is generally believed that the local optimal solution is the global optimal solution.
[0072] In one embodiment, after determining the target filter, the global target crossover point, and the global target gain in step 110, the method further includes: automatically debugging equalizer parameters in the audio system; wherein the equalizer parameters include center frequency, Q value, and equalization gain.
[0073] The center frequency refers to the specific frequency point at which the equalizer operates. The Q value indicates the width of the frequency range over which the equalizer operates. A higher Q value narrows the frequency range; a lower Q value widens the frequency range. Equalization gain refers to the amount of gain or loss in the frequency response at a specific frequency.
[0074] Automatically debugging the equalizer parameters in the audio system includes: finding the corresponding frequencies of the area deviating from the target curve from the frequency response curve, obtaining several center frequencies; and obtaining the target Q value and target equalization gain for different center frequencies.
[0075] like Figure 4As shown in the figure, after processing with the target filter, global target crossover point, and global target gain, the frequency response curve generally approaches the target curve. However, it still deviates significantly from the target curve at certain frequency points. For these areas, the center frequency is determined. Then, the corresponding equalizer is used for each center frequency. Based on the deviation between the frequency response curve and the target curve, the target Q value and target equalization gain of the equalizer are determined to bring the frequency response curve closer to the target curve. Figure 4 The area circled in the middle is the deviation area, from which the center frequency will be determined.
[0076] In one embodiment, searching for frequencies corresponding to regions deviating from a target curve in the frequency response curve to obtain a plurality of center frequencies includes: adjusting equalization gain using a second preset gain interval as a step size, adjusting the target curve based on the equalization gain, obtaining left and right intersection frequencies corresponding to intersections of the target curve and the frequency response curve at different equalization gains; and determining a corresponding center frequency based on each set of left and right intersection frequencies.
[0077] This embodiment uses a cyclic algorithm, defining an array N = [A - (T + G)], where A represents the frequency response curve array after processing using the target filter, the global target crossover frequency, and the global target gain; T represents the target curve array; and G represents the equalization gain. The equalization gain is adjusted starting from 0 with a second preset gain interval as the step size. For example, the second preset gain interval is set to 0.5, and array N is calculated for different equalization gains, such as 0, 0.5, and -0.5. The changes in array N can be used to determine whether the target curve and the frequency response curve intersect at each equalization gain. For example, when the gain is 0, the data at the corresponding position in array N at the 2k frequency is greater than 0, while when the gain is 0.5, the data at the corresponding position in array N at the 2k frequency is greater than 0, indicating that the target curve and the frequency response curve intersect. Intersecting points often occur in pairs and are considered left and right intersection points, respectively, based on their positional relationship. The corresponding frequencies at the intersection are the left and right intersection frequencies.
[0078] The left and right intersection frequencies are averaged, and the average is used as the center frequency.
[0079] In one embodiment, for different center frequencies, obtaining target Q values and target equalization gains includes: for each center frequency, adjusting the equalizer parameters with a first preset Q value interval as a step size and a third preset gain interval as a step size, and obtaining local equalizer parameters corresponding to the center frequency based on a second loss function between the frequency response curve and the target curve under different equalizer parameters; comparing the second loss function between the frequency response curve after adjustment of the local equalizer parameters and the target curve, screening the center frequencies corresponding to each local equalizer parameter, and obtaining several target center frequencies; for each target center frequency, adjusting the equalizer parameters with a second preset Q value interval as a step size and a fourth preset gain interval as a step size, and obtaining the target Q value and target equalization gain corresponding to the target center frequency based on the second loss function between the frequency response curve and the target curve under different equalizer parameters.
[0080] First, the center frequency needs to be screened to determine the target center frequency. Specifically, define the array Z = AQ-T+F+G, where A is the frequency response curve array, Q is the equalizer array, F is the filter array, G is the gain array, T is the target curve array, and the second loss function is the sum of the absolute values of the elements of the array Z, which is Y. For each center frequency, the equalizer parameters are adjusted through loop nesting with the first preset Q value interval as the step size and the third preset gain interval as the step size, and the second loss function under different equalizer parameters is calculated to obtain the equalizer parameters with the minimum second loss function, which are the local equalizer parameters corresponding to the center frequency. Then, each center frequency and its local equalizer parameters are taken as the equalizer as a whole, and the second loss functions between the equalizer as a whole are compared horizontally, so as to screen out several equalizer assemblages with smaller second loss functions, and their corresponding center frequencies are the target center frequencies.
[0081] After determining the target center frequency, a target Q value and target equalization gain corresponding to each target center frequency are calculated. Specifically, for each target center frequency, the equalizer parameters are adjusted using a second preset Q value interval and a fourth preset gain interval as a step size. Based on a second loss function between the frequency response curve and the target curve under different equalizer parameters, when the second loss function reaches a minimum, the equalizer parameters corresponding to the target center frequency are obtained, and the target Q value and target equalization gain are parsed.
[0082] In one embodiment, the first preset Q value interval and the third preset gain interval are relatively large to increase the cycle speed and improve the center frequency screening efficiency; the second preset Q value interval and the fourth preset gain interval are relatively small to determine a more accurate target Q value and target equalization gain. For example, if the first preset Q value interval is 0.5, the Q value range is 0.7 to 4, and the third preset gain interval is 2, the equalization gain range is 0 to 10; if the second preset Q value interval is 0.1, the Q value range is 0.7 to 6, and the fourth preset gain interval is 0.1, the equalization gain range is 0 to 10.
[0083] Usually, the number of equalizers is 12, so 12 target center frequencies can also be selected. After calculating the corresponding equalizer parameters in sequence, 12 equalizers can be obtained.
[0084] In one embodiment, after obtaining the target Q value and the target equalization gain, the method also includes: determining an evaluation value based on the target Q value and the target equalization gain; the evaluation value is the product of the square of the target Q value and the target equalization gain; comparing the evaluation value with a first threshold and a second threshold, if the evaluation value is not greater than the first threshold, retaining the target Q value and the target equalization gain corresponding equalizer parameters; if the evaluation value is greater than the first threshold and not greater than the second threshold, reducing the target equalization gain by one, retaining the target Q value and the adjusted target equalization gain corresponding equalizer parameters; if the evaluation value is greater than the second threshold, discarding the target Q value and the target equalization gain corresponding equalizer parameters.
[0085] Because equalization needs to take human hearing into account, equalizers are screened using Q and equalization gain. Specifically, the product of the square of the Q and the equalization gain is calculated as a critical estimate. If the value is less than or equal to a first threshold, equalization is considered usable. If the value is greater than the first threshold and less than or equal to a second threshold, the equalization gain is reduced by 1. If the value is greater than the second threshold, equalization is not used. Equalization parameters are provided based on the amount of equalization required by the user.
[0086] In this embodiment, the first threshold may be 54, and the second threshold may be 63. The specific values may be adjusted according to actual conditions.
[0087] In one embodiment, after determining the target filter, the global target crossover point, and the global target gain, the method further includes: automatically adjusting the phase in the sound system.
[0088] Phase can be viewed as the relationship between frequency and time. If there is no phase coupling, the phase curves do not overlap. Figure 5 As shown in (a), the boxed area is the area where the phase curves do not overlap.
[0089] The phase loss function is calculated based on the phase data, and the phase array is defined as the phase of the treble - the phase of the bass. The phase loss function is the sum of the absolute values of the elements of the phase array. Among them, the phase of the treble refers to the relative treble and bass formed according to the frequency size after the target crossover point is divided, and are sent to the corresponding speakers respectively. It should be noted that when encountering a phase curve fold (the phase curve is displayed from -180 degrees to +180 degrees. When the phase of the two frequencies is greater than 360 degrees, the phase curve folds), the phase array needs to be flipped by an algorithm, that is, the phase is added by 360, because one fold is equivalent to an extra 360 degrees.
[0090] With a delay of 0.01ms as a step, loop from -50ms to 50ms, find the delay when the phase loss function is the smallest, then increase the phase of one of the phase curves (treble phase curve or bass phase curve) by 180, that is, perform reverse polarity processing, and then with a delay of 0.01ms as a step, loop from -50ms to 50ms once, calculate the delay when the phase loss function is the smallest. Compare the two minimum phase loss function values to determine whether the phase curve needs to be reversed polarity; if the minimum phase loss function value with reverse polarity is smaller, the delay obtained after the reverse polarity processing is used as the delay required for the final debugging; otherwise, the delay obtained without the reverse polarity processing is used as the delay required for the final debugging. Adjust the speakers according to the final delay and polarity to make the phases of different speakers reach a coupled state. Such as Figure 5 As shown in (b), the boxed area is the area where the phase curves overlap after phase adjustment.
[0091] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0092] Based on the same inventive concept, embodiments of the present application also provide an automatic audio system debugging device for implementing the aforementioned automatic audio system debugging method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more embodiments of the automatic audio system debugging device provided below can be found in the above-described limitations of the automatic audio system debugging method and will not be further elaborated here.
[0093] In one embodiment, Figure 6 As shown, a sound system automatic debugging device is provided, comprising:
[0094] The acquisition module 602 is used to obtain the actual frequency response curve of the sound system at the site and obtain the target curve;
[0095] A filter selection module 604 is configured to obtain a first loss function between the frequency response curve and the target curve under different filters, and determine a target filter according to the first loss function;
[0096] An iterative calculation module 606 is configured to determine a current target crossover point based on the target filter and enter an iterative process, wherein the iterative process includes: determining a current target gain based on the current target crossover point using the gain as a variable; determining the current target crossover point based on the current target gain using the crossover point as a variable;
[0097] The frequency division module 608 is configured to stop iteration when a preset condition is met, obtain the current target frequency division point when the iteration stops as the global target frequency division point, and obtain the current target gain when the iteration stops as the global target gain;
[0098] The output module 610 is configured to debug the sound system according to the target filter, the global target crossover point, and the global target gain.
[0099] Each module in the aforementioned automatic audio system debugging device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0100] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in all the above method embodiments when executing the computer program.
[0101] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in all the above method embodiments are implemented.
[0102] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in all the above method embodiments when executed by a processor.
[0103] 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, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0104] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but are not limited to these.
[0105] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0106] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for automatic debugging of an audio system, characterized in that the method include: Obtain the actual frequency response curve of the sound system at the site and obtain the target curve; Obtain a first loss function between the frequency response curves and the target curve under different filters, and determine the target filter according to the first loss function; Determine the current target crossover point based on the target filter and enter an iterative process, the iterative process including: using the gain as a variable and determining the current target gain based on the current target crossover point; using the crossover point as a variable and determining the current target crossover point based on the current target gain; When the preset conditions are met, the iteration is stopped, and the current target frequency division point when the iteration is stopped is obtained as the global target frequency division point, and the current target gain when the iteration is stopped is obtained as the global target gain; Debug the sound system based on the target filter, global target crossover point and global target gain; After determining the target filter, the global target crossover frequency point, and the global target gain, the method further includes: Adjusting the equalization gain with a second preset gain interval as a step size, adjusting the target curve based on the equalization gain, and obtaining a left intersection frequency and a right intersection frequency corresponding to when the target curve intersects the frequency response curve at different equalization gains; Calculate the average of each group of left-intersection frequencies and right-intersection frequencies to determine the corresponding center frequency; For each center frequency, the equalizer parameters are adjusted with a first preset Q value interval as a step size and a third preset gain interval as a step size, and the local equalizer parameters corresponding to the center frequency are obtained based on a second loss function between the frequency response curve and the target curve under different equalizer parameters; Comparing the second loss function between the frequency response curve after the local equalizer parameters are adjusted and the target curve, screening the center frequencies corresponding to the local equalizer parameters to obtain several target center frequencies; and obtaining a target Q value and a target equalization gain based on the target center frequencies; After determining the target filter, global target crossover point, and global target gain, the phase in the audio system is automatically adjusted, including: Using a delay of 0.01ms as a step, loop from -50ms to 50ms to find the delay at which the phase loss function is minimum, and perform polarity reversal on the phase of the treble phase curve or the bass phase curve. Then, using a delay of 0.01ms as a step, loop from -50ms to 50ms once to calculate the delay at which the phase loss function is minimum. Compare the two minimum phase loss function values to determine whether the phase curve needs polarity reversal. If the minimum phase loss function value with reversed polarity is smaller, use the delay obtained after polarity reversal as the delay required for final debugging. Otherwise, use the delay obtained without polarity reversal as the delay required for final debugging. Adjust the speakers in the audio system according to the final delay and polarity so that the phases of different speakers are coupled.
2. The method according to claim 1, characterized in that Determining the current target gain based on the current target crossover frequency point includes: Based on the current target crossover point, the gain is adjusted with a first preset gain interval as a step size, and a gradient algorithm is used to obtain the current target gain; Determining the current target crossover point based on the current target gain includes: Based on the current target gain, the crossover point is adjusted with a preset frequency interval as the step size, and the current target crossover point is obtained using a gradient algorithm.
3. The method according to claim 1, characterized in that For different center frequencies, obtaining the target Q value and target equalization gain includes: For each target center frequency, the equalizer parameters are adjusted with a second preset Q value interval as a step size and a fourth preset gain interval as a step size, and the target Q value and target equalization gain corresponding to the target center frequency are obtained according to a second loss function between the frequency response curve and the target curve under different equalizer parameters.
4. The method according to claim 1, characterized in that After obtaining the target Q value and the target equalization gain, the method further includes: Determine an evaluation value based on the target Q value and the target equalization gain; the evaluation value is the product of the square of the target Q value and the target equalization gain; The evaluation value is compared with the first threshold and the second threshold. If the evaluation value is not greater than the first threshold, the target Q value and the target equalization gain corresponding equalizer parameters are retained; if the evaluation value is greater than the first threshold and not greater than the second threshold, the target equalization gain is reduced by one, and the target Q value and the adjusted target equalization gain corresponding equalizer parameters are retained; if the evaluation value is greater than the second threshold, the target Q value and the target equalization gain corresponding equalizer parameters are discarded.
5. An automatic debugging device for an audio system, characterized in that: The device includes: The acquisition module is used to obtain the actual frequency response curve of the sound system at the site and obtain the target curve; A filter selection module is used to obtain a first loss function between the frequency response curve and the target curve under different filters, and determine the target filter according to the first loss function; An iterative calculation module is used to determine the current target crossover point based on the target filter and enter an iterative process. The iterative process includes: using the gain as a variable and determining the current target gain based on the current target crossover point; using the crossover point as a variable and determining the current target crossover point based on the current target gain; The frequency division module is used to stop the iteration when the preset condition is reached, obtain the current target frequency division point when the iteration stops as the global target frequency division point, and obtain the current target gain when the iteration stops as the global target gain; Output module, used to debug the sound system according to the target filter, global target crossover point and global target gain; After determining the target filter, the global target crossover frequency point, and the global target gain, the method further includes: Adjusting the equalization gain with a second preset gain interval as a step size, adjusting the target curve based on the equalization gain, and obtaining a left intersection frequency and a right intersection frequency corresponding to when the target curve intersects the frequency response curve at different equalization gains; Calculate the average of each group of left-intersection frequencies and right-intersection frequencies to determine the corresponding center frequency; For each center frequency, the equalizer parameters are adjusted with a first preset Q value interval as a step size and a third preset gain interval as a step size, and the local equalizer parameters corresponding to the center frequency are obtained based on a second loss function between the frequency response curve and the target curve under different equalizer parameters; Comparing the second loss function between the frequency response curve after the local equalizer parameters are adjusted and the target curve, screening the center frequencies corresponding to the local equalizer parameters to obtain several target center frequencies; and obtaining a target Q value and a target equalization gain based on the target center frequencies; After determining the target filter, global target crossover point, and global target gain, the phase in the audio system is automatically adjusted, including: Using a delay of 0.01ms as a step, loop from -50ms to 50ms to find the delay at which the phase loss function is minimum, and perform polarity reversal on the phase of the treble phase curve or the bass phase curve. Then, using a delay of 0.01ms as a step, loop from -50ms to 50ms once to calculate the delay at which the phase loss function is minimum. Compare the two minimum phase loss function values to determine whether the phase curve needs polarity reversal. If the minimum phase loss function value with reversed polarity is smaller, use the delay obtained after polarity reversal as the delay required for final debugging. Otherwise, use the delay obtained without polarity reversal as the delay required for final debugging. Adjust the speakers according to the final delay and polarity to achieve phase coupling between different speakers.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Sound effect compensation method and device, earphone and storage medium
CN114157965A
Frequency response correction method and device, equipment and storage medium
CN117979207A