Audio signal encoding method, apparatus and audio signal decoding method, apparatus
The frequency-domain audio codec framework uses two-dimensional convolutions and residual networks with generative adversarial training to enhance audio reconstruction quality and efficiency, addressing scalability and distortion challenges in neural network-based codecs.
Patent Information
- Application Number
- PCT/CN2024/102392
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2026-01-02
AI Technical Summary
Existing audio codecs face challenges in achieving efficient compression and reconstruction of audio signals while maintaining high quality, particularly in scenarios requiring scalability and reduced bitrates, with neural network-based codecs facing issues of complexity and distortion.
A frequency-domain audio codec framework using two-dimensional convolutions and residual networks, trained with generative adversarial methods and loss functions, to optimize the encoding and decoding processes for improved reconstruction quality.
The proposed method achieves near-lossless audio reconstruction with improved subjective and objective scores, addressing distortion issues and enhancing scalability and bitrate efficiency.
Smart Images

Figure CN2024102392_02012026_PF_FP_ABST
Abstract
Description
AUDIO SIGNAL ENCODING METHOD, APPARATUS AND AUDIO SIGNAL DECODING METHOD, APPARATUSTECHNICAL FIELD
[0001] This disclosure relates to the field of audio processing technology, in particular to an audio signal encoding method, an audio signal encoding apparatus, an audio signal decoding method, an audio signal decoding apparatus, an audio signal processing system, an electronic device, a computer readable storage medium and a computer program product.BACKGROUND
[0002] Audio codecs can be partitioned into two broad categories, waveform codecs and parametric codecs. Waveform codecs aim at reconstructing original waveform as faithful as possible at the decoder side. Parametric codecs aim at generating audio that is perceptually similar to the original.
[0003] The main difference between waveform codecs and parametric codecs is that parametric codecs makes assumptions about the source audio to be coded (in most cases, speech) , this makes it possible to encode audio with low bitrates.SUMMARY
[0004] According to some embodiments of the present disclosure, there is provided an audio signal encoding method, comprising: converting a time-domain audio signal to be encoded to a frequency-domain audio signal to be encoded; and performing an encoding process on the frequency-domain audio signal to be encoded using an encoder.
[0005] In some embodiments, the encoder is trained based on a frequency-domain loss and a time-domain loss; the frequency-domain loss is determined according to a difference between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal, the recovered frequency-domain audio signal being a result of a decoding process performed on the result of the encoding process by the decoding side; and the time-domain loss is determined according to a difference between the time-domain audio signal to be encoded and a recovered time-domain audio signal, the recovered time domain audio signal being obtained by converting the result of the decoding process at the decoding side.
[0006] In some embodiments, the encoder is trained by a generative adversarial method, a discriminator in the generative adversarial method being trained according to a frequency-domain discrimination loss and a time-domain discrimination loss; the frequency-domain discrimination loss is determined according to a discriminating result between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal, the recovered frequency-domain audio signal being a result of a decoding process performed on the result of the encoding process by the decoding side; and the time-domain discrimination loss is determined according to a discrimination result between the time-domain audio signal to be encoded and a recovered time-domain audio signal, the recovered time-domain audio signal being obtained by converting the result of the decoding processing by the decoding side.
[0007] In some embodiments, a result of the encoding process comprises an index of a latent code, the index being determined according to a codebook.
[0008] In some embodiments, the encoder is trained according to a frequency-domain loss, a time-domain loss and a commitment loss; and the commitment loss is determined according to a difference between the latent code and a quantized latent code, the quantized latent code being a latent code recovered by the decoding side according to the codebook and the index.
[0009] In some embodiments, performing a two-dimensional convolution process on the frequency-domain audio signal to be encoded using the encoder.
[0010] In some embodiments, processing the frequency-domain audio signal to be encoded using a residual network block of the encoder.
[0011] In some embodiments, performing a down sampling process on the frequency-domain audio signal to be encoded using the encoder.
[0012] In some embodiments, performing a first two-dimensional convolution process, a first residual network block process, a down sampling process, a second residual network block process, and a second two-dimensional convolution process, in sequence, on the frequency-domain audio signal to be encoded, using the encoder.
[0013] According to still other embodiments of the present disclosure, there is provided an audio signal decoding method, comprising: performing a decoding process on an encoding result of an original frequency-domain audio signal using a decoder to obtain a recovered frequency-domain audio signal, the original frequency-domain audio signal being obtained by converting an original time-domain audio signal to a frequency domain at a coding side; and converting the recovered frequency-domain audio signal to a time domain to obtain a recovered time-domain audio signal.
[0014] In some embodiments, the decoder is trained based on a frequency-domain loss and a time-domain loss; the frequency-domain loss is determined according to a difference between the original frequency-domain audio signal to be encoded and the recovered frequency-domain audio signal; and the time-domain loss is determined according to a difference between the original time-domain audio signal to be encoded and the recovered time-domain audio signal.
[0015] In some embodiments, the decoder is trained by a generative adversarial method, a discriminator in the generative adversarial method being trained according to a frequency-domain discrimination loss and a time-domain discrimination loss; the frequency-domain discrimination loss is determined according to a discriminating result between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal; and the time-domain discrimination loss is determined according to a discrimination result between the time-domain audio signal to be encoded and a recovered time-domain audio signal.
[0016] In some embodiments, the result of the encoding process comprises an index of a latent code, the index being determined at an encoding side according to a codebook, and the performing the decoding process on the encoding result of the original frequency-domain audio signal using the decoder comprises: obtaining a quantized latent code according to the codebook and the index; and decoding the quantized latent code using the decoder.
[0017] In some embodiments, the decoder is trained according to a frequency-domain loss, a time-domain loss and a commitment loss; and the commitment loss is determined according to a difference between the latent code and a quantized latent code.
[0018] In some embodiments, the performing the decoding process on the encoding result of the original frequency-domain audio signal using the decoder comprises: performing a two-dimensional convolution process on the encoding result using the decoder.
[0019] In some embodiments, the performing the decoding process on the encoding result of the original frequency-domain audio signal using the decoder comprises: processing the encoding result using a residual network block of the decoder.
[0020] In some embodiments, the performing the decoding process on the encoding result of the original frequency-domain audio signal using the decoder comprises: performing a down sampling process on the encoding result using the decoder.
[0021] In some embodiments, the performing the decoding process on the encoding result of the original frequency-domain audio signal using the decoder comprises: performing a first two-dimensional convolution process, a first residual network block process, a down sampling process, a second residual network block process, and a second two-dimensional convolution process, in sequence, on the encoding result, using the decoder.
[0022] According to still other embodiments of the present disclosure, there is provided an audio signal encoding apparatus, comprising: a converting unit, configured to convert a time-domain audio signal to be encoded to a frequency-domain audio signal to be encoded; and a encoding unit, configured to perform an encoding process on the frequency-domain audio signal to be encoded using an encoder.
[0023] In some embodiments, the encoder is trained based on a frequency-domain loss and a time-domain loss; the frequency-domain loss is determined according to a difference between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal, the recovered frequency-domain audio signal being a result of a decoding process performed on the result of the encoding process by the decoding side; and the time-domain loss is determined according to a difference between the time-domain audio signal to be encoded and a recovered time-domain audio signal, the recovered time domain audio signal being obtained by converting the result of the decoding process at the decoding side.
[0024] In some embodiments, the encoder is trained by a generative adversarial method, a discriminator in the generative adversarial method being trained according to a frequency-domain discrimination loss and a time-domain discrimination loss; the frequency-domain discrimination loss is determined according to a discriminating result between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal, the recovered frequency-domain audio signal being a result of a decoding process performed on the result of the encoding process by the decoding side; and the time-domain discrimination loss is determined according to a discrimination result between the time-domain audio signal to be encoded and a recovered time-domain audio signal, the recovered time-domain audio signal being obtained by converting the result of the decoding processing by the decoding side.
[0025] In some embodiments, a result of the encoding process comprises an index of a latent code, the index being determined according to a codebook.
[0026] In some embodiments, the encoder is trained according to a frequency-domain loss, a time-domain loss and a commitment loss; and the commitment loss is determined according to a difference between the latent code and a quantized latent code, the quantized latent code being a latent code recovered by the decoding side according to the codebook and the index.
[0027] In some embodiments, encoding unit performs a two-dimensional convolution process on the frequency-domain audio signal to be encoded using the encoder.
[0028] In some embodiments, encoding unit processes the frequency-domain audio signal to be encoded using a residual network block of the encoder.
[0029] In some embodiments, encoding unit performs a down sampling process on the frequency-domain audio signal to be encoded using the encoder.
[0030] In some embodiments, encoding unit performs a first two-dimensional convolution process, a first residual network block process, a down sampling process, a second residual network block process, and a second two-dimensional convolution process, in sequence, on the frequency-domain audio signal to be encoded, using the encoder.
[0031] According to still other embodiments of the present disclosure, there is provided an audio signal decoding apparatus, comprising: a decoding unit, configured to perform a decoding process on an encoding result of an original frequency-domain audio signal using a decoder to obtain a recovered frequency-domain audio signal, the original frequency-domain audio signal being obtained by converting an original time-domain audio signal to a frequency domain at a coding side; and a converting unit, configured to convert the recovered frequency-domain audio signal to a time domain to obtain a recovered time-domain audio signal.
[0032] In some embodiments, the decoder is trained based on a frequency-domain loss and a time-domain loss; the frequency-domain loss is determined according to a difference between the original frequency-domain audio signal to be encoded and the recovered frequency-domain audio signal; and the time-domain loss is determined according to a difference between the original time-domain audio signal to be encoded and the recovered time-domain audio signal.
[0033] In some embodiments, the decoder is trained by a generative adversarial method, a discriminator in the generative adversarial method being trained according to a frequency-domain discrimination loss and a time-domain discrimination loss; the frequency-domain discrimination loss is determined according to a discriminating result between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal; and the time-domain discrimination loss is determined according to a discrimination result between the time-domain audio signal to be encoded and a recovered time-domain audio signal.
[0034] In some embodiments, the result of the encoding process comprises an index of a latent code, the index being determined at an encoding side according to a codebook, and the performing the decoding process on the encoding result of the original frequency-domain audio signal using the decoder comprises: obtaining a quantized latent code according to the codebook and the index; and decoding the quantized latent code using the decoder.
[0035] In some embodiments, the decoder is trained according to a frequency-domain loss, a time-domain loss and a commitment loss; and the commitment loss is determined according to a difference between the latent code and a quantized latent code.
[0036] In some embodiments, the decoding unit performs a two-dimensional convolution process on the encoding result using the decoder.
[0037] In some embodiments, the decoding unit processes the encoding result using a residual network block of the decoder.
[0038] In some embodiments, the decoding unit performs a down sampling process on the encoding result using the decoder.
[0039] In some embodiments, the decoding unit performs a first two-dimensional convolution process, a first residual network block process, a down sampling process, a second residual network block process, and a second two-dimensional convolution process, in sequence, on the encoding result, using the decoder.
[0040] According to still other embodiments of the present disclosure, there is provided an audio signal processing system, comprising: an audio signal encoding apparatus, configured to implement an audio signal encoding method according to any one of the above embodiments; and an audio signal decoding apparatus, configured to implement an audio signal decoding method according to any one of the above embodiments.
[0041] According to still other embodiments of the present disclosure, there is provided an electronic device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is used to read the executable instructions from the memory and execute the instructions to implement an audio signal encoding method according to any one of the above embodiments or an audio signal decoding method according to any one of the above embodiments.
[0042] According to still other embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements an audio signal encoding method any one of the above embodiments or an audio signal decoding method any one of the above embodiments.
[0043] According to still other embodiments of the present disclosure, there is provided a computer program product, comprising: instructions that, when executed by a processor, cause the processor to implement an audio signal encoding method any one of the above embodiments or an audio signal decoding method any one of the above embodiments.
[0044] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings.BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a portion of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0046] The present disclosure will be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0047] FIG. 1a shows a schematic diagram of a novel neural audio codec according to some embodiments;
[0048] FIG. 1b shows a schematic diagram of a novel neural audio codec according to other embodiments;
[0049] FIG. 2a-2e show schematic diagrams of a novel neural audio codec according to still other embodiments;
[0050] FIG. 3 shows a schematic diagram of an audio signal processing system according to some embodiments of the present disclosure;
[0051] FIG. 4a-4b show schematic diagrams of an audio signal processing system according to other embodiments of the present disclosure;
[0052] FIG. 5 shows a flowchart of an audio signal encoding method according to some embodiments of the present disclosure;
[0053] FIG. 6 shows a flowchart of an audio signal decoding method according to some embodiments of the present disclosure;
[0054] FIG. 7 shows a block diagram of an audio signal encoding apparatus according to some embodiments of the present disclosure;
[0055] FIG. 8 shows a block diagram of an audio signal decoding apparatus according to some embodiments of the present disclosure;
[0056] FIG. 9 shows a block diagram of an electronic device according to other embodiments of the present disclosure;
[0057] FIG. 10 shows a block diagram of an electronic device according to further embodiments of the present disclosure;
[0058] FIG. 11 shows a block diagram of an audio signal processing system according to some embodiments of the present disclosure;
[0059] FIG. 12a-12b show schematic diagrams of the sample output from time-domain codec and frequency-domain codec.DETAILED DESCRIPTION
[0060] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. Notice that, unless otherwise specified, the relative arrangement, numerical expressions and numerical values of the components and steps set forth in these examples do not limit the scope of the disclosure.
[0061] At the same time, it should be understood that, for ease of description, the dimensions of the plurality of parts shown in the drawings are not drawn to actual proportions.
[0062] The following description of at least one exemplary embodiment is in fact merely illustrative and is in no way intended as a limitation to the disclosure, its application or use.
[0063] Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, these techniques, methods, and apparatuses should be considered as part of the specification.
[0064] Of all the examples shown and discussed herein, any specific value should be construed as merely illustrative and not as a limitation. Thus, other examples of exemplary embodiments may have different values.
[0065] Notice that, similar reference numerals and letters are denoted by the like in the accompanying drawings, and therefore, once an item is defined in a drawing, there is no need for further discussion in the accompanying drawings.
[0066] The terms used in this disclosure are described as following:
[0067] STFT (Short Time Fourier Transform) ;
[0068] FFT (Fast Fourier Transform) ;
[0069] CNN (Convolutional Neural Network) ;
[0070] GAN (Generative Adversarial Networks) ;
[0071] RVQ (Residual Vector Quantization) ;
[0072] VQ-VAE (Vector Quantized-Variational AutoEncoder) ;
[0073] LSTM (Long Short Term Memory) ;
[0074] EMA (Exponential moving average) ;
[0075] VISQOL (Virtual Speech Quality Objective Listener) .
[0076] As mentioned above, Developing either type of waveform codecs or parametric codecs requires a deep understanding of signal processing, which makes the development of audio codec obscure and difficult to understand. With the development of machine learning, neural network is used more frequently in audio codecs. It is quite promising to replace DSP-based audio codecs with neural network audio codecs.
[0077] On the one hand, developing neural network is a data-driven task, the requirement for deep understanding of signal processing can be converted to the variety of datasets. Generally speaking, the datasets used in audio codec is unsupervised (label is not needed by default) , it is much easier to increase the amount of data (cove more patterns and features) than to find patterns and features for audio manually. Therefore, the overall development cost can be reduced.
[0078] On the other hand, scalability and bitrate are two conflicting problems in DSP-based audio codecs, higher bit rate is required for codec which covers several audio types than audio codec designed for a specific audio type (such as speech) . With the help of neural network and related techniques like vector quantization, scalability and bitrate can be considered at the same time.
[0079] However, those benefits of introducing neural network in audio codec comes with certain price. For example, computing complexity of neural network audio codec is quite large compared with DSP-based audio codec, and deployment is rather complicated since model inference needs support of neural network inference tools.
[0080] The audio codecs have been developed for decades, related solutions has be proposed like Opus [Valin 2012] , AAC [AAC 2010] , EVS [Dietz 2015] , etc. These codecs can efficiently encode common audio such as speech and music, support various sampling rates, and the encoding and decoding process is also real-time and efficient.
[0081] The time-domain neural network based audio codecs have been developing since 2019, most of them can be divided into three parts: encoder, decoder and vector quantization, and all of them choose to introduce GAN in training pipeline and better results (subjective scores and objective scores) is achieved compared with traditional codecs.
[0082] For example, novel neural audio codec can efficiently compress speech, music and general audio at bitrates normally targeted by speech-tailored codecs. The model is composed of a fully convolutional encoder / decoder network and a residual vector quantizer. The detailed block diagram is shown below.
[0083] FIG. 1a shows a schematic diagram of a novel neural audio codec according to some embodiments.
[0084] In FIG. 1a, the encoder architecture is illustrated and follows the same structure as the streaming SEANet encoder, but without skip connections. It consists of a ID convolution layer (with Cenc channels) , followed by Benc convolution blocks. Each of the blocks consists of three residual units, containing dilated convolutions with dilation rates of 1, 3, and 9, respectively, followed by a down-sampling layer in the form of a strided convolution. The number of channels is doubled whenever down-sampling, starting from Cenc. A final 1D convolution layer with a kernel of length 3 and a stride of 1 is used to set the dimensionality of the embeddings to D. To guarantee real-time inference, all convolutions are causal. This means that padding is only applied to the past but not the future in both training and offline inference, whereas no padding is used in streaming inference. The ELU activation is used and any normalization is not applied. The number Benc of convolution blocks and the corresponding striding sequence determines the temporal resampling ratio between the input waveform and the embeddings. For example, when Benc= 4 and using (2, 4, 5, 8) as strides, one embedding is computed every M = 2·4·5·8=320 input samples. Thus, the encoder outputs enc (x) =RS×D with S = T / M.
[0085] The decoder architecture follows a similar design, as illustrated in FIG. 1a. A 1D convolution layer is followed by a sequence of Bdec convolution blocks. The decoder block mirrors the encoder block, and consists of a transposed convolution for up-sampling followed by the same three residual units. The same strides is used as the encoder, but in reverse order, to reconstruct a waveform with the same resolution as the input waveform. The number of channels is halved whenever up-sampling, so that the last decoder block outputs Caec channels. A final 1D convolution layer with one filter, a kernel of size 7 and stride 1 projects the embeddings back to the waveform domain to produce In FIG. 1a, the same number of channels in both the encoder and the decoder is controlled by the same parameter, i.e., Cenc = Cdec = C. The cases is also investigate in which Cenc ≠ Cdee, which results in a computationally lighter encoder and a heavier decoder, or vice-versa.
[0086] For example, the 24kHz audio signal is converted to a 75Hz embedding after encoder. This embedding is quantized with a vector quantizer. However, original vector quantizer is not applicable here because the size of codebook would be huge even for low bitrate. For example, target bit rate is 6kbps, if a plain vector quantizer is used, the required codebook size is 280, which is obviously unfeasible. To address this issue, a Residual Vector Quantizer is adopt, which cascades N layers of VQ to reduce the size of single codebook. If N is set to 8 for the above example, each VQ only needs a codebook of size 1024.
[0087] Furthermore, a method to train multi-bitrate is proposed simultaneously. A dropout scheme is introduced in RVQ to randomly use first M quantizers. When M is set to 5 for the above example, final bit rate of bitstream is 3kbps, which means 3kbps and 6bps is training simultaneously.
[0088] FIG. 1b shows a schematic diagram of a novel neural audio codec according to other embodiments.
[0089] In FIG. 1b, codec is a CNN based encoder, decoder model similar to the example in FIG. 1a, extra LSTM is introduced in encoder and decoder for better temporal modeling. In addition, a transformer-based entropy coding is introduced after RVQ, which further improving the compression ratio. The codec can encode and decode audio at 24kHz and 48kHz.
[0090] For example, the codec model is fully convolutional networks for time-domain signal. Audio signals are preprocessed before sending to the codec model, it will be split into low-band and high-band, low-band will go through the codec model to get quantized indices, and audio features is extracted from high-band signal and transmitted along with indices. The quantization module consists of scalar quantization and entropy coding for lower bit rate.
[0091] During the training of the above codec models mentioned above, discriminators are introduced and the reconstruction quality of audio signal is improved.
[0092] For example, based on the information mentioned above, the following framework for audio codec can be concluded, codebook mentioned above is both stored in encoder and decoder, encoder and decoder are both neural networks deployed with neural network inference tools. Transmission is supposed to be lossless for this framework, error correction is required if lossy transmission is considered.
[0093] FIG. 2a-2e show schematic diagrams of a novel neural audio codec according to still other embodiments.
[0094] In FIG. 2a, the Stage1comprises extracting latent z (i.e. latent code) from time- domain audio. For example, the parameters of the time-domain audio comprise: dimension =channels × num_samples, mono: channels = 1, stereo: channels = 2, num_samples = samplerate × durations, samplerate: 16khz, 22.05kHz, 24kHz, 32kHz, 44.1khz..., durations: audio length measured in seconds; fully conventionally encoder extracts latent z, and num_samples is reduced into latent_dims using parameter called stride in each conv layer; the parameters of the latent z comprise: dimension = channels × num_frame × latent_dims, num_frames is calculated with encoder's paramater: stride, and typical value for latent_dims is 128, 256, 512.
[0095] In FIG. 2b, the Stage2 comprises converting latent z into indices using RVQ. For example, the parameters of the latent z comprise dimension = channels × num_frame × latent_dims; the quantizer finds nearest embeddings from codebook, and indices is used to represent a vector, so bandwith is reduced significantly; the parameters of the indices comprise dimension = channels × num_frame.
[0096] In FIG. 2c, the Stage3 comprises the transmission over network. For example, the parameters of the indices (encoder output) and the indices (decoder input) comprise dimension =channels × num_frame.
[0097] In FIG. 2d, the Stage4 comprises recovering z_q using indices and codebooks from RVQ. For example, the parameters of the indices comprise dimension = channels × num_frame; the quantizer finds nearest embeddings from codebook, and converting indices into vectors; the parameters of the z_q (quantized latent) comprise dimension = channels × num_frame× latent_dims.
[0098] In FIG. 2e, the Stage5 comprises converting quantized latent code into time-domain audio. For example, the parameters of the latent z_q comprise dimension = channels × num_frame; num_frames is calculated with encoder's paramater: stride, and typical value for latent_dims is 128, 256, 512; the parameters of the recovered time-domain audio comprise dimension = channels *num_samples, mono: channels = 1, stereo: channels = 2, num_samples = samplerate *durations, samplerate: 16kHz, 22.05kHz, 24kHz, 32kHz, 44.1kHz..., durations: audio length measured in seconds.
[0099] Although the above neural network audio codec schemes have achieved good results and showed their advantage over traditional audio codec, some audio in the test set is distorted after neural audio codec, which does not meet the requirements of lossless listening. In order to improve the objective score and subjective listening experience of user, the disclosure proposes a frequency-domain audio codec which further improves reconstruction quality.
[0100] To solve the above problem, the disclosure proposes a frequency-domain audio codec. The disclosure mainly replaces the input of the codec model from time-domain audio signal to STFT, and changes the model structure to a ConV2D (two-dimensional convolution) based structure. The loss and discriminator are adjusted accordingly. Ultimately the disclosure optimized the distortion problem mentioned above. The disclosure optimized Stage1 mentioned above and achieved overall improvement of the audio codec framework.
[0101] FIG. 3 shows schematic diagram of an audio signal processing system according to some embodiments of the present disclosure.
[0102] In FIG. 3, the dimension of input feature changes form 3D [batch_size, channels, samples] to 4D [batch_size, channels, frequency, frames] since the frequency-domain feature (i.e. frequency-domain audio signal) is used instead of time-domain audio signal.
[0103] For the frequency-domain audio signal, ConV1D is not sufficient and ConV2D is used instead. For example, the encoder keeps reducing dimension of frequency domain by using stride of 2 while keeping frames the same by using stride of 1. So number of frequency bins is halved after each Downsample, and final number of frequency bins is only 1 / 16 of original ones.
[0104] For example, ResNetBlock is added to increase the depth of the model. Two additional ResNetBlock layers are added to process extracted features.
[0105] For example, a final ConV2D is used before output the features (i.e. the result of the encoding process) to RVQ to adjust its channels. Latent z is obtained after encoder, and it is not suitable for transmission before quantization.
[0106] For example, a RVQ is applied here for better comparison, the codebooks are updated using EMA. After RVQ, latent z is converted into latent z_q, and z_q is transmitted to the decoder side for spectral reconstruction.
[0107] For example, the decoder adopts a symmetric structure to the encoder, where the downsample module in the encoder is replaced with the upsample module in the decoder. Finally, ISTFT is applied to get time-domain audio signal for further usage.
[0108] FIG. 4a-4b show schematic diagrams of an audio signal processing system according to other embodiments of the present disclosure.
[0109] In FIG. 4a-4b, the Stage1 comprises extracting frequency-domain features using STFT and the Stage5 comprises recovering time-domain signal using ISTFT. For example, extra STFT and ISTF modules are added before encoder and after decoder, respectively.
[0110] In FIG. 4a, the fully conventionally encoder extracts latent code based on ConV2D in Stage1; in FIG. 4b, the decoder is a ConV2D based model in Stage5.
[0111] It can be find that the proposed model works on frequency domain. Spectrum has several advantages over time domain audio signal, it usually contains more information about fundamental frequencies and their harmonics, its adjacent frames usually contains similar feature and is more suitable for compression. Therefore frequency-domain audio signals are more suitable for audio codec.
[0112] For example, time domain loss ltime and frequency domain loss lfreq are adopted to jointly optimize the reconstruction quality of the spectrum; the time domain-part may be a L1 Loss, and the frequency-domain part may be a multi-resolution STFT loss, three FFT sizes used, namely 1024, 2048, and 512; the RVQ part ensures the latent converges to codebook with additional commitment loss. Since the model works on frequency domain, extra ISTFT is need before apply time domain loss: loss = (ltime + lfreq ) × weightreconstruction + lcommitment × weightcommit; ltime = L1Loss ( (W AVtarget, ISTFT (STF Trecover ) ) ) ; lfreq = MultiResolutionSTFT Loss (fftsize = (1024, 2048, 512) (STF Ttarget, STF Trecover ) ;
[0113] g [] is the stop gradient sign. For example, weightreconstruction is set to 20 and weightcommit; is set to 1 can balance reconstruction quality and quantization error.
[0114] For example, two discriminators are used, one of them works in time domain and the other in the frequency domain. The time-domain discriminator is trained to distinguish the reconstructed signal (i.e. recovered time-domain audio signal) from original signal (i.e. original time-domain audio signal) , and the frequency-domain discriminator is trained to distinguish the complex spectrum of reconstructed signal (i.e. recovered frequency-domain audio signal) from original signal (i.e. the original frequency-domain audio signal) using different FFT size.
[0115] For example, related objective scores are tested on three test set. To ensure the reliability of the comparison, the modifications mentioned above are also introduced to the training of codec. The final results are listed as follows:
[0116] Table 1
[0117] In table, it is found that frequency-domain neural network audio codec outperforms time-domain codec by a large margin in terms of VISQOL. The VISQOL score of 32kbps frequency-domain model approximates to 4.6 which means reconstructed audio is nearly lossless. With further listening comparison, it is found that the distortion mentioned above no longer exists in the model proposed.
[0118] FIG. 5 shows a flowchart of an audio signal encoding method according to some embodiments of the present disclosure.
[0119] As shown in FIG. 5, the audio signal encoding method comprises the followings.
[0120] In step 510, a time-domain audio signal to be encoded is converted to a frequency-domain audio signal to be encoded.
[0121] In step 520, an encoding process is performed on the frequency-domain audio signal to be encoded using an encoder.
[0122] In some embodiments, the encoder is trained based on a frequency-domain loss and a time-domain loss; the frequency-domain loss is determined according to a difference between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal, the recovered frequency-domain audio signal being a result of a decoding process performed on the result of the encoding process by the decoding side; and the time-domain loss is determined according to a difference between the time-domain audio signal to be encoded and a recovered time-domain audio signal, the recovered time domain audio signal being obtained by converting the result of the decoding process at the decoding side.
[0123] In some embodiments, the encoder is trained by a generative adversarial method, a discriminator in the generative adversarial method being trained according to a frequency-domain discrimination loss and a time-domain discrimination loss; the frequency-domain discrimination loss is determined according to a discriminating result between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal, the recovered frequency-domain audio signal being a result of a decoding process performed on the result of the encoding process by the decoding side; and the time-domain discrimination loss is determined according to a discrimination result between the time-domain audio signal to be encoded and a recovered time-domain audio signal, the recovered time-domain audio signal being obtained by converting the result of the decoding processing by the decoding side.
[0124] In some embodiments, a result of the encoding process comprises an index of a latent code, the index being determined according to a codebook.
[0125] In some embodiments, the encoder is trained according to a frequency-domain loss, a time-domain loss and a commitment loss; and the commitment loss is determined according to a difference between the latent code and a quantized latent code, the quantized latent code being a latent code recovered by the decoding side according to the codebook and the index.
[0126] In some embodiments, performing a two-dimensional convolution process on the frequency-domain audio signal to be encoded using the encoder.
[0127] In some embodiments, processing the frequency-domain audio signal to be encoded using a residual network block of the encoder.
[0128] In some embodiments, performing a down sampling process on the frequency-domain audio signal to be encoded using the encoder.
[0129] In some embodiments, performing a first two-dimensional convolution process, a first residual network block process, a down sampling process, a second residual network block process, and a second two-dimensional convolution process, in sequence, on the frequency-domain audio signal to be encoded, using the encoder.
[0130] FIG. 6 shows a flowchart of an audio signal decoding method according to some embodiments of the present disclosure.
[0131] As shown in FIG. 6, the audio signal decoding method comprises the followings.
[0132] In step 610, a decoding process is performed on an encoding result of an original frequency-domain audio signal using a decoder to obtain a recovered frequency-domain audio signal, the original frequency-domain audio signal being obtained by converting an original time-domain audio signal to a frequency domain at a coding side.
[0133] In step 620, the recovered frequency-domain audio signal is converted to a time domain to obtain a recovered time-domain audio signal.
[0134] In some embodiments, the decoder is trained based on a frequency-domain loss and a time-domain loss; the frequency-domain loss is determined according to a difference between the original frequency-domain audio signal to be encoded and the recovered frequency-domain audio signal; and the time-domain loss is determined according to a difference between the original time-domain audio signal to be encoded and the recovered time-domain audio signal.
[0135] In some embodiments, the decoder is trained by a generative adversarial method, a discriminator in the generative adversarial method being trained according to a frequency- domain discrimination loss and a time-domain discrimination loss; the frequency-domain discrimination loss is determined according to a discriminating result between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal; and the time-domain discrimination loss is determined according to a discrimination result between the time-domain audio signal to be encoded and a recovered time-domain audio signal.
[0136] In some embodiments, the result of the encoding process comprises an index of a latent code, the index being determined at an encoding side according to a codebook, and obtaining a quantized latent code according to the codebook and the index; and decoding the quantized latent code using the decoder.
[0137] In some embodiments, the decoder is trained according to a frequency-domain loss, a time-domain loss and a commitment loss; and the commitment loss is determined according to a difference between the latent code and a quantized latent code.
[0138] In some embodiments, performing a two-dimensional convolution process on the encoding result using the decoder.
[0139] In some embodiments, processing the encoding result using a residual network block of the decoder.
[0140] In some embodiments, performing a down sampling process on the encoding result using the decoder.
[0141] In some embodiments, performing a first two-dimensional convolution process, a first residual network block process, a down sampling process, a second residual network block process, and a second two-dimensional convolution process, in sequence, on the encoding result, using the decoder.
[0142] FIG. 7 shows a block diagram of an audio signal encoding apparatus according to some embodiments of the present disclosure.
[0143] As shown in FIG. 7, audio signal encoding apparatus 7, comprising: a converting unit 71, configured to convert a time-domain audio signal to be encoded to a frequency-domain audio signal to be encoded; and a encoding unit72, configured to perform an encoding process on the frequency-domain audio signal to be encoded using an encoder.
[0144] In some embodiments, the encoder is trained based on a frequency-domain loss and a time-domain loss; the frequency-domain loss is determined according to a difference between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal, the recovered frequency-domain audio signal being a result of a decoding process performed on the result of the encoding process by the decoding side; and the time-domain loss is determined according to a difference between the time-domain audio signal to be encoded and a recovered time-domain audio signal, the recovered time domain audio signal being obtained by converting the result of the decoding process at the decoding side.
[0145] In some embodiments, the encoder is trained by a generative adversarial method, a discriminator in the generative adversarial method being trained according to a frequency-domain discrimination loss and a time-domain discrimination loss; the frequency-domain discrimination loss is determined according to a discriminating result between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal, the recovered frequency-domain audio signal being a result of a decoding process performed on the result of the encoding process by the decoding side; and the time-domain discrimination loss is determined according to a discrimination result between the time-domain audio signal to be encoded and a recovered time-domain audio signal, the recovered time-domain audio signal being obtained by converting the result of the decoding processing by the decoding side.
[0146] In some embodiments, a result of the encoding process comprises an index of a latent code, the index being determined according to a codebook.
[0147] In some embodiments, the encoder is trained according to a frequency-domain loss, a time-domain loss and a commitment loss; and the commitment loss is determined according to a difference between the latent code and a quantized latent code, the quantized latent code being a latent code recovered by the decoding side according to the codebook and the index.
[0148] In some embodiments, encoding unit 72 performs a two-dimensional convolution process on the frequency-domain audio signal to be encoded using the encoder.
[0149] In some embodiments, encoding unit 72 processes the frequency-domain audio signal to be encoded using a residual network block of the encoder.
[0150] In some embodiments, encoding unit 72 performs a down sampling process on the frequency-domain audio signal to be encoded using the encoder.
[0151] In some embodiments, encoding unit 72 performs a first two-dimensional convolution process, a first residual network block process, a down sampling process, a second residual network block process, and a second two-dimensional convolution process, in sequence, on the frequency-domain audio signal to be encoded, using the encoder.
[0152] FIG. 8 shows a block diagram of an audio signal decoding apparatus according to some embodiments of the present disclosure.
[0153] As shown in FIG. 8, audio signal decoding apparatus 8, comprising: a decoding unit 81, configured to perform a decoding process on an encoding result of an original frequency-domain audio signal using a decoder to obtain a recovered frequency-domain audio signal, the original frequency-domain audio signal being obtained by converting an original time-domain audio signal to a frequency domain at a coding side; and a converting unit 82, configured to convert the recovered frequency-domain audio signal to a time domain to obtain a recovered time-domain audio signal.
[0154] In some embodiments, the decoder is trained based on a frequency-domain loss and a time-domain loss; the frequency-domain loss is determined according to a difference between the original frequency-domain audio signal to be encoded and the recovered frequency-domain audio signal; and the time-domain loss is determined according to a difference between the original time-domain audio signal to be encoded and the recovered time-domain audio signal.
[0155] In some embodiments, the decoder is trained by a generative adversarial method, a discriminator in the generative adversarial method being trained according to a frequency-domain discrimination loss and a time-domain discrimination loss; the frequency-domain discrimination loss is determined according to a discriminating result between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal; and the time-domain discrimination loss is determined according to a discrimination result between the time-domain audio signal to be encoded and a recovered time-domain audio signal.
[0156] In some embodiments, the result of the encoding process comprises an index of a latent code, the index being determined at an encoding side according to a codebook, and the performing the decoding process on the encoding result of the original frequency-domain audio signal using the decoder comprises: obtaining a quantized latent code according to the codebook and the index; and decoding the quantized latent code using the decoder.
[0157] In some embodiments, the decoder is trained according to a frequency-domain loss, a time-domain loss and a commitment loss; and the commitment loss is determined according to a difference between the latent code and a quantized latent code.
[0158] In some embodiments, the decoding unit 81 performs a two-dimensional convolution process on the encoding result using the decoder.
[0159] In some embodiments, the decoding unit 81 processes the encoding result using a residual network block of the decoder.
[0160] In some embodiments, the decoding unit 81 performs a down sampling process on the encoding result using the decoder.
[0161] In some embodiments, the decoding unit 81 performs a first two-dimensional convolution process, a first residual network block process, a down sampling process, a second residual network block process, and a second two-dimensional convolution process, in sequence, on the encoding result, using the decoder.
[0162] FIG. 9 shows a block diagram of an electronic device according to other embodiments of the present disclosure.
[0163] As shown in FIG. 9, the electronic device 9 comprises: a memory 91 and a processor 92 coupled to the memory 91, the processor 92 configured to, based on instructions stored in the memory 91, carry out an audio signal encoding method or an audio signal decoding method according to any one of the embodiments of the present disclosure.
[0164] Wherein, the memory 91 may comprise, for example, system memory, a fixed non-transitory storage medium, or the like. The system memory stores, for example, an operating system, applications, a boot loader, a database, and other programs.
[0165] FIG. 10 shows a block diagram of an electronic device according to further embodiments of the present disclosure.
[0166] As shown in FIG. 10, the electronic device 10 of the embodiments comprises: a memory 1010 and a processor 1020 coupled to the memory 1010, the processor 1020 configured to, based on instructions stored in the memory 1010, carry out an audio signal encoding method or an audio signal decoding method according to any one of the embodiments of the present disclosure.
[0167] The memory 1010 may comprise, for example, system memory, a fixed non-transitory storage medium, or the like. The system memory stores, for example, an operating system, application programs, a boot loader, and other programs.
[0168] The electronic device 10 may further comprise an input-output interface 1030, a network interface 1040, a storage interface 1050, and the like. These interfaces 1030, 1040, 1050, the memory 1010 and the processor 1020 may be connected through a bus 1060, for example. Wherein, the input-output interface 1030 provides a connection interface for input-output devices such as a display, a mouse, a keyboard, a touch screen, a microphone, a loudspeaker, etc. The network interface 1040 provides a connection interface for various networked devices. The storage interface 1050 provides a connection interface for external storage devices such as an SD card and a USB flash disk.
[0169] FIG. 11 shows a block diagram of an audio signal processing system according to some embodiments of the present disclosure.
[0170] As shown in FIG. 11, audio signal processing system11, comprising: an audio signal encoding apparatus 111, configured to implement an audio signal encoding method according to any one of the above embodiments; and an audio signal decoding apparatus 112, configured to implement an audio signal decoding method according to any one of the above embodiments.
[0171] FIG. 12a-12b show schematic diagrams of the sample output from time-domain codec and frequency-domain codec.
[0172] In FIG. 12a-12b, one sample is picked from speech and sent to time-domain codec and frequency-domain codec proposed for compression and decompression. The output generated by time-domain codec failed to reconstruct detailed information in high frequency part, as shown in FIG. 12a; while the output generated by frequency-domain codec proposed has clearer harmonics, as shown in FIG. 12b.
[0173] Those skilled in the art should understand that the embodiments of the present disclosure may be provided as a method, a system, or a computer program product. Therefore, embodiments of the present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment containing both hardware and software elements. Moreover, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (comprising but not limited to disk storage, CD-ROM, optical memory, etc. ) having computer-usable program code embodied therein.
[0174] Heretofore, the method, apparatus device, computer-readable storage medium and computer program product according to the present disclosure have been described in detail. In order to avoid obscuring the concepts of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can understand how to implement the technical solutions disclosed herein.
[0175] The method and system of the present disclosure may be implemented in many ways. For example, the method and system of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above sequence of steps of the method is merely for the purpose of illustration, and the steps of the method of the present disclosure are not limited to the above-described specific order unless otherwise specified. In addition, in some embodiments, the present disclosure may also be implemented as programs recorded in a recording medium, which comprise machine-readable instructions for implementing the method according to the present disclosure. Thus, the present disclosure also covers a recording medium storing programs for executing the method according to the present disclosure.
[0176] Although some specific embodiments of the present disclosure have been described in detail by way of example, those skilled in the art should understand that the above examples are only for the purpose of illustration and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present disclosure. The scope of the disclosure is defined by the following claims.
Claims
1.An audio signal encoding method, comprising:converting a time-domain audio signal to be encoded to a frequency-domain audio signal to be encoded; andperforming an encoding process on the frequency-domain audio signal to be encoded using an encoder.2.The audio signal encoding method according to claim 1, wherein:the encoder is trained based on a frequency-domain loss and a time-domain loss;the frequency-domain loss is determined according to a difference between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal, the recovered frequency-domain audio signal being a result of a decoding process performed on the result of the encoding process by the decoding side; andthe time-domain loss is determined according to a difference between the time-domain audio signal to be encoded and a recovered time-domain audio signal, the recovered time domain audio signal being obtained by converting the result of the decoding process at the decoding side.3.The audio signal encoding method according to claim 1 or 2, wherein:the encoder is trained by a generative adversarial method, a discriminator in the generative adversarial method being trained according to a frequency-domain discrimination loss and a time-domain discrimination loss;the frequency-domain discrimination loss is determined according to a discriminating result between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal, the recovered frequency-domain audio signal being a result of a decoding process performed on the result of the encoding process by the decoding side; andthe time-domain discrimination loss is determined according to a discrimination result between the time-domain audio signal to be encoded and a recovered time-domain audio signal, the recovered time-domain audio signal being obtained by converting the result of the decoding processing by the decoding side.4.The audio signal encoding method according to any of claims 1 to 3, wherein a result of the encoding process comprises an index of a latent code, the index being determined according to a codebook.5.The audio signal encoding method according to claim 4, wherein:the encoder is trained according to a frequency-domain loss, a time-domain loss and a commitment loss; andthe commitment loss is determined according to a difference between the latent code and a quantized latent code, the quantized latent code being a latent code recovered by the decoding side according to the codebook and the index.6.The audio signal encoding method according to any of claims 1 to 5, wherein the performing the encoding process on the frequency-domain audio signal to be encoded using the encoder comprises:performing a two-dimensional convolution process on the frequency-domain audio signal to be encoded using the encoder.7.The audio signal encoding method according to any of claims 1 to 6, wherein the performing the encoding process on the frequency-domain audio signal to be encoded using the encoder comprises:processing the frequency-domain audio signal to be encoded using a residual network block of the encoder.8.The audio signal encoding method according to any of claims 1 to 7, wherein the performing the encoding process on the frequency-domain audio signal to be encoded using the encoder comprises:performing a down sampling process on the frequency-domain audio signal to be encoded using the encoder.9.The audio signal encoding method according to any of claims 1 to 8, wherein the performing the encoding process on the frequency-domain audio signal to be encoded using the encoder comprises:performing a first two-dimensional convolution process, a first residual network block process, a down sampling process, a second residual network block process, and a second two-dimensional convolution process, in sequence, on the frequency-domain audio signal to be encoded, using the encoder.10.An audio signal decoding method, comprising:performing a decoding process on an encoding result of an original frequency-domain audio signal using a decoder to obtain a recovered frequency-domain audio signal, the original frequency-domain audio signal being obtained by converting an original time-domain audio signal to a frequency domain at a coding side; andconverting the recovered frequency-domain audio signal to a time domain to obtain a recovered time-domain audio signal.11.The audio signal decoding method according to claim 10, wherein:the decoder is trained based on a frequency-domain loss and a time-domain loss;the frequency-domain loss is determined according to a difference between the original frequency-domain audio signal to be encoded and the recovered frequency-domain audio signal; andthe time-domain loss is determined according to a difference between the original time-domain audio signal to be encoded and the recovered time-domain audio signal.12.The audio signal decoding method according to claim 10 or 11, wherein:the decoder is trained by a generative adversarial method, a discriminator in the generative adversarial method being trained according to a frequency-domain discrimination loss and a time-domain discrimination loss;the frequency-domain discrimination loss is determined according to a discriminating result between the frequency-domain audio signal to be encoded and a recovered frequency-domain audio signal; andthe time-domain discrimination loss is determined according to a discrimination result between the time-domain audio signal to be encoded and a recovered time-domain audio signal.13.The audio signal decoding method according to any of claims 10 to 12, wherein the result of the encoding process comprises an index of a latent code, the index being determined at an encoding side according to a codebook, andthe performing the decoding process on the encoding result of the original frequency-domain audio signal using the decoder comprises:obtaining a quantized latent code according to the codebook and the index; anddecoding the quantized latent code using the decoder.14.The audio signal decoding method according to claim 13, wherein:the decoder is trained according to a frequency-domain loss, a time-domain loss and a commitment loss; andthe commitment loss is determined according to a difference between the latent code and a quantized latent code.15.The audio signal decoding method according to any of claims 10 to 14, wherein the performing the decoding process on the encoding result of the original frequency-domain audio signal using the decoder comprises:performing a two-dimensional convolution process on the encoding result using the decoder.16.The audio signal decoding method according to any of claims 10 to 15, wherein the performing the decoding process on the encoding result of the original frequency-domain audio signal using the decoder comprises:processing the encoding result using a residual network block of the decoder.17.The audio signal decoding method according to any of claims 10 to 16, wherein the performing the decoding process on the encoding result of the original frequency-domain audio signal using the decoder comprises:performing a down sampling process on the encoding result using the decoder.18.The audio signal decoding method according to any of claims 10 to 17, wherein the performing the decoding process on the encoding result of the original frequency-domain audio signal using the decoder comprises:performing a first two-dimensional convolution process, a first residual network block process, a down sampling process, a second residual network block process, and a second two-dimensional convolution process, in sequence, on the encoding result, using the decoder.19.An audio signal encoding apparatus, comprising:a converting unit, configured to convert a time-domain audio signal to be encoded to a frequency-domain audio signal to be encoded; anda encoding unit, configured to perform an encoding process on the frequency-domain audio signal to be encoded using an encoder.20.An audio signal decoding apparatus, comprising:a decoding unit, configured to perform a decoding process on an encoding result of an original frequency-domain audio signal using a decoder to obtain a recovered frequency-domain audio signal, the original frequency-domain audio signal being obtained by converting an original time-domain audio signal to a frequency domain at a coding side; anda converting unit, configured to convert the recovered frequency-domain audio signal to a time domain to obtain a recovered time-domain audio signal.21.An audio signal processing system, comprising:an audio signal encoding apparatus be configured to implement an audio signal encoding method of any one of claims 1 to 9; andan audio signal decoding apparatus be configured to implement an audio signal decoding method of any one of claims 10 to 18.22.An electronic device, comprising:a processor;a memory for storing processor executable instructions;wherein the processor is used to read the executable instructions from the memory and execute the instructions to implement an audio signal encoding method of any one of claims 1 to 9 or an audio signal decoding method of any one of claims 10 to 18.23.A computer readable storage medium storing thereon a computer program that, when executed by a processor, causes the processor to implement an audio signal encoding method of any one of claims 1 to 9 or an audio signal decoding method of any one of claims 10 to 18.24.A computer program product, comprising:instructions that, when executed by a processor, cause the processor to implement an audio signal encoding method of any one of claims 1 to 9 or an audio signal decoding method of any one of claims 10 to 18.
Citation Information
Patent Citations
Audio encoder and decoder
CN101436406A
Speech enhancement method based on time-frequency domain generative adversarial network
CN112802491A
Audio encoding / decoding apparatus and method having robustness to transition segment encoding distortion
CN116018640A
Voice signal combined noise reduction compression method and system
CN116153320A
Audio packet loss recovery method and device, electronic equipment and storage medium
CN118155650A