Audio signal encoding method, apparatus and audio signal decoding method, apparatus

The neural audio codec framework addresses scalability and bitrate issues by using a convolutional network with residual vector quantization and a trained codebook, enhancing audio encoding and decoding efficiency and quality.

WO2026000347A1PCT designated stage Publication Date: 2026-01-02DOUYIN VISION CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/102408
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Existing audio codecs face challenges in scalability and bitrate requirements, with neural network-based codecs having high computing complexity and deployment complications, while traditional codecs struggle with efficient encoding of various audio types.

Method used

Implementing a neural audio codec framework that uses a fully convolutional encoder/decoder network with residual vector quantization and a projection layer to reduce dimensions, coupled with a trained codebook that updates codes based on usage thresholds, to achieve efficient encoding and decoding of audio signals.

Benefits of technology

The proposed method reduces computational complexity and improves audio reconstruction quality, achieving efficient encoding and decoding across different audio types with optimized bitrates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024102408_02012026_PF_FP_ABST
    Figure CN2024102408_02012026_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of audio processing technology, and in particular to an audio signal encoding method, apparatus, audio signal decoding method, apparatus. The audio signal encoding method, comprising: projecting a first encoding result of an audio signal into a second encoding result, wherein a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result; and performing a quantization process on the second encoding result according to a codebook to obtain a quantized encoding result.
Need to check novelty before this filing date? Find Prior Art

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: projecting a first encoding result of an audio signal into a second encoding result, wherein a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result; and performing a quantization process on the second encoding result according to a codebook to obtain a quantized encoding result.

[0005] In some embodiments, the projecting the first encoding result of the audio signal into the second encoding result comprising: projecting the first encoding result into the second encoding result according to a factorization factor, the number of dimensions of the second encoding result being determined according to the factorization factor.

[0006] In some embodiments, the projecting the first encoding result of the audio signal into the second encoding result comprising: projecting the first encoding result into the second encoding result using a projection layer, the projection layer being introduced before inputting the first encoding result into a quantizer which performs the quantization process.

[0007] In some embodiments, the projecting the first encoding result into the second encoding result using the projection layer comprising: projecting the first encoding result into the second encoding result using a projection matrix in the projection layer.

[0008] In some embodiments, the codebook is trained by: during a plurality of rounds of training performed on the codebook using a current batch of training vectors, counting a number of rounds of training in which a code in the codebook is not used; and in response to the number of rounds exceeding a threshold value , updating the code.

[0009] In some embodiments, the updating the code comprises: updating the code to a designated training vector in the current batch of training vectors.

[0010] In some embodiments, the updating the code to the designated training vector in the current batch of training vectors comprises: randomly sampling the designated training vector from the current batch of training vectors; and updating the code to the designated training vector.

[0011] According to still other embodiments of the present disclosure, there is provided an audio signal decoding method, comprising: projecting a first quantized encoding result of an audio signal into a second quantized encoding result, wherein a number of dimensions of the first quantized encoding result is less than a number of dimensions of the second quantized encoding result, the first quantized encoding result is obtained by quantizing a second encoding result according to a codebook at an encoding side, the second encoding result is obtained by projecting a first encoding result of the audio signal at the encoding side, and a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result; performing a quantization process on the second quantized encoding result according to the codebook; and performing a decoding process on a result of the quantization process to obtain a recovered audio signal.

[0012] In some embodiments, the projecting the first quantized encoding result of the audio signal into the second quantized encoding result comprising: projecting the first quantized encoding result into the second quantized encoding result according to a factorization factor, the number of dimensions of the second quantized encoding result being determined according to the factorization factor.

[0013] In some embodiments, the projecting the first quantized encoding result of the audio signal into the second quantized encoding result comprising: projecting the first quantized encoding result into the second quantized encoding result using a projection layer, the projection layer being introduced before an output layer which outputs the recovered audio signal.

[0014] In some embodiments, the projecting the first quantized encoding result into the second quantized encoding result using the projection layer comprising: projecting the first quantized encoding result into the second quantized encoding result using a projection matrix in the projection layer.

[0015] In some embodiments, the codebook is trained by: during a plurality of rounds of training performed on the codebook using a current batch of training vectors, counting a number of rounds of training in which a code in the codebook is not used; and in response to the number of rounds exceeding a threshold value , updating the code.

[0016] In some embodiments, the updating the code comprises: updating the code to a designated training vector in the current batch of training vectors.

[0017] In some embodiments, the updating the code to the designated training vector in the current batch of training vectors comprises: randomly sampling the designated training vector from the current batch of training vectors; and updating the code to the designated training vector.

[0018] According to still other embodiments of the present disclosure, there is provided an audio signal encoding apparatus, comprising: a projecting unit, configured to project a first encoding result of the audio signal into a second encoding result, wherein a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result; and a quantizing unit, configured to perform a quantization process on the second encoding result according to a codebook to obtain a quantized encoding result.

[0019] In some embodiments, the projecting unit projects the first encoding result into the second encoding result according to a factorization factor, the number of dimensions of the second encoding result being determined according to the factorization factor.

[0020] In some embodiments, the projecting unit projects the first encoding result into the  second encoding result using a projection layer, the projection layer being introduced before inputting the first encoding result into a quantizer which performs the quantization process.

[0021] In some embodiments, the projecting unit projects the first encoding result into the second encoding result using a projection matrix in the projection layer.

[0022] In some embodiments, the codebook is trained by: during a plurality of rounds of training performed on the codebook using a current batch of training vectors, counting a number of rounds of training in which a code in the codebook is not used; and in response to the number of rounds exceeding a threshold value , updating the code.

[0023] In some embodiments, the codebook is trained by: updating the code to a designated training vector in the current batch of training vectors.

[0024] In some embodiments, the codebook is trained by: randomly sampling the designated training vector from the current batch of training vectors; and updating the code to the designated training vector.

[0025] According to still other embodiments of the present disclosure, there is provided an audio signal decoding apparatus, comprising: a projecting unit, configured to project a first quantized encoding result of an audio signal into a second quantized encoding result, wherein a number of dimensions of the first quantized encoding result is less than a number of dimensions of the second quantized encoding result, the first quantized encoding result is obtained by quantizing a second encoding result according to a codebook at an encoding side, the second encoding result is obtained by projecting the first encoding result of the audio signal at the encoding side, and a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result; a quantizing unit, configured to quantize the second quantized encoding result according to the codebook; and a decoding unit, configured to perform  a decoding process on a result of the quantization process to obtain a recovered audio signal.

[0026] In some embodiments, the projecting unit projects the first quantized encoding result into the second quantized encoding result according to a factorization factor, the number of dimensions of the second quantized encoding result being determined according to the factorization factor.

[0027] In some embodiments, the projecting unit projects the first quantized encoding result into the second quantized encoding result using a projection layer, the projection layer being introduced before an output layer which outputs the recovered audio signal.

[0028] In some embodiments, the projecting unit projects the first quantized encoding result into the second quantized encoding result using a projection matrix in the projection layer.

[0029] In some embodiments, the codebook is trained by: during a plurality of rounds of training performed on the codebook using a current batch of training vectors, counting a number of rounds of training in which a code in the codebook is not used; and in response to the number of rounds exceeding a threshold value , updating the code.

[0030] In some embodiments, the codebook is trained by: updating the code to a designated training vector in the current batch of training vectors.

[0031] In some embodiments, the codebook is trained by: randomly sampling the designated training vector from the current batch of training vectors; and updating the code to the designated training vector.

[0032] According to still other embodiments of the present disclosure, there is provided an n audio signal processing system, comprising: an audio signal encoding apparatus be 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.

[0033] 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.

[0034] 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.

[0035] 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.

[0036] 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

[0037] 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.

[0038] The present disclosure will be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0039] FIG. 1a shows a schematic diagram of a novel neural audio codec according to some embodiments;

[0040] FIG. 1b shows a schematic diagram of a novel neural audio codec according to other embodiments;

[0041] FIG. 2a-2b show schematic diagrams of an audio signal processing system according to some embodiments of the present disclosure;

[0042] FIG. 3 shows schematic diagram of an audio signal processing system according to other embodiments of the present disclosure;

[0043] FIG. 4 shows a flowchart of an audio signal encoding method according to some embodiments of the present disclosure;

[0044] FIG. 5 shows a flowchart of an audio signal decoding method according to some embodiments of the present disclosure;

[0045] FIG. 6 shows a block diagram of an audio signal encoding apparatus according to some embodiments of the present disclosure;

[0046] FIG. 7 shows a block diagram of an audio signal decoding apparatus according to some embodiments of the present disclosure;

[0047] FIG. 8 shows a block diagram of an electronic device according to other embodiments of the  present disclosure ;

[0048] FIG. 9 shows a block diagram of the electronic device according to further embodiments of the present disclosure ;

[0049] FIG. 10 shows a block diagram of an audio signal processing system according to some embodiments of the present disclosure.DETAILED DESCRIPTION

[0050] 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.

[0051] 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.

[0052] 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.

[0053] 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.

[0054] 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.

[0055] 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.

[0056] The terms used in this disclosure are described as following:

[0057] STFT (Short Time Fourier Transform) ;

[0058] ISTFT (Inverse Short Time Fourier Transform) ;

[0059] FFT (Fast Fourier Transform) ;

[0060] DSP (Digital Signal Processing) ;

[0061] CNN (Convolutional Neural Network) ;

[0062] GAN (Generative Adversarial Networks) ;

[0063] RVQ (Residual Vector Quantization) ;

[0064] VQ-VAE (Vector Quantized-Variational AutoEncoder) ;

[0065] LSTM (Long Short Term Memory) ;

[0066] EMA (Exponential moving average) ;

[0067] VISQOL (Virtual Speech Quality Objective Listener) .

[0068] 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.

[0069] 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.

[0070] 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.

[0071] 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.

[0072] 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.

[0073] 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.

[0074] 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.

[0075] FIG. 1a shows a schematic diagram of a novel neural audio codec according to some embodiments.

[0076] 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.

[0077] 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.

[0078] 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.

[0079] 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.

[0080] FIG. 1b shows a schematic diagram of a novel neural audio codec according to other embodiments.

[0081] 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.

[0082] 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.

[0083] During the training of the above codec models mentioned above, discriminators are introduced and the reconstruction quality of audio signal is improved.

[0084] In some embodiments, an audio signal processing system is proposed to replace the input of encoder from time-domain signals to frequency-domain features; basic block for encoder and decoder have been converted to ConV2D from ConV1D, as shown in FIG. 2a.

[0085] FIG. 2a shows schematic diagram of an audio signal processing system according to some embodiments of the present disclosure.

[0086] In FIG. 2a, 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.

[0087] 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.

[0088] For example, ResNetBlock is added to increase the depth of the model. Two additional ResNetBlock layers are added to process extracted features.

[0089] 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.

[0090] 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.

[0091] 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.

[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. For example, lossy transmission may be not considered in this disclosure.

[0093] For example, there are 5 stages in neural network audio codec as shown in FIG. 2b.

[0094] FIG. 2b shows schematic diagram of an audio signal processing system according to  some embodiments of the present disclosure.

[0095] In FIG. 2b, Stage1 is feature extraction: it is used to extract audio features from audio signals. Feature extraction does nothing in a time-domain audio codec, in frequency-domain audio codec, it is a STFT module.

[0096] Stage2 is the encoding process: it contains inference of encoder and vectorization of latent generated by encoder. The main blocks in encoder is ConV1D in time-domain audio codec and ConV2D in frequency-domain audio codec. Pre-trained codebooks are used here to get indices of each latent in each vector quantizer, so the size of bitstream is much smaller since it is a series of indices rather than vectors. Usually indices is limited by a certain range, 1024 for examples, so only 10 bits is needed to encode single index.

[0097] Stage3 is the transmission process: bitstream of indices if transferred using network or media device, this process is supposed to be loss-less in this disclosure.

[0098] Stage4 is the decoding process: it contains inference of decoder and de-vectorization of indices. The main blocks in decoder is ConV1D in time-domain audio codec and ConV2D in frequency-domain audio codec. Same codebook as the one mentioned in Stage2 is used here to extract z_q using indices.

[0099] Stage5 is the feature converter: it is used to generated recovered audio using features generated by decoder. Feature converter does nothing in a time-domain audio codec, in frequency-domain audio codec, it is a ISTFT module.

[0100] For example, residual vector quantization is an important part in audio codec. The goal of the quantizer is to compress the output of the encoder to a target bitrate R, expressed in bits / seconds (bps) . Usually the size of indices is much smaller than the size of tensors, therefore a much smaller stream can be transferred with less bandwidth. The codebook of vector quantizer  can be learned during training of neural audio codec in an end-to-end fashion.

[0101] For example, RVQ cascades Nq layers of VQ and is called multi-stage vector quantizer. The input vector is passed through the first VQ and quantization residuals are computed, the residuals are the iteratively quantized by a sequence of additional Nq -1 layers.

[0102] For example, the algorithm of RVQ may be implemented with the following:

[0103] If a codec with bitrate R=6000bps from 24000kHz audio with stride 320 is developed, the shape of input vector is 75×feature_dims. This corresponds to r=6000 / 75=80 bits allocated to each frame. For a plain VQ, the codebook size is N=280, which is obviously unfeasible.

[0104] But if this plain VQ is replaced with a RVQ with Nq=8, each VQ uses a codebook of size Total size of codebook is reduced from N=280 to Nq×N =8192.

[0105] The quality of RVQ is important for the reconstruction quality of neural audio codecs, so properly training methods should be chosen. For example, there are two methods to train RVQ as followings.

[0106] For example, the EMA update of each codebook in RVQ comprises:

[0107] is the number of vectors in E (x) in the mini-batch that are quantized to codebook item ei, , and γ is a decay parameter with a value between 0 and 1 (default γ = 0.99 is used in experiments) . For example, the released VQ-VAE implementation may be used in the Sonnet library. E (x) is the output of the encoder, ei is one item in the codebook.

[0108] For example, the codebook loss may be:

[0109] For example, the quality of RVQ can be measured by codebook usage, which mean how well each entry is utilized in RVQ, however there is no specific metric to measure this. Therefore, perplexity is introduced here to approximate the overall codebook usage of a RVQ.

[0110] Calculation of perplexity (Shape of input is [batch_size, num_frames, embedding_dims] ) :

[0111] i. Find indices for input using distance function (cosine similarity or euclidean distance) , min_encoding_indices is a tensor of integer with shape [batch_size×num_frames] ;

[0112] ii. Given min_encoding_indices, the number of occurrence of each index can be calculated, for example, index 0 is chosen 7 times, index 3 is chosen 38 times... and probability can be calculated by divide counts with total number;

[0113] iii. Calculate perplexity using following function:

[0114] Although RVQ is wildly used in neural audio codecs, it still suffers from low codebook usage and causes lower audio quality of reconstructed audio compared with autoencoder. Codebook usage can be measured use perplexity, perplexity is a statistics calculated across a batch test data.

[0115] For example, to address this issue, several experiments is conducted comprising k-means initialization, dead code reset scheme, warmup before initialization, and find the best practice for frequency domain neural audio codec is factorization.

[0116] For example, factorization with a factorization factor 4 is suggest to used as the default training of codebook if computation complexity is not a large concern; dead code reset (i.e. updating the dead code) is suggested if computation complexity is considered.

[0117] For example, subjective Scores for the proposed method and other method is shown in table 1.

[0118] table 1

[0119] The proposed method is most suitable for those codecs most critical on computational complexity. The training of RVQ is modified to get higher codebook usage, and the inference is all the same. Codebooks are updated as mentioned above for RVQ.

[0120] The problem is not every codebook item (i.e. a code in the codebook) ei is updated.  Each vector in the mini-batch is used to update the codebook item with minimum distance to it, there are a number of dead codes in RVQ, which leads to low codebook usage and degrades reconstruction quality. The perplexity is 113.5 as listed in table1 and PESQ is quite low compared (-0.28) with auto encoder.

[0121] For example, the dead code in RVQ's codebook may be reset with sample vectors from current mini-batch. How many times each code has not been used are counted. For example, the codebook in RVQ is a tensor with shape [num_embeddings, embedding_dims] , a tensor named D with shape [num_embeddings] is created with integer values. Di means how many times the vector codebooki (i.e. a code in the codebook) has not been used. If Di exceeds the threshold (such as 2) , we will reset the vector with input vector randomly sampled from the mini-batch.

[0122] For example, threshold = 2 is quite useful (PESQ+0.12, perplexity+260) and proposed this to be the first version of RVQ without increasing complexity during inference.

[0123] The RVQ1 proposed above improved neural audio codec performance a lot compared with VQVAE. In order to improve the PESQ value further, a factorization technique is proposed to use, which improves reconstruction quality with slightly increase on computational budget.

[0124] FIG. 3 shows schematic diagrams of an audio signal processing system according to other embodiments of the present disclosure.

[0125] In FIG. 3, for example, the input of RVQ is z of shape [nembedding×dembedding] , dembedding is usually large and factorization is proposed to be performed on dembedding to reduce feature dimension of codebook so that higher codebook usage is possible.

[0126] For example, a projection layer is introduced before input latent z into RVQ, which is configured to project the latent z into zfactorization using a projection matrix. So the shape of  zfactorization becomes [nembedding×dembedding / factorization factor] . Another projection layer is introduced before output layer to convert z_qfactorization to z_q with original shape using a projection matrix. For example, this process also has gained improvement on image coding and so on.

[0127] The proposed factorization method above is also useful for frequency-domain neural audio codec. For example, factorization factor is 4, input dimension is 256; after projection layer, dimension becomes 64 and after codebook lookup stage; it is converted back to 256 using another projection layer. PESQ now becomes 4.36 which mean current RVQ's performance approximates the performance of auto encoder, and the perplexity also becomes 625 which means higher codebook usage.

[0128] The extra computational budget is introduces because the projection layer is added in each vector quantization, so it is suggested to use this factorization method in scenarios where computing resources are sufficient.

[0129] For example, the improved methods above are proposed for different scenarios and improved reconstruction audio quality.

[0130] FIG. 4 shows a flowchart of an audio signal encoding method according to some embodiments of the present disclosure.

[0131] As shown in FIG. 4, the audio signal encoding method comprises the followings.

[0132] In step 410, a first encoding result of an audio signal is projected into a second encoding result, wherein a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result.

[0133] In some embodiments, the first encoding result is projected into the second encoding result according to a factorization factor, the number of dimensions of the second encoding result  being determined according to the factorization factor.

[0134] In some embodiments, the first encoding result is projected into the second encoding result using a projection layer, the projection layer being introduced before inputting the first encoding result into a quantizer which performs the quantization process.

[0135] In some embodiments, the first encoding result is projected into the second encoding result using a projection matrix in the projection layer.

[0136] In step 420, a quantization process is performed on the second encoding result according to a codebook to obtain a quantized encoding result.

[0137] In some embodiments, the codebook is trained by: during a plurality of rounds of training performed on the codebook using a current batch of training vectors, counting a number of rounds of training in which a code in the codebook is not used; and in response to the number of rounds exceeding a threshold value , updating the code.

[0138] In some embodiments, the code is updated to a designated training vector in the current batch of training vectors.

[0139] In some embodiments, the designated training vector is randomly sampled from the current batch of training vectors; and updating the code to the designated training vector.

[0140] FIG. 5 shows a flowchart of an audio signal decoding method according to some embodiments of the present disclosure.

[0141] As shown in FIG. 5, the audio signal decoding method comprises the followings.

[0142] In step 510, a first quantized encoding result of an audio signal is projected into a second quantized encoding result, wherein a number of dimensions of the first quantized encoding result is less than a number of dimensions of the second quantized encoding result, the first quantized encoding result is obtained by quantizing a second encoding result according to a  codebook at an encoding side, the second encoding result is obtained by projecting a first encoding result of the audio signal at the encoding side, and a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result.

[0143] In some embodiments, the first quantized encoding result is projected into the second quantized encoding result according to a factorization factor, the number of dimensions of the second quantized encoding result being determined according to the factorization factor.

[0144] In some embodiments, the first quantized encoding result is projected into the second quantized encoding result using a projection layer, the projection layer being introduced before an output layer which outputs the recovered audio signal.

[0145] In some embodiments, the first quantized encoding result is projected into the second quantized encoding result using a projection matrix in the projection layer.

[0146] In step 520, a quantization process is performed on the second quantized encoding result according to the codebook.

[0147] In some embodiments, the codebook is trained by: during a plurality of rounds of training performed on the codebook using a current batch of training vectors, counting a number of rounds of training in which a code in the codebook is not used; and in response to the number of rounds exceeding a threshold value , updating the code.

[0148] In some embodiments, the code is updated to a designated training vector in the current batch of training vectors.

[0149] In some embodiments, the designated training vector is randomly sampled from the current batch of training vectors; and updating the code to the designated training vector.

[0150] In step 530, a decoding process is performed on a result of the quantization process to obtain a recovered audio signal.

[0151] FIG. 6 shows a block diagram of an audio signal encoding apparatus according to some embodiments of the present disclosure.

[0152] As shown in FIG. 6, audio signal encoding apparatus 6, comprising: a projecting unit 61, configured to project a first encoding result of the audio signal into a second encoding result, wherein a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result; and a quantizing unit 62, configured to perform a quantization process on the second encoding result according to a codebook to obtain a quantized encoding result.

[0153] In some embodiments, the projecting unit 61 projects the first encoding result into the second encoding result according to a factorization factor, the number of dimensions of the second encoding result being determined according to the factorization factor.

[0154] In some embodiments, the projecting unit 61 projects the first encoding result into the second encoding result using a projection layer, the projection layer being introduced before inputting the first encoding result into a quantizer which performs the quantization process.

[0155] In some embodiments, the projecting unit 61 projects the first encoding result into the second encoding result using a projection matrix in the projection layer.

[0156] In some embodiments, the codebook is trained by: during a plurality of rounds of training performed on the codebook using a current batch of training vectors, counting a number of rounds of training in which a code in the codebook is not used; and in response to the number of rounds exceeding a threshold value , updating the code.

[0157] In some embodiments, the codebook is trained by: updating the code to a designated training vector in the current batch of training vectors.

[0158] In some embodiments, the codebook is trained by: randomly sampling the designated  training vector from the current batch of training vectors; and updating the code to the designated training vector.

[0159] FIG. 7 shows a block diagram of an audio signal decoding apparatus according to some embodiments of the present disclosure.

[0160] As shown in FIG. 7, audio signal decoding apparatus 7, comprising: a projecting unit 71, configured to project a first quantized encoding result of an audio signal into a second quantized encoding result, wherein a number of dimensions of the first quantized encoding result is less than a number of dimensions of the second quantized encoding result, the first quantized encoding result is obtained by quantizing a second encoding result according to a codebook at an encoding side, the second encoding result is obtained by projecting the first encoding result of the audio signal at the encoding side, and a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result; a quantizing unit 72, configured to quantize the second quantized encoding result according to the codebook; and a decoding unit 73, configured to perform a decoding process on a result of the quantization process to obtain a recovered audio signal.

[0161] In some embodiments, the projecting unit 71 projects the first quantized encoding result into the second quantized encoding result according to a factorization factor, the number of dimensions of the second quantized encoding result being determined according to the factorization factor.

[0162] In some embodiments, the projecting unit 71 projects the first quantized encoding result into the second quantized encoding result using a projection layer, the projection layer being introduced before an output layer which outputs the recovered audio signal.

[0163] In some embodiments, the projecting unit 71 projects the first quantized encoding  result into the second quantized encoding result using a projection matrix in the projection layer.

[0164] In some embodiments, the codebook is trained by: during a plurality of rounds of training performed on the codebook using a current batch of training vectors, counting a number of rounds of training in which a code in the codebook is not used; and in response to the number of rounds exceeding a threshold value , updating the code.

[0165] In some embodiments, the codebook is trained by: updating the code to a designated training vector in the current batch of training vectors.

[0166] In some embodiments, the codebook is trained by: randomly sampling the designated training vector from the current batch of training vectors; and updating the code to the designated training vector.

[0167] FIG. 8 shows a block diagram of an electronic device according to other embodiments of the present disclosure.

[0168] As shown in FIG. 8, the electronic device 8 comprises: a memory 81 and a processor 82 coupled to the memory 81, the processor 82 configured to, based on instructions stored in the memory 81, carry out 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.

[0169] Wherein, the memory 81 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.

[0170] FIG. 9 shows a block diagram of the electronic device according to further embodiments of the present disclosure.

[0171] As shown in FIG. 9, the electronic device 9 of the embodiments comprises: a memory  910 and a processor 920 coupled to the memory 910, the processor 920 configured to, based on instructions stored in the memory 910, carry out 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.

[0172] The memory 910 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.

[0173] The electronic device 9 may further comprise an input-output interface 930, a network interface 940, a storage interface 950, and the like. These interfaces 930, 940, 950, the memory 910 and the processor 920 may be connected through a bus 960, for example. Wherein, the input-output interface 930 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 940 provides a connection interface for various networked devices. The storage interface 950 provides a connection interface for external storage devices such as an SD card and a USB flash disk.

[0174] FIG. 10 shows a block diagram of an audio signal processing system according to some embodiments of the present disclosure.

[0175] As shown in FIG. 10, audio signal processing system 10, comprising: an audio signal encoding apparatus 11, configured to implement an audio signal encoding method according to any one of the above embodiments; and an audio signal decoding apparatus 12, configured to implement an audio signal decoding method according to any one of the above embodiments.

[0176] 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.

[0177] 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.

[0178] 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.

[0179] 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:projecting a first encoding result of an audio signal into a second encoding result, wherein a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result; andperforming a quantization process on the second encoding result according to a codebook to obtain a quantized encoding result.2.The audio signal encoding method according to claim 1, wherein the projecting the first encoding result of the audio signal into the second encoding result comprising:projecting the first encoding result into the second encoding result according to a factorization factor, the number of dimensions of the second encoding result being determined according to the factorization factor.3.The audio signal encoding method according to claim 1 or 2, wherein the projecting the first encoding result of the audio signal into the second encoding result comprising:projecting the first encoding result into the second encoding result using a projection layer, the projection layer being introduced before inputting the first encoding result into a quantizer which performs the quantization process.4.The audio signal encoding method according to claim 3, wherein the projecting the first encoding result into the second encoding result using the projection layer comprising:projecting the first encoding result into the second encoding result using a projection matrix in the projection layer.5.The audio signal encoding method according to any of claims 1 to 4, wherein the codebook is trained by:during a plurality of rounds of training performed on the codebook using a current batch of training vectors, counting a number of rounds of training in which a code in the codebook is not used; andin response to the number of rounds exceeding a threshold value , updating the code.6.The audio signal encoding method according to claim 5, wherein the updating the code comprises:updating the code to a designated training vector in the current batch of training vectors.7.The audio signal encoding method according to claim 6, wherein the updating the code to the designated training vector in the current batch of training vectors comprises:randomly sampling the designated training vector from the current batch of training vectors; andupdating the code to the designated training vector.8.An audio signal decoding method, comprising:projecting a first quantized encoding result of an audio signal into a second quantized encoding result, wherein a number of dimensions of the first quantized encoding result is less than a number of dimensions of the second quantized encoding result, the first quantized encoding result is obtained by quantizing a second encoding result according to a codebook at an encoding side, the second encoding result is obtained by projecting a first encoding result of the audio signal at the encoding side, and a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result;performing a quantization process on the second quantized encoding result according to the codebook; andperforming a decoding process on a result of the quantization process to obtain a recovered audio signal.9.The audio signal decoding method according to claim 8, wherein the projecting the first quantized encoding result of the audio signal into the second quantized encoding result comprising:projecting the first quantized encoding result into the second quantized encoding result according to a factorization factor, the number of dimensions of the second quantized encoding result being determined according to the factorization factor.10.The audio signal decoding method according to claim 8 or 9, wherein the projecting the first quantized encoding result of the audio signal into the second quantized encoding result comprising:projecting the first quantized encoding result into the second quantized encoding result using a projection layer, the projection layer being introduced before an output layer which outputs the recovered audio signal.11.The audio signal decoding method according to claim 10, wherein the projecting the first quantized encoding result into the second quantized encoding result using the projection layer comprising:projecting the first quantized encoding result into the second quantized encoding result using a projection matrix in the projection layer.12.The audio signal decoding method according to any of claims 8 to 11, wherein the codebook is trained by:during a plurality of rounds of training performed on the codebook using a current batch of training vectors, counting a number of rounds of training in which a code in the codebook is not used; andin response to the number of rounds exceeding a threshold value , updating the code.13.The audio signal decoding method according to claim 12, wherein the updating the code comprises:updating the code to a designated training vector in the current batch of training vectors.14.The audio signal decoding method according to claim 13, wherein the updating the code to the designated training vector in the current batch of training vectors comprises:randomly sampling the designated training vector from the current batch of training vectors; andupdating the code to the designated training vector.15.An audio signal encoding apparatus, comprising:a projecting unit, configured to project a first encoding result of the audio signal into a second encoding result, wherein a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result; anda quantizing unit, configured to perform a quantization process on the second encoding result according to a codebook to obtain a quantized encoding result.16.An audio signal decoding apparatus, comprising:a projecting unit, configured to project a first quantized encoding result of an audio signal into a second quantized encoding result, wherein a number of dimensions of the first quantized encoding result is less than a number of dimensions of the second quantized encoding result, the first quantized encoding result is obtained by quantizing a second encoding result according to a codebook at an encoding side, the second encoding result is obtained by projecting the first encoding result of the audio signal at the encoding side, and a number of dimensions of the second encoding result is less than a number of dimensions of the first encoding result;a quantizing unit, configured to quantize the second quantized encoding result according to the codebook; anda decoding unit, configured to perform a decoding process on a result of the quantization process to obtain a recovered audio signal.17.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 7; andan audio signal decoding apparatus be configured to implement an audio signal decoding method of any one of claims 8 to 14.18.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 7 or an audio signal decoding method of any one of claims 8 to 14.19.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 7 or an audio signal decoding method of any one of claims 8 to 14.20.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 7 or an audio signal decoding method of any one of claims 8 to 14.

Citation Information

Patent Citations

  • Multi-channel audio signal compressing method based on tensor decomposition

    CN102982805A

  • Spatial audio encoding-decoding method based on sparse expression

    CN104934038A

  • Encoder, decoder and method for encoding and decoding

    CN106415716A

  • Audio information processing method and device, electronic equipment and storage medium

    CN113112993A

  • Speech recognition model training method and device, speech recognition method and device, equipment and medium

    CN117711386A