Methods, devices, storage media, and computer program products for stopband vestigial compensation of digital filters
By constructing a dynamic compensation model for stopband residual noise and utilizing a deep recurrent network to learn the physical state continuity of the hardware analog filter, the problems of slow response speed and high stopband residual energy of digital filters when adjusting the cutoff frequency in real time at high frequencies are solved. This achieves a smooth transition without delay and suppresses stopband energy, thereby improving the response speed and audio quality of digital filters.
Patent Information
- Application Number
- CN202511454434.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-10-13
AI Technical Summary
When digital filters adjust the cutoff frequency in real time at high frequencies, they have slow response speed and high residual energy in the stopband. Existing technologies cannot effectively suppress transient pole drift and the rise in stopband energy.
By constructing a dynamic compensation model for stopband residual noise, and using a deep recurrent network to learn the physical state continuity of the hardware analog filter, synchronous input of digital filtered signal and audio signal is achieved, and smoothing is performed at a preset ratio to obtain a calibration signal, thereby suppressing stopband residual energy.
This technology improves the response speed of digital filters when adjusting the cutoff frequency in real time at high frequencies and effectively suppresses residual energy in the stopband, achieving delay-free data processing. It balances the flexibility of digital filters with the low-noise performance of analog filters, thus achieving a balance between the flexibility of digital filters and the low-noise performance of analog systems.
Smart Images

Figure CN120915271B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio signal processing technology, and in particular to methods, devices, storage media, and computer program products for stopband residual compensation of digital filters. Background Technology
[0002] Digital filters (such as IIR low-pass or high-pass filters) are widely used in scenarios requiring real-time variable cutoff frequencies. When the cutoff frequency needs to be adjusted continuously at high frequencies on a per-sampling-period basis, the historical state parameters (delay unit register values) inside the filter must be immediately replaced with the values corresponding to the new frequency. Currently, two main update strategies are used: one is to directly clear the old parameters or overwrite them with the new parameters all at once; the other is to run two sets of parameters in parallel within a time window of tens of milliseconds, mix them proportionally, and then switch between them. However, the former mathematically disrupts the phase continuity between the original and new states, causing transient pole drift in the filter transfer function in the stopband region, resulting in a rapid increase in stopband energy and the formation of a high-frequency spike; although the latter suppresses this spike through delay mixing, the introduced fixed delay window (≥50 ms) prevents the filter from completing the response within the next sampling period, thus failing to support high-frequency real-time parameter tuning.
[0003] Therefore, how to improve the response speed of digital filters when adjusting the cutoff frequency in real time at high frequencies and effectively suppress the residual energy in the stopband during cutoff frequency adjustment has become a technical problem that this application urgently needs to solve.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this application is to provide a method, device, storage medium, and computer program product for stopband residual compensation of digital filters, aiming to solve the technical problem of how to improve the response speed of digital filters when adjusting the cutoff frequency in real time at high frequencies and effectively suppress the stopband residual energy at the moment of cutoff frequency adjustment.
[0006] To achieve the above objectives, this application proposes a stopband vestigial compensation method for digital filters, the method comprising:
[0007] Acquire raw audio signals and digitally filtered signals;
[0008] The digital filtered signal and the original audio signal are synchronously input into a pre-built dynamic compensation model for stopband residual noise to obtain a smooth transition signal. The dynamic compensation model for stopband residual noise uses the hardware filtered signal output by the hardware analog filter as the target label.
[0009] The smooth transition signal and the digital filter signal are superimposed at a preset superposition ratio to obtain the calibration signal.
[0010] In one embodiment, before the step of synchronously inputting the digitally filtered signal and the original audio signal into a pre-constructed dynamic compensation model for stopband residual noise to obtain a smooth transition signal, the method further includes:
[0011] Training datasets are acquired based on a pre-deployed hardware digital dual-mode synchronous architecture. The data format of the training dataset is pure time-domain sampled data, and the training dataset includes hardware analog filtered signals, raw audio training signals, and digital filtered training signals.
[0012] Using the hardware analog filtered signal as the target label, the original audio training signal and the digital filtered training signal are input into the deep recurrent network model to generate a preliminary prediction signal;
[0013] The final prediction signal is determined based on the preliminary prediction signal and the digital filter training signal;
[0014] Calculate the total loss value between the final predicted signal and the target label, update the parameters of the deep recurrent network model based on the total loss value, and iteratively execute the following steps: using the hardware analog filtered signal as the target label, input the original audio training signal and the digital filtered training signal into the deep recurrent network model to generate a preliminary predicted signal until the total loss value reaches loss convergence;
[0015] Under the condition that the total loss value reaches the loss convergence condition, the iterative deep recurrent network model is used as the dynamic compensation model for stopband residual noise.
[0016] In one embodiment, the step of acquiring the training dataset based on a pre-deployed hardware digital dual-mode synchronous architecture further includes:
[0017] Load the digital filter plugin and the original playback track, and form a digital plugin track based on the digital filter plugin;
[0018] A hardware processing track is obtained by connecting a pre-deployed hardware analog filter through an audio interface loop;
[0019] The cutoff frequency control parameters of the hardware processing track and the digital plug-in track are synchronized. The cutoff frequency control parameters are obtained based on the automatic curve mapping to control signals.
[0020] A hardware-digital dual-mode synchronous architecture is constructed based on the hardware processing track, the digital plug-in track, and the original playback track.
[0021] In one embodiment, the step of calculating the total loss value between the final predicted signal and the target label includes:
[0022] Mean square error is used as the time-domain loss function, and short-time Fourier transform is used as the frequency-domain loss function;
[0023] Calculate the temporal loss value between the final predicted signal and the target label based on the temporal loss function;
[0024] Perform a Fast Fourier Transform on the final predicted signal and the target label, and calculate the frequency domain loss value of the final predicted signal and the target label after the Fast Fourier Transform based on the frequency domain loss function.
[0025] The total loss value is obtained based on the time-domain loss value and the frequency-domain loss value.
[0026] In one embodiment, the step of calculating the temporal loss value between the final predicted signal and the target label based on the temporal loss function further includes:
[0027] Obtain the physical characteristic parameters of the hardware analog filter in the hardware digital dual-mode synchronous architecture;
[0028] A priori constraint term is constructed based on the physical characteristic parameters, and the priori constraint term is incorporated into the time-domain loss function.
[0029] In one embodiment, the step of synchronously inputting the digitally filtered signal and the original audio signal into a pre-constructed dynamic compensation model for stopband residual noise to obtain a smooth transition signal includes:
[0030] The digital filtered signal and the original audio signal are input into a pre-built dynamic compensation model for stopband residual noise in a sampling point-level synchronous manner to perform dynamic compensation for stopband residual noise, and a smooth transition signal is output point by point.
[0031] The stopband residual noise dynamic compensation includes:
[0032] The multi-level gated loop unit of the stopband residual noise dynamic compensation model performs point-by-point feature capture on the digital filtered signal and the original audio signal to obtain transient features;
[0033] The transient characteristics are mapped to compensation coefficients by the fully connected layer of the stopband residual noise dynamic compensation model, and dynamic compensation parameters are calculated based on the compensation coefficients.
[0034] In one embodiment, after the step of synchronously inputting the digitally filtered signal and the original audio signal into a pre-constructed dynamic compensation model for stopband residual noise to obtain a smooth transition signal, the method further includes:
[0035] Monitor the group band frequency band of the smooth transition signal, and calculate the average noise energy value within the group band frequency band based on short-time Fourier transform;
[0036] If the average noise energy value is higher than the preset noise energy value within a continuous preset monitoring period, the model optimization of the stopband residual noise dynamic compensation model is triggered. The steps for triggering the model optimization of the stopband residual noise dynamic compensation model include:
[0037] Noise samples are extracted from the smooth transition signal, and the weights of the loss function of the stopband residual noise dynamic compensation model are updated based on the noise samples;
[0038] The hyperparameters of the stopband residual noise dynamic compensation model are adjusted using a grid search.
[0039] Furthermore, to achieve the above objectives, this application also proposes a stopband vestigial compensation device for a digital filter, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the stopband vestigial compensation method for a digital filter as described above.
[0040] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the stopband residual compensation method for the digital filter as described above.
[0041] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the stopband residual compensation method for digital filters as described above.
[0042] One or more technical solutions proposed in this application have at least the following technical effects:
[0043] The original audio signal and the digitally filtered signal are acquired based on a pre-deployed hardware digital dual-mode synchronous architecture. The digitally filtered signal and the original audio signal are synchronously input into a pre-constructed stopband residual noise dynamic compensation model for processing to obtain a smooth transition signal. The stopband residual noise dynamic compensation model uses the hardware-filtered signal output by the hardware analog filter as the target label. The smooth transition signal and the digitally filtered signal are superimposed at a preset superposition ratio to obtain a calibration signal. First, the hardware digital dual-mode synchronous architecture ensures synchronous acquisition of the original audio signal and the digitally filtered signal, guaranteeing delay-free data acquisition. Second, the stopband residual noise dynamic compensation model is trained using the smooth transition signal output by the hardware analog filter as the target label, enabling the model to learn the inherent advantage of analog filters based on the continuity of physical component states, thereby accurately reproducing the smooth transition characteristics during parameter adjustment in the digital domain. Third, the smooth transition signal and the digitally filtered signal are superimposed at a preset superposition ratio, preserving the high-frequency details after digital filter processing while obtaining a calibration signal that optimizes smoothness characteristics. Therefore, the digital filtered signal and the original audio signal are synchronously input into a pre-constructed dynamic compensation model for stopband residual noise for processing. The final output is a smooth transition signal with no delay and effective suppression of stopband residual energy. This balances the flexibility of the digital filter with the low noise performance of the analog system, thereby improving the response speed of the digital filter when adjusting the cutoff frequency in real time at high frequency and effectively suppressing the stopband residual energy at the moment of cutoff frequency adjustment. Attached Figure Description
[0044] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0045] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 A flowchart illustrating the first embodiment of the stopband residual compensation method for digital filters in this application;
[0047] Figure 2 A flowchart illustrating the second embodiment of the stopband residual compensation method for digital filters in this application;
[0048] Figure 3 This is a flowchart illustrating the third embodiment of the stopband residual compensation method for digital filters in this application.
[0049] Figure 4This is a schematic diagram of the hardware digital dual-mode synchronous architecture provided in this application;
[0050] Figure 5 A schematic diagram of the overall process for the stopband residual compensation method provided in this application;
[0051] Figure 6 This is a schematic diagram of the module structure of the stopband residual compensation device for the digital filter in an embodiment of this application;
[0052] Figure 7 This is a schematic diagram of the hardware operating environment involved in the stopband residual compensation method of the digital filter in the embodiments of this application.
[0053] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0054] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0055] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0056] The main solution of this application embodiment is: to build a "hardware-digital dual-mode synchronous acquisition architecture" inside the digital audio workstation to acquire the unprocessed raw audio signal X. (n) With the initial output Y of the digital filter 1(n) The output Y of the hardware filter (n) The three signals (audio, digital, and digital) are used as training datasets to train a deep recurrent network model, resulting in a dynamic compensation model for stopband residual noise. The output of the hardware filter is used as the target label, mean square error as the time-domain loss function, and short-time Fourier transform as the frequency-domain loss function. After the model is trained, the original audio signal and the digital filter signal are input into the trained model to obtain a smooth transition signal that retains the smoothing characteristics of the hardware filter. Simultaneously, to preserve the high-frequency details processed by the digital filter and obtain a calibration signal that optimizes smoothness, the smooth transition signal and the digital filter signal are superimposed at a preset superposition ratio to obtain the calibration signal. Specifically, the model uses a gated recurrent unit (GRU) as its core, performs forward inference with a single sampling step, and directly outputs the compensated smooth transition signal Y. 2(n) The smooth transition signal and the digital filter signal are superimposed to obtain the final calibration signal Y. 3(n) During the network training phase, the DAW's three-track synchronization system locks the original audio track, the digital plug-in track, and the recorded track processed by the hardware analog filter into the same clock domain, and uses the output Y of the hardware filter... (n)As the target label; the network minimizes Y 3(n) With Y (n) Targeting the mean square error and spectral envelope, this study learns the nonlinear inertial characteristics of analog filters during capacitor charging and discharging, thereby mastering how to suppress stopband transient spikes caused by phase discontinuities at the moment of abrupt cutoff frequency change. After training, the neural network model weights are frozen and deployed in the real-time link: when the user changes the cutoff frequency of the digital filter in real time via MIDI CC (MIDI Continuous Controller), the digital filter immediately outputs Y according to the new parameters. 1(n) The output is related to the original signal X. (n) After sampling-level alignment, the signals are simultaneously fed into the network, which processes them with extremely low latency, ultimately yielding a smooth transition signal Y that maintains the flexible editing advantages of digital systems while suppressing stopband residual energy to below -70 dB. 2(n) This achieves a delay-free smooth transition and stopband residue suppression for digital filters when adjusting the cutoff frequency in real time at high frequencies.
[0057] This application's embodiments take into account the following issues: First, digital filters suffer from the following problems when rapidly adjusting their cutoff frequencies: When adjusting the cutoff frequency of a low-pass / high-pass filter in real time (e.g., for vocal enhancement in audio production or creating special sound effects), the filter needs to synchronously update the historical state (delay unit value) parameters stored in the mathematical calculation formula. However, directly clearing or forcibly overwriting the old parameters will cause transient oscillations and step jumps in the output signal—for example, the music being played suddenly "interrupted" and then resumed, producing a brief "pop" or noise. The root cause of this problem is that digital filters rely on precise mathematical calculations and parameter presets; abrupt parameter switching may trigger brief but jarring high-frequency noise. Essentially, the phase continuity of the mathematical model is disrupted: there is a lack of smooth transition between the waveform memory (such as resonant energy) accumulated in the original filter structure and the calculated state of the new parameter system. Spectral analysis reveals significant residual noise signals in the stopband region.
[0058] To address the issue of residual popping noise in the cutoff frequency of digital filters (such as IIR low-pass or high-pass filters) during real-time adjustment, engineers often employ a gradual parameter transition: initially retaining some of the calculation weights of the old parameters, then gradually transitioning to the new parameters. The system runs two sets of filter parameters simultaneously and mixes the output signals proportionally within tens of milliseconds. For example, when switching between vocal enhancement modes in a karaoke app in real time, the algorithm briefly retains the high-frequency suppression effect of the old parameters while gradually increasing the low-frequency attenuation of the new parameters, avoiding the "pop" switching noise.
[0059] Another approach is to break the frequency adjustment into multiple small steps (e.g., adjusting from 100Hz to 200Hz in ten steps), which can reduce transient noise. This is similar to climbing stairs instead of jumping in one step, but at the cost of increased adjustment latency (e.g., the filter response will be 0.1 seconds slower), resulting in a slower response speed that cannot meet the needs of some real-time scenarios. This method is commonly found in embedded microphone noise reduction chips, sacrificing about 50ms of latency for a pop-free frequency tuning process.
[0060] The above optimization strategies alleviate or mask the signal abruptness caused by parameter updates in digital filters to some extent, but they all introduce a certain time delay, sacrificing adjustment speed (on the order of approximately 100ms) for seamless switching. This limits their application in real-time high-frequency parameter tuning scenarios.
[0061] Furthermore, considering that analog filters achieve filtering based on voltage and current changes in physical components such as resistors and capacitors, they naturally avoid the problem of abrupt parameter changes. Their core advantage lies in the continuity of the physical component states. For example, in the classic Moog trapezoidal filter in a synthesizer, when the cutoff frequency is adjusted by turning a knob, the charge inside the capacitor does not reset instantly, but transitions smoothly with the physical state of the component, avoiding the "parameter conflict" caused by mathematical truncation errors in digital systems. It's like a spring gradually rebounding after being compressed, slowly migrating to the new state. This "inertial buffer" provided by the physical characteristics of electronic components (such as capacitor charging time and inductor hysteresis) makes sound changes as natural and smooth as water flowing from a narrow pipe into a wide channel. Even with rapid knob turning, the sound changes remain soft and natural.
[0062] However, analog systems struggle to integrate into modern digital audio workflows. For instance, adding analog filters to a pre-recorded guitar audio track in a DAW (Ableton Live or Pro Tools) requires reconnecting the hardware, playing back, and recording the entire track after any parameter modification. The original signal cannot be recovered via undo, resulting in extremely low efficiency. Furthermore, the inherent characteristics of analog circuits (such as frequency response shifts caused by capacitor aging) make it difficult to reproduce the effects of the same set of knob parameters at different times, hindering music production scenarios requiring precise effect replication. In contrast, digital filters not only allow for repeated listening to different cutoff frequencies on the same audio segment but also enable precise control over parameter changes through automated curve plotting (e.g., making the low-pass frequency fluctuate with the drum beat), a level of efficiency that analog devices cannot match.
[0063] Therefore, this application provides a solution that reproduces the organic response characteristics of analog filters while retaining the processing flexibility of digital filters, thereby improving the response speed of digital filters when adjusting the cutoff frequency in real time at high frequencies and suppressing the residual energy in the stopband at the moment of cutoff frequency adjustment, effectively suppressing step noise.
[0064] Specifically, the original audio signal and the digitally filtered signal are acquired based on a pre-deployed hardware digital dual-mode synchronous architecture. The digitally filtered signal and the original audio signal are synchronously input into a pre-constructed stopband residual noise dynamic compensation model for processing to obtain a smooth transition signal. The stopband residual noise dynamic compensation model uses the hardware-filtered signal output by the hardware analog filter as the target label. The smooth transition signal and the digitally filtered signal are superimposed at a preset superposition ratio to obtain a calibration signal. First, the hardware digital dual-mode synchronous architecture ensures synchronous acquisition of the original audio signal and the digitally filtered signal, guaranteeing delay-free data acquisition. Second, the stopband residual noise dynamic compensation model is trained using the smooth transition signal output by the hardware analog filter as the target label, enabling the model to learn the inherent advantage of analog filters based on the continuity of physical component states, thereby accurately reproducing the smooth transition characteristics during parameter adjustment in the digital domain. Third, the smooth transition signal and the digitally filtered signal are superimposed at a preset superposition ratio, preserving the high-frequency details after digital filter processing while obtaining a calibration signal that optimizes smoothness characteristics. Therefore, the digital filtered signal and the original audio signal are synchronously input into a pre-constructed dynamic compensation model for stopband residual noise for processing. The final output is a smooth transition signal with no delay and effective suppression of stopband residual energy. This balances the flexibility of the digital filter with the low noise performance of the analog system, thereby improving the response speed of the digital filter when adjusting the cutoff frequency in real time at high frequency and effectively suppressing the stopband residual energy at the moment of cutoff frequency adjustment.
[0065] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or stopband vestigial compensation system capable of performing the above functions. The following description uses a stopband vestigial compensation system as an example to illustrate this embodiment and the subsequent embodiments.
[0066] Based on this, embodiments of this application provide a stopband vestigial compensation method for a digital filter, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the stopband residual compensation method for digital filters in this application.
[0067] In this embodiment, the stopband vestigial compensation method for the digital filter includes steps S10~S30:
[0068] Step S10: Acquire the original audio signal and the digitally filtered signal;
[0069] The raw audio signal refers to the pulse code modulation (PCM) data stream stored in a digital audio workstation (DAW) in WAV or AIFF format. This data stream is unprocessed by any filters and retains full-band information. The digitally filtered signal refers to the output data stream of the raw audio signal after preliminary processing by an IIR dual second-order digital filter. This data stream contains stopband residual noise caused by real-time parameter tuning.
[0070] The acquisition process is implemented through the audio driver layer of the DAW. The system calls the ASIO or Core Audio interface to read the raw audio signal frame by frame from the track buffer, and at the same time reads the digital filtered signal from the output buffer of the digital filter plugin, thereby ensuring that the two signals are aligned at the sampling clock level.
[0071] It should be noted that both the digital filter plugin in the training phase and the digital filter in the inference phase of this application use IIR bi-second-order filters. Their transfer functions are:
[0072]
[0073] in, , , , , These are the filter coefficients.
[0074] Step S20: The digital filtered signal and the original audio signal are synchronously input into a pre-constructed dynamic compensation model for stopband residual noise for processing to obtain a smooth transition signal. The dynamic compensation model for stopband residual noise uses the hardware filtered signal output by the hardware analog filter as the target label.
[0075] The stopband residual noise dynamic compensation model is a supervised learning model that uses a deep recurrent network as the main body and the hardware filtered signal output by the hardware analog filter as the target label. Its input end simultaneously receives the digital filtered signal and the original audio signal, and the output end generates a smooth transition signal.
[0076] Smooth transition signal: The final audio sample sequence that eliminates popping sounds caused by parameter abrupt changes in the digital domain and approximates the characteristics of hardware filters in terms of phase continuity.
[0077] Synchronous input: After strictly aligning the digital filtered signal and the original audio signal on the sampling point-level time axis, the signal is fed into the model point by point to meet the requirements of streaming real-time processing.
[0078] In one possible implementation, the deep recurrent network can employ a 4-layer bidirectional GRU (Gated Recurrent Unit), with each layer having a hidden dimension of 256, followed by a 1×1 convolution for channel mixing. Specifically, the deep recurrent network using a 4-layer bidirectional GRU, with each layer containing 256 hidden units, extracts bidirectional temporal features from low to high levels through multi-layer bidirectional GRUs, capturing the complex dynamics of transient signals. Then, a 1×1 convolution is used for channel mixing, fusing the feature channels output from different hidden layers to further enhance the modeling ability for transient signals such as stopband residual noise.
[0079] In another possible implementation, a causal Transformer architecture can be used in conjunction with rotational position encoding to further capture long-range transient dependencies. Specifically, using a causal Transformer architecture with rotational position encoding ensures that the model relies only on past time step information to meet real-time processing requirements. Rotational position encoding incorporates positional information into the feature vector through a rotation matrix, overcoming the limitations of Transformer in modeling long sequence positions. This allows for more accurate capture of long-range transient dependencies during parameter switching in audio signals, improving the stability and continuity of stopband residual compensation.
[0080] Step S30: The smooth transition signal and the digital filter signal are superimposed at a preset superposition ratio to obtain the calibration signal.
[0081] The preset superposition ratio refers to the weight α(n) that is continuously varied between 0 and 1, which is predicted by the system in real time based on the neural network. This weight is applied between the smooth transition signal and the digitally filtered signal. The calibration signal refers to the audio data stream that is finally output to the main output of the DAW or driven by the speaker after being superimposed by weighted α(n).
[0082] First, align the smooth transition signal with the digitally filtered signal point by point, and then perform vector operations:
[0083] Calibration signal Y 3(n) =α(n)·Y 2(n) + (1-α(n))·Y 1(n)
[0084] Among them, Y 2(n) Y represents a smooth transition signal. 1(n) This represents the digitally filtered signal, and α(n) represents the preset superposition ratio. α(n) is much larger than 1-α(n) in order to retain a larger proportion of the smooth transition signal.
[0085] This embodiment provides a method for stopband residual noise compensation of a digital filter. It achieves synchronous acquisition of the original audio signal and the digital filtered signal through a hardware digital dual-mode synchronous architecture, ensuring delay-free data acquisition. Furthermore, the stopband residual noise dynamic compensation model is trained using the smooth transition signal output by the hardware analog filter as the target label. This allows the model to learn the inherent advantage of analog filters based on the continuity of physical component states, thereby accurately reproducing the smooth transition characteristics during parameter adjustment in the digital domain. Further, the smooth transition signal and the digital filtered signal are superimposed at a preset superposition ratio, preserving high-frequency details after digital filter processing while obtaining a calibration signal that optimizes smoothness characteristics. Therefore, the digital filtered signal and the original audio signal are synchronously input into the pre-constructed stopband residual noise dynamic compensation model for processing, ultimately outputting a smooth transition signal with no delay and effective suppression of stopband residual energy. This balances the flexibility of the digital filter with the low-noise performance of the analog system, thereby improving the response speed of the digital filter when adjusting the cutoff frequency in real time at high frequencies and effectively suppressing the stopband residual energy at the moment of cutoff frequency adjustment.
[0086] Based on the first embodiment of this application, a second embodiment of this application is proposed. In the second embodiment of this application, content that is the same as or similar to that in the first embodiment described above can be referred to the above description and will not be repeated hereafter.
[0087] Based on this, please refer to Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of this application, as shown below. Figure 2 As shown, steps S011 to S015 are included before step S20:
[0088] Step S011: Collect training dataset based on pre-deployed hardware digital dual-mode synchronous architecture. The data format of the training dataset is pure time-domain sampling data. The training dataset includes hardware analog filter signal, original audio training signal and digital filter training signal.
[0089] Pre-deployed hardware digital dual-mode synchronous architecture: a closed-loop signal link consisting of a digital audio workstation (DAW), audio interface, hardware analog filter and synchronous clock source. This architecture ensures strict alignment of the sampling clocks in the digital domain and analog domain through MIDI clock or word clock.
[0090] The training dataset refers to the entire set of data used for supervised learning. Its data format is pure time-domain sampled data, that is, each sample point only contains time-series amplitude values arranged according to the sampling rate, without containing any frequency domain or transform domain information.
[0091] Hardware analog filter signal refers to the waveform data obtained by processing the original audio training signal through a real hardware analog filter and then sampling it back through the audio interface. This waveform data has the inertia of capacitor charging and discharging, and can serve as an ideal reference without popping noise. The original audio training signal refers to the input audio segment used to drive the digital filter plug-in and hardware analog filter during the training phase. It usually includes white noise sweep, music segments, pulse signals, etc. The digital filter training signal refers to the output waveform obtained after the original audio training signal is processed in real time by the digital filter plug-in. This waveform retains the stopband residual noise caused by parameter jumps.
[0092] The system plays the original audio training signal through track 0 of the DAW, loads a digital filter plugin on track 1 to obtain a digital filter training signal, and connects a hardware analog filter through the audio interface loop to obtain a hardware analog filter signal. The three tracks are then written to the training dataset frame by frame.
[0093] Step S012: Using the hardware analog filtered signal as the target label, input the original audio training signal and the digital filtered training signal into the deep recurrent network model to generate a preliminary prediction signal;
[0094] The deep recurrent network model refers to a sequence-to-sequence network composed of multi-level gated recurrent units (GRUs). Its hidden state dimension, number of layers, and dropout ratio have been determined during the hyperparameter search phase. The preliminary prediction signal refers to the network's first estimate of the ideal noiseless output under the current parameter conditions. This estimate has not yet been fused with the digital filtering training signal. The target label is the aforementioned hardware analog filtering signal.
[0095] The original audio training signal and the digitally filtered training signal are concatenated at the sampling point level to form a two-dimensional input feature vector (channel 0 is the original audio training signal, and channel 1 is the digitally filtered training signal), which is then fed into a deep recurrent network model. The model captures transient features and capacitive inertia through GRU units, and finally generates a preliminary prediction signal with the same length as the target label at the output layer. Additionally, it should be noted that in one possible implementation, an attention mechanism can be superimposed on the bidirectional GRU to enhance the ability to locate abrupt change regions.
[0096] Step S013: Determine the final prediction signal based on the preliminary prediction signal and the digital filter training signal;
[0097] The final predicted signal refers to the compensation result obtained by further fusing the digital filter training signal on the basis of the preliminary predicted signal. This result is the direct object of loss calculation. The fusion strategy adopts the residual connection method, that is, the digital filter training signal and the preliminary predicted signal are added or weightedly added point by point to preserve the high-frequency details of the digital system and suppress the stopband residual noise.
[0098] First, the residual energy between the preliminary predicted signal and the digitally filtered training signal is calculated. Then, the two are fused according to the preset coefficients λ∈[0,1]. It can be understood that the preset superposition ratio α(n) is the optimal solution of the preset coefficients λ∈[0,1]. During the model training process, the preset coefficients λ can be continuously adjusted to finally obtain the preset superposition ratio α(n) used in the prediction process using the model.
[0099] Step S014: Calculate the total loss value between the final predicted signal and the target label, update the parameters of the deep recurrent network model based on the total loss value, and iteratively execute the following steps: using the hardware analog filtered signal as the target label, input the original audio training signal and the digital filtered training signal into the deep recurrent network model to generate a preliminary predicted signal until the total loss value reaches loss convergence.
[0100] The total loss value is obtained by weighted summation of the time-domain loss value and the frequency-domain loss value. The time-domain loss value uses the mean square error (MSE) to measure the sample-by-sample difference between the final predicted signal and the target label, while the frequency-domain loss value uses the amplitude spectrum MSE after short-time Fourier transform (STFT). Loss convergence refers to the relative decrease in the total loss value being less than a preset threshold ε in N consecutive iterations.
[0101] Specifically, the system first calculates the time-domain loss, then performs STFT on the final predicted signal and the target label respectively and calculates the amplitude spectrum MSE, and finally sums them according to the preset weights to obtain the total loss value. The backpropagation algorithm is used to update all trainable parameters of the deep recurrent network model, and the above process is repeated until convergence.
[0102] Step S015: Under the condition that the total loss value reaches the loss convergence, the iterated deep recurrent network model is used as the dynamic compensation model for stopband residual noise.
[0103] The stopband residual noise dynamic compensation model refers to a deep recurrent network model with minimum stopband residual noise obtained after iterative training. The model has its weights fixed in the ONNX format and deployed to the inference engine for real-time inference.
[0104] After completing the final weight update, the system serializes the network structure, weight matrix, hyperparameters, and input / output specifications into a stopband residual noise dynamic compensation model, and registers the model in the hardware abstraction layer for subsequent real-time calls.
[0105] In this embodiment, a hardware digital dual-mode synchronous architecture is used to collect triple synchronous data—"original audio training signal—digital filter training signal—hardware analog filter signal"—under the condition of sampling clock-level alignment. The hardware analog filter signal is used as the ideal target label for noise-free audio. Subsequently, a deep recurrent network model is used as the core, and the system iterates repeatedly until convergence using joint time-domain and frequency-domain loss within an end-to-end supervised learning framework. The trained network is then solidified into a dynamic compensation model for stopband residual noise. As a result, the system inherits the advantages of digital filters in the DAW environment, such as non-destructive editing, automated curve control, and repeatability, while also reproducing the noise-free and smooth listening experience of hardware analog filters due to the inertia of capacitor charging and discharging. In real-time cutoff frequency jump scenarios, the stopband residual noise energy is below -70 dB with no additional audible delay. Thus, while ensuring low latency and low computational power consumption, the audio quality and user experience are significantly improved.
[0106] Based on the first and / or second embodiments of this application, a third embodiment of this application is proposed. In the third embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter.
[0107] Based on this, please refer to Figure 3 , Figure 3 This is a schematic diagram of the process of the third embodiment of this application, as shown below. Figure 3 As shown, steps S1 to S4 are included before step S011, which involves obtaining the training dataset based on a pre-deployed hardware digital dual-mode synchronous architecture:
[0108] Step S1: Load the digital filter plugin and the original playback track, and form a digital plugin track based on the digital filter plugin;
[0109] Digital filtering module: An audio signal processing module implemented in software within a digital audio workstation. Its functions include, but are not limited to, low-pass, high-pass, band-pass, or band-stop filtering. It typically employs an IIR or FIR differential equation structure internally.
[0110] Raw playback track: An audio track in a digital audio workstation used to carry raw audio signals without any filtering. The audio segments in this track can be white noise, music, pulses, or any time-domain signal used for training and testing.
[0111] Digital plug-in track: An audio track created independently within a digital audio workstation, on which only digital filter plug-ins are mounted, and the output of the original playback track is used as its input, thus forming a signal processing link in the digital domain.
[0112] By loading the digital filtering plugin and the original playback track, a repeatable, editable, and automated digital filtering path is established for subsequent synchronous acquisition. This ensures that the digital filtered signal and the subsequent hardware filtered signal can be recorded under completely consistent control parameter trajectories, thereby guaranteeing the temporal consistency of the training data.
[0113] In one possible implementation, the parametric equalizer built into the audio workstation can be used, along with a visual programming extension device to map hidden parameters to MIDI CC signals, thereby providing an additional parameter exposure interface for subsequent MIDI CC mapping.
[0114] Step S2: Connect the pre-deployed hardware analog filter through the audio interface loop to obtain the hardware processing track;
[0115] Audio interface loop: A closed physical link formed between the analog output port and analog input port of the audio interface through an external hardware analog filter.
[0116] Hardware analog filters: Analog filter circuits that are composed of active or passive components such as resistors, capacitors, and inductors and operate in a continuous-time manner.
[0117] Hardware processing track: An audio track in a digital audio workstation used to record the output signal of a hardware analog filter. Its input is connected to the analog input port of the audio interface.
[0118] By connecting a pre-deployed hardware analog filter through an audio interface loop, the resulting hardware processing track introduces the physical characteristics of the real analog system, such as nonlinearity, phase drift, and transient inertia, into the data acquisition link, enabling subsequent models to learn "organic" response characteristics that digital filters cannot directly generate.
[0119] Step S3: Synchronize the cutoff frequency control parameters of the hardware processing track and the digital plug-in track. The cutoff frequency control parameters are obtained based on the automatic curve mapping to control signals.
[0120] Cutoff frequency control parameter: A single scalar value used to continuously control the cutoff frequency of the filter, usually in Hertz (Hz).
[0121] Automation curve: An editable curve in a digital audio workstation with the time axis as the horizontal axis and the parameter value as the vertical axis. It can be drawn manually or written in real time based on an external MIDI controller.
[0122] Control signal: A MIDI continuous controller generated by automated curve sampling, used to drive the synchronous changes of hardware and software filters in real time.
[0123] The purpose of synchronizing the cutoff frequency control parameters of the hardware processing track and the digital plug-in track is to drive the digital plug-in and the hardware analog filter simultaneously with the same control signal, ensuring that their cutoff frequencies remain consistent at any time, thereby making the subsequently acquired digital filtered signal and hardware filtered signal strictly comparable.
[0124] Step S4: Build a hardware digital dual-mode synchronous architecture based on the hardware processing track, the digital plug-in track, and the original playback track.
[0125] A complete acquisition framework is formed by the original playback track, digital plugin track, hardware processing track, audio interface, hardware analog filter, and unified clock source, resulting in a hardware-digital dual-mode synchronous architecture. In this architecture, the digital signal chain and analog signal chain operate in parallel, sharing the sampling clock, MIDI clock, and automation control clock. This integrates the aforementioned three tracks and their external devices into a closed-loop system capable of simultaneously outputting the original audio signal, digitally filtered signal, and hardware-filtered signal with millisecond-level time precision, providing rigorously aligned data for subsequent deep learning training.
[0126] Additionally, it should be noted that in one possible implementation, the unified clock source can be provided by the WordClock output of the audio interface, and then distributed to the clock input of the digital workstation and external hardware via a BNC cable (Bayonet Neill-Concelman Cable). In another possible implementation, Ethernet clock synchronization based on the Ethernet high-precision time synchronization protocol can also be used to keep the entire system consistent in a distributed recording studio environment.
[0127] refer to Figure 4 , Figure 4 This is a schematic diagram of the hardware digital dual-mode synchronous architecture provided in this application. Figure 4 As shown, a hardware-digital dual-mode synchronous data acquisition architecture is built, a three-track synchronous system is constructed in a digital audio workstation, the automated curve is mapped to a MIDI CC control signal, and millisecond-level dynamic parameter tuning is achieved by binding filter cutoff frequency control parameters.
[0128] In this embodiment, a "hardware-digital dual-mode synchronous architecture" with unified clock, consistent parameters, and parallel signals is constructed between the internal digital audio workstation and the external analog hardware. This architecture can synchronously output three sample-level aligned audio streams: the unprocessed raw audio signal, the digitally filtered signal processed by the digital filtering plugin, and the hardware-filtered signal processed by the hardware analog filter. This retains all the advantages of digital systems—editability, undoability, and automation—while fully capturing the "organic" transient characteristics of analog systems caused by component inertia, nonlinearity, and phase drift. This provides high-precision, strictly aligned training and verification data rich in real-world physical behavior for subsequent stopband residual noise dynamic compensation models, fundamentally solving the problem of simultaneous popping sound residue and response delay during real-time parameter tuning of digital filters.
[0129] Based on the above embodiments of this application, a fourth embodiment of this application is proposed. In the fourth embodiment of this application, the same or similar contents as those in the above embodiments can be referred to the above description, and will not be repeated hereafter.
[0130] In this embodiment, step S014, which calculates the total loss value between the final predicted signal and the target label, includes steps S41 to S44:
[0131] Step S41: The mean square error is used as the time domain loss function, and the short-time Fourier transform is used as the frequency domain loss function.
[0132] Mean square error (MSE) refers to the arithmetic mean of the squared differences between the predicted sequence and the true sequence at each sampling point. This index quantifies the overall deviation of the time-domain waveform; the smaller the value, the higher the reconstruction accuracy. Short-time Fourier transform (SFT) refers to windowing the signal, dividing it into frames, and then performing discrete Fourier transform frame by frame to obtain the amplitude and phase spectra that change over time. This transform can explicitly present transient errors in the frequency domain. The frequency domain loss function is a function that takes the amplitude spectrum after the SFT as input and calculates the difference between the predicted spectrum and the target spectrum in the form of mean square error. It is used to capture stopband residual energy and harmonic distortion.
[0133] By configuring both time-domain and frequency-domain loss functions simultaneously, joint optimization of "waveform fidelity" and "auditory fidelity" is achieved, enabling the network to maintain a smooth temporal waveform while suppressing abnormal frequency band spikes during the training phase.
[0134] Specifically, the formula for the time-domain loss function is as follows:
[0135]
[0136] in, This represents the target label, i.e., the hardware-filtered signal; This is the smooth transition signal output by the model;
[0137] The formula for the frequency domain loss function is as follows:
[0138]
[0139] in, This represents the mean of all elements of the tensor. This represents the predicted spectral envelope of a smooth transition signal after undergoing a Fast Fourier Transform. The desired spectral envelope after performing a Fast Fourier Transform on the target label.
[0140] Therefore, the total loss function of this application is as follows:
[0141]
[0142] Among them, the time-domain weighting coefficient Frequency domain weighting coefficients In one specific implementation, the time-domain weighting coefficient The value is 0.35, which is the frequency domain weighting coefficient. The value is 0.65.
[0143] Step S42: Calculate the temporal loss value between the final predicted signal and the target label based on the temporal loss function;
[0144] The time-domain loss value refers to the mean square error between the final predicted signal and the target label. This value is obtained by calculating the square of the difference for each sampling point and averaging it. It can directly reflect the severity of time-domain defects such as transient bursts and phase misalignments.
[0145] The final predicted signal refers to the network output waveform after residual fusion; the target label refers to the hardware filtered signal output by the hardware analog filter.
[0146] The system calculates the mean square error between the final predicted signal and the target label to obtain the scalar loss value in real time, and uses this loss value to update the network weights during the backpropagation stage in order to gradually reduce the waveform error.
[0147] Step S43: Perform a Fast Fourier Transform on the final predicted signal and the target label, and calculate the frequency domain loss value of the final predicted signal and the target label after the Fast Fourier Transform based on the frequency domain loss function.
[0148] First, the final predicted signal and the target label are fed into the same fast Fourier transform engine to obtain the complex spectrum. Then, the amplitude spectrum is extracted, and the specific frequency domain loss value is calculated according to the frequency domain loss function formula.
[0149] Step S44: Obtain the total loss value based on the time-domain loss value and the frequency-domain loss value.
[0150] The total loss value refers to the sum of the time-domain loss value and the frequency-domain loss value, weighted by a time-domain weighting factor. Frequency domain weighting coefficients The scalar after weighted summation serves as the sole basis for backpropagation in the network, driving all trainable parameters to be updated in the direction of reducing the overall error.
[0151] Time-domain weighting coefficients Frequency domain weighting coefficients In this embodiment, the time domain is set to 0.35 and the frequency domain to 0.65 to highlight the auditory characteristics in the frequency domain, but this can be dynamically adjusted based on the subjective scores of the validation set. After obtaining the total loss value through linear combination, the system inputs it into the optimizer for gradient descent until the relative decrease of the total loss value is less than the convergence threshold in several consecutive iterations, thereby completing the training of the stopband residual noise dynamic compensation model.
[0152] In this embodiment, the mean square error is used to accurately measure the time-domain waveform difference, and the mean square error of the short-time Fourier transform amplitude spectrum is used to capture the frequency-domain residual energy. The two are then fused into a single total loss value according to preset weights. During backpropagation, this total loss value drives all parameters of the deep recurrent network model to be continuously updated along the gradient direction until the relative decrease is lower than the convergence threshold after multiple iterations. Thus, the network can simultaneously ensure the smoothness and absence of popping in the time-domain waveform and the deep suppression of frequency-domain stopband energy during the training phase. The finally converged stopband residual noise dynamic compensation model has the ability to minimize stopband residual noise, providing a high-precision compensation foundation that balances auditory fidelity and low latency for the subsequent real-time inference phase.
[0153] In one possible implementation, steps S0231-S0232 are included before step S42:
[0154] Step S0231: Obtain the physical characteristic parameters of the hardware analog filter in the hardware digital dual-mode synchronous architecture;
[0155] The physical characteristic parameters of the hardware analog filter in the hardware digital dual-mode synchronous architecture are: within the hardware analog filter, a set of measurable physical quantities determined by physical components such as resistors, capacitors, inductors, operational amplifiers, and transistors, which can quantify its transient and steady-state behavior; specifically including but not limited to the gain coefficient of the cutoff frequency as a function of the control voltage, the capacitor charging and discharging time constant, the slope of the inductor hysteresis loop, the open-loop gain-bandwidth product of the operational amplifier, the transconductance nonlinearity coefficient of the transistor, and the temperature drift compensation coefficient.
[0156] The purpose of obtaining physical characteristic parameters is to introduce the objective laws of inertia, nonlinearity, and temperature drift of real analog circuits into the subsequent loss function in numerical form, thereby constraining the weight update direction of the deep loop network. This makes the network output not only statistically approximate the hardware filter signal, but also physically reflect the "continuous" nature of capacitor charge not being able to be reset instantaneously and inductor current not being able to change abruptly.
[0157] The system injects step, sinusoidal frequency sweep and pulse sequences into the hardware analog filter through automated test scripts, and records the response using a measurement microphone or loop sampling method. Then, it extracts the above physical characteristic parameters through least squares fitting or system identification algorithm to form a structured numerical table or continuous function expression, providing a data foundation for the construction of subsequent prior constraint terms.
[0158] Step S0232: Construct prior constraint terms based on the physical characteristic parameters, and integrate the prior constraint terms into the time-domain loss function.
[0159] Prior constraints refer to differentiable regularization terms constructed based on physical characteristic parameters. These can take the form of a capacitor discharge exponential decay function, a cutoff frequency smoothness penalty term, or a resonance peak damping constraint. They are used to inject the physical inertial priors of the simulated system into the deep recurrent network model during the training phase. The temporal loss function refers to the mean square error or its weighted variant, used to measure the sample-by-sample difference between the final predicted signal and the target label. The system embeds the prior constraints into the temporal loss function in an additive manner.
[0160] Based on the above embodiments of this application, a fifth embodiment of this application is proposed. In the fifth embodiment of this application, the same or similar contents as those in the above embodiments can be referred to the above description, and will not be repeated hereafter.
[0161] In this embodiment, step S20, which involves synchronously inputting the digital filtered signal and the original audio signal into a pre-built dynamic compensation model for stopband residual noise to obtain a smooth transition signal, may include step S21:
[0162] Step S21: Input the digital filtered signal and the original audio signal into the pre-constructed stopband residual noise dynamic compensation model in a sampling point-level synchronous manner to perform stopband residual noise dynamic compensation, and output a smooth transition signal point by point;
[0163] Sampling point-level synchronization method: The digital filtered signal and the original audio signal are input in parallel point by point with the same sampling index, driven by the same sampling clock.
[0164] Dynamic compensation for residual stopband noise: The model dynamically calculates the compensation amount for each sampling point and adds it in real time, thereby suppressing the stopband energy to below the target level.
[0165] Smooth transition signal: The output sampling sequence that, after compensation, eliminates burst noise while maintaining the natural transient characteristics of the analog filter.
[0166] By using a trained network to correct the real-time digital filtering results point by point, the final output audio approximates the hardware analog filter in terms of phase continuity, energy release, and auditory smoothness, while fully preserving the editability and low latency advantages of the digital system.
[0167] In one feasible implementation, the stopband residual noise dynamic compensation includes steps S211~S212:
[0168] Step S211: The multi-level gated loop unit of the stopband residual noise dynamic compensation model performs point-by-point feature capture on the digital filtered signal and the original audio signal to obtain transient features;
[0169] Multi-level gated recurrent unit: A recurrent neural network module consisting of two or more layers of gated recurrent units stacked together. Each layer contains update gates, reset gates and candidate hidden states, which are used to capture short-term transients and long-term dependencies in the time dimension.
[0170] Point-by-point feature capture: Calculate the corresponding hidden state vector for each input sampling point to extract features that reflect the transient amplitude, slope and energy change patterns.
[0171] Transient features: A high-dimensional vector output by a multi-level gated loop unit that characterizes the local dynamic characteristics of the current sampling point and its context.
[0172] The purpose of this step is to integrate the full-band information provided by the original audio signal and the defect information exposed by the digital filter signal into a unified transient representation, providing a basis for subsequent compensation coefficient calculation that considers both local and global factors.
[0173] Additionally, it should be noted that in one possible implementation, the multi-level gated loop unit can adopt a bidirectional structure to utilize both past and future contexts simultaneously; in another possible implementation, a 1×1 convolution can be added at the front end for channel mixing before being fed into the unidirectional gated loop unit to reduce computational load.
[0174] Step S212: The transient features are mapped to compensation coefficients by the fully connected layer of the stopband residual noise dynamic compensation model, and dynamic compensation parameters are calculated based on the compensation coefficients.
[0175] Fully connected layer: A linear transformation layer in which all input and output neurons are interconnected and no weights are shared. Its function is to compress or map high-dimensional transient features to the target dimension.
[0176] Compensation coefficient: A scalar or vector output by the fully connected layer used to correct the amplitude or phase of the current digital filtered signal sampling point.
[0177] Dynamic compensation parameter calculation: The superimposed or convolutional correction amount is calculated in real time based on the compensation coefficient and immediately applied to the current sampling point to offset the stopband residual noise.
[0178] The purpose of this step is to transform transient characteristics into directly executable compensation actions, so that the final output smooth transition signal is consistent with the hardware analog filter in both energy envelope and phase trajectory.
[0179] Additionally, it should be noted that in one possible implementation, the fully connected layer outputs a single-channel compensation coefficient, which is corrected using simple multiplication; in another possible implementation, dual-channel coefficients can be output to control the amplitude and phase respectively, and more refined frequency domain correction can be achieved through complex multiplication.
[0180] In this embodiment, by using sampling point-level synchronous input, multi-level gated loop units are used to capture transient features in real time, and then the fully connected layer generates compensation coefficients to output smooth transition signals point by point. This eliminates the burst noise of digital filtering while preserving the smooth transients of analog filters, achieving low-latency and high-fidelity real-time compensation.
[0181] Based on the above embodiments of this application, a sixth embodiment of this application is proposed. In the sixth embodiment of this application, the same or similar contents as those in the above embodiments can be referred to the above description, and will not be repeated hereafter.
[0182] In this embodiment, after step S20, which involves synchronously inputting the digital filtered signal and the original audio signal into a pre-constructed dynamic compensation model for stopband residual noise to obtain a smooth transition signal, steps A30 to A40 are further included:
[0183] Step A30: Monitor the group band frequency band of the smooth transition signal, and calculate the average noise energy value within the group band frequency band based on short-time Fourier transform;
[0184] Smooth transition signal: The audio output stream after dual processing by digital filter and neural network compensation filter retains the flexibility of real-time parameter adjustment of digital system, and suppresses stopband residual noise through neural network, so that the sound is close to the natural transition of analog filter.
[0185] The group band refers to the frequency range extending 1 / 3 octave to both sides of the target cutoff frequency. It is used to specifically capture residual noise that may not be completely canceled by the neural network at the moment of digital parameter switching.
[0186] Average noise energy value: The average energy density obtained by integrating the square of the amplitude spectrum obtained by the short-time Fourier transform within this frequency band and dividing it by the bandwidth. Its value directly reflects the strength of the stopband residual noise.
[0187] The smooth transition signal is segmented according to a preset frame length (e.g., 1024 sampling points) and a preset window function (e.g., Hanning window). Then, a discrete Fourier transform is performed on each frame to obtain a frequency domain representation. The spectrum is continuously calculated using a sliding window method to obtain the short-time Fourier transform value. The average noise energy value is obtained by integrating the squared amplitude spectrum obtained from the short-time Fourier transform and dividing it by the bandwidth to obtain the average energy density.
[0188] The core purpose of real-time monitoring of the frequency band is to provide quantitative basis for subsequent model optimization: when the average noise energy value is consistently high, it indicates that the current neural network is not capable of compensating for abrupt changes and needs further fine-tuning; conversely, if the energy value is lower than the preset threshold for a long time, it indicates that the model has fully learned the hardware inertia characteristics and can maintain the current weights unchanged.
[0189] Step A40: If the average noise energy value is higher than the preset noise energy value within a continuous preset monitoring period, the model optimization of the stopband residual noise dynamic compensation model is triggered;
[0190] The continuous preset monitoring period refers to a time window in frames. Its length is determined by the audio system's latency constraints and is commonly set to 10-50 frames to ensure that it is neither too sensitive to cause frequent triggering nor too long to miss key changes. The preset noise energy value refers to a fixed threshold set based on the threshold that the human ear can perceive and the system's background noise. It is typically between -70dBFS and -55dBFS.
[0191] Additionally, it should be noted that the triggering mechanism adopts a two-stage strategy of "soft first, hard later": when the average noise energy value exceeds the preset threshold for the first time, the system first activates soft optimization - only adjusting the weight of the loss function; if it still does not drop below the threshold after three consecutive monitoring cycles, it enters hard optimization - starting grid search and freezing the audio output briefly to prevent users from hearing popping sounds.
[0192] In one feasible implementation, the steps for triggering the model optimization of the stopband residual noise dynamic compensation model include steps A41-A42:
[0193] Step S41: Extract noise samples from the smooth transition signal, and update the loss function weights of the stopband residual noise dynamic compensation model based on the noise samples;
[0194] Noise samples refer to the residual high-frequency components separated from the smooth transition signal by spectral subtraction or mask filtering within a continuous monitoring period, and their duration is equal to the monitoring period. The loss function weights refer to the weighting coefficients in the MSE loss for different frequency bands or different time periods. The initial value is uniformly 1.0, and after the update, a higher weight (such as 5.0) will be assigned to the stopband frequency band to enhance the network's sensitivity to errors in that frequency band. The update method adopts online gradient accumulation: after the system calculates the error between each frame of noise samples and the corresponding target zero signal (ideally, the noise should be zero), it does not immediately backpropagate, but accumulates it to a small batch (such as 32 frames) before performing a weight fine-tuning, thereby balancing stability and real-time performance.
[0195] Additionally, it should be noted that, in order to avoid overfitting extreme samples in the mutation range, the system also introduces a regularization term—applying an L2 norm penalty to the weight increment, with the coefficient λ set to 1e-4, so that the updated network can suppress noise without significantly changing its response to normal audio.
[0196] In one possible implementation, noise sample extraction can be performed using an adaptive threshold spectrum subtraction method: first, the amplitude spectrum is obtained by performing an STFT on the smooth transition signal, then the mean spectrum of the neighboring noise-free frames is used as the estimated noise spectrum, and then the time-frequency units that are lower than the estimated noise spectrum by +3 dB are set to zero, and what is retained is the noise sample.
[0197] Step A42: Use grid search to adjust the hyperparameters of the stopband residual noise dynamic compensation model.
[0198] The grid search described in this embodiment refers to exhaustively searching all combinations within a preset hyperparameter space and selecting the optimal configuration using a validation set error metric. Hyperparameters include, but are not limited to, GRU hidden layer dimension, learning rate, batch size, and dropout ratio. The validation set consists of 10 historically collected audio segments of different styles, each containing at least one parameter mutation. The error metric uses a frequency band-weighted signal-to-noise ratio.
[0199] In one possible implementation, grid search can employ a hierarchical strategy: first, perform a coarse-grained search on the hidden layer dimension and learning rate to determine the optimal range, and then fine-tune the dropout and batch size to reduce computational load.
[0200] In this embodiment, the average noise energy value of the smooth transition signal is calculated in real time using a short-time Fourier transform within the group band. This value is then used as a criterion to trigger model optimization of the stopband residual noise dynamic compensation model within a continuous preset monitoring period. After triggering, noise samples are accurately extracted from the smooth transition signal, and the loss function weights are updated online, significantly increasing the neural network's sensitivity to stopband residual errors. Then, an offline grid search is performed to re-lock the optimal hyperparameter combination. This maintains millisecond-level low latency and the advantages of non-destructive editing in digital systems while continuously and adaptively approximating the physical smoothness of analog filters due to capacitor charging and discharging inertia, suppressing burst noise energy during parameter switching, and achieving real-time, abrupt, and reproducible high-fidelity audio filtering.
[0201] To better aid in understanding the proposed solution in this application, the following is combined with... Figure 5 , Figure 5 This is a schematic diagram of the overall process of the stopband residual compensation method provided in this application. Figure 5 As shown, during the model training phase, a "hardware-digital dual-mode synchronous acquisition architecture" is built inside the digital audio workstation to simultaneously acquire the unprocessed raw audio signal X with millisecond-level precision. (n) The initial output Y of the digital filter 1(n) The output Y of the hardware filter (n) The original audio signal and the digital filter signal are fed as dual-channel inputs into the deep recurrent network for training, generating a preliminary prediction signal Y. 2(n) .
[0202] Furthermore, the preliminary prediction signal and the digital filter signal are superimposed to obtain the final prediction signal. The total loss between the final predicted signal and the target label is calculated. Specifically, mean square error is used as the time-domain loss function, and short-time Fourier transform is used as the frequency-domain loss function. The time-domain loss between the final predicted signal and the target label is calculated based on the time-domain loss function. A fast Fourier transform is performed on the final predicted signal and the target label, and the frequency-domain loss after the fast Fourier transform is calculated based on the frequency-domain loss function. The total loss is obtained based on the time-domain loss and the frequency-domain loss. Iterative training of the model is performed based on the total loss value to obtain the finally trained model.
[0203] During the model inference phase, when the user changes the cutoff frequency of the digital filter in real time via the MIDI CC (MIDI Continuous Controller), the digital filter immediately outputs Y according to the new parameters. 1(n) The output is related to the original signal X. (n)After sampling-level alignment, the signals are simultaneously fed into the model, which processes them with extremely low latency, ultimately yielding a smooth transition signal Y that maintains the advantages of flexible editing in digital systems while suppressing stopband residual energy to below -70 dB. 2(n) This achieves a delay-free smooth transition and stopband residue suppression for digital filters when adjusting the cutoff frequency in real time at high frequencies.
[0204] This application also provides a stopband vestigial compensation device for a digital filter; please refer to [reference needed]. Figure 6 The stopband vestigial compensation device of the digital filter includes:
[0205] The multi-mode synchronous data acquisition module 10 is used to acquire the original audio signal and the digital filtered signal based on a pre-deployed hardware digital dual-mode synchronous architecture.
[0206] The deep learning compensation filtering module 20 is used to synchronously input the digital filtered signal and the original audio signal into a pre-built dynamic compensation model for stopband residual noise for processing to obtain a smooth transition signal. The dynamic compensation model for stopband residual noise uses the hardware filtered signal output by the hardware analog filter as the target label.
[0207] The superposition module 30 is used to superimpose the smooth transition signal and the digital filter signal at a preset superposition ratio to obtain a calibration signal.
[0208] The stopband vestigial compensation device for digital filters provided in this application employs the stopband vestigial compensation method for digital filters described in the above embodiments, and can solve the technical problem of stopband vestigial compensation for digital filters. Compared with the prior art, the beneficial effects of the stopband vestigial compensation device for digital filters provided in this application are the same as those of the stopband vestigial compensation method for digital filters provided in the above embodiments, and other technical features in the stopband vestigial compensation device for digital filters are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0209] This application provides a stopband vestigial compensation device for a digital filter. The stopband vestigial compensation device for a digital filter includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the stopband vestigial compensation method for the digital filter in the first embodiment described above.
[0210] The following is for reference. Figure 7This document illustrates a schematic diagram of a stopband vestigial compensation device suitable for implementing the embodiments of the present application for digital filters. The stopband vestigial compensation device for digital filters in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The stopband residual compensation device for the digital filter shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0211] like Figure 7 As shown, the stopband vestigial compensation device for a digital filter may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the stopband vestigial compensation device for the digital filter. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the stopband vestigial compensation device of the digital filter to communicate wirelessly or wiredly with other devices to exchange data. Although stopband vestigial compensation devices for digital filters with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0212] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0213] The stopband vestigial compensation device for digital filters provided in this application employs the stopband vestigial compensation method for digital filters described in the above embodiments, and can solve the technical problem of stopband vestigial compensation for digital filters. Compared with the prior art, the beneficial effects of the stopband vestigial compensation device for digital filters provided in this application are the same as the beneficial effects of the stopband vestigial compensation method for digital filters provided in the above embodiments, and other technical features in this stopband vestigial compensation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0214] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0215] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0216] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the stopband residual compensation method of the digital filter in the above embodiments.
[0217] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0218] The aforementioned computer-readable storage medium may be included in the stopband residual compensation device of the digital filter; or it may exist independently and not assembled into the stopband residual compensation device of the digital filter.
[0219] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the stopband lingering compensation device of the digital filter, the stopband lingering compensation device of the digital filter: acquires the original audio signal and the digital filtered signal; synchronously inputs the digital filtered signal and the original audio signal into a pre-constructed dynamic compensation model for stopband lingering noise for processing to obtain a smooth transition signal, wherein the dynamic compensation model for stopband lingering noise uses the hardware filtered signal output by the hardware analog filter as the target label; and superimposes the smooth transition signal and the digital filtered signal at a preset superposition ratio to obtain a calibration signal.
[0220] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0221] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0222] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0223] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the stopband vestigial compensation method for the above-described digital filter, thereby solving the technical problem of stopband vestigial compensation for digital filters. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the stopband vestigial compensation method for digital filters provided in the above embodiments, and will not be repeated here.
[0224] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the stopband residual compensation method for a digital filter as described above.
[0225] The computer program product provided in this application can solve the technical problem of stopband vestigial compensation for digital filters. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the stopband vestigial compensation method for digital filters provided in the above embodiments, and will not be repeated here.
[0226] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A stopband residue compensation method for a digital filter, characterized by, The stopband residual compensation method of the digital filter comprises: Collecting original audio signals and digital filter signals; Collecting a training data set based on a pre-deployed hardware digital dual-mode synchronization architecture, the data format of the training data set being pure time domain sampling data, the training data set comprising hardware analog filter signals, original audio training signals and digital filter training signals; Inputting the original audio training signals and the digital filter training signals into a deep recurrent network model with the hardware analog filter signals as target labels to generate preliminary prediction signals; Determining a final prediction signal according to the preliminary prediction signals and the digital filter training signals; Calculating a total loss value between the final prediction signal and the target labels, updating parameters of the deep recurrent network model based on the total loss value, and iteratively performing the steps of inputting the original audio training signals and the digital filter training signals into the deep recurrent network model with the hardware analog filter signals as target labels to generate preliminary prediction signals until the total loss value reaches loss convergence; Under the condition that the total loss value reaches loss convergence, taking the iterated deep recurrent network model as a stopband residual noise dynamic compensation model; Synchronously inputting the digital filter signals and the original audio signals into the pre-constructed stopband residual noise dynamic compensation model for processing to obtain a smooth transition signal, the stopband residual noise dynamic compensation model taking hardware filter signals output by a hardware analog filter as target labels; including synchronously inputting the digital filter signals and the original audio signals into the pre-constructed stopband residual noise dynamic compensation model at a sampling point level for stopband residual noise dynamic compensation, and outputting the smooth transition signal point by point; wherein the stopband residual noise dynamic compensation comprises: capturing features point by point by a multi-level gated recurrent unit of the stopband residual noise dynamic compensation model to obtain transient features; mapping the transient features to compensation coefficients by a fully connected layer of the stopband residual noise dynamic compensation model, and calculating dynamic compensation parameters based on the compensation coefficients. Stacking the smooth transition signal and the digital filter signal at a preset stacking ratio to obtain a calibration signal.
2. The stopband residual compensation method of claim 1, wherein, The step of collecting the training data set based on the pre-deployed hardware digital dual-mode synchronization architecture further comprises: Loading a digital filter plug-in and an original playback track, and forming a digital plug-in track based on the digital filter plug-in; Connecting a pre-deployed hardware analog filter through an audio interface loop to obtain a hardware processing track; Synchronizing cutoff frequency control parameters of the hardware processing track and the digital plug-in track, the cutoff frequency control parameters being obtained after automatically mapping the control signals based on the automatic curve; Building a hardware digital dual-mode synchronization architecture according to the hardware processing track, the digital plug-in track and the original playback track.
3. The stopband residual compensation method of claim 1, wherein, The step of calculating the total loss value between the final prediction signal and the target labels comprises: Using mean square error as a time domain loss function and short-time Fourier transform as a frequency domain loss function. calculating a time domain loss value between the final prediction signal and the target label according to the time domain loss function; performing fast Fourier transform on the final prediction signal and the target label, and calculating a frequency domain loss value of the final prediction signal and the target label after the fast Fourier transform according to the frequency domain loss function; obtaining a total loss value according to the time domain loss value and the frequency domain loss value.
4. The stopband residual compensation method of claim 3, wherein, The step of calculating a time domain loss value between the final prediction signal and the target label according to the time domain loss function further comprises: obtaining physical characteristic parameters of a hardware analog filter in the hardware digital dual-mode synchronization architecture; constructing a prior constraint term based on the physical characteristic parameters, and integrating the prior constraint term into the time domain loss function.
5. The stopband residual compensation method of claim 1, wherein, The step of obtaining a smooth transition signal by inputting the digital filtered signal and the original audio signal into a pre-constructed stopband residual noise dynamic compensation model for processing further comprises: monitoring a group band frequency range of the smooth transition signal, and calculating an average noise energy value in the group band frequency range based on short-time Fourier transform; if the average noise energy value is higher than a preset noise energy value in a continuous preset monitoring period, triggering model optimization of the stopband residual noise dynamic compensation model, wherein the step of triggering model optimization of the stopband residual noise dynamic compensation model comprises: extracting noise samples from the smooth transition signal, and updating a loss function weight of the stopband residual noise dynamic compensation model based on the noise samples; adjusting hyperparameters of the stopband residual noise dynamic compensation model by using grid search.
6. A stopband residue compensation device for a digital filter, characterized by, The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the stopband residual compensation method of the digital filter according to any one of claims 1 to 5.
7. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the stopband residual compensation method of the digital filter according to any one of claims 1 to 5.
8. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by the processor to implement the steps of the stopband residual compensation method of the digital filter according to any one of claims 1 to 5.
Citation Information
Patent Citations
Digital filtering frequency self-compensation circuit
CN101577534A
Method and system for filter frequency response offset compensation for WLAN traffic
CN115277319A