Room sound correction method and device of audio equipment, equipment and storage medium
By obtaining response data of multi-band test signals, combining time-frequency joint analysis and microphone calibration data, and optimizing algorithm fitting calculations, the problem of inaccurate correction parameters in existing technologies is solved, precise acoustic adjustment of audio equipment in the room is achieved, and the acoustic effect is improved.
Patent Information
- Application Number
- CN202510596716.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-09-12
AI Technical Summary
Existing room acoustic correction technology for audio equipment ignores other important acoustic parameters besides frequency attenuation, resulting in inaccurate correction parameters and an inability to effectively improve the acoustic effect of the audio equipment in the room.
By obtaining the room's response data to multi-band preset test signals, a joint time-frequency analysis method is used to extract frequency attenuation, reflection path, phase offset and reverberation time information. Compensation processing is performed in combination with microphone calibration data, and an optimization algorithm is used to fit and calculate the room-specific correction parameters, and the audio equipment is adjusted.
Significantly improves the accuracy of correction parameters, improves the acoustic effects of audio equipment in the room, and ensures the accuracy of frequency response, phase and reverberation effects.
Smart Images

Figure CN120640204A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of audio signal processing, and in particular to a room acoustic correction method, apparatus, device and storage medium for an audio device. Background Art
[0002] Existing room acoustic correction techniques for audio equipment typically first collect data on the room's response to a test signal. The room's frequency response data is extracted using simple frequency domain analysis methods, typically focusing only on frequency attenuation information. A frequency response curve is generated based on this attenuation information. A matching calculation is then performed between the preset ideal frequency curve and the frequency response curve to obtain correction parameters, which are then used to adjust the audio equipment's parameters. This existing technique focuses solely on frequency attenuation information and ignores other important acoustic parameters, resulting in an inaccurate frequency response curve. The matching method, which uses fixed empirical formulas or simple algorithms, cannot effectively adapt to the acoustic characteristics of different rooms. The resulting correction parameters are inaccurate, resulting in an ineffective improvement in the acoustic performance of the audio equipment within the room. Summary of the Invention
[0003] The present invention provides a room acoustic correction method, apparatus, device and storage medium for an audio device, so as to solve the technical problem that correction parameters generated in the prior art are not accurate enough.
[0004] A first aspect of the present invention provides a room acoustic correction method for an audio device, comprising: obtaining response data of a room to a preset test signal in multiple frequency bands, and extracting the room acoustic data using a joint time-frequency analysis method, wherein the room acoustic data includes frequency attenuation, reflection path, phase offset, and reverberation time information in different frequency bands; performing compensation processing based on the room acoustic data using preset microphone calibration data to obtain a calibrated frequency response curve; performing fitting calculations on a preset ideal frequency curve and the calibrated frequency response curve according to an optimization algorithm to obtain room-specific correction parameters; and making corresponding adjustments to the output of the audio device based on the correction parameters.
[0005] In a feasible embodiment, obtaining the room's response data to a multi-band preset test signal to obtain the room acoustic data includes: generating a multi-band preset test signal covering low frequency, mid frequency and high frequency through an audio device, and playing the test signals in the room; using multiple microphones to collect signal response data at multiple listening positions; and analyzing the response data using a time-frequency joint analysis method combining short-time Fourier transform and continuous wavelet transform to extract frequency attenuation, reflection path, phase shift and reverberation time information in different frequency bands to obtain the room acoustic data.
[0006] In a feasible embodiment, the method of generating a multi-band preset test signal covering low frequency, medium frequency and high frequency by an audio device and playing the test signal in a room includes: determining, based on a common operating frequency range of the audio device, the low frequency segment as a first frequency band range, the medium frequency segment as a second frequency band range, and the high frequency segment as a third frequency band range; within each frequency band range, uniformly selecting multiple frequency points according to logarithmic intervals to generate a sine wave signal; superimposing the sine wave signals of different frequency bands according to a preset amplitude ratio and phase relationship to form a multi-band preset test signal covering low frequency, medium frequency and high frequency, and playing the test signal in the room.
[0007] In a feasible embodiment, the compensation processing based on the room acoustic data is performed using preset microphone calibration data to obtain a calibrated frequency response curve, including: for different frequency bands, according to the frequency attenuation information in the room acoustic data, combined with the corresponding frequency response characteristics in the preset microphone calibration data, preliminary attenuation compensation is performed on the frequency response in the room response data; based on the reflection path information in the room acoustic data, the interference degree of different reflection paths on the signals of each frequency band is analyzed, and the frequency response of the preliminary attenuation compensation is corrected for reflection interference in combination with the calibration parameters regarding the influence of the reflection path in the microphone calibration data; according to the phase offset information in the room acoustic data, combined with the phase calibration value of the corresponding frequency band in the microphone calibration data, phase calibration is performed on the frequency response after reflection interference correction; based on the reverberation time information in the room acoustic data, combined with the calibration rules regarding the influence of reverberation time on frequency response in the microphone calibration data, reverberation time compensation is performed on the frequency response after phase calibration to obtain a calibrated frequency response curve.
[0008] In a feasible embodiment, for different frequency bands, according to the frequency attenuation information in the room acoustic data and combined with the corresponding frequency response characteristics in the preset microphone calibration data, preliminary attenuation compensation is performed on the frequency response in the room response data, including: dividing different frequency bands into multiple sub-bands; calculating the sum of the frequency attenuation value of each sub-band and the frequency response attenuation compensation value of the corresponding sub-band in the preset microphone calibration data as the preliminary attenuation compensation value of the corresponding sub-band; using the preliminary attenuation compensation value to compensate the frequency response of the corresponding sub-band extracted from the room response data; and integrating the compensated frequency responses of each sub-band according to the frequency band to which they belong to obtain the frequency response of the corresponding frequency band.
[0009] In a feasible embodiment, the reflection path information in the room acoustic data is based on the analysis of the interference degree of different reflection paths on the signals of each frequency band, and the frequency response of the preliminary attenuation compensation is corrected for reflection interference in combination with the calibration parameters regarding the influence of the reflection path in the microphone calibration data, including: determining the main reflection path and the secondary reflection path of the signal of each frequency band according to the reflection path information; for each frequency band, calculating the interference coefficient of the main reflection path and the secondary reflection path on the signal of the frequency band, the interference coefficient is determined based on the length of the reflection path, the material properties of the reflecting surface and the room layout; combining the calibration parameters regarding the influence of the reflection path in the microphone calibration data, the calibration parameters include the frequency response correction factor under different reflection path interference, and the frequency response of the corresponding frequency band after the preliminary attenuation compensation is corrected for reflection interference according to the interference coefficient and the correction factor.
[0010] In a feasible implementation manner, the phase calibration is performed on the frequency response after the reflection interference correction based on the phase offset information in the room acoustic data and the phase calibration value of the corresponding frequency band in the microphone calibration data, including: decomposing the phase offset information according to the frequency band to obtain the phase offset of each frequency band; for each frequency band, adding the phase offset of each frequency band to the phase calibration value of the corresponding frequency band in the microphone calibration data to obtain the phase calibration compensation value of the frequency band; and using the phase calibration compensation value to phase calibrate the frequency response of the corresponding frequency band after the reflection interference correction.
[0011] In a feasible implementation, performing reverberation time compensation on the frequency response after phase calibration based on the reverberation time information in the room acoustic data in combination with a calibration rule regarding the effect of reverberation time on frequency response in the microphone calibration data to obtain a calibrated frequency response curve includes: determining the reverberation time lengths of different frequency bands based on the reverberation time information; and performing reverberation time compensation on the frequency response of each frequency band after phase calibration based on the reverberation time length and a corresponding compensation coefficient using the calibration rule regarding the effect of reverberation time on frequency response in the microphone calibration data, wherein the calibration rule defines the compensation coefficient for the frequency response of each frequency band at different reverberation time lengths.
[0012] In a feasible embodiment, the fitting calculation of the preset ideal frequency curve and the calibrated frequency response curve according to the optimization algorithm to obtain room-specific correction parameters includes: discretizing the preset ideal frequency curve and the calibrated frequency response curve in the same frequency band to obtain a discretized ideal frequency point set and a calibration frequency point set; selecting a preset optimization algorithm, taking the discretized ideal frequency point set as the target and the calibration frequency point set as the initial value, and constructing an objective function, wherein the objective function is used to measure the error between the calibration frequency point set and the ideal frequency point set; using the optimization algorithm to iteratively optimize the objective function, and continuously adjusting the parameters corresponding to the calibration frequency point set during the iteration process until a preset convergence condition is met; when the convergence condition is met, determining the finally adjusted parameters as the room-specific correction parameters.
[0013] In a feasible embodiment, the discretization processing of the preset ideal frequency curve and the calibrated frequency response curve on the same frequency band to obtain the discretized ideal frequency point set and the calibration frequency point set includes: determining the discretized frequency band interval, wherein the frequency band interval is determined according to the frequency resolution of the audio device and the acoustic characteristics of the room; according to the frequency band interval, starting from the starting frequency of the preset ideal frequency curve and the calibrated frequency response curve, the frequency values corresponding to the center frequency of each frequency band are selected in sequence as the discretized frequency points; the frequency values corresponding to the ideal frequency curve at each discretized frequency point are formed into an ideal frequency point set, and the frequency values corresponding to the calibrated frequency response curve at each discretized frequency point are formed into a calibration frequency point set.
[0014] In a feasible implementation, the objective function is iteratively optimized using the optimization algorithm, and the parameters corresponding to the calibration frequency point set are continuously adjusted during the iteration process until a preset convergence condition is met, including: in each iteration, the gradient of the objective function with respect to the parameter is calculated according to the selected optimization algorithm or the least squares problem is directly solved to obtain the adjustment amount of the parameter; the parameters corresponding to the calibration frequency point set are updated according to the adjustment amount; the objective function value after the updated parameter is calculated and compared with the objective function value of the previous iteration; if the difference between the objective function values of the two iterations is less than a preset threshold, or the number of iterations reaches a preset maximum number of iterations, it is determined that the convergence condition is met and the iteration is stopped; otherwise, the next iteration is continued.
[0015] In a feasible embodiment, the room acoustic correction method of the audio device further includes: real-time monitoring of changes in environmental parameters of the room; when the monitored changes in environmental parameters exceed a preset threshold, automatically reacquiring the room's response data to a multi-band preset test signal, and re-executing a subsequent acoustic correction process based on the new response data to generate room-specific correction parameters adapted to the new environment, thereby re-adjusting the output of the audio device.
[0016] A second aspect of the present invention provides a room acoustic correction device for an audio device, comprising: an acquisition module for acquiring response data of a room to a preset test signal in multiple frequency bands, and extracting room acoustic data using a time-frequency joint analysis method, wherein the room acoustic data includes frequency attenuation, reflection path, phase offset, and reverberation time information in different frequency bands; a processing module for performing compensation processing based on the room acoustic data using preset microphone calibration data to obtain a calibrated frequency response curve; a fitting module for performing fitting calculations on a preset ideal frequency curve and the calibrated frequency response curve according to an optimization algorithm to obtain room-specific correction parameters; and an adjustment module for making corresponding adjustments to the output of the audio device according to the correction parameters.
[0017] In a feasible embodiment, the acquisition module includes: a playback unit, which is used to generate multiple preset test signals covering low frequency, medium frequency and high frequency through an audio device, and play the test signals in the room; an acquisition unit, which is used to use multiple microphones to collect signal response data at multiple listening positions; and an extraction unit, which is used to analyze the response data using a time-frequency joint analysis method combining short-time Fourier transform and continuous wavelet transform, extract frequency attenuation, reflection path, phase offset and reverberation time information of different frequency bands, and obtain room acoustic data.
[0018] In a feasible embodiment, the playback unit is specifically used to: determine, based on the commonly used operating frequency range of the audio device, the low frequency segment as the first frequency segment, the mid-frequency segment as the second frequency segment, and the high frequency segment as the third frequency segment; within each frequency segment, evenly select multiple frequency points according to logarithmic intervals to generate a sine wave signal; superimpose the sine wave signals of different frequency bands according to a preset amplitude ratio and phase relationship to form a multi-band preset test signal covering low frequency, mid-frequency and high frequency, and play the test signal in the room.
[0019] In a feasible embodiment, the processing module includes: a first compensation unit, which is used to perform preliminary attenuation compensation on the frequency response in the room response data for different frequency bands according to the frequency attenuation information in the room acoustic data and the corresponding frequency response characteristics in the preset microphone calibration data; a correction unit, which is used to analyze the degree of interference of different reflection paths on the signals of each frequency band based on the reflection path information in the room acoustic data, and perform reflection interference correction on the frequency response of the preliminary attenuation compensation in combination with the calibration parameters of the reflection path influence in the microphone calibration data; a calibration unit, which is used to perform phase calibration on the frequency response after reflection interference correction according to the phase offset information in the room acoustic data and the phase calibration value of the corresponding frequency band in the microphone calibration data; a second compensation unit, which is used to perform reverberation time compensation on the frequency response after phase calibration based on the reverberation time information in the room acoustic data and the calibration rules on the influence of reverberation time on frequency response in the microphone calibration data, to obtain a calibrated frequency response curve.
[0020] In a feasible embodiment, the first compensation unit is specifically used to: divide different frequency bands into multiple sub-bands; calculate the sum of the frequency attenuation value of each sub-band and the frequency response attenuation compensation value of the corresponding sub-band in the preset microphone calibration data as the preliminary attenuation compensation value of the corresponding sub-band; use the preliminary attenuation compensation value to compensate the frequency response of the corresponding sub-band extracted from the room response data; and integrate the compensated frequency responses of each sub-band according to the frequency band to which they belong to obtain the frequency response of the corresponding frequency band.
[0021] In a feasible embodiment, the correction unit is specifically used to: determine the main reflection path and secondary reflection path of each frequency band signal based on the reflection path information; for each frequency band, calculate the interference coefficient of the main reflection path and the secondary reflection path on the frequency band signal, and the interference coefficient is determined based on the length of the reflection path, the material properties of the reflecting surface and the room layout; combine the calibration parameters regarding the influence of the reflection path in the microphone calibration data, the calibration parameters include the frequency response correction factor under different reflection path interferences, and perform reflection interference correction on the frequency response of the corresponding frequency band after preliminary attenuation compensation according to the interference coefficient and the correction factor.
[0022] In a feasible embodiment, the calibration unit is specifically used to: decompose the phase offset information according to frequency bands to obtain the phase offset of each frequency band; for each frequency band, add the phase offset of each frequency band to the phase calibration value of the corresponding frequency band in the microphone calibration data to obtain the phase calibration compensation value of the frequency band; use the phase calibration compensation value to phase calibrate the frequency response of the corresponding frequency band after correction of the reflection interference.
[0023] In a feasible implementation manner, the second compensation unit is specifically configured to: determine, based on the reverberation time information, reverberation time lengths of different frequency bands; and for each frequency band, utilize a calibration rule regarding the influence of reverberation time on frequency response in the microphone calibration data to perform reverberation time compensation on the frequency response of the frequency band after phase calibration, based on the reverberation time length and a corresponding compensation coefficient, wherein the calibration rule defines the compensation coefficient for the frequency response of each frequency band at different reverberation time lengths.
[0024] In a feasible embodiment, the fitting module includes: a processing unit, which is used to discretize the preset ideal frequency curve and the calibrated frequency response curve in the same frequency band to obtain a discretized ideal frequency point set and a calibration frequency point set; a construction unit, which is used to select a preset optimization algorithm, take the discretized ideal frequency point set as the target, and the calibration frequency point set as the initial value, to construct an objective function, and the objective function is used to measure the error between the calibration frequency point set and the ideal frequency point set; an iteration unit, which is used to iteratively optimize the objective function using the optimization algorithm, and continuously adjust the parameters corresponding to the calibration frequency point set during the iteration process until the preset convergence conditions are met; and a determination unit, which is used to determine the finally adjusted parameters as room-specific correction parameters when the convergence conditions are met.
[0025] In a feasible embodiment, the processing unit is specifically used to: determine the discretized frequency band interval, where the frequency band interval is determined based on the frequency resolution of the audio device and the acoustic characteristics of the room; according to the frequency band interval, starting from the starting frequency of the preset ideal frequency curve and the calibrated frequency response curve, the frequency values corresponding to the center frequency of each frequency band are selected in sequence as discretized frequency points; the frequency values corresponding to the ideal frequency curve at each discretized frequency point are formed into an ideal frequency point set, and the frequency values corresponding to the calibrated frequency response curve at each discretized frequency point are formed into a calibration frequency point set.
[0026] In a feasible embodiment, the iteration unit is specifically used to: in each iteration process, calculate the gradient of the objective function with respect to the parameter according to the selected optimization algorithm or directly solve the least squares problem to obtain the adjustment amount of the parameter; update the parameters corresponding to the calibration frequency point set according to the adjustment amount; calculate the objective function value after the updated parameter, and compare it with the objective function value of the previous iteration; if the difference between the objective function values of the two iterations is less than a preset threshold, or the number of iterations reaches a preset maximum number of iterations, it is determined that the convergence condition is met and the iteration is stopped; otherwise, proceed to the next iteration.
[0027] In a feasible implementation manner, the room acoustics correction method for an audio device further includes: The environmental adaptation module is used to monitor changes in the room's environmental parameters in real time. When the monitored environmental parameter changes exceed a preset threshold, it automatically re-acquires the room's response data to the multi-band preset test signal and re-executes the subsequent acoustic correction process based on the new response data to generate room-specific correction parameters adapted to the new environment, thereby further adjusting the output of the audio device.
[0028] A third aspect of the present invention provides an electronic device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the electronic device executes the above-mentioned room acoustic correction method for an audio device.
[0029] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned room acoustics correction method for an audio device.
[0030] In the technical solution provided by the present invention, response data of a room to a preset multi-band test signal is obtained, and a time-frequency joint analysis method is used to extract room acoustic data, wherein the room acoustic data includes frequency attenuation, reflection path, phase offset, and reverberation time information of different frequency bands. Based on the room acoustic data, compensation processing is performed using preset microphone calibration data to obtain a calibrated frequency response curve. A preset ideal frequency curve and the calibrated frequency response curve are fitted and calculated according to an optimization algorithm to obtain room-specific correction parameters. The output of the audio device is correspondingly adjusted according to the correction parameters. In an embodiment of the present invention, by obtaining the room's response data to a multi-band preset test signal and using a time-frequency joint analysis method to extract the room acoustic data, the frequency attenuation, reflection path, phase offset, and reverberation time information of different frequency bands are comprehensively covered, thereby enabling a more accurate understanding of the room's acoustic characteristics. Based on the comprehensive and accurate room acoustic data, compensation processing is performed using preset microphone calibration data, and the preset ideal frequency curve and the calibrated frequency response curve are fitted according to an optimization algorithm to obtain room-specific correction parameters, thereby significantly improving the accuracy of the correction parameters. The output of the audio device is then adjusted accordingly based on the correction parameters, effectively improving the acoustic effect of the audio device in the room. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A schematic diagram of an embodiment of a method for correcting room acoustics of an audio device according to an embodiment of the present invention; Figure 2 A schematic diagram of another embodiment of a method for correcting room acoustics of an audio device according to an embodiment of the present invention; Figure 3FIG1 is a schematic diagram of yet another embodiment of a method for correcting room acoustics of an audio device according to an embodiment of the present invention; Figure 4 A schematic diagram of an embodiment of a room acoustic correction device for an audio device according to an embodiment of the present invention; Figure 5 A schematic diagram of another embodiment of a room acoustics correction device for an audio device according to an embodiment of the present invention; Figure 6 FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The embodiments of the present invention provide a room acoustic correction method, apparatus, device, and storage medium for an audio device, which improve the accuracy of correction parameters and the correction effect, and effectively improve the impact of the room acoustic environment.
[0033] The terms "first," "second," "third," "fourth," and so on (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that shown or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, product, or apparatus.
[0034] It is understandable that the execution subject of the present invention may be a room acoustic correction device for an audio device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0035] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 An embodiment of a room acoustic correction method for an audio device according to an embodiment of the present invention includes: 101. Obtaining the room's response data to a multi-band preset test signal and extracting the room's acoustic data using a time-frequency joint analysis method. The room's acoustic data includes frequency attenuation, reflection path, phase shift, and reverberation time information for different frequency bands. The audio device plays a multi-band test signal, covering sweeps and pulses from low to high frequencies, and uses a microphone to collect room reflection data. This can be done with a single, moving microphone or multiple microphones. Short-time Fourier transforms are used to analyze frequency domain attenuation characteristics, while wavelet transforms are combined to detect transient reflection components. The energy attenuation curve for each frequency band, along with the delay and direction of the early reflection path, phase offset, and reverberation time, are extracted.
[0036] 102. Based on the room acoustic data, compensation processing is performed using preset microphone calibration data to obtain a calibrated frequency response curve; Due to factors such as the microphone's own characteristics and the collection environment, the collected room acoustic data may have certain deviations. The preset microphone calibration data contains correction information for factors such as microphone characteristics. By combining the microphone calibration data with the room acoustic data, the frequency response-related parts of the room acoustic data are adjusted to obtain a calibrated frequency response curve. The calibrated frequency response curve can more accurately reflect the impact of the room's actual acoustic characteristics on the audio frequency response.
[0037] When using preset microphone calibration data for compensation processing based on room acoustic data, first clarify the correlation between the characteristics of each frequency band; for frequency attenuation in different frequency bands, combine the gain deviation of the frequency band in the microphone calibration data to correct the frequency attenuation value in the room acoustic data; for reflection paths, adjust the reflection path delay and direction data based on the microphone's calibration of signal reception characteristics in different directions; for phase offset, refer to the phase response of the microphone calibration to correct the phase information in the room acoustic data; the reverberation time is also optimized in combination with the calibration parameters of the microphone for reverberation signal acquisition; finally, combine these corrections to obtain a more accurate calibrated frequency response curve.
[0038] 103. Perform fitting calculation on the preset ideal frequency curve and the calibrated frequency response curve according to the optimization algorithm to obtain room-specific correction parameters; The preset ideal frequency curve represents the desired frequency response of an audio device in an ideal acoustic environment. The calibrated frequency response curve reflects the effect of the actual room acoustics on the device's frequency response. Through an optimization algorithm, various parameters are continuously adjusted to bring the calibrated frequency response curve as close to the ideal frequency curve as possible. Ultimately, a set of room-specific correction parameters is obtained that accurately describes the impact of the room's acoustic characteristics on the audio device. These correction parameters include frequency adjustment, phase correction, and reverberation control.
[0039] The frequency data of each frequency point on the preset ideal frequency curve is used as the target value, and the corresponding frequency data on the calibrated frequency response curve is used as the observation value. The square of the error between each pair of frequency point data is calculated and accumulated to obtain the total error. By iteratively adjusting the correction parameters, such as frequency gain and phase offset, the shape of the calibrated frequency response curve is continuously changed, so that the total error is gradually reduced. When the total error reaches the preset minimum threshold or the number of iterations reaches the upper limit, the correction parameter is stopped. At this time, the correction parameter obtained can make the calibrated frequency response curve fit the ideal frequency curve to the greatest extent. This parameter is the room-specific correction parameter.
[0040] 104. Adjust the output of the audio device accordingly according to the correction parameters.
[0041] According to the frequency adjustment information in the correction parameters, the amplitude of the audio signal in different frequency bands is increased or decreased through the filter to compensate for the frequency response deviation caused by the acoustic characteristics of the room; according to the phase correction data in the correction parameters, the phase of the audio signal is corrected by the phase adjustment circuit to eliminate phase distortion caused by factors such as room reflection; at the same time, according to the instructions on reverberation control in the correction parameters, the reverberation effect of the audio signal is dynamically adjusted using the reverberation algorithm to make the audio playback effect in the room clearer and more natural, thereby achieving accurate adjustment of the audio device output according to the correction parameters.
[0042] In an embodiment of the present invention, by obtaining the room's response data to a multi-band preset test signal and using a time-frequency joint analysis method to extract the room acoustic data, the frequency attenuation, reflection path, phase offset, and reverberation time information of different frequency bands are comprehensively covered, thereby enabling a more accurate understanding of the room's acoustic characteristics. Based on the comprehensive and accurate room acoustic data, compensation processing is performed using preset microphone calibration data, and the preset ideal frequency curve and the calibrated frequency response curve are fitted according to an optimization algorithm to obtain room-specific correction parameters, thereby significantly improving the accuracy of the correction parameters. The output of the audio device is then adjusted accordingly based on the correction parameters, effectively improving the acoustic effect of the audio device in the room.
[0043] See also Figure 2 Another embodiment of the room acoustics correction method for an audio device according to the present invention includes: 201. Generate multiple preset test signals covering low frequency, mid frequency and high frequency through audio equipment, and play the test signals in the room; According to the common operating frequency range of audio equipment, the low frequency segment is determined as the first frequency segment, the mid-frequency segment is determined as the second frequency segment, and the high frequency segment is determined as the third frequency segment. Within each frequency segment, multiple frequency points are evenly selected at logarithmic intervals to generate a sine wave signal. The sine wave signals of different frequency bands are superimposed according to a preset amplitude ratio and phase relationship to form a multi-band preset test signal covering low frequency, mid-frequency and high frequency, and the test signal is played in the room.
[0044] For example, for the low frequency band, determine the first frequency range to be 20Hz - 200Hz. Within this frequency range, select 10 frequency points evenly spaced logarithmically. For example, starting at 20Hz, the subsequent frequency points are 25.12Hz, 31.62Hz, 39.81Hz, 50.12Hz, 63.10Hz, 79.43Hz, 100Hz, 125.89Hz, and 158.49Hz. Generate sine wave signals for these frequency points.
[0045] The mid-frequency band is used as the second frequency range and is set to 200Hz - 2000Hz. Similarly, 20 frequency points can be evenly selected according to logarithmic intervals. For example, after 200Hz, 251.19Hz, 316.23Hz, 398.11Hz, and so on, up to 2000Hz, and corresponding sine wave signals can be generated for these frequency points.
[0046] The high frequency band, or the third frequency band, is defined as 2000Hz - 20000Hz. Within this wide frequency band, 30 frequency points can be evenly selected at logarithmic intervals, starting at 2000Hz and continuing through 20000Hz, such as 2511.89Hz, 3162.28Hz, and so on, to generate the corresponding sine wave signal.
[0047] After generating sinusoidal signals of different frequency bands, they are superimposed according to preset amplitude ratios and phase relationships. For example, the amplitude of the low-frequency signal can be set to 0.8 times that of the mid-frequency signal, and the amplitude of the high-frequency signal to 0.6 times that of the mid-frequency signal. Regarding the phase relationship, the phase difference between the low-frequency and mid-frequency signals can be set to 0, and the phase difference between the high-frequency and mid-frequency signals can be set to π / 4. Through this setting, the sinusoidal signals of different frequency bands are superimposed to form a multi-band preset test signal covering low, mid, and high frequencies.
[0048] 202. Collecting signal response data at multiple listening positions using multiple microphones; Multiple listening positions are set up in the room, and a microphone is placed at each listening position. When a multi-band preset test signal is played in the room, these microphones start working simultaneously to collect response data generated by the signal at different locations in the room.
[0049] 203. The response data is analyzed using a time-frequency joint analysis method combining short-time Fourier transform and continuous wavelet transform to extract frequency attenuation, reflection path, phase shift, and reverberation time information of different frequency bands to obtain room acoustic data; By using short-time Fourier transform to perform frequency domain analysis on the collected response data, the frequency attenuation characteristics of different frequency bands can be clearly observed. At the same time, the transient reflection component is detected in combination with continuous wavelet transform, which can effectively extract the reflection path information. The phase offset is obtained by analyzing the phase information, and the reverberation time is calculated using relevant algorithms. By integrating the information extracted from these different aspects, the room acoustic data containing frequency attenuation, reflection path, phase offset and reverberation time information of different frequency bands is finally obtained.
[0050] 204. For different frequency bands, perform preliminary attenuation compensation on the frequency response in the room response data according to the frequency attenuation information in the room acoustic data and the corresponding frequency response characteristics in the preset microphone calibration data; Different frequency bands are divided into multiple sub-bands; the sum of the frequency attenuation value of each sub-band and the frequency response attenuation compensation value of the corresponding sub-band in the preset microphone calibration data is calculated as the preliminary attenuation compensation value of the corresponding sub-band; the preliminary attenuation compensation value is used to compensate the frequency response of the corresponding sub-band extracted from the room response data; the compensated frequency responses of each sub-band are integrated according to the frequency band to which they belong to obtain the frequency response of the corresponding band.
[0051] Different frequency bands such as low frequency, mid frequency, and high frequency are further refined into multiple sub-bands. For example, the low frequency band can be divided into 20-50Hz, 50-100Hz, and 100-200Hz. The sub-bands, mid-bands and high-bands are also divided at appropriate intervals; a frequency attenuation value of each sub-band is extracted from the room acoustic data, and the attenuation value reflects the degree of attenuation of the sub-band signal by the room acoustic environment; a frequency response attenuation compensation value of the corresponding sub-band in the preset microphone calibration data is obtained, and the compensation value is obtained based on the microphone's own characteristics and the standard test environment; the frequency attenuation value of each sub-band is added to the frequency response attenuation compensation value of the corresponding sub-band in the preset microphone calibration data to obtain a preliminary attenuation compensation value of the corresponding sub-band; using the preliminary attenuation compensation value, a linear compensation algorithm or a nonlinear compensation algorithm is used to compensate the frequency response of the corresponding sub-band extracted from the room response data to correct the frequency response deviation caused by the room acoustic environment and the microphone characteristics; the frequency responses of the compensated sub-bands are orderly integrated according to the frequency bands to which they belong, and a more accurate frequency response of the corresponding band is obtained by weighted averaging or other integration algorithms.
[0052] Among them, if the frequency attenuation value in the room acoustic data of the i-th sub-band is A r,i , the frequency response attenuation compensation value of the corresponding sub-band in the microphone calibration data is A m,i , then the initial attenuation compensation value A of this sub-band c,i The calculation formula is: A c,i =A r,i +A m,i If the original frequency response amplitude of the i-th sub-band extracted from the room response data is M r,i , the frequency response amplitude M after the initial attenuation compensation c-r,i It can be calculated by the linear compensation formula:
[0053] Here we use This is because the frequency response is usually measured in decibels (dB), and the conversion relationship between amplitude and decibel is A=20log 10 (M), so this formula is used when converting from the decibel compensation value back to the amplitude compensation factor.
[0054] If the jth frequency band is divided into n sub-bands, the frequency response amplitude of the kth sub-band after compensation is , the corresponding weight is , then the frequency response amplitude after integration of this frequency band is The calculation formula is:
[0055] 205. Based on the reflection path information in the room acoustic data, analyze the interference degree of different reflection paths on the signals in each frequency band. Combined with the calibration parameters regarding the influence of the reflection paths in the microphone calibration data, perform reflection interference correction on the frequency response of the preliminary attenuation compensation. Based on the reflection path information, the main reflection path and secondary reflection path of the signal in each frequency band are determined; for each frequency band, the interference coefficient of the main reflection path and the secondary reflection path on the signal in that frequency band is calculated, and the interference coefficient is determined based on the length of the reflection path, the material properties of the reflecting surface, and the room layout; combined with the calibration parameters regarding the influence of the reflection path in the microphone calibration data, the calibration parameters include the frequency response correction factor under different reflection path interferences, and the reflection interference correction is performed on the frequency response of the corresponding frequency band after the preliminary attenuation compensation based on the interference coefficient and the correction factor.
[0056] Based on the reflection path information, the signal energy proportion of each path is counted. The path with a high proportion and a great impact on sound quality is defined as the main reflection path; the path with a low energy proportion and a lesser impact is defined as the secondary reflection path.
[0057] For each frequency band, when calculating the interference coefficient of the primary and secondary reflection paths on the signal in that frequency band, we first set a basic interference factor based on the length of the reflection path. Generally, the longer the path, the smaller the basic interference factor. The impact of length on interference can be quantified according to the inverse rule of path length. Next, based on the material properties of the reflecting surface, the sound absorption coefficient is used to determine the material influence factor. The larger the sound absorption coefficient, the more sound energy the material absorbs, the less sound energy is reflected, and the less interference to the signal. The material influence factor can be set as 1 minus the sound absorption coefficient. Then, the layout influence factor is constructed based on the distribution density of obstacles in the room layout. The denser the obstacle distribution, the more complex the reflection and scattering effects on the signal, and the greater the interference. Finally, these three factors are weighted and summed according to certain weights to obtain the interference coefficient of the reflection path on the signal in this frequency band.
[0058] Assume the length of the reflection path is , and its basic interference factor is , ,in is a constant coefficient related to the length, which is used to adjust the magnitude of the basic interference factor; the sound absorption coefficient of the reflecting surface is , the material influence factor is ; The distribution density of obstacles in the room layout is , the layout impact factor is ,in, ,in is a constant coefficient related to layout; let the weights of the three factors be 、 and ,and , then the calculation formula of the interference coefficient I of the reflection path to the signal in this frequency band is:
[0059] 206. Perform phase calibration on the frequency response after the reflection interference correction based on the phase offset information in the room acoustic data and the phase calibration value of the corresponding frequency band in the microphone calibration data; The phase offset information is decomposed according to the frequency band to obtain the phase offset of each frequency band; for each frequency band, the phase offset of each frequency band is added to the phase calibration value of the corresponding frequency band in the microphone calibration data to obtain the phase calibration compensation value of the frequency band; the phase calibration compensation value is used to phase calibrate the frequency response of the corresponding frequency band after the reflection interference correction.
[0060] When performing the phase calibration operation, the phase offset information is first accurately extracted from the room acoustic data. The phase offset information reflects the phase change caused by the influence of the acoustic environment during the signal propagation in the room; then, according to the frequency band division rule, the extracted phase offset information is divided into different frequency bands such as low frequency, medium frequency, and high frequency, so as to obtain the phase offset corresponding to each frequency band; then, the phase calibration value corresponding to each frequency band in the microphone calibration data is obtained. These calibration values are based on the test data of the microphone under a standard environment and are used to compensate for the influence of the microphone's own characteristics on the phase; for each frequency band, the phase offset of the frequency band is added to the phase calibration value of the corresponding frequency band in the microphone calibration data to obtain the phase calibration compensation value of the frequency band; finally, the calculated phase calibration compensation value is used to perform phase calibration on the frequency response of the corresponding frequency band after correction for reflection interference.
[0061] Assume the phase offset of the i-th frequency band is , the phase calibration value of the i-th frequency band in the microphone calibration data is , then the phase calibration compensation value of the i-th frequency band is The calculation formula is:
[0062] After obtaining the phase calibration compensation value, the frequency response of the i-th frequency band after the reflection interference correction is phase-calibrated. Assume that the frequency response signal of the i-th frequency band after the reflection interference correction is ,in is the amplitude function, is the center frequency of the band, is the original phase function, and the signal after phase calibration is It can be expressed as:
[0063] 207. Based on the reverberation time information in the room acoustic data and the calibration rules regarding the effect of reverberation time on frequency response in the microphone calibration data, reverberation time compensation is performed on the frequency response after phase calibration to obtain a calibrated frequency response curve; Based on the reverberation time information, the reverberation time length of different frequency bands is determined. For each frequency band, the calibration rules regarding the impact of reverberation time on frequency response in the microphone calibration data are used to perform reverberation time compensation on the frequency response of the frequency band after phase calibration according to its reverberation time length and the corresponding compensation coefficient. The calibration rules define the compensation coefficient of the frequency response of each frequency band under different reverberation time lengths.
[0064] Determine the reverberation time lengths of different frequency bands such as low frequency, mid frequency, and high frequency. The reverberation time reflects the time it takes for sound to stop emitting sound in the room and for the sound pressure level to decay to a certain value. Due to the different propagation characteristics of different frequency bands in the room, the reverberation time will also be different; then, obtain the calibration rules for the influence of reverberation time on frequency response in the microphone calibration data. This calibration rule is based on a large amount of experimental data and theoretical analysis, and clarifies the compensation coefficients required for the frequency response of each frequency band under different reverberation time lengths. For each frequency band, according to its determined reverberation time length, find the corresponding compensation coefficient in the calibration rule, and then use the compensation coefficient to compensate for the reverberation time of the frequency response of the frequency band after phase calibration. The compensation method is usually to adjust the amplitude or phase of the frequency response accordingly to offset the deviation of the frequency response caused by too long or too short reverberation time, and finally obtain the calibrated frequency response curve.
[0065] 208. Perform fitting calculation on the preset ideal frequency curve and the calibrated frequency response curve according to the optimization algorithm to obtain room-specific correction parameters; 209. Adjust the output of the audio device accordingly according to the correction parameters.
[0066] In an embodiment of the present invention, multiple preset test signals are generated by an audio device and played in a room. Response data is collected using multiple microphones, and a time-frequency joint analysis method is used to extract room acoustic data. Combined with preset microphone calibration data, preliminary attenuation compensation, reflection interference correction, phase calibration, and reverberation time compensation are performed on the frequency response of the room response data in sequence to obtain a calibrated frequency response curve. Finally, based on an optimization algorithm, the ideal frequency curve and the calibrated curve are fitted to obtain room-specific correction parameters and adjust the audio device output. This method can accurately adapt to the room acoustic characteristics, improve the accuracy of the correction parameters, and significantly enhance the audio output quality of the audio device in a specific room.
[0067] See also Figure 3 Another embodiment of the room acoustics correction method for an audio device in the embodiment of the present invention includes: 301. Obtain response data of the room to a multi-band preset test signal, and extract room acoustic data using a time-frequency joint analysis method, where the room acoustic data includes frequency attenuation, reflection path, phase shift, and reverberation time information of different frequency bands; 302. Based on the room acoustic data, compensation processing is performed using preset microphone calibration data to obtain a calibrated frequency response curve; 303. Discretize the preset ideal frequency curve and the calibrated frequency response curve in the same frequency band to obtain a discretized ideal frequency point set and a calibrated frequency point set; Determine the discretized frequency band interval, which is determined based on the frequency resolution of the audio equipment and the acoustic characteristics of the room; according to the frequency band interval, starting from the starting frequency of the preset ideal frequency curve and the calibrated frequency response curve, select the frequency values corresponding to the center frequency of each frequency band in turn as the discretized frequency points; the frequency values corresponding to the ideal frequency curve at each discretized frequency point are combined into an ideal frequency point set, and the frequency values corresponding to the calibrated frequency response curve at each discretized frequency point are combined into a calibration frequency point set.
[0068] Based on the predetermined frequency band interval, starting from the common starting frequency position of the preset ideal frequency curve and the calibrated frequency response curve, the first frequency band range is determined, the center frequency value of the frequency band is calculated and selected as the first discretized frequency point; starting from the end frequency of the frequency band, the next frequency band is determined according to the frequency band interval, and the center frequency value of this frequency band is calculated again as the second discretized frequency point; and so on, proceeding along the frequency axis in sequence, continuously dividing the frequency bands, calculating the center frequencies and selecting them until the entire frequency range to be analyzed is covered, thereby obtaining a series of discrete frequency points in sequence.
[0069] 304. Select a preset optimization algorithm, take the discretized ideal frequency point set as the target and the calibration frequency point set as the initial value, and construct an objective function, where the objective function is used to measure the error between the calibration frequency point set and the ideal frequency point set; If the gradient descent method is used, the target state expected to be achieved by the frequency value corresponding to each point in the discretized ideal frequency point set is used as the benchmark, and the calibration frequency point set is used as the initial input value of the algorithm iteration. The objective function is constructed by calculating the sum of the squares of the differences between the calibration frequency point set and the ideal frequency point set at the corresponding frequency points. This objective function can intuitively reflect the degree of error between the two. If the least squares method is used, the ideal frequency point set is also used as the target, and the calibration frequency point set is used as the initial value. The objective function constructed is the sum of the squares of the errors between the calibration frequency point set and the ideal frequency point set at each discrete frequency point, which is used to measure the error between the two.
[0070] 305. Iteratively optimize the objective function using an optimization algorithm, and continuously adjust the parameters corresponding to the calibration frequency point set during the iterative process until a preset convergence condition is met; During each iteration, the gradient of the objective function with respect to the parameters is calculated according to the selected optimization algorithm or the least squares problem is directly solved to obtain the parameter adjustment amount; the parameters corresponding to the calibration frequency point set are updated according to the adjustment amount; the objective function value after the updated parameters is calculated and compared with the objective function value of the previous iteration; if the difference between the objective function values of the two iterations is less than a preset threshold, or the number of iterations reaches the preset maximum number of iterations, it is determined that the convergence condition is met and the iteration is stopped; otherwise, the next iteration is continued.
[0071] In each iteration, if the gradient descent method is used as the optimization algorithm, the partial derivatives of the objective function with respect to the parameters corresponding to the calibration frequency point set are calculated according to the principle of gradient descent. This gradient indicates the parameter adjustment direction that will most rapidly decrease the objective function value. The parameter adjustment amount is obtained by multiplying the gradient value by the preset learning rate. If the least squares method is used, the normal equations associated with the least squares problem are directly constructed and solved to obtain the parameter adjustment amount. The calculated parameter adjustment amount is then numerically added or subtracted from the current parameters corresponding to the calibration frequency point set to update the parameters corresponding to the calibration frequency point set. Subsequently, the objective function value is recalculated using the updated calibration frequency point set and compared with the objective function value obtained in the previous iteration. The absolute value of the difference between the two objective function values is calculated. If the absolute value of this difference is less than a preset convergence threshold or the current number of iterations has reached a preset maximum number of iterations, the convergence condition is determined to be met and the iteration process is terminated. If the above conditions are not met, the calibration frequency point set with the updated parameters is used as the new initial value and the next iteration is continued.
[0072] 306. When the convergence condition is met, the finally adjusted parameters are determined as room-specific correction parameters; 307. Adjust the output of the audio device accordingly according to the correction parameters; 308. Monitor changes in the room's environmental parameters in real time. When changes in the monitored environmental parameters exceed a preset threshold, automatically reacquire the room's response data to the multi-band preset test signal, and re-execute the subsequent acoustic correction process based on the new response data to generate room-specific correction parameters that adapt to the new environment, thereby further adjusting the output of the audio device.
[0073] The system monitors changes in the room's environmental parameters in real time. If changes in environmental parameters such as temperature, humidity, and noise level exceed pre-set thresholds, it will automatically trigger the re-acquisition of the room's response data to multi-band preset test signals. Subsequently, based on the newly acquired response data, each step in the acoustic correction process is re-executed in sequence, including matching result determination, baseline parameter and adjustment range calculation, interpolation processing, parameter optimization, etc., to generate room-specific correction parameters adapted to the new environment. Finally, these new correction parameters are used to readjust the output of the audio equipment to ensure that the audio equipment can output high-quality audio under different environmental conditions.
[0074] In an embodiment of the present invention, by obtaining the room's response data to a multi-band preset test signal and extracting the room acoustic data, and combining it with the microphone calibration data to obtain a calibrated frequency response curve, and then through discretization processing, constructing an objective function, and iterative optimization using an optimization algorithm, room-specific correction parameters can be accurately generated, effectively improving the acoustic performance of the audio device in a specific room and enhancing the audio output quality. At the same time, changes in room environmental parameters are monitored in real time. When the change exceeds a threshold, the response data is automatically re-acquired and the acoustic correction process is re-executed to generate correction parameters adapted to the new environment, and the audio device output is adjusted again to ensure that the audio device can continuously output high-quality audio under different environmental conditions, thereby enhancing the adaptability and stability of the device.
[0075] The above describes the room acoustic correction method of the audio device according to the embodiment of the present invention. The following describes the room acoustic correction device of the audio device according to the embodiment of the present invention. Figure 4 In one embodiment of the present invention, a room acoustic correction device for an audio device includes: Acquisition module 401 is used to obtain the response data of the room to the multi-band preset test signal and extract the room acoustic data using a time-frequency joint analysis method. The room acoustic data includes frequency attenuation, reflection path, phase offset and reverberation time information of different frequency bands; The processing module 402 is configured to perform compensation processing based on the room acoustic data using preset microphone calibration data to obtain a calibrated frequency response curve; A fitting module 403 is configured to perform fitting calculations on a preset ideal frequency curve and a calibrated frequency response curve according to an optimization algorithm to obtain room-specific correction parameters; The adjustment module 404 is configured to adjust the output of the audio device accordingly according to the correction parameters.
[0076] In an embodiment of the present invention, by obtaining the room's response data to a multi-band preset test signal and using a time-frequency joint analysis method to extract the room acoustic data, the frequency attenuation, reflection path, phase offset, and reverberation time information of different frequency bands are comprehensively covered, thereby enabling a more accurate understanding of the room's acoustic characteristics. Based on the comprehensive and accurate room acoustic data, compensation processing is performed using preset microphone calibration data, and the preset ideal frequency curve and the calibrated frequency response curve are fitted according to an optimization algorithm to obtain room-specific correction parameters, thereby significantly improving the accuracy of the correction parameters. The output of the audio device is then adjusted accordingly based on the correction parameters, effectively improving the acoustic effect of the audio device in the room.
[0077] See also Figure 5 Another embodiment of the room acoustics correction device for an audio device according to the present invention includes: Acquisition module 401 is used to obtain the response data of the room to the multi-band preset test signal and extract the room acoustic data using a time-frequency joint analysis method. The room acoustic data includes frequency attenuation, reflection path, phase offset and reverberation time information of different frequency bands; The processing module 402 is configured to perform compensation processing based on the room acoustic data using preset microphone calibration data to obtain a calibrated frequency response curve; A fitting module 403 is configured to perform fitting calculations on a preset ideal frequency curve and a calibrated frequency response curve according to an optimization algorithm to obtain room-specific correction parameters; The adjustment module 404 is configured to adjust the output of the audio device accordingly according to the correction parameters.
[0078] Optionally, the acquisition module 401 includes: The playback unit 4011 is used to generate multiple preset test signals covering low frequency, medium frequency and high frequency through audio equipment, and play the test signals in the room; The collection unit 4012 is configured to collect response data of signals at multiple listening positions using multiple microphones; The extraction unit 4013 is used to analyze the response data using a time-frequency joint analysis method combining short-time Fourier transform and continuous wavelet transform, extract frequency attenuation, reflection path, phase shift and reverberation time information of different frequency bands, and obtain room acoustic data.
[0079] Optionally, the playback unit 4011 may be specifically configured to: According to the common operating frequency range of audio equipment, the low frequency segment is determined as the first frequency segment, the mid-frequency segment is determined as the second frequency segment, and the high frequency segment is determined as the third frequency segment. Within each frequency segment, multiple frequency points are evenly selected at logarithmic intervals to generate a sine wave signal. The sine wave signals of different frequency bands are superimposed according to a preset amplitude ratio and phase relationship to form a multi-band preset test signal covering low frequency, mid-frequency and high frequency, and the test signal is played in the room.
[0080] Optionally, the processing module 402 includes: The first compensation unit 4021 is configured to perform preliminary attenuation compensation on the frequency response in the room response data according to the frequency attenuation information in the room acoustic data and the corresponding frequency response characteristics in the preset microphone calibration data for different frequency bands; A correction unit 4022 is configured to analyze the degree of interference of different reflection paths on signals in each frequency band based on the reflection path information in the room acoustic data, and perform reflection interference correction on the frequency response of the preliminary attenuation compensation in combination with the calibration parameters regarding the influence of the reflection paths in the microphone calibration data; a calibration unit 4023 for performing phase calibration on the frequency response after the reflection interference correction based on the phase offset information in the room acoustic data and the phase calibration value of the corresponding frequency band in the microphone calibration data; The second compensation unit 4024 is configured to perform reverberation time compensation on the frequency response after phase calibration based on the reverberation time information in the room acoustic data and the calibration rules regarding the influence of reverberation time on frequency response in the microphone calibration data, thereby obtaining a calibrated frequency response curve.
[0081] Optionally, the first compensation unit 4021 may be specifically configured to: Different frequency bands are divided into multiple sub-bands; the sum of the frequency attenuation value of each sub-band and the frequency response attenuation compensation value of the corresponding sub-band in the preset microphone calibration data is calculated as the preliminary attenuation compensation value of the corresponding sub-band; the preliminary attenuation compensation value is used to compensate the frequency response of the corresponding sub-band extracted from the room response data; the compensated frequency responses of each sub-band are integrated according to the frequency band to which they belong to obtain the frequency response of the corresponding band.
[0082] Optionally, the correction unit 4022 may be specifically configured to: Based on the reflection path information, the main reflection path and secondary reflection path of the signal in each frequency band are determined; for each frequency band, the interference coefficient of the main reflection path and the secondary reflection path on the signal in that frequency band is calculated, and the interference coefficient is determined based on the length of the reflection path, the material properties of the reflecting surface, and the room layout; combined with the calibration parameters regarding the influence of the reflection path in the microphone calibration data, the calibration parameters include the frequency response correction factor under different reflection path interferences, and the reflection interference correction is performed on the frequency response of the corresponding frequency band after the preliminary attenuation compensation based on the interference coefficient and the correction factor.
[0083] Optionally, the calibration unit 4023 may be specifically configured to: The phase offset information is decomposed according to the frequency band to obtain the phase offset of each frequency band; for each frequency band, the phase offset of each frequency band is added to the phase calibration value of the corresponding frequency band in the microphone calibration data to obtain the phase calibration compensation value of the frequency band; the phase calibration compensation value is used to phase calibrate the frequency response of the corresponding frequency band after the reflection interference correction.
[0084] Optionally, the second compensation unit 4024 may be configured to: Based on the reverberation time information, the reverberation time length of different frequency bands is determined. For each frequency band, the calibration rules regarding the impact of reverberation time on frequency response in the microphone calibration data are used to perform reverberation time compensation on the frequency response of the frequency band after phase calibration according to its reverberation time length and the corresponding compensation coefficient. The calibration rules define the compensation coefficient of the frequency response of each frequency band under different reverberation time lengths.
[0085] Optionally, the fitting module 403 includes: The processing unit 4031 is configured to discretize the preset ideal frequency curve and the calibrated frequency response curve in the same frequency band to obtain a discretized ideal frequency point set and a calibrated frequency point set; A construction unit 4032 is configured to select a preset optimization algorithm, use the discretized ideal frequency point set as a target, and the calibration frequency point set as an initial value, to construct an objective function, wherein the objective function is used to measure the error between the calibration frequency point set and the ideal frequency point set; The iterative unit 4033 is used to iteratively optimize the objective function using an optimization algorithm, and continuously adjust the parameters corresponding to the calibration frequency point set during the iterative process until a preset convergence condition is met; The determining unit 4034 is configured to determine the finally adjusted parameters as the room-specific correction parameters when a convergence condition is satisfied.
[0086] Optionally, the processing unit 4031 may be specifically configured to: Determine the discretized frequency band interval, which is determined based on the frequency resolution of the audio equipment and the acoustic characteristics of the room; according to the frequency band interval, starting from the starting frequency of the preset ideal frequency curve and the calibrated frequency response curve, select the frequency values corresponding to the center frequency of each frequency band in turn as the discretized frequency points; the frequency values corresponding to the ideal frequency curve at each discretized frequency point are combined into an ideal frequency point set, and the frequency values corresponding to the calibrated frequency response curve at each discretized frequency point are combined into a calibration frequency point set.
[0087] Optionally, the iteration unit 4033 may be specifically configured to: During each iteration, the gradient of the objective function with respect to the parameters is calculated according to the selected optimization algorithm or the least squares problem is directly solved to obtain the parameter adjustment amount; the parameters corresponding to the calibration frequency point set are updated according to the adjustment amount; the objective function value after the updated parameters is calculated and compared with the objective function value of the previous iteration; if the difference between the objective function values of the two iterations is less than a preset threshold, or the number of iterations reaches the preset maximum number of iterations, it is determined that the convergence condition is met and the iteration is stopped; otherwise, the next iteration is continued.
[0088] Optionally, the device further comprises: The environmental adaptation module 405 is used to monitor the changes in the room's environmental parameters in real time. When the changes in the monitored environmental parameters exceed a preset threshold, it automatically re-acquires the room's response data to the multi-band preset test signal and re-executes the subsequent acoustic correction process based on the new response data to generate room-specific correction parameters that adapt to the new environment, thereby further adjusting the output of the audio device.
[0089] In an embodiment of the present invention, by obtaining the room's response data to a multi-band preset test signal and extracting the room acoustic data, and combining it with the microphone calibration data to obtain a calibrated frequency response curve, and then through discretization processing, constructing an objective function, and iterative optimization using an optimization algorithm, room-specific correction parameters can be accurately generated, effectively improving the acoustic performance of the audio device in a specific room and enhancing the audio output quality. At the same time, changes in room environmental parameters are monitored in real time. When the change exceeds a threshold, the response data is automatically re-acquired and the acoustic correction process is re-executed to generate correction parameters adapted to the new environment, and the audio device output is adjusted again to ensure that the audio device can continuously output high-quality audio under different environmental conditions, thereby enhancing the adaptability and stability of the device.
[0090] above Figure 4 and Figure 5 The room acoustics correction apparatus for an audio device in an embodiment of the present invention is described in detail from the perspective of modular functional entities. Next, the electronic device in an embodiment of the present invention is described in detail from the perspective of hardware processing.
[0091] See also Figure 6 As shown, the electronic device includes a processor 600 and a memory 601 , wherein the memory 601 stores machine-executable instructions that can be executed by the processor 600 , and the processor 600 executes the machine-executable instructions to implement the room acoustic correction method of the audio device.
[0092] Further, Figure 6 The electronic device shown further includes a bus 602 and a communication interface 603 , and the processor 600 , the communication interface 603 and the memory 601 are connected via the bus 602 .
[0093] The memory 601 may include a high-speed random access memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is achieved through at least one communication interface 603 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 602 may be an ISA bus, a PCI bus, or an EISA bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0094] The processor 600 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the processor 600. The above processor 600 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present disclosure. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 601 , and the processor 600 reads the information in the memory 601 and completes the method steps of the aforementioned embodiment in combination with its hardware.
[0095] The present invention further provides an electronic device, comprising a computer device including a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor performs the steps of the audio device room acoustics correction method described in each of the above-described embodiments. The present invention further provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the audio device room acoustics correction method.
[0096] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0097] If the integrated unit 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 the present invention, or the portion that contributes to the prior art, or all or 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 for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0098] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for correcting room acoustics of an audio device, characterized in that: The room acoustic correction method of the audio device comprises: Acquiring the room's response data to a multi-band preset test signal and extracting room acoustic data using a joint time-frequency analysis method. The room acoustic data includes frequency attenuation, reflection path, phase shift, and reverberation time information for different frequency bands. Based on the room acoustic data, compensation processing is performed using preset microphone calibration data to obtain a calibrated frequency response curve; Performing fitting calculation on a preset ideal frequency curve and the calibrated frequency response curve according to an optimization algorithm to obtain room-specific correction parameters; The output of the audio device is adjusted accordingly according to the correction parameters.
2. The room acoustic correction method for an audio device according to claim 1, characterized in that: The step of obtaining the room's response data to the multi-band preset test signal to obtain the room acoustic data includes: Generate multiple preset test signals covering low frequency, mid frequency and high frequency by audio equipment, and play the test signals in the room; Using multiple microphones to collect signal response data at multiple listening positions; The response data are analyzed using a time-frequency joint analysis method combining short-time Fourier transform and continuous wavelet transform to extract frequency attenuation, reflection path, phase shift and reverberation time information of different frequency bands to obtain room acoustic data.
3. The room acoustic correction method for an audio device according to claim 2, characterized in that: The method of generating multiple preset test signals covering low frequency, mid frequency and high frequency by audio equipment and playing the test signals in the room includes: According to the common operating frequency range of audio equipment, the low frequency segment is determined as the first frequency segment, the mid-frequency segment is determined as the second frequency segment, and the high frequency segment is determined as the third frequency segment; In each frequency band, multiple frequency points are evenly selected according to logarithmic intervals to generate a sine wave signal; Sine wave signals of different frequency bands are superimposed according to a preset amplitude ratio and phase relationship to form a multi-band preset test signal covering low frequency, medium frequency and high frequency, and the test signal is played in the room.
4. The room acoustic correction method for an audio device according to claim 1, wherein: The method of performing compensation processing based on the room acoustic data and utilizing preset microphone calibration data to obtain a calibrated frequency response curve includes: For different frequency bands, performing preliminary attenuation compensation on the frequency response in the room response data according to the frequency attenuation information in the room acoustic data and the corresponding frequency response characteristics in the preset microphone calibration data; Based on the reflection path information in the room acoustic data, analyzing the interference degree of different reflection paths on the signals in each frequency band, and combining the calibration parameters related to the reflection path influence in the microphone calibration data, performing reflection interference correction on the frequency response of the preliminary attenuation compensation; performing phase calibration on the frequency response after the reflection interference correction based on the phase offset information in the room acoustic data and the phase calibration value of the corresponding frequency band in the microphone calibration data; Based on the reverberation time information in the room acoustic data and in combination with the calibration rules regarding the influence of reverberation time on frequency response in the microphone calibration data, reverberation time compensation is performed on the frequency response after phase calibration to obtain a calibrated frequency response curve.
5. The room acoustic correction method for an audio device according to claim 4, characterized in that: The performing preliminary attenuation compensation on the frequency response in the room response data according to the frequency attenuation information in the room acoustic data and the corresponding frequency response characteristics in the preset microphone calibration data for different frequency bands includes: Divide different frequency bands into multiple sub-bands; Calculating the sum of the frequency attenuation value of each sub-band and the frequency response attenuation compensation value of the corresponding sub-band in the preset microphone calibration data as the preliminary attenuation compensation value of the corresponding sub-band; Compensating the frequency response of the corresponding sub-band extracted from the room response data using the preliminary attenuation compensation value; The compensated frequency responses of the sub-bands are integrated according to the frequency bands to which they belong, to obtain the frequency responses of the corresponding frequency bands.
6. The room acoustic correction method for an audio device according to claim 4, characterized in that: The method includes analyzing the interference degree of different reflection paths on signals of each frequency band based on the reflection path information in the room acoustic data, and performing reflection interference correction on the frequency response of the preliminary attenuation compensation in combination with the calibration parameters related to the reflection path influence in the microphone calibration data, including: Determining the primary reflection path and the secondary reflection path of the signal in each frequency band according to the reflection path information; For each frequency band, calculate the interference coefficient of the primary reflection path and the secondary reflection path on the signal in the frequency band, where the interference coefficient is determined based on the length of the reflection path, the material properties of the reflecting surface, and the room layout; Combined with the calibration parameters regarding the reflection path influence in the microphone calibration data, the calibration parameters include frequency response correction factors under different reflection path interferences, and reflection interference correction is performed on the frequency response of the corresponding frequency band after preliminary attenuation compensation according to the interference coefficient and correction factor.
7. The room acoustic correction method for an audio device according to claim 4, wherein: The phase calibration of the frequency response after the reflection interference correction is performed based on the phase offset information in the room acoustic data and in combination with the phase calibration value of the corresponding frequency band in the microphone calibration data, including: Decomposing the phase offset information according to frequency bands to obtain a phase offset for each frequency band; For each frequency band, the phase offset of each frequency band is added to the phase calibration value of the corresponding frequency band in the microphone calibration data to obtain a phase calibration compensation value of the frequency band; The phase calibration compensation value is used to perform phase calibration on the frequency response of the corresponding frequency band after the reflection interference correction.
8. The room acoustic correction method for an audio device according to claim 4, wherein: The method further comprises: performing reverberation time compensation on the frequency response after phase calibration based on the reverberation time information in the room acoustic data and combining the calibration rules regarding the influence of reverberation time on frequency response in the microphone calibration data to obtain a calibrated frequency response curve, including: Determining the reverberation time lengths of different frequency bands according to the reverberation time information; For each frequency band, reverberation time compensation is performed on the frequency response of the frequency band after phase calibration according to the reverberation time length and the corresponding compensation coefficient, using the calibration rules regarding the influence of reverberation time on frequency response in the microphone calibration data. The calibration rules define the compensation coefficients of the frequency responses of each frequency band under different reverberation time lengths.
9. The room acoustic correction method for an audio device according to claim 1, wherein: The fitting calculation of the preset ideal frequency curve and the calibrated frequency response curve according to the optimization algorithm to obtain room-specific correction parameters includes: Discretize the preset ideal frequency curve and the calibrated frequency response curve in the same frequency band to obtain a discretized ideal frequency point set and a calibrated frequency point set; Selecting a preset optimization algorithm, taking the discretized ideal frequency point set as the target and the calibration frequency point set as the initial value, and constructing an objective function, wherein the objective function is used to measure the error between the calibration frequency point set and the ideal frequency point set; Iteratively optimizing the objective function using the optimization algorithm, and continuously adjusting the parameters corresponding to the calibration frequency point set during the iterative process until a preset convergence condition is met; When the convergence condition is met, the final adjusted parameters are determined as the room-specific correction parameters.
10. The room acoustic correction method for an audio device according to claim 9, characterized in that: Discretizing the preset ideal frequency curve and the calibrated frequency response curve in the same frequency band to obtain a discretized ideal frequency point set and a calibrated frequency point set includes: Determining a discretized frequency band interval, wherein the frequency band interval is determined according to a frequency resolution of an audio device and room acoustic characteristics; According to the frequency band interval, starting from the starting frequency of the preset ideal frequency curve and the calibrated frequency response curve, the frequency values corresponding to the center frequency of each frequency band are selected in sequence as the discretized frequency points; The frequency values corresponding to the ideal frequency curve at each discretized frequency point are combined into an ideal frequency point set, and the frequency values corresponding to the calibrated frequency response curve at each discretized frequency point are combined into a calibration frequency point set.
11. The room acoustic correction method for an audio device according to claim 9, wherein: The iterative optimization of the objective function using the optimization algorithm, and continuously adjusting the parameters corresponding to the calibration frequency point set during the iteration process until a preset convergence condition is satisfied, includes: In each iteration, the gradient of the objective function with respect to the parameters is calculated according to the selected optimization algorithm or the least squares problem is directly solved to obtain the adjustment amount of the parameters; updating the parameters corresponding to the calibration frequency point set according to the adjustment amount; Calculate the objective function value after updating the parameters and compare it with the objective function value of the previous iteration; if the difference between the objective function values of the two iterations is less than the preset threshold, or the number of iterations reaches the preset maximum number of iterations, it is determined that the convergence condition is met and the iteration is stopped; otherwise, continue to the next iteration.
12. The room acoustic correction method for an audio device according to any one of claims 1 to 11, characterized in that: The room acoustic correction method for an audio device further comprises: The system monitors changes in the room's environmental parameters in real time. When it is detected that the changes in the environmental parameters exceed a preset threshold, it automatically reacquires the room's response data to the multi-band preset test signal, and re-executes the subsequent acoustic correction process based on the new response data to generate room-specific correction parameters that adapt to the new environment, thereby re-adjusting the output of the audio device.
13. A room acoustic correction device for an audio device, characterized in that: The room acoustic correction device of the audio device comprises: An acquisition module is used to obtain the room's response data to a multi-band preset test signal and extract the room acoustic data using a time-frequency joint analysis method. The room acoustic data includes frequency attenuation, reflection path, phase shift, and reverberation time information for different frequency bands. a processing module, configured to perform compensation processing based on the room acoustic data using preset microphone calibration data to obtain a calibrated frequency response curve; A fitting module, configured to perform fitting calculations on a preset ideal frequency curve and the calibrated frequency response curve according to an optimization algorithm to obtain room-specific correction parameters; The adjustment module is used to adjust the output of the audio device accordingly according to the correction parameters.
14. An electronic device, characterized in that: The electronic device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the electronic device to execute the room acoustic correction method for an audio device according to any one of claims 1 to 12.
15. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, the room acoustic correction method for an audio device according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Room characterization and correction for multi-channel audio
CN103621110A
Playback device calibration
CN106688250A
Audio control method and device, electronic equipment and storage medium
CN119450301A
Compensating filters
US6760451B1
Cited By
Reverberation balance management data processing method and system for music intelligent terminal
CN121645077A
Reverberation equalization management data processing method and system for music intelligent terminal
CN121645077B
Room sound calibration method based on hearing tendency control and related equipment
CN122054066A
Audio calibration curve generation method and system based on room reverberation time
CN122224203A
A Method and System for Generating Audio Calibration Curves Based on Room Reverberation Time
CN122224203B