A debugging method and device of an acoustic device and a terminal device
By using a global optimization algorithm and a neural network model to determine the filter coefficients of in-vehicle audio equipment, the problem of low accuracy caused by subjective factors of professionals in the debugging of in-vehicle audio equipment is solved, and efficient and accurate debugging of audio equipment is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2026-03-27
AI Technical Summary
In the existing technology, the debugging process of car audio equipment is affected by the subjective factors of professionals, resulting in inconsistent equipment parameters after each debugging, low accuracy, and the reliance on professionals has limitations and low efficiency.
By acquiring audio data from audio equipment, global optimization algorithms such as genetic algorithms and neural network models are used to determine the target filter coefficients of the filters in the audio equipment, and the audio equipment is controlled to output audio signals with the target filter coefficients to match the actual frequency response with the target frequency response.
This reduces inconsistencies in parameters caused by subjective factors of professionals, improves the accuracy and efficiency of vehicle audio equipment debugging, and achieves matching of the audio signals required for the audio equipment output.
Smart Images

Figure CN119743702B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of audio signal processing, and particularly relates to a debugging method and device of a sound equipment and a terminal device. BACKGROUND
[0002] A vehicle-mounted sound equipment is a device installed in a car and used for playing an audio signal. In order to enable the vehicle-mounted sound equipment to accurately output the required audio signal and improve sound quality, the vehicle-mounted sound equipment needs to be debugged.
[0003] At present, the debugging of the vehicle-mounted sound equipment is generally performed by professional personnel. However, the subjective factors of the professional personnel may affect the debugging of the vehicle-mounted sound equipment, so that the device parameters of the vehicle-mounted sound equipment are different after each debugging, and thus it is difficult to ensure that the vehicle-mounted sound equipment can accurately output the required audio signal after each debugging, that is, the accuracy of the debugging of the vehicle-mounted sound equipment is low. SUMMARY
[0004] Embodiments of the present application provide a debugging method and device of a sound equipment and a terminal device, and aim to solve the problem of low accuracy of the debugging of the vehicle-mounted sound equipment due to the influence of subjective factors of professional personnel when the vehicle-mounted sound equipment is parameter debugged.
[0005] In a first aspect, embodiments of the present application provide a debugging method of a sound equipment, and the method comprises:
[0006] obtaining audio data of the sound equipment; wherein the audio data is audio data collected when the sound equipment plays a target signal;
[0007] determining an audio impulse response of the sound equipment according to the audio data;
[0008] determining a target filter coefficient of a filter in the sound equipment according to a global optimization algorithm and the audio impulse response;
[0009] controlling the sound equipment to output an audio signal by using the target filter coefficient; wherein an actual frequency response of the sound equipment output matches a target frequency response of the audio signal.
[0010] In a possible implementation manner of the first aspect, the sound equipment comprises at least two channels, and the obtaining of the audio data of the sound equipment comprises:
[0011] obtaining first audio data when each channel plays the target signal alone;
[0012] obtaining second audio data when a plurality of channels play the target signal simultaneously;
[0013] The audio impulse response includes a first audio impulse response corresponding to the first audio data and a second audio impulse response corresponding to the second audio data. Determining the target filter coefficients of the filter in the audio device based on the global optimization algorithm and the audio impulse response includes:
[0014] The target filter coefficients of the filters in the audio device are determined based on the global optimization algorithm, the first audio impulse response of each channel, and the second audio impulse response.
[0015] In one possible implementation of the first aspect above, the global optimization algorithm includes a genetic algorithm and a neural network model, and determining the target filter coefficients of the filter in the audio device based on the global optimization algorithm, the first audio impulse response of each channel, and the second audio impulse response includes:
[0016] Each of the first audio impulse responses is sequentially input into the genetic algorithm to obtain the intermediate filter coefficients corresponding to each channel;
[0017] The second audio impulse response and the intermediate filter coefficients corresponding to each of the channels are input into the neural network model to obtain the target filter coefficients of the filter in the audio device; wherein, the neural network model includes a diffusion model, which is used to add random noise to the intermediate filter coefficients during the forward diffusion process to obtain a set of random coefficients, and to perform noise reduction processing on the set of random coefficients during the reverse diffusion process to obtain the target filter coefficients.
[0018] In one possible implementation of the first aspect above, the genetic algorithm is used to calculate the fitness corresponding to the initial filter coefficients in the channel based on the fitness function, and to determine the intermediate filter coefficients corresponding to each channel based on the fitness, wherein the fitness function is determined based on the audio impulse response and the initial filter coefficients.
[0019] In one possible implementation of the first aspect above, determining the target filter coefficients of the filter in the audio device based on the global optimization algorithm and the audio impulse response includes:
[0020] Determine the filter parameters of the filter in the audio equipment;
[0021] The target filter coefficients of the filter in the audio device are determined based on the global optimization algorithm, the audio impulse response, and the filter parameters.
[0022] In a possible implementation manner of the first aspect, the determining the target filter coefficients of the filter in the sound equipment according to the global optimization algorithm and the audio impulse response comprises:
[0023] determining the first filter coefficients according to the global optimization algorithm and the audio impulse response;
[0024] In a case where the actual frequency response of the audio signal output by the sound equipment with the first filter coefficients matches the target frequency response, the first filter coefficients are determined as the target filter coefficients.
[0025] In a possible implementation manner of the first aspect, the method further comprises:
[0026] In a case where the actual frequency response of the audio signal output by the sound equipment with the first filter coefficients does not match the target frequency response, processing the target signal based on the first filter coefficients to obtain a processed target signal;
[0027] controlling the sound equipment to play the processed target signal to obtain processed audio data;
[0028] repeatedly performing the step of determining the target filter coefficients of the filter in the sound equipment according to the global optimization algorithm and the audio impulse response based on the processed audio data.
[0029] In a second aspect, a debugging apparatus of a sound equipment is provided, and the apparatus comprises:
[0030] an obtaining module configured to obtain audio data of the sound equipment, wherein the audio data is audio data collected by the sound equipment when playing a target signal;
[0031] a determining module configured to determine an audio impulse response of the sound equipment according to the audio data, and determine target filter coefficients of a filter in the sound equipment according to a global optimization algorithm and the audio impulse response;
[0032] a controlling module configured to control the sound equipment to output an audio signal by using the target filter coefficients, wherein an actual frequency response of the sound equipment matches a target frequency response of the audio signal.
[0033] In a third aspect, an embodiment of the present application provides a terminal device, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the debugging method of the sound equipment provided in the first aspect or any possible implementation manner of the first aspect when executing the computer program.
[0034] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the debugging method of the sound equipment according to the first aspect or any possible implementation manner of the first aspect.
[0035] In a fifth aspect, an embodiment of the present application provides a computer program product, which comprises a computer program. When the computer program is executed on a computer, the computer program causes the computer to execute the debugging method of the sound equipment according to the first aspect or any possible implementation manner of the first aspect.
[0036] It can be understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description in the first aspect, which will not be repeated here.
[0037] Compared with the prior art, the embodiment of the present application has the following beneficial effects:
[0038] In the embodiment of the present application, the audio data of the sound equipment is acquired, the audio data is the audio data collected when the sound equipment plays the target signal, the audio impulse response of the sound equipment is determined according to the audio data, and the target filter coefficient of the filter in the sound equipment is determined according to the global optimization algorithm and the audio impulse response. The filter coefficient of the vehicle-mounted sound equipment can be debugged based on the audio impulse response of the sound equipment and the preset global optimization algorithm, which reduces the situation that the device parameters of the vehicle-mounted sound equipment are different after each debugging due to the influence of the subjective factors of the professional personnel. By controlling the sound equipment to output the audio signal by using the target filter coefficient, the actual frequency response of the sound equipment is matched with the target frequency response of the audio signal, so that the vehicle-mounted sound equipment can output the required audio signal, and the accuracy of debugging the vehicle-mounted sound equipment is improved. BRIEF DESCRIPTION OF DRAWINGS
[0039] Figure 1 FIG. 1 is a step flowchart of a debugging method of a sound equipment according to an embodiment of the present application;
[0040] Figure 2 FIG. 2 is a step flowchart of another debugging method of a sound equipment according to an embodiment of the present application;
[0041] Figure 3 FIG. 3 is a flowchart of a global optimization algorithm according to an embodiment of the present application;
[0042] Figure 4 FIG. 4 is a flowchart of a debugging method of a sound equipment according to an embodiment of the present application;
[0043] Figure 5 FIG. 5 is a structural schematic diagram of a debugging device of a sound equipment according to an embodiment of the present application;
[0044] Figure 6 is a structural block diagram of a terminal device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the technical problems, technical solutions and beneficial effects of the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0046] The car audio equipment is a device installed in the car interior and used for playing audio signals, providing users with good music experience. With the improvement of living standards and the continuous progress of automobile technology, people have put forward more demands for car audio equipment, and in order to meet people's needs, it is necessary to debug the car audio equipment so that the car audio equipment can accurately output the required audio signal.
[0047] At present, the car audio equipment is generally debugged by professional personnel, which is affected by the subjective factors of professional personnel, so that the equipment parameters of the car audio equipment after each debugging are different, thereby it is difficult to ensure that the car audio equipment can accurately output the required audio signal after each debugging, that is, there is a problem of low accuracy of debugging the car audio equipment.
[0048] Moreover, the car audio equipment is debugged by professional personnel, which depends on professional personnel. If professional personnel cannot be provided, the car audio equipment cannot be debugged, which has a problem of great limitation. At the same time, the car audio equipment is debugged by professional personnel, which requires professional personnel to debug the car audio equipment one by one, which has a problem of low efficiency of debugging the car audio equipment.
[0049] Therefore, the present application provides a debugging method of an audio equipment, which acquires audio data of the audio equipment, the audio data being audio data collected by the audio equipment when playing a target signal, determines an audio impulse response of the audio equipment according to the audio data, and determines target filter coefficients of a filter in the audio equipment according to a global optimization algorithm and the audio impulse response. The filter coefficients of the car audio equipment can be debugged based on the audio impulse response of the audio equipment and the preset global optimization algorithm, which reduces the situation that the equipment parameters of the car audio equipment are different after each debugging due to the influence of the subjective factors of professional personnel. By controlling the audio equipment to output an audio signal by using the target filter coefficients, the actual frequency response of the audio equipment is matched with the target frequency response of the audio signal, so that the car audio equipment can output the required audio signal, and the accuracy of debugging the car audio equipment is improved.
[0050] Referring toFigure 1 , Figure 1 A flowchart of steps of a method for debugging an audio device is shown, which can specifically include the following steps:
[0051] In step 101, audio data of the audio device is obtained.
[0052] The audio device can be a device for playing audio signals, and can be a vehicle audio device. The audio device can include at least one loudspeaker and play audio signals through the at least one loudspeaker. The audio data can be audio data collected by the audio device when playing target signals, and can include sound waveform data of the audio device playing target signals, specifically including frequency response curves, frequency ranges, sensitivities, etc. of the audio device playing target signals. The target signals can include audio signals of different songs and sweep signals of the audio device. The sweep signal can be an audio signal with a continuously changing signal frequency within a predetermined frequency range, and can be determined based on the working frequency range of the audio device.
[0053] When the audio device needs to be debugged, the song currently played by the audio device can be determined, and the target signal of the song can be obtained to debug based on the target signal of the song.
[0054] In specific implementation, the target signal played by the audio device can include audio signals of different songs, and the audio signals of different songs can not include all working frequency ranges of the audio device due to smaller frequency ranges involved by the audio signals, which can reduce the accuracy of debugging based on the audio signals. To improve the accuracy of debugging the audio device, the working frequency range of the audio device can be determined according to the specifications of the audio device to be debugged, and a sweep signal for the audio device can be generated based on the working frequency range of the audio device, so that the audio device can play the sweep signal, and an audio collection device can be used to collect audio data of the audio device playing the sweep signal.
[0055] Specifically, the audio collection device can be a device for collecting audio signals in the environment, and can include a microphone, a sound pickup device, etc.
[0056] In actual application, the audio device can be a vehicle audio device, which can be installed in a vehicle, and a microphone matrix can be installed in the vehicle to collect audio signals in the vehicle, i.e. to collect audio data of the audio device playing the sweep signal in the vehicle.
[0057] In step 102, an audio impulse response of the audio device is determined based on the audio data.
[0058] The audio impulse response can be an impulse response of the sound equipment outputting the target signal.
[0059] After obtaining the audio data of the sound equipment, the audio impulse response of the sound equipment for the target signal can be calculated by using a signal processing technique, such as a Fourier transform method, a correlation function method, or the like.
[0060] In actual applications, the sound equipment can include at least one speaker, and each speaker can correspond to one channel, that is, the sound equipment transmits the audio signal to the corresponding speaker through at least one channel, so that the speaker plays the corresponding audio signal, that is, the sound equipment can include at least one channel. When the sound equipment includes at least two channels, that is, the sound equipment includes at least two speakers, each speaker can be controlled to play the sweep signal, and then the audio impulse response of each speaker, that is, the audio impulse response of the channel corresponding to the speaker, can be obtained.
[0061] In step 103, the target filter coefficient of the filter in the sound equipment is determined according to the global optimization algorithm and the audio impulse response.
[0062] The global optimization algorithm can be used to determine the filter coefficient of the filter in the sound equipment based on the audio impulse response, and the target filter coefficient can be the optimal filter coefficient of the filter in the sound equipment, that is, the actual frequency response of the audio signal output by the sound equipment with the optimal filter coefficient can match the target frequency response.
[0063] After obtaining the audio impulse response, the target filter coefficient of the filter in the sound equipment can be calculated by using the global optimization algorithm with the audio impulse response as the input.
[0064] In actual applications, since the sound equipment can include at least one channel, at least one channel audio impulse response can be obtained, and then the target filter coefficient of the filter in the sound equipment can be determined based on the audio impulse response of each channel, or the target filter coefficient of the filter in the sound equipment can be determined based on the audio impulse response of any one or more channels of all channels.
[0065] In a specific implementation, the loudspeakers that need to be debugged in the sound equipment can be determined when the sound equipment is debugged, and then the debugging can be performed only on the loudspeakers that need to be debugged, that is, the target filter coefficients of the filters in the channels corresponding to the loudspeakers can be determined only based on the audio impulse responses of the channels. In addition, different output configurations can be defined in the sound equipment based on the needs of the user, for example, the user has a higher demand for bass, and then only the loudspeakers for outputting low-frequency signals among all the loudspeakers of the sound equipment can be called to determine the target filter coefficients corresponding to the loudspeakers for outputting low-frequency signals. In addition, the target filter coefficients of all the filters in the sound equipment can be determined in combination with the audio impulse responses of all the channels.
[0066] In yet another embodiment, the audio data of the sound equipment playing the target signal can also be collected in real time by the microphone matrix in the vehicle when the sound equipment plays the target signal, and then the audio impulse response of the sound equipment can be determined based on the currently collected audio data, and the target filter coefficients of the filters in the sound equipment can be determined according to the global optimization algorithm and the audio impulse response, so that the target filter coefficients can be used for processing when playing the target signal subsequently, so that the filters in the sound equipment can be debugged in real time, and the real-time performance of debugging the sound equipment can be improved.
[0067] It should be understood that since the currently collected audio data can be part of the content in the target signal, the filters in the sound equipment can be debugged based on the audio data of the currently collected part, and the processed target signal can be processed by using the debugged filters, so that the actual frequency response of the processed target signal can match the target frequency response.
[0068] In an embodiment of the present application, step 103 can include steps 1031 to 1032:
[0069] Step 1031, determining the first filter coefficients according to the global optimization algorithm and the audio impulse response.
[0070] The first filter coefficients can be determined based on the filter coefficients determined based on the audio impulse response determined at the current time.
[0071] After obtaining the audio impulse response, the first filter coefficients of the filters in the sound equipment can be calculated by using the global optimization algorithm with the audio impulse response as the input.
[0072] Step 1032, determining the first filter coefficients as the target filter coefficients in a case where the actual frequency response of the audio signal output by the sound equipment with the first filter coefficients matches the target frequency response.
[0073] The audio signal can be an audio signal used for debugging the sound equipment, that is, the audio signal can be used to test whether the filter coefficients of the filter in the sound equipment are optimal filter coefficients. The actual frequency response can be a frequency response curve of the sound equipment when playing the audio signal actually, and the target frequency response can be a frequency response curve of the audio signal, that is, a frequency response curve expected to be achieved by the sound equipment when playing the audio signal.
[0074] After obtaining the first filter coefficients, the sound equipment can be controlled to process and play the audio signal with the first filter coefficients, and then the actual frequency response of the audio signal output by the sound equipment with the first filter coefficients can be collected, and the collected actual frequency response and the target frequency response can be compared. When the actual frequency response of the audio signal output by the sound equipment with the first filter coefficients matches the target frequency response, it can be determined that the first filter coefficients are the target filter coefficients.
[0075] In actual application, since there can be a case that the first filter coefficients determined are non-optimal filter coefficients when the sound equipment is debugged, that is, a case that the actual frequency response output with the first filter coefficients determined does not match the target frequency response, and then it is needed to determine whether the first filter coefficients currently determined are optimal filter coefficients, and by playing the audio signal output with the first filter coefficients and collecting the actual frequency response output by the sound equipment, and comparing the actual frequency response with the target frequency response, it can be determined whether the first filter coefficients currently determined are optimal filter coefficients.
[0076] In an embodiment of the present application, the method can further include the following steps:
[0077] When the actual frequency response of the audio signal output by the sound equipment with the first filter coefficients does not match the target frequency response, the target signal is processed based on the first filter coefficients to obtain a processed target signal, the sound equipment is controlled to play the processed target signal to obtain processed audio data, and the step of determining the target filter coefficients of the filter in the sound equipment according to the global optimization algorithm and the audio impulse response is repeatedly executed based on the processed audio data.
[0078] After obtaining the first filter coefficients, the actual frequency response of the audio signal output by the sound equipment with the first filter coefficients can be collected, and the collected actual frequency response and the target frequency response are compared. If the actual frequency response of the audio signal output by the sound equipment with the first filter coefficients does not match the target frequency response, it can be determined that the first filter coefficients are non-optimal filter coefficients. Then, the target signal can be processed using the first filter coefficients to obtain a processed target signal. The step of obtaining the audio data of the sound equipment can be repeatedly performed based on the processed target signal, that is, the sound equipment plays the processed target signal, and the audio data when the sound equipment plays the processed target signal is collected. Then, the step of determining the target filter coefficients of the filter in the sound equipment based on the global optimization algorithm and the audio impulse response can be repeatedly performed based on the audio data corresponding to the processed target signal.
[0079] In practical applications, when it is determined that the current first filter coefficients are non-optimal filter coefficients, the first filter coefficients need to be determined again so that the first filter coefficients determined again are optimal filter coefficients. Based on this, the swept frequency signal can be processed using the current first filter coefficients to obtain a processed swept frequency signal. The frequency, amplitude, and other parameters of the swept frequency signal before processing and the processed swept frequency signal are different. Then, different audio data can be obtained based on the processed swept frequency signal to determine the first filter coefficients again based on the different audio data.
[0080] In an embodiment of the present application, the following steps can also be included:
[0081] The filter parameters of the filter in the sound equipment are determined, and the target filter coefficients of the filter in the sound equipment are determined based on the global optimization algorithm, the audio impulse response, and the filter parameters.
[0082] The filter parameters can be parameters describing the performance of the filter in the sound equipment, and the filter parameters can include the order, type, and number of the filter.
[0083] After obtaining the audio impulse response, the filter parameters of the filter in the sound equipment can be determined, and the corresponding global optimization algorithm can be determined based on the filter parameters. Then, the target filter coefficients of the filter in the sound equipment can be calculated using the global optimization algorithm corresponding to the filter parameters with the audio impulse response as the input.
[0084] It needs to be understood that different types, different orders, and different numbers of filters can have different methods for calculating filter coefficients, and the corresponding global optimization algorithm can be defined in advance for different types, different orders, and different numbers of filters to determine the filter coefficients of the filters in different cases based on the corresponding global optimization algorithm, so that when the filter parameters of the filters in the sound equipment are determined, the corresponding global optimization algorithm is selected based on the filter parameters, and the target filter coefficients are calculated by using the corresponding global optimization algorithm, which improves the accuracy of determining the target filter coefficients, and the determination of the target filter coefficients by using the corresponding global optimization algorithm can improve the efficiency of determining the target filter coefficients.
[0085] In step 104, the sound equipment is controlled to output an audio signal by using the target filter coefficients.
[0086] The actual frequency response of the sound equipment is matched with the target frequency response of the audio signal.
[0087] After obtaining the target filter coefficients, the sound equipment can be controlled to output an audio signal by using the target filter coefficients.
[0088] In specific implementation, the filter in the sound equipment can be controlled to process the audio signal by using the target filter coefficients, which can specifically include equalization processing, filtering processing, and the like, so that the processed audio signal can be obtained, and the audio signal can be transmitted to the corresponding speaker for playing, so that the actual frequency response of the audio signal played by the sound equipment is matched with the target frequency response of the audio signal.
[0089] In the embodiments of the present application, by obtaining the audio data of the sound equipment, the audio data is the audio data collected by the sound equipment when playing the target signal, according to the audio data, the audio impulse response of the sound equipment is determined, and according to the global optimization algorithm and the audio impulse response, the target filter coefficients of the filter in the sound equipment are determined, which can debug the filter coefficients of the vehicle-mounted sound equipment based on the audio impulse response of the sound equipment and the preset global optimization algorithm, reduces the situation that the device parameters of the vehicle-mounted sound equipment are different after each debugging due to the subjective factors of professional personnel, and by controlling the sound equipment to output an audio signal by using the target filter coefficients, the actual frequency response of the sound equipment is matched with the target frequency response of the audio signal, so that the vehicle-mounted sound equipment can output the required audio signal, and the accuracy of debugging the vehicle-mounted sound equipment is improved.
[0090] Referring to Figure 2 , Figure 2 A step flowchart of a method for debugging a sound equipment is shown, which can specifically include the following steps:
[0091] Step 201, obtaining first audio data when each channel plays the target signal alone, and obtaining second audio data when multiple channels play the target signal simultaneously.
[0092] The first audio data can be audio data collected when the target signal is played by the loudspeaker of each channel alone, and the second audio data can be audio data collected when the target signal is played by the loudspeakers of all channels simultaneously.
[0093] When the sound equipment needs to be debugged, the working frequency band of the sound equipment can be determined according to the specifications of the sound equipment to be debugged, and the target signal for the sound equipment can be generated based on the working frequency band of the sound equipment. Then, each loudspeaker in the sound equipment can be controlled to play the target signal in turn, and the first audio data corresponding to each channel can be collected when the loudspeaker corresponding to each channel plays the target signal alone, so that the first audio data when each channel plays the target signal alone can be obtained.
[0094] After obtaining the first audio data corresponding to each channel, all loudspeakers in the sound equipment can be controlled to play the target signal simultaneously, and the audio data when all loudspeakers play the target signal simultaneously can be collected, that is, the second audio data.
[0095] Step 202, determining a first audio impulse response corresponding to the first audio data, and determining a second audio impulse response corresponding to the second audio data.
[0096] The audio impulse response can include the first audio impulse response corresponding to the first audio data and the second audio impulse response corresponding to the second audio data. The first audio impulse response can be an impulse response obtained by impulse solving the first audio data, and the second audio impulse response can be an impulse response obtained by impulse solving the second audio data.
[0097] After obtaining the first audio data and the second audio data, the impulse responses of each first audio data and second audio data can be calculated by signal processing techniques such as Fourier transform method, correlation function method, etc. to obtain the first audio impulse response corresponding to each first audio data and the second audio impulse response corresponding to the second audio data.
[0098] Step 203, determining a target filter coefficient of a filter in the sound equipment according to a global optimization algorithm, the first audio impulse response of each channel, and the second audio impulse response.
[0099] After obtaining the first audio impulse response of each channel and the second audio impulse response, the first audio impulse response of each channel and the second audio impulse response can be taken as input, and the target filter coefficient of the filter in the sound equipment can be calculated by using the global optimization algorithm.
[0100] In an embodiment of the present application, step 203 can include steps 2031 to 2032:
[0101] Step 2031, input each first audio impulse response into the genetic algorithm in turn to obtain the intermediate filter coefficients corresponding to each channel.
[0102] Wherein, the genetic algorithm can be used to calculate the fitness corresponding to the initial filter coefficients in the channel based on the fitness function, and determine the intermediate filter coefficients corresponding to each channel based on the fitness, the fitness function can be determined based on the audio impulse response and the initial filter coefficients, and the initial filter coefficients can be the filter coefficients when the filter in the sound equipment is not adjusted.
[0103] After obtaining the first audio impulse response, the initial filter coefficients of the filter in the sound equipment can be determined, and the initial filter coefficients are randomly amplified to generate multiple groups of filter coefficients, that is, the initial population in the genetic algorithm, and the fitness function is determined according to the equalization degree of the filter processed after the first audio impulse response and the initial filter coefficients, and then the fitness of each individual in the initial population can be calculated by using the determined fitness function, and the initial population can be iterated multiple times based on the fitness of each individual by using random sampling selection method, so that one or more individuals with high fitness are converged in the initial population after multiple iterations, that is, one individual with the maximum fitness or multiple individuals with fitness greater than the preset fitness are found after a preset number of iterations, that is, the intermediate filter coefficients.
[0104] Step 2032, input the second audio impulse response and the intermediate filter coefficients corresponding to each channel into the neural network model to obtain the target filter coefficients of the filter in the sound equipment.
[0105] Wherein, the neural network model can include a diffusion model, the diffusion model can be used to add random noise to the intermediate filter coefficients in the forward diffusion process to obtain a random coefficient set, and to denoise the random coefficient set in the reverse diffusion process to obtain the target filter coefficients, and the random coefficient set can be a set of filter coefficients obtained by adding random noise to the intermediate filter coefficients.
[0106] After obtaining the second audio impulse response and the intermediate filter coefficients, the second audio impulse response and the intermediate filter coefficients can be input into the neural network model, and the neural network model can add random noise to the intermediate filter coefficients in the forward diffusion process to obtain a random coefficient set, and denoise the random coefficient set in the reverse diffusion process to obtain the target filter coefficients.
[0107] Referring toFigure 3 , Figure 3 A flowchart of a global optimization algorithm provided by an embodiment of the present application is shown. As shown in FIG. 3, after obtaining the audio impulse response, since the audio impulse response can include the first audio impulse response and the second audio impulse response corresponding to each channel, each first audio impulse response can be input into the genetic algorithm in turn to obtain the intermediate filter coefficient corresponding to each channel, and the second audio impulse response and the intermediate filter coefficient corresponding to each channel can be input into the neural network model, so that the target filter coefficient of the filter in the sound equipment can be obtained. Figure 3
[0108] Step 204, controlling the sound equipment to output the audio signal by using the target filter coefficient.
[0109] In the embodiment of the present application, by obtaining the first audio data when each channel plays the target signal alone, and obtaining the second audio data when multiple channels play the target signal at the same time, the first audio impulse response corresponding to the first audio data is determined, and the second audio impulse response corresponding to the second audio data is determined, and the target filter coefficient of the filter in the sound equipment is determined according to the global optimization algorithm, the first audio impulse response and the second audio impulse response of each channel. The filter coefficient of the vehicle-mounted sound equipment can be debugged based on the audio impulse response of the sound equipment and the preset global optimization algorithm, which reduces the situation that the device parameters of the vehicle-mounted sound equipment are different after each debugging due to the influence of the subjective factors of professional personnel, and the sound equipment outputs the audio signal by using the target filter coefficient, so that the actual frequency response of the sound equipment output matches the target frequency response of the audio signal, so that the vehicle-mounted sound equipment can output the required audio signal, and the accuracy of debugging the vehicle-mounted sound equipment is improved.
[0110] Referring to Figure 4 , Figure 4 A flowchart of a debugging method of a sound equipment provided by an embodiment of the present application is shown, which can specifically include the following steps:
[0111] Step 401, determining the sweep signal of the sound equipment according to the working frequency band of the sound equipment.
[0112] Step 402, controlling the sound equipment to play the sweep signal.
[0113] Step 403, collecting the audio data of the sound equipment when playing the sweep signal by using the audio collection device.
[0114] Step 404, determining the audio impulse response of the sound equipment according to the audio data.
[0115] In step 405, the first filter coefficient of the filter in the sound equipment is determined according to the global optimization algorithm and the audio impulse response.
[0116] In step 406, it is determined whether the actual frequency response of the audio signal output by the sound equipment with the first filter coefficient matches the target frequency response. If yes, step 407 is performed. If no, step 408 is performed.
[0117] In step 407, the first filter coefficient is determined as the target filter coefficient, and the sound equipment is controlled to output the audio signal with the target filter coefficient.
[0118] In step 408, the swept frequency signal is processed based on the first filter coefficient to obtain a processed swept frequency signal, and steps 402 are repeatedly performed based on the processed swept frequency signal.
[0119] In the embodiments of the present application, the swept frequency signal of the sound equipment is determined according to the working frequency band of the sound equipment, the sound equipment is controlled to play the swept frequency signal, the audio data of the sound equipment when playing the swept frequency signal is collected by the audio collection device, the audio impulse response of the sound equipment is determined according to the audio data, the first filter coefficient of the filter in the sound equipment is determined according to the global optimization algorithm and the audio impulse response, it is determined whether the actual frequency response of the audio signal output by the sound equipment with the first filter coefficient matches the target frequency response, in the case that the actual frequency response matches the target frequency response, the first filter coefficient is determined as the target filter coefficient, and then the filter coefficient of the vehicle-mounted sound equipment can be adjusted based on the audio impulse response of the sound equipment and the preset global optimization algorithm, which reduces the case that the device parameters of the vehicle-mounted sound equipment are different after each adjustment due to the influence of the subjective factors of professional personnel, and the actual frequency response of the sound equipment output matches the target frequency response of the audio signal by controlling the sound equipment to output the audio signal with the target filter coefficient, so that the vehicle-mounted sound equipment can output the required audio signal, and the accuracy of adjusting the vehicle-mounted sound equipment is improved. In the case that the actual frequency response does not match the target frequency response, the swept frequency signal is processed based on the first filter coefficient to obtain a processed swept frequency signal, and the step of controlling the sound equipment to play the swept frequency signal is repeatedly performed based on the processed swept frequency signal, which can reduce the case that the actual frequency response of the audio signal output with the first filter coefficient does not match the target frequency response, thereby further improving the accuracy of determining the target filter coefficient and improving the accuracy of adjusting the vehicle-mounted sound equipment.
[0120] Referring to Figure 5 , Figure 5 The structure of the adjusting device of the sound equipment provided by an embodiment of the present application is shown, which can specifically include the following modules:
[0121] The acquisition module 501 is configured to acquire audio data of the sound equipment, wherein the audio data is audio data collected by the sound equipment when playing the target signal.
[0122] The determination module 502 is configured to determine an audio impulse response of the sound equipment according to the audio data, and determine target filter coefficients of a filter in the sound equipment according to a global optimization algorithm and the audio impulse response.
[0123] The control module 503 is configured to control the sound equipment to output an audio signal by using the target filter coefficients, wherein an actual frequency response of the sound equipment output matches a target frequency response of the audio signal.
[0124] In an implementation manner, the sound equipment includes at least two channels, and the acquisition module 501 is further configured to:
[0125] acquire first audio data when each channel plays the target signal alone;
[0126] acquire second audio data when the multiple channels play the target signal simultaneously;
[0127] In an implementation manner, the audio impulse response includes a first audio impulse response corresponding to the first audio data and a second audio impulse response corresponding to the second audio data, and the control module 503 is further configured to:
[0128] determine the target filter coefficients of the filter in the sound equipment according to the global optimization algorithm, the first audio impulse response of each channel, and the second audio impulse response.
[0129] In an implementation manner, the global optimization algorithm includes a genetic algorithm and a neural network model, and the control module 503 is further configured to:
[0130] input each first audio impulse response into the genetic algorithm in sequence to obtain intermediate filter coefficients corresponding to each channel;
[0131] input the second audio impulse response and the intermediate filter coefficients corresponding to each channel into the neural network model to obtain the target filter coefficients of the filter in the sound equipment, wherein the neural network model includes a diffusion model, the diffusion model is configured to add random noise to the intermediate filter coefficients in a forward diffusion process to obtain a random coefficient set, and is configured to perform denoising processing on the random coefficient set in a reverse diffusion process to obtain the target filter coefficients.
[0132] In an implementation manner, the genetic algorithm is configured to calculate an adaptability corresponding to an initial filter coefficient in a channel based on an adaptability function, and determine the intermediate filter coefficients corresponding to each channel based on the adaptability, wherein the adaptability function is determined based on the audio impulse response and the initial filter coefficient.
[0133] In an implementation manner, the control module 503 can be further configured to:
[0134] determine the filter parameters of the filter in the sound equipment;
[0135] determine the target filter coefficients of the filter in the sound equipment according to the global optimization algorithm, the audio impulse response and the filter parameters.
[0136] In an implementation manner, the control module 503 can be further configured to:
[0137] determine the first filter coefficients according to the global optimization algorithm and the audio impulse response;
[0138] determine the first filter coefficients as the target filter coefficients in a case that the actual frequency response of the audio signal output by the sound equipment with the first filter coefficients matches the target frequency response.
[0139] In an implementation manner, the control module 503 can be further configured to:
[0140] perform processing on the target signal based on the first filter coefficients to obtain processed target signal in a case that the actual frequency response of the audio signal output by the sound equipment with the first filter coefficients does not match the target frequency response;
[0141] control the sound equipment to play the processed target signal to obtain processed audio data;
[0142] repeat the step of determining the target filter coefficients of the filter in the sound equipment according to the global optimization algorithm and the audio impulse response based on the processed audio data.
[0143] In the embodiments of the present application, the audio data of the sound equipment is acquired, the audio data is the audio data collected by the sound equipment when playing the target signal, the audio impulse response of the sound equipment is determined according to the audio data, and the target filter coefficients of the filter in the sound equipment are determined according to the global optimization algorithm and the audio impulse response. The filter coefficients of the sound equipment in the vehicle can be debugged based on the audio impulse response of the sound equipment and the preset global optimization algorithm, which reduces the case that the device parameters of the sound equipment in the vehicle are different after each debugging due to the influence of subjective factors of professional personnel. The sound equipment outputs the audio signal by using the target filter coefficients, so that the actual frequency response of the sound equipment matches the target frequency response of the audio signal, thereby the sound equipment in the vehicle can output the required audio signal, and the accuracy of debugging the sound equipment in the vehicle is improved.
[0144] It should be noted that the information interaction between the above devices, the execution process and the like, since the same concept based on the method embodiments of the present application, its specific functions and the resulting technical effects, specific can be seen from the method embodiments, this will not be repeated here.
[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit, module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units, modules according to the needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or software. In addition, the specific name of each functional unit and module is only for easy distinction, and does not limit the protection scope of the present application. The specific working process of the unit and module in the system can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0146] Reference Figure 6 , Figure 6 A structure block diagram of a terminal device provided by an embodiment of the present application is shown, as Figure 6 shown, the present embodiment provides a terminal device 61, which comprises at least one processor 611, a memory 612, and a computer program 6121 stored in the memory 612 and executable on the at least one processor 611. The processor 611 executes the computer program 6121 to implement the steps in any of the above method embodiments.
[0147] The present embodiment also provides a computer readable storage medium, which stores a computer program, and the computer program is executable by a processor to implement the steps in any of the above method embodiments.
[0148] The present embodiment provides a computer program product, when the computer program product is run on a terminal device, so that the terminal device executes the steps in any of the above method embodiments.
[0149] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the photographing device / terminal equipment, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal and a software distribution medium.
[0150] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method of debugging an acoustic device, characterized by, The method comprises: acquiring audio data of a sound equipment; wherein the audio data is audio data collected by the sound equipment when playing a target signal, the sound equipment comprises at least two channels, and the acquiring of the audio data of the sound equipment comprises: acquiring first audio data when each channel plays the target signal alone; and acquiring second audio data when multiple channels play the target signal simultaneously; determining an audio impulse response of the sound equipment according to the audio data, wherein the audio impulse response comprises a first audio impulse response corresponding to the first audio data and a second audio impulse response corresponding to the second audio data; determining target filter coefficients of a filter in the sound equipment according to a global optimization algorithm and the audio impulse response, wherein the determining of the target filter coefficients of the filter in the sound equipment according to the global optimization algorithm and the audio impulse response comprises: determining the target filter coefficients of the filter in the sound equipment according to a global optimization algorithm, the first audio impulse response of each channel, and the second audio impulse response; controlling the sound equipment to output an audio signal by using the target filter coefficients; wherein an actual frequency response of the sound equipment output matches a target frequency response of the audio signal.
2. The method of claim 1, wherein the audio device is a speaker. The global optimization algorithm comprises a genetic algorithm and a neural network model, and the determining of the target filter coefficients of the filter in the sound equipment according to the global optimization algorithm, the first audio impulse response of each channel, and the second audio impulse response comprises: inputting each first audio impulse response into the genetic algorithm in sequence to obtain intermediate filter coefficients corresponding to each channel; inputting the second audio impulse response and the intermediate filter coefficients corresponding to each channel into the neural network model to obtain the target filter coefficients of the filter in the sound equipment; wherein the neural network model comprises a diffusion model, the diffusion model is used for adding random noise to the intermediate filter coefficients in a forward diffusion process to obtain a random coefficient set, and is used for denoising the random coefficient set in a reverse diffusion process to obtain the target filter coefficients.
3. The method of claim 2, wherein the audio device is a speakerphone. The genetic algorithm is used for calculating a fitness corresponding to an initial filter coefficient in the channel based on a fitness function, and determining the intermediate filter coefficients corresponding to each channel based on the fitness, wherein the fitness function is determined based on the audio impulse response and the initial filter coefficient.
4. The method of claim 1, wherein the audio device is a speakerphone. The determining of the target filter coefficients of the filter in the sound equipment according to the global optimization algorithm and the audio impulse response comprises: determining filter parameters of the filter in the sound equipment; determining the target filter coefficients of the filter in the sound equipment according to the global optimization algorithm, the audio impulse response, and the filter parameters.
5. The method of adjusting the sound equipment according to any one of claims 1-4, wherein, The determining of the target filter coefficients of the filter in the sound equipment according to the global optimization algorithm and the audio impulse response comprises: determining first filter coefficients according to a global optimization algorithm and the audio impulse response; In a case where an actual frequency response of an audio signal output by the acoustic device with the first filter coefficient matches the target frequency response, the first filter coefficient is determined as the target filter coefficient.
6. The method of adjusting the sound equipment according to claim 5, wherein, The method further includes: In a case where the actual frequency response of the audio signal output by the acoustic device with the first filter coefficient does not match the target frequency response, processing the target signal based on the first filter coefficient to obtain a processed target signal; controlling the acoustic device to play the processed target signal to obtain processed audio data; repeating the step of determining the target filter coefficient of the filter in the acoustic device based on the global optimization algorithm and the audio impulse response based on the processed audio data.
7. An adjusting device of a sound equipment, characterized by comprising: The apparatus includes: an obtaining module configured to obtain audio data of an acoustic device, wherein the audio data is audio data collected by the acoustic device when playing a target signal, the acoustic device includes at least two channels, and the obtaining of the audio data of the acoustic device includes: obtaining first audio data when each channel plays the target signal alone, and obtaining second audio data when multiple channels play the target signal simultaneously; a determining module configured to determine an audio impulse response of the acoustic device based on the audio data, and determine a target filter coefficient of a filter in the acoustic device based on a global optimization algorithm and the audio impulse response, wherein the audio impulse response includes a first audio impulse response corresponding to the first audio data and a second audio impulse response corresponding to the second audio data, and the determination of the target filter coefficient of the filter in the acoustic device based on the global optimization algorithm and the audio impulse response includes: determining the target filter coefficient of the filter in the acoustic device based on the global optimization algorithm, the first audio impulse response of each channel, and the second audio impulse response; a control module configured to control the acoustic device to output an audio signal with the target filter coefficient, wherein an actual frequency response of the acoustic device matches a target frequency response of the audio signal.
8. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor implements the method in any one of claims 1 to 6 when executing the computer program.
9. A computer program product comprising a computer program, characterized in that, The computer program, when running on a computer, causes the computer to perform the method in any one of claims 1 to 6. The computer program, when running on a computer, causes the computer to perform the method in any one of claims 1 to 6.
Citation Information
Patent Citations
Vehicle-mounted tuning method and device
CN116866777A
Sound signal processing method, sound signal processing device, and storage medium that stores sound signal processing program
US20210385597A1