Neural network training method, device, electronic equipment and medium
By introducing the loss function of auditory perception characteristics into the audio coding method, the problem of audible noise in the audio coding method under low bit rate is solved, ensuring that the reconstruction error of the frequency component is within the masking threshold, and improving the audio decoding quality.
Patent Information
- Application Number
- CN202210293128.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-23
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-03-23
AI Technical Summary
Existing audio coding methods based on deep neural networks have audible noise problems at low bit rates. The reason is that only using the spectral mean square error as the frequency domain loss measure cannot ensure that the reconstruction error of each frequency component does not exceed the masking threshold. .
Introduce a loss function based on auditory perception characteristics, and calculate the time-frequency loss, quantization loss and auditory perception loss through the neural network training module to ensure that the reconstruction loss of each frequency component is controlled within the masking threshold as much as possible, improving the perceptual quality of the decoded audio signal .
By introducing a loss function with auditory perception characteristics, the perceptual quality of the decoded audio signal is significantly improved, audible noise is reduced, the reconstruction error of each frequency component is ensured within the masking threshold, and the performance of audio coding is improved.
Smart Images

Figure CN114783449B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of audio signal encoding and decoding, and in particular to a neural network training method, device, electronic equipment and medium. Background Art
[0002] Human hearing research shows that the human ear has an auditory masking effect, that is, when two sounds of the same or similar frequency occur at the same time, the louder sound (masker) will reduce the human ear's ability to perceive the smaller sound (masked); when the difference in intensity between the two is large, the masked sound cannot be heard by the human ear at all. The maximum intensity at which the masker can mask the masked sound is called the masking threshold. In addition to being closely related to the intensity of the masker, the masking effect is also strongly correlated with the frequency of the audio signal.
[0003] Traditional perceptual audio coding methods use the masking effect of the human ear to divide the input audio signal into various sub-bands. When encoding each sub-band signal, the intensity of the reconstruction error caused by the encoding is controlled within the masking threshold of the sub-band signal, so as to compress the audio data while ensuring that the decoded audio signal is perceived without distortion. When the transmission bit rate is low, based on the characteristic that the human ear is more sensitive to low frequencies, the encoder will allocate more bits to the low-frequency components, resulting in a large loss or even loss of the high-frequency components of the audio. Taking MP3 as an example, when the bit rate is lower than 128kbps, the frequency components above 15kHz will be discarded, and the decoded audio quality will be reduced. In recent years, neural network-based autoencoders have developed rapidly in the field of audio encoding and decoding. When the bit rate is 112kbps, the autoencoder can retain the high-frequency components of 15kHz to 22kHz while ensuring good decoded audio quality, which makes it possible to generate high-quality decoded audio at a lower bit rate.
[0004] The following technical problems exist in the prior art: when the bit rate of the neural network-based autoencoder is as low as 72kbps, the decoded audio signal can retain the high-frequency components of 15kHz to 22kHz, but there is obvious audible noise. The reason is that the autoencoder only uses the spectral mean square error as the frequency domain loss metric, and when quantizing the extracted internal features, the average value of the error between the decoded audio and the original audio spectrum is minimized as the calculation target. However, the human ear has large differences in sensitivity to different frequency components. This averaged error processing alone cannot ensure that the reconstruction error of each frequency component does not exceed the masking threshold, which may introduce audible noise. Therefore, it is necessary to introduce losses based on auditory perception characteristics in the existing audio coding method based on deep neural networks to improve the perceptual quality of the decoded audio signal. Summary of the invention
[0005] The purpose of the present invention is to overcome the deficiencies of the above-mentioned background technology and provide a neural network training method, device, electronic device and medium to improve the perceptual quality of decoded audio signals.
[0006] In a first aspect, a neural network training method is provided for training a quantization codebook and an encoder and a decoder based on a neural network, comprising the following steps:
[0007] The neural network-based encoder extracts deep features of the input audio signal frame by frame;
[0008] A quantizer quantizes the deep-level features extracted by the encoder to obtain an index of the deep-level features;
[0009] The dequantizer dequantizes the index of the encoded deep-level feature to obtain a dequantized deep-level feature;
[0010] The quantization loss calculation module calculates the quantization loss for training the quantization codebook based on the deep-level features and the dequantized deep-level features;
[0011] The neural network-based decoder decodes the dequantized deep features to obtain a decoded audio signal;
[0012] The time-frequency loss calculation module calculates the time domain reconstruction loss and the frequency domain reconstruction loss respectively based on the input audio signal and the decoded audio signal, and uses the sum of the time domain reconstruction loss, the frequency domain reconstruction loss and the quantization loss as the loss function;
[0013] The signal-to-mask ratio calculation module based on the psychoacoustic model calculates the signal-to-mask ratio of the input audio signal;
[0014] The auditory perception loss calculation module calculates the auditory perception loss of the decoded audio signal;
[0015] Adding the auditory perception loss to the loss function to obtain a loss function that introduces auditory perception characteristics;
[0016] The training module trains the encoder, quantization codebook and decoder with a loss function that introduces auditory perception characteristics until the loss converges, thereby obtaining the trained encoder, quantization codebook and decoder.
[0017] Further, the auditory perception loss calculation module calculates the auditory perception loss according to the input audio signal, the decoded audio signal and a signal-to-mask ratio of the input audio signal.
[0018] Further, the step of calculating the signal-to-mask ratio of the input audio signal by the signal-to-mask ratio calculation module based on the psychoacoustic model comprises:
[0019] The input audio signal is input frame by frame into the signal-to-mask ratio calculation module based on the psychoacoustic model. The signal-to-mask ratio calculation module divides each frame of the input audio signal into multiple sub-bands in the frequency domain, and calculates the signal-to-mask ratio sub-band by sub-band to obtain the signal-to-mask ratio of the input audio signal.
[0020] Further, the step of the auditory perception loss calculation module calculating the auditory perception loss of the decoded audio signal includes:
[0021] The input audio signal and the decoded audio signal are subjected to time-frequency transformation frame by frame to obtain an energy spectrum of the input audio signal and an energy spectrum of the decoded audio signal;
[0022] Divide the energy spectrum of the input audio signal and the energy spectrum of the decoded audio signal into sub-bands in the same sub-band division manner as in the signal-to-mask ratio calculation module, to obtain the energy of the sub-band of the input audio signal and the energy of the sub-band of the decoded audio signal;
[0023] Calculating the signal-to-noise ratio of each sub-band frame by frame based on the energy of the input audio signal sub-band and the energy of the decoded audio signal sub-band to obtain the signal-to-noise ratio of the decoded audio signal;
[0024] The signal-to-mask ratio of the input audio signal is subtracted from the signal-to-noise ratio of the decoded audio signal frame by frame and subband by subband, and the auditory perception loss of each subband of each frame is obtained through an activation function, and finally the auditory perception loss is obtained by summing them.
[0025] In a second aspect, a neural network training device is provided for training a quantization codebook and an encoder and a decoder based on a neural network, comprising:
[0026] An encoder, used to extract deep features of the input audio signal;
[0027] A quantizer, used to quantize the deep features extracted by the encoder to obtain an index of the deep features;
[0028] A dequantizer, used for dequantizing the index of the encoded deep-level feature to obtain a dequantized deep-level feature;
[0029] A quantization loss calculation module is used to calculate the quantization loss of the training quantization codebook;
[0030] A decoder, used to decode the dequantized deep features to obtain a decoded audio signal;
[0031] A time-frequency loss calculation module, used to calculate the time domain reconstruction loss and the frequency domain reconstruction loss of the input audio signal and the decoded audio signal;
[0032] A signal-to-mask ratio calculation module based on a psychoacoustic model, used to calculate the signal-to-mask ratio of the input audio signal;
[0033] an auditory perception loss calculation module, used to calculate the auditory perception loss of the decoded audio signal;
[0034] The training module is used to train the encoder, quantization codebook and decoder according to the loss function that introduces the auditory perception characteristics until the loss converges to obtain the trained encoder, quantization codebook and decoder.
[0035] In a third aspect, an audio decoding device is provided, comprising the neural network training device, wherein the audio decoding device is further configured to:
[0036] Receive the deep features of solution quantization;
[0037] Decoding and dequantizing deep features, and
[0038] Output decoded audio signal;
[0039] The dequantized deep-level features are obtained by dequantizing the neural network training device using the trained quantization codebook.
[0040] In a fourth aspect, an audio encoding device is provided, comprising the neural network training device, wherein the audio encoding device is further configured to:
[0041] receiving an input audio signal;
[0042] encoding the input audio signal in a compressed audio format; and
[0043] Outputs the encoded signal in a compressed audio format.
[0044] In a fifth aspect, an electronic device is provided, including:
[0045] Processor; and
[0046] A memory, configured to store executable instructions of the processor;
[0047] The processor is configured to perform the method by executing the executable instructions.
[0048] According to a sixth aspect, a computer-readable medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the method described is implemented.
[0049] Compared with the prior art, the advantages of the present invention are as follows: the training module trains the encoder, quantization codebook and decoder based on the loss function that introduces auditory perception characteristics, so that the reconstruction loss of each frequency component of the decoded audio signal is controlled within the masking threshold as much as possible, thereby achieving the effect of improving the perceptual quality of the decoded audio signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flow chart of the neural network training method of the present invention.
[0051] Figure 2 It is a flow chart of calculating the signal-to-mask ratio of an input audio signal by the neural network training method of the present invention.
[0052] Figure 3 It is a schematic diagram of the flow of calculating auditory perception loss by the neural network training method of the present invention.
[0053] Figure 4 It is a flow chart of the testing method of the neural network training device of the present invention.
[0054] Figure 5 This is a schematic diagram comparing the subjective test results of audio sequences generated by neural networks trained with two loss functions. DETAILED DESCRIPTION
[0055] Reference will now be made in detail to specific embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Although the present invention will be described in conjunction with specific embodiments, it will be understood that it is not intended to limit the present invention to the embodiments described. On the contrary, it is intended to cover changes, modifications and equivalents included in the spirit and scope of the present invention as defined by the appended claims. It should be noted that the method steps described herein can all be implemented by any functional block or functional arrangement, and any functional block or functional arrangement can be implemented as a physical entity or a logical entity, or a combination of the two.
[0056] In order to enable those skilled in the art to better understand the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0057] Note: The example to be introduced below is only a specific example, and is not intended to limit the embodiments of the present invention to the following specific steps, values, conditions, data, sequences, etc. Those skilled in the art can apply the concept of the present invention to construct more embodiments not mentioned in this specification by reading this specification.
[0058] See also Figure 1 As shown, this embodiment provides a neural network training method for training a quantization codebook and an encoder and a decoder based on a neural network, comprising the following steps:
[0059] The neural network-based encoder extracts deep features of the input audio signal frame by frame.
[0060] The quantizer quantizes the deep features extracted by the encoder to obtain the index of the deep features.
[0061] The dequantizer dequantizes the index of the encoded deep-level feature to obtain the dequantized deep-level feature.
[0062] The quantization loss calculation module calculates the quantization loss for training the quantization codebook based on the deep-level features and the dequantized deep-level features.
[0063] The neural network-based decoder decodes the dequantized deep features to obtain a decoded audio signal.
[0064] The time-frequency loss calculation module calculates the time domain reconstruction loss and the frequency domain reconstruction loss respectively based on the input audio signal and the decoded audio signal, and takes the sum of the time domain reconstruction loss, the frequency domain reconstruction loss and the quantization loss as the loss function.
[0065] The signal-to-mask ratio calculation module based on the psychoacoustic model calculates the signal-to-mask ratio of the input audio signal.
[0066] The auditory perception loss calculation module calculates the auditory perception loss of the decoded audio signal; wherein the auditory perception loss calculation module calculates the auditory perception loss according to the input audio signal, the decoded audio signal and the signal-to-mask ratio of the input audio signal.
[0067] The specific steps include:
[0068] The input audio signal and the decoded audio signal are subjected to time-frequency transformation frame by frame to obtain the energy spectrum of the input audio signal and the energy spectrum of the decoded audio signal.
[0069] The energy spectrum of the input audio signal and the energy spectrum of the decoded audio signal are divided into sub-bands according to the same sub-band division method in the signal-to-mask ratio calculation module to obtain the energy of the sub-band of the input audio signal and the energy of the sub-band of the decoded audio signal.
[0070] The signal-to-noise ratio of each sub-band is calculated frame by frame based on the energy of the input audio signal sub-band and the energy of the decoded audio signal sub-band to obtain the signal-to-noise ratio of the decoded audio signal.
[0071] The signal-to-mask ratio of the input audio signal is subtracted from the signal-to-noise ratio of the decoded audio signal frame by frame and subband by subband, and then the auditory perception loss of each subband in each frame is obtained by passing through the activation function, and finally the auditory perception loss is obtained by summing them up.
[0072] The auditory perception loss is added to the loss function to obtain a loss function that introduces auditory perception characteristics.
[0073] The training module trains the encoder, quantization codebook and decoder according to the loss function that introduces auditory perception characteristics until the loss converges, thereby obtaining the trained encoder, quantization codebook and decoder.
[0074] In one embodiment, the specific steps of the neural network training method are as follows:
[0075] S1: The input audio signal is fed into a neural network-based encoder frame by frame to extract its deep features;
[0076] Specifically, as an optional implementation, the input audio signal format adopted in this example is WAVE (Waveform Audio File Format), the sampling rate is 44.1kHz or 48kHz, the number of channels is 1, the sampling depth is 16 bits, the frame length of the input audio signal is 512, the number of frames is 16, and the organization format of the input audio signal is (number of frames, frame length); the encoder uses a convolutional neural network to extract deep features of the input audio signal, and its organization format is (number of frames, deep feature dimension, number of deep feature frames).
[0077] S2: The input audio signal is input frame by frame into a signal-to-mask ratio calculation module based on a psychoacoustic model, the input audio signal is divided into multiple sub-bands in the frequency domain, and the signal-to-mask ratio is calculated sub-band by sub-band to obtain the signal-to-mask ratio of the input audio signal.
[0078] Specifically, the signal-to-mask ratio is the ratio of signal strength to masking threshold, expressed in decibels, and is calculated in sub-bands. The sub-band division principle usually adopts the Bark band division principle. The number of sub-bands can be adjusted according to the coding bit rate requirements. Generally, the more sub-bands there are, the higher the required bit rate is, and the better the perceived quality of the decoded audio. As an optional implementation, the number of sub-bands is 34, and the psychoacoustic model 1 of the standard ISO / IEC 11172-3 is selected to calculate the signal-to-mask ratio of each sub-band of the input audio signal frame by frame. The specific process is as follows: Figure 2 shown.
[0079] First, calculate the power spectral density of each frame of the input audio signal Where N is the frame length of the input audio signal, and C is the number of frames. Then, the sub-bands are divided according to the sub-band division principle, and the maximum value of the power spectral density in the sub-band is selected as the power spectral density P of the sub-band. c (b), b∈{1,…B}, c∈{1,…C}, where B is the number of subbands; then, determine which frequency points in each frame of the input audio signal are tone masking sounds S TM,c ,c∈{1,…C} or noise masking sound S NM,c ,c∈{1,…C}; Next, the tone masker and noise masker are downsampled and reassembled, and the masker whose sound pressure level is lower than the absolute hearing threshold is removed, so as to obtain the tone masker S′ of each frame after reassembly TM,c ,c∈{1,…C} and noise masker S′ NM,c ,c∈{1,…C}; Then, calculate the masking threshold of the tone masker to all other frequency points in each frame And the masking threshold of the noise masker in each frame to all other frequencies Then, calculate the masking threshold of all masking sounds for each frequency point in each frame, that is, the global masking threshold Next, the sub-bands are divided based on the sub-band division principle, and the minimum value of the frequency masking threshold in the sub-band is used as the masking threshold T of the sub-band. c (b), b∈{1,…B}, c∈{1,…C}; Finally, the signal-to-mask ratio of each subband of the input audio signal is calculated frame by frame, and the calculation formula is as follows:
[0080] SMR c (b) = P c (b)-T c (b),b∈{1,…B},c∈{1,…C}(dB)
[0081] S3: Input the deep-level features of step S1 into the quantizer for quantization to obtain the index of the deep-level features.
[0082] Specifically, as an optional implementation, the quantizer of this example uses vector quantization, the dimension of the vector quantization codebook is the dimension of the deep-level features, the number of quantization codebooks is 8192, and the deep-level features are vector quantized to obtain the index of the deep-level features. The organization method of the deep-level feature index is (number of frames, number of frames of the deep-level features).
[0083] S4: Input the index of the deep-level feature of step S3 to the dequantizer, obtain the dequantized deep-level feature, and calculate the quantization loss for training the quantization codebook.
[0084] Specifically, the dequantizer of this example will dequantize the index of the deep feature according to the quantization codebook of the quantizer to obtain the dequantized deep feature, which is organized as (number of frames, dimension of the deep feature, number of frames of the deep feature); in order to make the value of the dequantized deep feature as close as possible to the value of the deep feature, this example introduces a quantization loss to train the quantization codebook, and the calculation formula is as follows:
[0085]
[0086] Specifically, e c (d,f) is the value of the deep feature, e′ c (d, f) is the value of the dequantized deep feature, C is the number of frames, D is the dimension of the deep feature, and F is the number of frames of the deep feature.
[0087] S5: Input the dequantized deep-level features described in step S4 into a neural network-based decoder for decoding to obtain a decoded audio signal.
[0088] Specifically, the decoder of this example uses a transposed convolutional network to upsample the dequantized deep features into a decoded audio signal, and the decoded audio signal is organized as (number of frames, frame length).
[0089] S6: Calculate the time domain reconstruction loss and the frequency domain reconstruction loss respectively based on the input audio signal and the decoded audio signal described in step S5.
[0090] Specifically, this example uses the L2 norm of the input audio signal and the decoded audio signal as the time domain reconstruction error.
[0091] The specific formula is as follows:
[0092]
[0093] Where N is the frame length, C is the number of frames, x c (n) is the input audio signal, x′ c (n) is the decoded audio signal
[0094] In this example, the L2 norm of the input audio signal amplitude spectrum and the decoded audio signal amplitude spectrum is used as the frequency domain reconstruction error. The calculation formula is as follows
[0095]
[0096] Among them, X c (f, t) is the input audio signal amplitude spectrum, X′ c (f, t) is the amplitude spectrum of the decoded audio signal, C is the number of frames, F is the number of frequency points, T is the number of frames divided by short-time Fourier transform, and the amplitude spectrum of the input audio signal and the decoded audio signal is obtained by short-time Fourier transform. The window length of short-time Fourier transform is 512 and the number of overlapping points is 32.
[0097] S7: Input the input audio signal, the decoded audio signal in step S5, and the signal-to-mask ratio of the input audio signal in step S2 to an auditory perception loss calculation module to calculate the auditory perception loss.
[0098] The calculation flow chart of auditory perception loss is as follows Figure 3 The specific steps are as follows:
[0099] Step 7.1: The input audio signal and the decoded audio signal are transformed frame by frame to obtain the energy spectrum of the input audio signal and the energy spectrum of the decoded audio signal.
[0100] Specifically, there are many ways of time-frequency transformation. As an optional implementation, this example uses fast Fourier transform to calculate the energy of each frequency point frame by frame. The frame length of the signal is 512, and the calculation formula is as follows:
[0101]
[0102]
[0103]
[0104] Where N is the frame length of the signal, C is the number of frames of the signal, and x c (n) is the input audio signal, x′ c (n) is the decoded audio signal, X c (k) is the energy spectrum of the input audio signal, X′ c (k) is the decoded audio signal energy spectrum.
[0105] Step 7.2: Divide the energy spectrum of the input audio signal and the energy spectrum of the decoded audio signal in step 7.1 into sub-bands in the same sub-band division manner as step S2 to obtain the energy of the input audio signal sub-band and the energy of the decoded audio signal sub-band.
[0106] Specifically, the energy calculation formula of the input audio signal and the decoded audio signal sub-band is as follows:
[0107]
[0108]
[0109] Wherein, k∈m(b) is the frequency index of the frequency point whose frequency range belongs to subband b, and B is the number of subbands.
[0110] Step 7.3: Based on the energy of the input audio signal subband and the energy of the decoded audio signal subband in step 7.2, the signal-to-noise ratio of each subband is calculated frame by frame to obtain the signal-to-noise ratio of the decoded audio signal.
[0111] Specifically, the signal-to-noise ratio is calculated as follows:
[0112]
[0113] Step 7.4: Subtract the signal-to-mask ratio of the input audio signal described in step S2 from the signal-to-noise ratio of the decoded audio signal described in step 7.3 frame by frame and subband by subband, and pass through an activation function to obtain the auditory perception loss of each subband in each frame, and finally sum them up to obtain the auditory perception loss.
[0114] Specifically, as an optional implementation method, this method uses the Relu function as the activation function, and the calculation formula of the auditory perception loss is as follows:
[0115]
[0116] S8: Taking the sum of the auditory perception loss described in step S7, the time domain reconstruction loss and the frequency domain reconstruction loss described in step S6, and the quantization loss described in step S4 as the value of the loss function, train the quantization codebook and the neural network-based encoder and decoder until the above-mentioned losses converge.
[0117] Specifically, the loss function is defined as follows:
[0118] Loss = L audible +L freq +L quant +L time
[0119] As an optional implementation, this example uses an adaptive moment estimation (Adam) optimizer to optimize the loss, with a learning rate of 0.0003 and a decay weight of 0.002, and trains until all losses converge.
[0120] Figure 5 The subjective test results of four different types of audio sequences generated by neural networks trained with two loss functions at 72 kbps are shown. In this example, the subjective test results have the rating of the Multiple Stimulus Test with Hidden Reference and Anchor (MUSHRA). MUSHRA, described in ITU-R BS.1534, is a well-known method for performing codec listening tests to evaluate the perceptual quality of the output of lossy audio compression algorithms. Figure 5 The x-axis represents the test sequence, and the y-axis represents the MUSHRA test score.
[0121] More specifically, Figure 5 Comparison between the MUSHRA scores of the audio sequences generated by the same neural network trained with the loss function and the loss function introducing auditory perceptual properties and the audio sequences generated by applying a 3.5kHz low-pass filter (MUSHRA) and the reference audio sequence is shown. Figure 5 As shown in the figure, the average MUSHRA score of the audio sequence generated by the neural network trained with the loss function of auditory perceptual characteristics is significantly higher than any other score, and the MUSHRA score of the audio sequence generated by the neural network trained without the loss function of auditory perceptual characteristics is about 20 points higher. The difference between the two is about 20, which is a very significant improvement.
[0122] Based on the same inventive concept, the embodiment of the present application further provides a neural network training device for training a quantization codebook and an encoder and a decoder based on a neural network, comprising:
[0123] The encoder is used to extract deep features of the input audio signal, wherein the encoder is an encoder based on a neural network.
[0124] The quantizer is used to quantize the deep features extracted by the encoder to obtain the index of the deep features.
[0125] The dequantizer is used to dequantize the index of the encoded deep-level feature to obtain the dequantized deep-level feature.
[0126] The quantization loss calculation module is used to calculate the quantization loss of the training quantization codebook.
[0127] The decoder is used to decode the dequantized deep features to obtain a decoded audio signal. The decoder is a decoder based on a neural network.
[0128] The time-frequency loss calculation module is used to calculate the time-domain reconstruction loss and the frequency-domain reconstruction loss based on the input audio signal and the decoded audio signal.
[0129] The signal-to-mask ratio calculation module based on the psychoacoustic model is used to calculate the signal-to-mask ratio of the input audio signal.
[0130] The auditory perception loss calculation module is used to calculate the auditory perception loss of the decoded audio signal.
[0131] The training module is used to train the encoder, quantization codebook and decoder according to the loss function that introduces the auditory perception characteristics until the loss converges, thereby obtaining the trained encoder, quantization codebook and decoder.
[0132] Based on the same inventive concept, Figure 4 As shown, the embodiment of the present application also provides a method for testing a neural network training device, comprising the following steps:
[0133] M1: The input audio signal is fed into the trained encoder frame by frame to extract its deep features.
[0134] M2: Input the deep-level features described in step M1 into the quantizer, quantize using the trained quantization codebook, and obtain the index of the deep-level features.
[0135] M3: Input the index of the deep-level feature described in step M2 into the dequantizer, dequantize using the trained quantization codebook, and obtain the dequantized deep-level feature.
[0136] M4: Input the dequantized deep-level features described in step M3 into the trained decoder for decoding to obtain a decoded audio signal.
[0137] Specifically, the neural network does not need to calculate any loss during the test. The input audio signal is encoded by the encoder to obtain deep features, which are then quantized by the quantizer and dequantized by the dequantizer to obtain dequantized deep features. Finally, the decoder upsamples the dequantized deep features to obtain the decoded audio signal.
[0138] Based on the same inventive concept, an embodiment of the present application further provides an audio decoding device, including a neural network training device, wherein the audio decoding device is further configured as follows:
[0139] Receive the deep features of solution quantization;
[0140] Decoding and dequantizing deep features, and
[0141] Output decoded audio signal;
[0142] Among them, the deep-level features of dequantization are obtained by dequantization using the trained quantization codebook by the neural network training device.
[0143] Based on the same inventive concept, an embodiment of the present application further provides an audio encoding device, including a neural network training device, wherein the audio encoding device is further configured as follows:
[0144] receiving an input audio signal;
[0145] encoding an input audio signal in a compressed audio format; and
[0146] Outputs the encoded signal in a compressed audio format.
[0147] Based on the same inventive concept, an embodiment of the present application further provides an electronic device, including:
[0148] Processor; and
[0149] A memory for storing executable instructions of the processor;
[0150] The processor is configured to execute all or part of the method steps of the above method by executing executable instructions.
[0151] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable medium on which a computer program is stored. When the computer program is executed by a processor, all or part of the method steps of the above method are implemented.
[0152] The present invention implements all or part of the process in the above method, and can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of each method embodiment can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0153] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of a computer device, and uses various interfaces and lines to connect various parts of the entire computer device.
[0154] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.). In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0155] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, servers or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.
[0156] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), servers, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0157] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0159] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A neural network training method for training a quantization codebook and a neural network-based encoder and decoder, characterized in that: The following steps are involved: The neural network-based encoder extracts deep features of the input audio signal frame by frame; A quantizer quantizes the deep-level features extracted by the encoder to obtain an index of the deep-level features; The dequantizer dequantizes the index of the deep-level feature to obtain a dequantized deep-level feature; The quantization loss calculation module calculates the quantization loss for training the quantization codebook based on the deep-level features and the dequantized deep-level features; The neural network-based decoder decodes the dequantized deep features to obtain a decoded audio signal; The time-frequency loss calculation module calculates the time domain reconstruction loss and the frequency domain reconstruction loss respectively based on the input audio signal and the decoded audio signal, and uses the sum of the time domain reconstruction loss, the frequency domain reconstruction loss and the quantization loss as the loss function; A signal-to-mask ratio calculation module based on a psychoacoustic model calculates a signal-to-mask ratio of the input audio signal; The auditory perception loss calculation module calculates the auditory perception loss of the decoded audio signal; Adding the auditory perception loss to the loss function to obtain a loss function that introduces auditory perception characteristics; The training module trains the encoder, quantization codebook and decoder with a loss function that introduces auditory perception characteristics until the loss converges, thereby obtaining the trained encoder, quantization codebook and decoder.
2. The neural network training method according to claim 1, characterized in that: The auditory perception loss calculation module calculates the auditory perception loss according to the input audio signal, the decoded audio signal and a signal-to-mask ratio of the input audio signal.
3. The neural network training method according to claim 2, characterized in that: The signal-to-mask ratio calculation module based on the psychoacoustic model calculates the signal-to-mask ratio of the input audio signal, and the steps include: The input audio signal is input frame by frame into the signal-to-mask ratio calculation module based on the psychoacoustic model. The signal-to-mask ratio calculation module divides each frame of the input audio signal into multiple sub-bands in the frequency domain, and calculates the signal-to-mask ratio sub-band by sub-band to obtain the signal-to-mask ratio of the input audio signal.
4. The neural network training method according to claim 3, characterized in that: The auditory perception loss calculation module calculates the auditory perception loss of the decoded audio signal, and the steps include: The input audio signal and the decoded audio signal are subjected to time-frequency transformation frame by frame to obtain an energy spectrum of the input audio signal and an energy spectrum of the decoded audio signal; Divide the energy spectrum of the input audio signal and the energy spectrum of the decoded audio signal into sub-bands in the same sub-band division manner as in the signal-to-mask ratio calculation to obtain the energy of the sub-band of the input audio signal and the energy of the sub-band of the decoded audio signal; Calculating the signal-to-noise ratio of each sub-band frame by frame based on the energy of the input audio signal sub-band and the energy of the decoded audio signal sub-band to obtain the signal-to-noise ratio of the decoded audio signal; The signal-to-mask ratio of the input audio signal is subtracted from the signal-to-noise ratio of the decoded audio signal frame by frame and subband by subband, and the auditory perception loss of each subband of each frame is obtained through an activation function, and finally the auditory perception loss is obtained by summing them.
5. A neural network training device for training a quantization codebook and a neural network-based encoder and decoder, characterized in that: include: An encoder, used to extract deep features of the input audio signal; A quantizer, used to quantize the deep features extracted by the encoder to obtain an index of the deep features; A dequantizer, used for dequantizing the index of the encoded deep-level feature to obtain a dequantized deep-level feature; A quantization loss calculation module is used to calculate the quantization loss of the training quantization codebook; A decoder, used to decode the dequantized deep features to obtain a decoded audio signal; A time-frequency loss calculation module, used for calculating a time-domain reconstruction loss and a frequency-domain reconstruction loss based on an input audio signal and a decoded audio signal; A signal-to-mask ratio calculation module based on a psychoacoustic model, used to calculate the signal-to-mask ratio of the input audio signal; an auditory perception loss calculation module, used to calculate the auditory perception loss of the decoded audio signal; The training module is used to train the encoder, quantization codebook and decoder according to the loss function that introduces the auditory perception characteristics until the loss converges to obtain the trained encoder, quantization codebook and decoder.
6. An audio decoding device, characterized in that: The neural network training device according to claim 5, wherein the audio decoding device is further configured to: Receive the deep features of solution quantization; Decoding and dequantizing deep features, and Output decoded audio signal; The dequantized deep-level features are obtained by dequantizing the neural network training device using the trained quantization codebook.
7. An audio encoding device, characterized in that: The neural network training device according to claim 5, wherein the audio encoding device is further configured to: receiving an input audio signal; encoding the input audio signal in a compressed audio format; and Outputs the encoded signal in a compressed audio format.
8. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 4 by executing the executable instructions.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
