An audio processing method, apparatus, device and medium
By combining an improved discrete cosine transform (MDCT) with a mask prediction model, the problem of increased computational load and complexity in existing audio processing methods is solved, achieving the effect of improving sound quality without increasing computational load.
Patent Information
- Application Number
- CN202611505230.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-11-27
AI Technical Summary
Existing audio processing methods suffer from increased computational load and model complexity in improving sound quality, especially when dealing with non-stationary noise.
An improved discrete cosine transform (MDCT) is used for time-frequency transformation to construct input features and a mask prediction model is used for noise reduction. The time-domain signal is reconstructed through the amplitude information of the MDCT spectral coefficients, avoiding the processing of phase information and reducing network complexity and training difficulty.
Without increasing computational load, it improves the noise reduction effect and sound quality of audio signals, and reduces the complexity and training difficulty of neural networks.
Smart Images

Figure CN123182686A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio processing technology, and in particular to an audio processing method, apparatus, device and medium. Background Technology
[0002] With the rise of live audio and video streaming services, users' demands for voice quality are constantly increasing, while the cost of setting up a professional recording environment is relatively high. In practical applications, wireless microphones are popular among many broadcasters due to their high cost-effectiveness and ease of use. These devices are usually based on short-range wireless communication technologies such as Bluetooth and Wi-Fi.
[0003] In the aforementioned scenarios, speech enhancement typically needs to be performed on the microphone side. There are many speech enhancement methods, with two main types being representative: one is the traditional denoising method represented by spectral subtraction, which has the advantages of low computational cost, mature algorithms, and good denoising effect on stationary noise, but its disadvantage is poor performance on non-stationary noise; the other is a deep learning-based denoising method, which usually mainly processes the amplitude spectrum and uses the denoised amplitude spectrum combined with the original noisy phase spectrum to recover the time-domain signal during reconstruction. While this method has low computational cost, it is prone to phase information being contaminated by noise. To compensate for the shortcomings of amplitude spectrum methods in phase processing, existing technologies have developed denoising methods based on the complex domain. By simultaneously processing the real and imaginary parts of the complex spectrum in the complex domain, it takes into account both amplitude and phase information, thereby improving sound quality. However, these methods double the number of inputs and outputs of the neural network, leading to a more complex network structure, higher computational cost, and increased training difficulty.
[0004] Therefore, there is an urgent need for a new audio processing method to improve sound quality without excessively increasing the amount of computation. Summary of the Invention
[0005] The main technical problem addressed by this application is to provide a method for processing stereo audio to improve sound quality without excessively increasing computational load.
[0006] To achieve the above objectives, the first technical solution adopted in this application is: to provide an audio processing method, comprising: performing time-frequency transformation on the audio to be processed to obtain improved discrete cosine transform (MDCT) spectral coefficients; constructing input features based on the MDCT spectral coefficients, inputting the input features into a mask prediction model to obtain ideal ratio mask (IRM) prediction values output by the model; using the IRM prediction values to denoise the MDCT spectral coefficients to obtain denoised spectral coefficients; and performing inverse time-frequency transformation on the denoised spectral coefficients to obtain a denoised time-domain audio signal.
[0007] Preferably, the mask prediction model is constructed based on a recurrent neural network or a long short-term memory network; the input features are constructed based on MDCT spectral coefficients, and the input features are input into the mask prediction model to obtain the ideal ratio mask (IRM) prediction value output by the model, including: concatenating the MDCT spectral coefficients of multiple consecutive frames, including the current audio frame, in the time dimension to form a feature vector containing contextual information; and inputting the feature vector into the mask prediction model to obtain the IRM prediction value of the current audio frame.
[0008] Preferably, the training process of the mask prediction model includes: mixing clean audio with noisy audio, and performing time-frequency transformation on the mixed noisy audio to obtain noisy MDCT spectral coefficients; constructing training input features based on the noisy MDCT spectral coefficients, and inputting the training input features into the neural network model to be trained to obtain training IRM prediction values; calculating the model loss based on the training IRM prediction values, noisy MDCT spectral coefficients, and clean audio; adjusting the model's weight parameters and bias parameters based on the model loss, and repeatedly training the model with adjusted parameters until the model converges and training is stopped to obtain the trained mask prediction model.
[0009] Preferably, the model loss is calculated based on the training IRM prediction value, the noisy MDCT spectral coefficients, and the clean audio, including: multiplying the training IRM prediction value by the noisy MDCT spectral coefficients to obtain the training denoised spectral coefficients; performing an inverse time-frequency transformation on the training denoised spectral coefficients to obtain the denoised audio corresponding to the noisy frequency; and calculating the error between the clean audio and the denoised audio as the model loss.
[0010] Preferably, the method involves mixing clean audio with noisy audio and performing a time-frequency transformation on the mixed noisy audio to obtain noisy MDCT spectral coefficients. This includes: performing frame processing on the clean audio and noisy audio with preset frame length and preset frame shift respectively to obtain clean audio frames and noisy audio frames; determining the scaling factor of the noisy audio frame according to a preset signal-to-noise ratio and scaling the noisy audio frame according to the scaling factor; adding the scaled noisy audio frame to the clean audio frame with the same frame number point by point in the time domain to obtain noisy frequency frames; and performing a time-frequency transformation on the noisy frequency frames to obtain noisy MDCT spectral coefficients.
[0011] Preferably, the time-frequency transformation and inverse time-frequency transformation are implemented based on the low-delay improved discrete cosine transform (LD-MDCT).
[0012] The second technical solution adopted in this application is: providing an audio processing device, including: a time-frequency transformation module for performing time-frequency transformation on the audio to be processed to obtain improved discrete cosine transform (MDCT) spectral coefficients; a mask prediction module for constructing input features based on the MDCT spectral coefficients, inputting the input features into a mask prediction model, and obtaining ideal ratio mask (IRM) prediction values output by the model; a noise reduction module for using the IRM prediction values to reduce noise in the MDCT spectral coefficients to obtain noise-reduced spectral coefficients; and a signal reconstruction module for performing inverse time-frequency transformation on the noise-reduced spectral coefficients to obtain a noise-reduced time-domain audio signal.
[0013] Preferably, the mask prediction model is constructed based on a recurrent neural network or a long short-term memory network; the mask prediction module is used to concatenate the MDCT spectral coefficients of multiple consecutive frames, including the current audio frame, in the time dimension to form a feature vector containing contextual information; the feature vector is input into the mask prediction model to obtain the IRM prediction value of the current audio frame.
[0014] Preferably, the device further includes a model training module, used to mix clean audio with noisy audio, and perform time-frequency transformation on the mixed noisy audio to obtain noisy MDCT spectral coefficients; construct training input features based on the noisy MDCT spectral coefficients, and input the training input features into the neural network model to be trained to obtain training IRM prediction values; calculate the model loss based on the training IRM prediction values, noisy MDCT spectral coefficients and clean audio; adjust the model's weight parameters and bias parameters based on the model loss, and repeat training on the model with adjusted parameters until the model converges and training stops, thus obtaining a trained mask prediction model.
[0015] Preferably, the model training module is used to multiply the IRM prediction value used for training with the denoised MDCT spectral coefficients to obtain the denoised spectral coefficients used for training; perform inverse time-frequency transformation on the denoised spectral coefficients used for training to obtain the denoised audio corresponding to the denoised frequency; and calculate the error between the clean audio and the denoised audio as the model loss.
[0016] Preferably, the model training module is used to perform frame segmentation processing on clean audio and noisy audio with preset frame length and preset frame shift respectively, to obtain clean audio frames and noisy audio frames; determine the scaling factor of the noisy audio frame according to the preset signal-to-noise ratio, and perform amplitude scaling on the noisy audio frame according to the scaling factor; add the scaled noisy audio frame to the clean audio frame with the same frame number point by point in the time domain to obtain the noisy frequency frame; and perform time-frequency transformation on the noisy frequency frame to obtain the noisy MDCT spectral coefficients.
[0017] Preferably, the time-frequency transformation and inverse time-frequency transformation are implemented based on the low-delay improved discrete cosine transform (LD-MDCT).
[0018] The third technical solution adopted in this application is: to provide a sound receiving device, including: a sound pickup module and an audio processing module; The sound pickup module and the audio processing module are connected in communication; the sound pickup module is used to collect audio as the audio to be processed; the audio processing module is used to execute the audio processing method of Scheme 1 to reduce noise in the audio to be processed.
[0019] The fourth technical solution adopted in this application is: to provide a computer device, which includes a processor and a memory, the memory storing computer instructions, and the processor operating the computer instructions to execute the audio processing method of Solution 1.
[0020] The fourth technical solution adopted in this application is: providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the audio processing method in Solution 1 can be implemented.
[0021] The beneficial effects of this application are as follows: MDCT is used for time-frequency transformation to obtain MDCT spectral coefficients. The mask prediction model only needs to process these amplitude spectral coefficients, without needing to process phase information separately. After the model outputs IRM prediction values, the MDCT spectral coefficients are denoised using these IRM prediction values to obtain MDCT-type denoised spectral coefficients. Since the inverse MDCT transform can reconstruct the corresponding time-domain signal, this application performs an inverse time-frequency transform on the denoised spectral coefficients. Using all the denoised spectral coefficients corresponding to the audio to be processed, the time-domain audio signal can be reconstructed through inverse transformation. In this time-domain audio signal, amplitude information is explicitly generated based on the denoised spectral coefficients, and phase information can be implicitly determined based on all the denoised spectral coefficients. Therefore, without using a model to process phase information, the amplitude and phase information of the denoised signal can be determined simultaneously using MDCT-type denoised spectral coefficients, improving the denoising effect of the audio signal. This improves sound quality without excessively increasing computational load. Attached Figure Description
[0022] Figure 1 This is a flowchart of a specific implementation of the audio processing method of this application; Figure 2 This is a schematic diagram of the offline training process of the model in one embodiment of this application; Figure 3 This is a schematic block diagram of a specific embodiment of the audio processing device of this application. Detailed Implementation
[0023] The preferred embodiments of this application will now be described in detail with reference to the accompanying drawings, so that the advantages and features of this application can be more easily understood by those skilled in the art, thereby providing a clearer and more definite definition of the scope of protection of this application.
[0024] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0025] Most existing deep learning-based denoising methods use the Distributed Fourier Transform (DFT) to convert the time-domain signal to the frequency domain. The output of the DFT is a complex number with both real and imaginary parts, including amplitude and phase information. On the one hand, to reduce computational load and model complexity, existing techniques only use neural networks to process the amplitude spectrum after the Fourier transform, predict an ideal ratio mask, and then use the ideal ratio mask to adjust the gain of the amplitude spectrum before reconstructing the denoised time-domain signal by combining it with the original noisy phase spectrum. This audio processing method, which only denoises the amplitude spectrum and directly replaces the clean phase with the noisy phase, is prone to problems such as noise contamination of the phase and signal distortion after denoising. On the other hand, to address this problem, existing techniques have proposed some methods based on the complex domain. These methods need to process both the real and imaginary parts of the DFT spectrum simultaneously to balance amplitude and phase during denoising. This doubles the input and output data of the neural network, requiring a more complex neural network to handle the increased computational load, which in turn increases the difficulty of model training and deployment in embedded systems.
[0026] To address the aforementioned issues, this application employs an improved Discrete Cosine Transform (MDCT) instead of the Discrete Fourier Transform (DFT) for time-frequency transformation. After denoising the MDCT spectral coefficients to obtain denoised spectral coefficients (i.e., the denoised MDCT spectral coefficients), the denoised time-domain audio signal can be reconstructed by performing an inverse transform, windowing, and overlapping summation on the denoised spectral coefficients. The time-domain signal can be reconstructed by performing an inverse transform, windowing, and overlapping summation on the denoised MDCT spectral coefficient sequence. The time-domain signal naturally contains phase information; that is, both the amplitude and phase of the time-domain signal are determined by the denoised MDCT spectral coefficients, eliminating the need for separate prediction of the denoised phase spectrum. Therefore, this application only needs to predict the denoised MDCT spectral coefficients to inversely reconstruct a time-domain signal containing both amplitude and phase information. Compared to methods based on the complex domain, this application only needs to utilize an ideal ratio mask for predicting the amplitude spectrum using a neural network, avoiding the problem of increasing the amount of input and output data for the neural network. This reduces network complexity and training difficulty without increasing computational load, while simultaneously improving speech enhancement performance.
[0027] The audio processing method provided in this application can be applied to a variety of electronic devices, including but not limited to recording devices (e.g., microphones, recorders) and computer devices (e.g., mobile phones, tablets, servers).
[0028] Figure 1 This is a flowchart of a specific implementation of the audio processing method of this application.
[0029] In this specific embodiment, the audio processing method includes the following steps: Step S101: Perform time-frequency transformation on the audio to be processed to obtain the improved discrete cosine transform (MDCT) spectral coefficients.
[0030] For example, the audio to be processed can be a time-domain audio signal picked up by a microphone. The audio to be processed is then divided into frames to obtain all audio frames.
[0031] In one embodiment of this specific implementation, the forward transform of standard MDCT can be used as the time-frequency transformation method. The audio signal to be processed is divided into frames along the time axis according to a preset frame length and a preset frame shift, wherein the preset frame shift is less than the preset frame length. Preferably, the preset frame shift is half the preset frame length, that is, there is a 50% overlap between adjacent audio frames. The number of sampling points in a single frame is denoted as N. F For the m-th frame, construct a string of length 2N. F The time-frequency transformation vector t(n), specifically: the N of the current frame F The sampling points are sequentially used as the first N of the time-frequency transformation vector t(n). F The element will be N in the next frame. F The sampling points are used as the last N sampling points of the time-frequency transform vector t(n).F There are N elements. During the time-frequency transformation of standard MDCT, an analysis window is applied to the time-frequency transformation vector corresponding to each frame. This analysis window can be a symmetrical sinusoidal window or a KBD window, or other window functions that satisfy the perfect reconstruction condition. Subsequently, the MDCT transformation is performed to obtain N for each frame. F There are MDCT spectral coefficients. Among them, the Perfect Reconstruction Condition (PR condition) or Princen-Bradley condition means that within the same overlapping region, the window functions of two adjacent frames satisfy a preset energy complementarity relationship, so that when the decoder overlaps and adds them together, the temporal aliasing components in the overlapping region can cancel each other out, thereby reconstructing the temporal signal without distortion.
[0032] In another embodiment of this specific implementation, the time-frequency transformation can be achieved using the forward transform of the low-latency improved discrete cosine transform (LD-MDCT). For example, it can be implemented using the low-latency MDCT defined in mainstream audio codec standards (such as AAC, LC3, L2HC).
[0033] Preferably, low-latency MDCT as defined in the LC3 standard is used to implement time-frequency transformation. Specifically, the audio signal to be processed is divided into frames along the time axis according to a preset frame length and a preset frame shift, where the preset frame shift is less than the preset frame length. Preferably, the preset frame shift can be half of the preset frame length. The number of sampling points in a single frame is denoted as N. F For the m-th frame, construct a string of length 2N. F The time-frequency transformation vector t(n), specifically: the N of the current frame F Each sampling point and N before the current frame F -Z sampling points (i.e., N points located at the end of the time axis in the previous frame) F -Z sampling points), concatenated in chronological order, yield a total of 2N. F -Z true sampling points are generated, and then Z zeros are padded to the end of the true sampling points. In this embodiment, an asymmetric low-latency analysis window is applied to the time-frequency transform vector corresponding to each frame, and then MDCT transform is performed to obtain N for each frame. F The MDCT spectral coefficients are as follows. Among them, the asymmetric low-latency analysis window has the characteristics of a long past overlap region and a short or zero future overlap region, which allows the encoder to complete the time-frequency transformation without waiting for the next frame of data. Compared with the time-frequency transformation corresponding to the standard MDCT, it can reduce the encoding latency, thereby meeting the timely noise reduction requirements of the microphone side in live streaming scenarios.
[0034] For example, the time-frequency transformation vector t(n) of the m-th frame can be constructed using the following formula: When n=0,1,……,2N FWhen -Z-1, assign the value t(n)=x m,in (ZN F +n); When n=2N F -Z,……,2N F When the value is -1, zero padding is performed at the end, and t(n) is set to 0; Where, x m,in (·) represents the time-domain signal of the m-th frame of audio to be processed; Z is the number of zeros padded, N F This represents the number of sampling points per frame.
[0035] The MDCT spectral coefficients of the m-th frame are calculated using the following formula:
[0036] Among them, X m,in (k) represents the MDCT spectral coefficients of the m-th frame, where k represents the number of frequency points of the MDCT spectral coefficients per frame, W ana (n) represents the asymmetric low-latency analysis window.
[0037] Step S102: Construct input features based on MDCT spectral coefficients, input the input features into the mask prediction model, and obtain the ideal ratio mask (IRM) prediction value output by the model.
[0038] The mask prediction model can be a feedforward neural network that is trained to receive the features corresponding to the MDCT spectral coefficients of N consecutive frames and output the ideal ratio mask prediction value.
[0039] In one embodiment of this specific implementation, the mask prediction model may be built based on a recurrent neural network (RNN) or a long short-term memory (LSTM) network to utilize the contextual information of the audio when predicting the mask.
[0040] In this embodiment, step S102, "Constructing input features based on MDCT spectral coefficients, inputting the input features into the mask prediction model, and obtaining the ideal ratio mask (IRM) prediction value output by the model," may include the following steps: The MDCT spectral coefficients of multiple consecutive frames, including the current audio frame, are concatenated in the time dimension to form a feature vector containing contextual information. This feature vector is then input into the mask prediction model to obtain the IRM prediction value of the current audio frame.
[0041] Among them, multiple consecutive frames, including the current audio frame, may include the current audio frame, one or more audio frames preceding the current audio frame, and / or one or more audio frames following the current audio frame.
[0042] As an example, we select MDCT spectral coefficients from N consecutive frames, for instance, N=4, choosing the MDCT spectral coefficients from the current frame and the three frames preceding it. We then arrange the MDCT spectral coefficients of these four consecutive frames in chronological order, forming a 4×K two-dimensional time-frequency matrix, which serves as the input feature for the current frame, where K is the number of frequency points in each frame's MDCT spectral coefficients. By concatenating the MDCT spectral coefficients from multiple consecutive frames, we provide temporal context information for the mask prediction model.
[0043] After the two-dimensional time-frequency matrix is input into the mask prediction model, the mask prediction model can extract local time-frequency correlation characteristics in the time and frequency dimensions, and predict the ratio mask with reference to these characteristics. The predicted ratio mask is used to approximate the ideal ratio mask IRM. Therefore, this application describes it as the IRM prediction value.
[0044] As another example, obtain the MDCT spectral coefficients of N consecutive frames (e.g., the current frame and the N-1 frames prior to the current frame), flatten the MDCT spectral coefficients of each frame in frequency order, and then concatenate the flattened results of four consecutive frames to form a one-dimensional input feature vector, which is used as the input feature mentioned above. This one-dimensional input feature vector is then input into the mask prediction model.
[0045] Optionally, the selection of N consecutive frames can be done in either a causal or non-causal mode. In the causal mode, the MDCT spectral coefficients of the current frame and the N-1 frames preceding it are selected, utilizing only historical frame information. This method is suitable for low-latency real-time processing scenarios. In the non-causal mode, the MDCT spectral coefficients of the current frame and several frames before and after it are selected, which can utilize both past and future contextual information. This method is suitable for scenarios that are not sensitive to latency but require higher audio quality.
[0046] In the above example, the number of consecutive frames N can be set as needed, and this application does not limit it. For example, it can be determined according to the required context duration (such as 30ms~50ms) and the preset frame shift. The feature extraction process directly uses MDCT spectral coefficients as the data source without performing additional feature domain transformation, thereby maintaining the integrity of frequency domain information while introducing time context.
[0047] In one embodiment of this specific implementation, the mask prediction model can be trained in the following manner, including the following steps: First, the clean audio and noisy audio are mixed, and the mixed noisy audio is subjected to time-frequency transformation to obtain noisy MDCT spectral coefficients. Based on the noisy MDCT spectral coefficients, training input features are constructed and input into the neural network model to be trained to obtain training IRM prediction values. The model loss is calculated based on the training IRM prediction values, noisy MDCT spectral coefficients, and clean audio. Based on the model loss, the model's weight parameters and bias parameters are adjusted, and the model with adjusted parameters is repeatedly trained until the model converges and training is stopped to obtain the trained mask prediction model.
[0048] As an example, mixing clean audio with noisy audio and performing a time-frequency transformation on the mixed noisy frequency to obtain noisy MDCT spectral coefficients can include the following sub-steps: The clean audio and noisy audio are processed into frames with preset frame length and preset frame shift respectively, resulting in clean audio frames and noisy audio frames. The scaling factor of the noisy audio frame is determined according to the preset signal-to-noise ratio, and the noisy audio frame is scaled according to the scaling factor. The scaled noisy audio frame is added point by point in the time domain to the clean audio frame with the same frame number to obtain the noisy frequency frame. The noisy frequency frame is subjected to time-frequency transformation to obtain the noisy MDCT spectral coefficients.
[0049] In a specific example, both the clean audio and the noisy audio have a sampling rate of 16kHz. The clean audio and noisy audio are framed with a frame length of 10ms and a frame shift of 5ms, respectively. Each frame contains 160 sampling points, with adjacent frames repeating 80 sampling points (50% overlap). For the m-th frame, the clean audio frame x is obtained. m,clean (n), Noise audio frames x m,noise (n), where n=0,1,…,159.
[0050] Calculate the energy of the m-th clean audio frame and the energy of the noisy audio frame. Combining the energy of the clean audio frame, the energy of the noisy audio frame, and the preset signal-to-noise ratio, calculate the scaling factor of the noisy audio frame. Then, multiply the noisy audio frame by the scaling factor to obtain the scaled noisy audio frame. Add the scaled noisy audio frame to the clean audio frame with the same frame number in the time domain, sampling point by point, to obtain the noisy frequency frame. Then, perform a time-frequency transformation on the noisy frequency frame.
[0051] It should be noted that the method for performing MDCT time-frequency transformation on the noisy frequency can refer to the time-frequency transformation method described in the above embodiments, and will not be repeated here.
[0052] Repeat the above process to process all noisy frequency frames to obtain the noisy MDCT spectral coefficient sequence required for training.
[0053] It should be noted that the frame length, frame shift, sampling rate, and signal-to-noise ratio mentioned above can be set as needed, and this application does not impose any limitations on them.
[0054] After obtaining the noisy MDCT spectral coefficients, input features are constructed based on these coefficients. To facilitate differentiation from the input features used in the model application phase, this application refers to them as training input features. It should be noted that the feature construction method during the training phase can refer to the feature construction method used in the model application phase described in the above embodiments, and will not be repeated here.
[0055] The neural network model to be trained processes the input features for training and predicts a ratio mask. To distinguish it from the IRM prediction value during the model application stage, this application refers to it as the training IRM prediction value. In this embodiment, the output layer of the neural network model can use Sigmoid as the activation function so that the output training IRM prediction value falls within the range of [0, 1].
[0056] This embodiment divides clean audio and noisy audio into frames and mixes them frame by frame according to the signal-to-noise ratio. This allows for flexible control over the signal-to-noise ratio of the training samples and the types of noise involved in the mixing, simulating various real-world noise scenarios and improving the model's generalization ability to different noise environments.
[0057] In one example, calculating the model loss based on the training IRM predictions, noisy MDCT spectral coefficients, and clean audio may include the following steps: Multiply the IRM predictions used for training by the noisy MDCT spectral coefficients to obtain the denoised spectral coefficients used for training. The training denoised spectral coefficients are subjected to inverse time-frequency transformation (i.e., inverse MDCT transformation, windowing, and overlapping addition are performed sequentially) to obtain the denoised audio corresponding to the noisy frequency. Calculate the error between the clean audio and the denoised audio, and use it as the model loss.
[0058] It should be noted that the inverse MDCT transformation, windowing, and overlapping addition processing of the noise reduction spectral coefficients during training can refer to the processing methods of inverse MDCT transformation, windowing, and overlapping addition during the model application stage. See the specific implementation method of step S104 for details.
[0059] After obtaining the denoised audio, the error between the m-th clean audio frame and the m-th denoised audio frame can be calculated using the following formula: ; in, Let x represent the time-domain signal of the m-th denoised audio frame. m,clean (n) represents the time-domain signal of the m-th pure audio frame.
[0060] Then, the calculated errors are summed to obtain the error between the clean audio and the denoised audio, which is used as the model loss.
[0061] When the model loss does not reach the preset loss threshold, the backpropagation algorithm is used to calculate the gradient of the weight parameters and bias parameters of each layer in the neural network model based on the model loss. The weight parameters and bias parameters are updated along the gradient descent direction according to the preset learning rate to obtain the parameter-adjusted model. For the parameter-adjusted model, the above training process is repeated until the model loss reaches the preset loss threshold or the preset maximum number of iterations is reached, the model convergence is determined, and the trained mask prediction model is obtained.
[0062] This embodiment, by mixing clean audio with noisy audio and converting it to the MDCT domain, can flexibly construct supervised training data with known clean labels (e.g., time-domain signals of clean audio), effectively simulating real-world noise scenarios and improving the model's generalization ability to different noise environments. Training input features are constructed based on noisy MDCT spectral coefficients, allowing the model to directly learn the mapping relationship from MDCT domain features to the ideal ratio mask, avoiding additional prediction of phase information and reducing model complexity and training difficulty. The training denoised spectral coefficients are obtained by multiplying the noisy MDCT spectral coefficients in the IRM prediction domain and then performing an inverse operation on them. Time-frequency transformation can directly obtain the denoised audio corresponding to the noisy frequency, ensuring that the model training objective is consistent with the signal reconstruction process in the actual application stage. Furthermore, using the error between the clean audio and the denoised audio as the model loss, the final reconstructed signal can be directly constrained in the time domain. This not only optimizes the amplitude information but also implicitly constrains the phase information through the inverse MDCT transformation, avoiding phase distortion caused by relying solely on amplitude spectrum loss. At the same time, it does not require additional phase prediction, excessive increase in network input and output, or increase in network complexity and training difficulty, thereby improving the waveform fidelity and overall auditory effect of the denoised audio under low computational conditions.
[0063] For ease of understanding, in Figure 2 The diagram illustrates the offline training process of the model.
[0064] like Figure 2As shown, in this training process, the clean speech and noisy audio are first mixed to obtain noisy audio. Then, time-frequency transformation and feature extraction are performed on the noisy audio to obtain noisy features. The noisy features are input into the neural network model. After the model outputs the IRM prediction value, denoising, inverse MDCT transformation, windowing, and overlapping addition are performed sequentially based on the IRM prediction value and the MDCT spectral coefficients after the time-frequency transformation of the noisy audio to obtain the denoised audio. Then, the error is calculated using the clean audio and the denoised audio, and the weights and bias parameters of the network model are adjusted based on the error. When the error is less than a preset threshold, the model training is considered complete. Then, the weights and bias parameters of the trained model are quantized into 8 bits so that the trained neural network model can be deployed in the embedded system.
[0065] Step S103: Use the IRM prediction value to denoise the MDCT spectral coefficients to obtain the denoised spectral coefficients.
[0066] The denoised spectral coefficients of a frame are obtained by multiplying the IRM prediction value of each frame by the MDCT spectral coefficients of that frame.
[0067] For example, the noise reduction spectral coefficients can be calculated using the following formula: X m,denoise (k)=X m,in (k)·IRM m (k), k=0,...,N F -1
[0068] Among them, X m,denoise (k) represents the noise reduction spectral coefficients of the m-th frame, X m,in (k) represents the MDCT spectral coefficients of the m-th frame of the audio to be processed, IRM m (k) is the IRM prediction value corresponding to the m-th frame.
[0069] Step S104: Perform inverse time-frequency transformation on the denoised spectral coefficients to obtain the denoised time-domain audio signal.
[0070] Using the inverse time-frequency transform that accompanies the above time-frequency transform process, the denoised time-domain audio signal is reconstructed based on the denoised spectral coefficients.
[0071] First, an inverse MDCT transform is performed on the denoised spectral coefficients corresponding to each audio frame to obtain the temporal aliasing signal of each audio frame. A synthesis window function is then applied to each temporal aliasing signal, and the windowed temporal aliasing signal of the current audio frame is overlapped and added to the windowed temporal aliasing signals of the adjacent audio frames in the overlapping region to obtain the denoised temporal audio signal. The synthesis window and the analysis window used in the time-frequency transform are complementary window functions. The analysis window, synthesis window, and overlap addition process are used together to ensure that the temporal aliasing components in the overlapping region of adjacent frames cancel each other out.
[0072] In one embodiment, the inverse time-frequency transform corresponding to standard MDCT is: the noise reduction spectral coefficients X of the m-th frame. m,denoise (k), where k=0,…,N F -1, perform inverse MDCT transform, resulting in a length of 2N. F The time-domain aliasing signal, where n=0,…,2N F -1. For time-domain aliasing signals Apply the synthesis window function W syn (n), to obtain the windowed time-domain aliasing signal. The synthesis window corresponds to the symmetric analysis window used in the standard MDCT transform, for example, using a symmetric sinusoidal window or a KBD window, and satisfies the perfect reconstruction condition.
[0073] Then, according to the preset frame shift, the windowed temporal aliasing signals of two adjacent frames are added point-by-point in the overlapping region. Specifically, for the m-th frame, its windowed temporal aliasing signal is superimposed with the windowed temporal aliasing signals of the adjacent frames in the overlapping region to obtain the N corresponding to the m-th frame. F Each frame has a denoised temporal sampling point. The denoised temporal sampling points corresponding to all frames are arranged in chronological order to obtain the denoised temporal audio signal.
[0074] In another embodiment, if a low-latency MDCT is used during time-frequency transformation, such as the low-latency MDCT defined in the LC3 standard, then during the inverse time-frequency transformation, the inverse transformation of the low-latency MDCT defined in the LC3 standard should be used, and the asymmetric low-latency synthesis window defined in the LC3 standard should be used for windowing and overlapping addition.
[0075] Specifically, the noise reduction spectral coefficients x of the m-th frame m,denoise (k), where k=0,…,N F -1, perform inverse MDCT transform, resulting in a length of 2N. F Temporal aliasing signal Where n=0,…,2N F -1. For time-domain aliasing signals Apply the synthesis window function W syn (n), to obtain the windowed time-domain aliasing signal. The synthesis window corresponds to the asymmetric low-delay analysis window used in the LC3 LD-MDCT forward transform and satisfies the generalized perfect reconstruction condition.
[0076] The inverse transformation can be performed using the following formula:
[0077] Then, to Windowing is applied to ensure seamless stitching with adjacent frames, and a window function is used to achieve temporal aliasing cancellation (TDAC). ; Finally, perform "overlapping addition" using the following formula:
[0078] Where, x m,denoise (n) represents the time-domain audio signal after noise reduction in the m-th frame, where n represents the index of the sampling point; The buffered signal is stored in the windowed temporal aliasing signal of the previous frame during the overlapping and addition process. It is used to overlap and add with the windowed temporal aliasing signal of the current frame to achieve temporal aliasing cancellation.
[0079] The synthesis window W used in this embodiment syn (n) is the asymmetric delay window function. Based on the above formula, it can be understood that this synthesis window is divided into four segments on the time axis: The first segment corresponds to the points with indices 0 to Z-1 in each frame of time-domain aliasing signal, which are the sampling points that overlap with the previous frame; The second segment corresponds to indices Z~N in each frame of the temporal aliasing signal. F -1 point; The third segment corresponds to index N in each frame of the temporal aliasing signal. F ~N F +Z-1 points; The fourth segment corresponds to index N in each frame of the temporal aliasing signal. F +Z~2N F -1 point.
[0080] Among them, the window coefficients of the second and fourth segments satisfy the energy complementarity relationship so as to achieve temporal aliasing cancellation when they overlap and are added together; the window coefficient of the third segment keeps a non-zero value, such as a plateau value of 1 or close to 1.
[0081] Thus, by referring to the formulas involved in the overlapping addition process, it can be understood that the overlapping addition process involves... The first Z sampling points are discarded (these are the sampling points that overlap with the (m-1)th frame); starting from the sampling point with index Z, ... Point by point Add the values; assign the index N F ~N F +Z-1 sampling points are retained, thus obtaining the time-domain audio signal X after noise reduction in the m-th frame. m,denoise (n). Finally, Sampling points in the zero-padding region at the end of the middle (i.e., index N) F +Z~2N F -1 point) updated to middle.
[0082] In summary, the audio processing method provided in this application uses MDCT for time-frequency transformation to obtain MDCT spectral coefficients. The mask prediction model only needs to process these amplitude spectral coefficients, without needing to process the phase information separately. After the model outputs IRM prediction values, the MDCT spectral coefficients are denoised using the IRM prediction values to obtain MDCT-type denoised spectral coefficients. Since the inverse MDCT transform can reconstruct the corresponding time-domain signal, this application performs an inverse time-frequency transform on the denoised spectral coefficients. Using all the denoised spectral coefficients corresponding to the audio to be processed, the time-domain audio signal can be reconstructed through inverse transformation. In this time-domain audio signal, the amplitude information is explicitly generated based on the denoised spectral coefficients, and the phase information can be implicitly determined based on all the denoised spectral coefficients. Therefore, without using a model to process the phase information, the amplitude and phase information of the denoised signal can be determined simultaneously using MDCT-type denoised spectral coefficients, improving the denoising effect of the audio signal. This improves sound quality without excessively increasing the computational load.
[0083] In one specific embodiment of this application, Figure 3 An audio processing apparatus according to this application is shown, comprising: The time-frequency transformation module 301 is used to perform time-frequency transformation on the audio to be processed to obtain the improved discrete cosine transform (MDCT) spectral coefficients; The mask prediction module 302 is used to construct input features based on MDCT spectral coefficients, input the input features into the mask prediction model, and obtain the ideal ratio mask (IRM) prediction value output by the model. The noise reduction module 303 is used to reduce the noise of the MDCT spectral coefficients using the IRM prediction values to obtain the noise-reduced spectral coefficients. The signal reconstruction module 304 is used to perform inverse time-frequency transformation on the noise reduction spectral coefficients to obtain the noise-reduced time-domain audio signal.
[0084] In one embodiment of this application, the time-frequency conversion module, mask prediction module, noise reduction module, and signal reconstruction module in the audio processing apparatus of this application may be directly in hardware, in a software module executed by a processor, or in a combination of both.
[0085] Software modules may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in this art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium.
[0086] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination thereof. A general-purpose processor can be a microprocessor, but alternatively, it can be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors incorporating a DSP core, or any other such configuration. Alternatively, the storage medium can be integrated with the processor. The processor and storage medium can reside in an ASIC. The ASIC can reside in the user terminal. Alternatively, the processor and storage medium can reside as discrete components in the user terminal.
[0087] In one specific embodiment of this application, a sound recording device is provided, including: a sound pickup module and an audio processing module; the sound pickup module and the audio processing module are communicatively connected; the sound pickup module is used to collect audio as audio to be processed; the audio processing module is used to execute the audio processing method of the above embodiment to reduce noise in the audio to be processed.
[0088] In one specific embodiment of this application, a computer device is provided, which includes a processor and a memory, the memory storing computer instructions, and the processor operating the computer instructions to perform the audio processing method described in any of the above embodiments.
[0089] In one specific embodiment of this application, the computer-readable storage medium of this application stores computer instructions that are operated to perform the audio processing method described in any embodiment.
[0090] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0091] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0092] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. An audio processing method, characterized in that, include: The audio to be processed is subjected to time-frequency transformation to obtain the spectral coefficients of the improved discrete cosine transform (MDCT); Input features are constructed based on the MDCT spectral coefficients, and the input features are input into the mask prediction model to obtain the ideal ratio mask (IRM) prediction value output by the model. The MDCT spectral coefficients are denoised using the IRM prediction values to obtain denoised spectral coefficients; The denoised spectral coefficients are subjected to inverse time-frequency transformation to obtain the denoised time-domain audio signal.
2. The audio processing method according to claim 1, characterized in that, The mask prediction model is constructed based on a recurrent neural network or a long short-term memory network; The process of constructing input features based on the MDCT spectral coefficients, inputting these features into a mask prediction model, and obtaining the ideal ratio mask (IRM) prediction value output by the model includes: The MDCT spectral coefficients of multiple consecutive frames, including the current audio frame, are concatenated in the time dimension to form a feature vector containing contextual information. The feature vector is input into the mask prediction model to obtain the IRM prediction value of the current audio frame.
3. The audio processing method according to claim 1, characterized in that, The training process of the mask prediction model includes: The clean audio and the noisy audio are mixed, and the mixed noisy frequency is subjected to time-frequency transformation to obtain the noisy MDCT spectral coefficients. Training input features are constructed based on the noisy MDCT spectral coefficients, and the training input features are input into the neural network model to be trained to obtain the training IRM prediction value. The model loss is calculated based on the IRM predictions used for training, the noisy MDCT spectral coefficients, and the clean audio. Based on the model loss, the model's weight parameters and bias parameters are adjusted, and the model with adjusted parameters is repeatedly trained until the model converges and training is stopped, thus obtaining the trained mask prediction model.
4. The audio processing method according to claim 3, characterized in that, The step of calculating the model loss based on the training IRM prediction values, the noisy MDCT spectral coefficients, and the clean audio includes: Multiply the training IRM prediction value by the noisy MDCT spectral coefficient to obtain the training denoised spectral coefficient; Perform inverse time-frequency transformation on the training noise reduction spectral coefficients to obtain the noise-reduced audio corresponding to the noisy frequency; The error between the clean audio and the denoised audio is calculated and used as the model loss.
5. The audio processing method according to claim 3, characterized in that, The process of mixing clean audio with noisy audio and performing time-frequency transformation on the mixed noisy frequency to obtain noisy MDCT spectral coefficients includes: The clean audio and the noisy audio are processed into frames with preset frame length and preset frame shift, respectively, to obtain clean audio frames and noisy audio frames. The scaling factor of the noisy audio frame is determined according to the preset signal-to-noise ratio, and the noisy audio frame is scaled according to the scaling factor. The scaled noisy audio frame is added point by point in the time domain to the clean audio frame with the same frame number to obtain the noisy frequency frame. The noisy frequency frame is subjected to time-frequency transformation to obtain the noisy MDCT spectral coefficients.
6. The audio processing method according to claim 1 or 4, characterized in that, The time-frequency transformation and the inverse time-frequency transformation are implemented based on the low-delay improved discrete cosine transform (LD-MDCT).
7. An audio processing device, characterized in that, include: The time-frequency transformation module is used to perform time-frequency transformation on the audio to be processed, and obtain the improved discrete cosine transform (MDCT) spectral coefficients; The mask prediction module is used to construct input features based on the MDCT spectral coefficients, input the input features into the mask prediction model, and obtain the ideal ratio mask (IRM) prediction value output by the model. The noise reduction module is used to reduce the noise of the MDCT spectral coefficients using the IRM prediction values to obtain the noise-reduced spectral coefficients. The signal reconstruction module is used to perform inverse time-frequency transformation on the denoised spectral coefficients to obtain the denoised time-domain audio signal.
8. A radio receiving device, characterized in that, include: Sound pickup module and audio processing module; The pickup module and the audio processing module are communicatively connected; The audio pickup module is used to collect audio as audio to be processed. The audio processing module is configured to execute the audio processing method according to any one of claims 1-6 to reduce noise in the audio to be processed.
9. A computer device comprising a processor and a memory, the memory storing computer instructions, characterized in that, The processor operates the computer instructions to perform the audio processing method according to any one of claims 1-6.
10. A computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are operated to perform the audio processing method according to any one of claims 1-6.
