An audio signal encoding and decoding method and apparatus

By suppressing and reversing the frequency spectrum of the high-frequency and low-frequency residual signals of the audio signal, the problems of lack of harmonic components and low energy of the high-frequency signal are solved, thereby improving the quality of the audio signal and enhancing the user experience.

CN118038877BActive Publication Date: 2026-03-10DOUYIN VISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-01
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, the spectrum of high-frequency signals is generally generated by folding the spectrum of low-frequency signals during audio signal processing. This results in the recovered audio frame signal lacking harmonic components and having low high-frequency energy, leading to an overall poor audio frame listening experience.

Method used

By acquiring the high-frequency and low-frequency residual signals of the target audio frame, the frequency components within the target frequency range in the low-frequency residual signal are suppressed to obtain the encoding suppression signal. The encoding suppression signal is then spectrum-inverted to obtain the spectrum-inverted signal. Combined with the high-frequency residual signal, the high-frequency energy gain is obtained, and finally, the encoded data of the target audio frame is generated.

Benefits of technology

This effectively avoids the problems of lack of harmonic components and low energy in the reconstructed high-frequency signal, improves the quality of the audio signal, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118038877B_ABST
    Figure CN118038877B_ABST
Patent Text Reader

Abstract

This application provides an audio signal encoding and decoding method and apparatus, relating to the field of signal processing technology. The method includes: acquiring a high-frequency residual signal and a low-frequency residual signal of a target audio frame; suppressing frequency components within a target frequency range in the low-frequency residual signal to obtain an encoding suppression signal; the center frequency of the target frequency range being the fundamental frequency of the low-frequency residual signal; performing a spectrum inversion on the encoding suppression signal to obtain a spectrum inverted signal; acquiring a high-frequency energy gain of the target audio signal based on the spectrum inverted signal and the high-frequency residual signal; and generating encoded data of the target audio frame based on the high-frequency energy gain. This application is used to improve the audio quality after encoding and decoding of audio signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method and apparatus for encoding and decoding audio signals. Background Technology

[0002] In audio signal processing, bandwidth expansion algorithms can, within the bitrate constraint, allocate most of the bitrate to encode low-frequency signals that the human ear is more sensitive to, while transmitting high-frequency signals that the human ear pays less attention to using a lower bitrate, or relying solely on the decoding end to reconstruct the high-frequency signals from the decoded low-frequency signals, thereby improving the overall quality of encoded speech at a fixed bitrate.

[0003] In existing technologies, the spectrum of high-frequency signals is generally generated by folding the spectrum of low-frequency signals during audio signal processing. Therefore, the recovered audio frame signal will lack some harmonic components. In order to suppress the fundamental tone components folded to the high frequency, the high-frequency energy is attenuated when recovering the high-frequency signal energy at the decoding end, resulting in low high-frequency energy after recovery and poor overall audio frame listening experience. Summary of the Invention

[0004] In view of this, embodiments of this application provide an audio signal encoding and decoding method and apparatus for improving the audio quality of processed audio signals.

[0005] To achieve the above objectives, the technical solutions provided in this application are as follows:

[0006] In a first aspect, embodiments of this application provide an audio signal encoding method, comprising:

[0007] Acquire the high-frequency residual signal and low-frequency residual signal of the target audio frame;

[0008] The frequency components within the target frequency range of the low-frequency residual signal are suppressed to obtain a coded suppression signal; the center frequency of the target frequency range is the fundamental frequency of the low-frequency residual signal.

[0009] The encoded suppression signal is spectrally inverted to obtain the spectrally inverted signal;

[0010] Based on the spectrum inversion signal and the high-frequency residual signal, the high-frequency energy gain of the target audio signal is obtained;

[0011] The encoded data of the target audio frame is generated based on the high-frequency energy gain.

[0012] As an optional implementation of this application, the step of suppressing frequency components within the target frequency range in the low-frequency residual signal to obtain a coded suppression signal includes:

[0013] The low-frequency residual signal is pre-emphasized using a high-pass filter to suppress frequency components within the target frequency range, thereby obtaining a coded suppression signal.

[0014] As an optional implementation of this application, the step of suppressing frequency components within the target frequency range in the low-frequency residual signal to obtain a coded suppression signal includes:

[0015] The low-frequency residual signal is filtered using a ramp filter to suppress frequency components within the target frequency range and obtain a coded suppression signal.

[0016] As an optional implementation of this application, the step of suppressing frequency components within the target frequency range in the low-frequency residual signal to obtain a coded suppression signal includes:

[0017] The frequency components within the target frequency range are notched using a second-order notch filter to obtain an encoded notch signal.

[0018] The coded notch signal is whitened to obtain the coded suppression signal.

[0019] As an optional implementation of this application, the step of performing spectrum inversion on the encoded suppression signal to obtain a spectrum-inverted signal includes:

[0020] The amplitude of the sampling points with odd indexes in the coded suppression signal is modified to the opposite number to obtain a spectrum inverted signal.

[0021] As an optional implementation of this application, the acquisition of the high-frequency residual signal and the low-frequency residual signal of the target audio signal includes:

[0022] The target audio frame is divided into low-frequency and high-frequency signals;

[0023] The first linear prediction (LPC) coefficients are obtained by performing linear prediction analysis on the high-frequency signal.

[0024] Convert the first linear prediction coefficients into line spectrum pair LSP coefficients;

[0025] The line spectrum pair coefficients are restored to the second linear prediction coefficients;

[0026] The high-frequency signal is divided into a predetermined number of sub-signals;

[0027] Based on the second linear prediction coefficient, each sub-signal is filtered to obtain the residual signal of each sub-signal, thereby obtaining the high-frequency residual signal;

[0028] The low-frequency signal is encoded to obtain low-frequency encoding information and the low-frequency residual signal.

[0029] As an optional implementation of this application, the step of generating the encoded data of the target audio frame based on the high-frequency energy gain includes:

[0030] The low-frequency coding information, the line spectrum pair coefficients, and the high-frequency energy gain are encoded to generate the coded data of the target audio frame.

[0031] Secondly, embodiments of this application provide a method for decoding audio signals, including:

[0032] Analyze the encoded data of the target audio frame to obtain low-frequency encoding information;

[0033] The low-frequency encoded information is decoded to obtain the low-frequency signal and the low-frequency residual signal;

[0034] The frequency components within the target frequency range of the low-frequency residual signal are suppressed to obtain a decoding suppression signal; the center frequency of the target frequency range is the fundamental frequency of the low-frequency residual signal.

[0035] The decoded suppression signal is spectrally inverted to obtain the low-frequency excitation signal;

[0036] The high-frequency signal is obtained by reconstructing the signal based on the low-frequency excitation signal.

[0037] The audio signal of the target audio frame is generated based on the low-frequency signal and the high-frequency signal.

[0038] As an optional implementation of this application, the step of suppressing the frequency components within the target frequency range of the low-frequency residual signal to obtain a decoding suppression signal includes:

[0039] The low-frequency residual signal is pre-emphasized based on a high-pass filter to suppress frequency components within the target frequency range in the low-frequency residual signal, thereby obtaining a decoding suppression signal.

[0040] As an optional implementation of this application, the step of suppressing the frequency components within the target frequency range of the low-frequency residual signal to obtain a decoding suppression signal includes:

[0041] The low-frequency residual signal is filtered using a ramp filter to suppress frequency components within the target frequency range and obtain a decoding suppression signal.

[0042] As an optional implementation of this application, the step of suppressing the frequency components within the target frequency range of the low-frequency residual signal to obtain a decoding suppression signal includes:

[0043] The frequency components within the target frequency range are notched using a second-order notch filter to obtain a decoded notch signal.

[0044] The decoded notch signal is whitened to obtain the decoded suppression signal.

[0045] As an optional implementation of this application, the step of performing spectrum inversion on the decoded suppression signal to obtain the low-frequency excitation signal includes:

[0046] The amplitude of the sampling points with odd indexes in the decoded and suppressed signal is modified to the opposite number to obtain a spectrum inverted signal.

[0047] As an optional implementation of this application, the encoded data of the target audio frame further includes: LSP coefficients and high-frequency energy gain;

[0048] The step of reconstructing the signal based on the low-frequency excitation signal to obtain the high-frequency signal includes:

[0049] The high-frequency signal is obtained by reconstructing the signal based on the low-frequency excitation signal, the LSP coefficient, and the high-frequency energy gain.

[0050] As an optional implementation of this application, the step of reconstructing the signal based on the low-frequency excitation signal, the LSP coefficients, and the high-frequency energy gain to obtain the high-frequency signal includes:

[0051] Obtain the energy gain corresponding to each sub-signal in the high-frequency energy gain;

[0052] Based on the low-frequency excitation signal and the energy gain of each sub-signal, the residual signal of each sub-signal is obtained;

[0053] The LSP coefficients are restored to LPC coefficients;

[0054] Each prediction sub-signal is obtained based on the LPC coefficients;

[0055] Each sub-signal is generated based on each predicted sub-signal and the residual signal of each sub-signal;

[0056] The high-frequency signal is generated based on each sub-signal.

[0057] Thirdly, embodiments of this application provide an audio signal encoding apparatus, comprising:

[0058] The acquisition unit is used to acquire the high-frequency residual signal and the low-frequency residual signal of the target audio frame;

[0059] The suppression unit is used to suppress frequency components within the target frequency range of the low-frequency residual signal to obtain a coded suppression signal; the center frequency of the target frequency range is the fundamental frequency of the low-frequency residual signal.

[0060] The inversion unit is used to invert the spectrum of the encoded suppression signal to obtain the inverted spectrum signal.

[0061] The processing unit is configured to obtain the high-frequency energy gain of the target audio signal based on the spectrum inversion signal and the high-frequency residual signal;

[0062] The generation unit is used to generate encoded data of the target audio frame based on the high-frequency energy gain.

[0063] As an optional implementation of this application, the suppression unit is specifically used to pre-emphasize the low-frequency residual signal based on a high-pass filter in order to suppress the frequency components in the target frequency range of the low-frequency residual signal and obtain a coded suppression signal.

[0064] As an optional implementation of this application, the suppression unit is specifically used to filter the low-frequency residual signal based on a ramp filter to suppress the frequency components in the target frequency range of the low-frequency residual signal and obtain a coded suppression signal.

[0065] As an optional implementation of this application, the suppression unit is specifically used to perform notch processing on the frequency components within the target frequency range based on a second-order notch filter to obtain an coded notch signal, and to perform whitening processing on the coded notch signal to obtain the coded suppression signal.

[0066] As an optional implementation of this application, the inversion unit is specifically used to modify the amplitude of the sampling points with odd indexes in the coded suppression signal to the opposite number, so as to obtain a spectrum inverted signal.

[0067] As an optional implementation of this application, the acquisition unit is specifically used for:

[0068] The target audio frame is divided into low-frequency and high-frequency signals;

[0069] The first linear prediction (LPC) coefficients are obtained by performing linear prediction analysis on the high-frequency signal.

[0070] Convert the first linear prediction coefficients into line spectrum pair LSP coefficients;

[0071] The line spectrum pair coefficients are restored to the second linear prediction coefficients;

[0072] The high-frequency signal is divided into a predetermined number of sub-signals;

[0073] Based on the second linear prediction coefficient, each sub-signal is filtered to obtain the residual signal of each sub-signal, thereby obtaining the high-frequency residual signal;

[0074] The low-frequency signal is encoded to obtain low-frequency encoding information and the low-frequency residual signal.

[0075] As an optional implementation of this application, the generation unit is specifically used to encode the low-frequency coding information, the line spectrum pair coefficients, and the high-frequency energy gain to generate the encoded data of the target audio frame.

[0076] Fourthly, embodiments of this application provide an audio signal decoding apparatus, comprising:

[0077] The acquisition unit parses the encoded data of the target audio frame to obtain low-frequency encoding information;

[0078] The decoding unit decodes the low-frequency encoded information to obtain the low-frequency signal and the low-frequency residual signal;

[0079] The suppression unit suppresses the frequency components within the target frequency range of the low-frequency residual signal to obtain a decoded suppression signal; the center frequency of the target frequency range is the fundamental frequency of the low-frequency residual signal.

[0080] The inversion unit performs a spectrum inversion on the decoded suppression signal to obtain a low-frequency excitation signal;

[0081] The reconstruction unit reconstructs the signal based on the low-frequency excitation signal to obtain the high-frequency signal;

[0082] The generation unit generates the audio signal of the target audio frame based on the low-frequency signal and the high-frequency signal.

[0083] As an optional implementation of this application, the suppression unit is specifically used to: pre-emphasize the low-frequency residual signal based on a high-pass filter to suppress the frequency components in the target frequency range of the low-frequency residual signal, thereby obtaining a decoding suppression signal.

[0084] As an optional implementation of this application, the suppression unit is specifically used to filter the low-frequency residual signal based on a ramp filter to suppress the frequency components in the target frequency range of the low-frequency residual signal and obtain a decoding suppression signal.

[0085] As an optional implementation of this application, the suppression unit is specifically used to perform notch processing on the frequency components within the target frequency range based on a second-order notch filter to obtain a decoded notch signal, and to perform whitening processing on the decoded notch signal to obtain the decoded suppression signal.

[0086] As an optional implementation of this application, the inversion unit is specifically used to modify the amplitude of the sampling points with odd indexes in the decoded suppression signal to the opposite number in order to obtain a low-frequency excitation signal.

[0087] As an optional implementation of this application, the encoded data of the target audio frame further includes: LSP coefficients and high-frequency energy gain. The reconstruction unit is specifically used to reconstruct the signal based on the low-frequency excitation signal, the LSP coefficients and the high-frequency energy gain to obtain the high-frequency signal.

[0088] As an optional implementation of this application, the reconstruction unit is specifically used to obtain the energy gain corresponding to each sub-signal in the high-frequency energy gain; obtain the residual signal of each sub-signal based on the low-frequency excitation signal and the energy gain of each sub-signal; restore the LSP coefficients to LPC coefficients; obtain each predicted sub-signal based on the LPC coefficients; generate each sub-signal based on each predicted sub-signal and the residual signal of each sub-signal; and generate the high-frequency signal based on each sub-signal.

[0089] Fifthly, embodiments of this application provide an electronic device, including: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to cause the electronic device to implement the audio signal encoding method or audio signal decoding method described in any of the above embodiments when executing the computer program.

[0090] Sixthly, embodiments of this application provide a computer-readable storage medium that, when executed by a computing device, causes the computing device to implement the audio signal encoding method or audio signal decoding method described in any of the above embodiments.

[0091] In a seventh aspect, embodiments of this application provide a computer program product that, when run on a computer, enables the computer to implement the audio signal encoding method or audio signal decoding method described in any of the above embodiments.

[0092] The audio signal encoding method provided in this application embodiment acquires the high-frequency residual signal and low-frequency residual signal of the target audio frame, then suppresses the frequency components within the target frequency range of the low-frequency residual signal to obtain an encoding suppression signal; the encoding suppression signal is then spectrum-inverted to obtain a spectrum-inverted signal; then, based on the spectrum-inverted signal and the high-frequency residual signal, the high-frequency energy gain of the target audio signal is obtained; finally, the encoded data of the target audio frame is generated based on the high-frequency energy gain. This application embodiment, by suppressing and inverting the frequency components of the acquired low-frequency residual signal, and then combining the high-frequency residual signal and the high-frequency energy gain to obtain the encoded data of the target audio frame, ensures that the reconstructed high-frequency signal does not suffer from missing harmonic components or low energy. This avoids poor audio quality issues when acquiring the bitstream data of the target audio frame, improving the user experience. Therefore, this application embodiment can improve audio quality during the encoding and decoding process. Attached Figure Description

[0093] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0094] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings that need to be called in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0095] Figure 1 One of the flowcharts for an audio signal encoding method provided in an embodiment of this application;

[0096] Figure 2 A second flowchart illustrating the audio signal encoding method provided in this application embodiment;

[0097] Figure 3 The third flowchart of the audio signal encoding method provided in the embodiments of this application;

[0098] Figure 4 The fourth flowchart of the audio signal encoding method provided in the embodiments of this application;

[0099] Figure 5 A hardware block diagram of an audio signal encoding device provided in the embodiments of this application;

[0100] Figure 6 One of the flowcharts for an audio signal decoding method provided in an embodiment of this application;

[0101] Figure 7A second flowchart illustrating the audio signal decoding method provided in this application embodiment;

[0102] Figure 8 The third flowchart of the audio signal decoding method provided in the embodiments of this application;

[0103] Figure 9 The fourth flowchart of the audio signal decoding method provided in the embodiments of this application;

[0104] Figure 10 A hardware block diagram of an audio signal decoding device provided in an embodiment of this application;

[0105] Figure 11 A schematic diagram of the structure of an audio signal encoding device provided in an embodiment of this application;

[0106] Figure 12 A schematic diagram of the structure of the audio signal decoding device provided in the embodiments of this application;

[0107] Figure 13 This is a schematic diagram of the electronic device structure provided in an embodiment of this application. Detailed Implementation

[0108] To better understand the above-mentioned objectives, features, and advantages of this application, the solution of this application will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0109] Many specific details are set forth in the following description in order to provide a full understanding of this application, but this application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of this application, and not all embodiments.

[0110] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. Furthermore, in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0111] This application provides an audio signal encoding method, referring to... Figure 1 As shown, the encoding method for this audio signal includes the following steps:

[0112] S101: Acquire the high-frequency residual signal and low-frequency residual signal of the target audio frame.

[0113] In this context, the high-frequency residual signal refers to the difference between the value of each sample point of the high-frequency signal of the audio signal and the corresponding predicted value. The predicted value corresponding to each sample point is the product of the linear prediction coefficient (LPC) and the low-frequency signal of the historical audio signal. Similarly, the low-frequency residual signal refers to the difference between the value of each sample point of the low-frequency signal of the audio signal and the corresponding predicted value. The predicted value corresponding to each sample point is the product of the linear prediction coefficient and the low-frequency signal of the historical audio signal. The linear prediction coefficient is a linear combination of the sample values ​​of the audio signal, obtained by multiplying the sample values ​​of historical audio data by coefficients and summing the products. For example, an LPC of order 10 has 10 coefficients. Multiplying each of these 10 coefficients by 10 sample values ​​of historical audio data and summing the products approximates the current sample value. These coefficients are the linear prediction coefficients.

[0114] The method of obtaining the high-frequency residual signal and the low-frequency residual signal can be the same as the prior art. The implementation method of obtaining the high-frequency residual signal and the low-frequency residual signal of the target audio frame in this application embodiment is not limited, but mainly focuses on being able to obtain the high-frequency residual signal and the low-frequency residual signal of the target audio frame.

[0115] S102: Suppress the frequency components within the target frequency range in the low-frequency residual signal to obtain the encoded suppression signal.

[0116] Wherein, the center frequency of the target frequency range is the fundamental frequency of the low-frequency residual signal.

[0117] The fundamental frequency, also called the baseband, refers to the frequency of the fundamental tone in a complex tone. Among the several tones that make up a complex tone, the fundamental tone has the lowest frequency and the highest intensity. The pitch of a note is determined by the fundamental frequency.

[0118] For example, when the center frequency of the target frequency range is 20 kHz, the target frequency range can be {10 kHz, 30 kHz}; when the center frequency of the target frequency range is 40 kHz, the target frequency range can be {20 kHz, 60 kHz}.

[0119] S103: Perform spectrum inversion on the encoded suppression signal to obtain the spectrum inverted signal.

[0120] The sampled baseband spectrum (center frequency near 0Hz) obtained according to the formula of the bandpass sampling theorem is exactly the opposite of the shape of the positive and negative spectrum of the original signal. Therefore, in this embodiment, performing spectrum inversion on the encoded suppression signal is to make the shape of the spectrum inverted signal opposite to the positive and negative spectrum of the encoded suppression signal.

[0121] S104: Obtain the high-frequency energy gain of the target audio signal based on the spectrum inversion signal and the high-frequency residual signal.

[0122] High-frequency energy gain refers to the energy gain of the high-frequency residual signal, specifically the ratio of the energy of the high-frequency residual signal to that of the low-frequency residual signal. The gain value refers to the energy difference between the high-frequency signal and the low-frequency signal.

[0123] In some embodiments, obtaining the high-frequency energy gain of the target audio signal based on the spectrum inversion signal and the high-frequency residual signal may include:

[0124] The energy values ​​of the spectrum inverted signal and the high-frequency residual signal are obtained, and the ratio of the energy value of the spectrum inverted signal to the energy value of the high-frequency residual signal is calculated to obtain the high-frequency energy gain of the target audio signal.

[0125] S105: Generate the encoded data of the target audio frame based on the high-frequency energy gain.

[0126] The audio signal encoding method provided in this application involves acquiring the high-frequency residual signal and low-frequency residual signal of the target audio frame, then suppressing the frequency components within the target frequency range in the low-frequency residual signal to obtain an encoding suppression signal; inverting the frequency components in the encoding suppression signal that meet preset conditions to obtain a spectrum inversion signal; then, obtaining the high-frequency energy gain of the target audio signal based on the spectrum inversion signal and the high-frequency residual signal; and finally generating the encoded data of the target audio frame based on the high-frequency energy gain. This application embodiment, by suppressing and inverting the frequency components of the acquired low-frequency residual signal, ensures that the reconstructed high-frequency signal does not suffer from missing harmonic components or low energy. This avoids poor audio quality issues when acquiring the bitstream data of the target audio frame, improving the user experience. Therefore, this application embodiment can improve audio quality during the encoding process.

[0127] As an extension and refinement of the above embodiments, this application provides another method for encoding audio signals, referring to... Figure 2 As shown, the encoding method for this audio signal includes the following steps:

[0128] S201. Divide the target audio frame into low-frequency signals and high-frequency signals.

[0129] In some embodiments, the target audio frame can be divided into low-frequency and high-frequency signals using a Quadrature Mirror Filter (QMF). The frequency range of the low-frequency signal can be [0kHz-4kHz], and the frequency range of the high-frequency signal can be [4kHz-8kHz].

[0130] S202, Perform linear prediction analysis on the high-frequency signal to obtain the first linear prediction coefficient.

[0131] In some embodiments, the high-frequency signal can be linearly predicted using the Burg algorithm to obtain first linear prediction coefficients. The Burg algorithm is a recursive algorithm that directly calculates power spectrum estimates from a known time signal sequence.

[0132] S203. Convert the first linear prediction coefficients into line spectrometer pair (LSP) coefficients.

[0133] The method of converting the first linear prediction coefficients into line spectrum pair coefficients is the same as the method of converting LPC coefficients into LSP coefficients in the prior art, and the embodiments of this application do not limit this.

[0134] S204. Restore the line spectrum pair coefficients to the second linear prediction coefficients.

[0135] Similarly, the method of restoring the line spectrum pair coefficients to the second linear prediction coefficients can be the same as the method of restoring LSP coefficients to LPC coefficients in the prior art, and this application embodiment does not limit this.

[0136] S205. Divide the high-frequency signal into a preset number of sub-signals.

[0137] In this embodiment, no preset number is limited. In the actual encoding process, the high-frequency signal can be divided into any number of sub-signals as needed. For example, the high-frequency signal can be divided into 4 sub-signals of equal length, or, for another example, into 8 sub-signals of equal length.

[0138] S206. Based on the second linear prediction coefficient, each sub-signal is filtered to obtain the residual signal of each sub-signal, thereby obtaining the high-frequency residual signal.

[0139] Specifically, the transfer function of the linear prediction filter that performs filtering on each sub-signal based on the second linear prediction coefficients can be:

[0140]

[0141] The residual signal of the sub-signal obtained through this transfer function is:

[0142]

[0143] Where i is the index of the sub-signal, x hbRepresents the original sub-signal, a i For the linear prediction coefficients of the sub-signal with index i, res hb It is the residual signal of the sub-signal with index i.

[0144] S207. Encode the low-frequency signal to obtain low-frequency coding information and the low-frequency residual signal.

[0145] In some embodiments, the low-frequency signal can be encoded using a SILK encoder to obtain the low-frequency encoding information and the low-frequency residual signal.

[0146] S208. The low-frequency residual signal is pre-emphasized based on a high-pass filter to suppress the frequency components in the target frequency range of the low-frequency residual signal, thereby obtaining a coded suppression signal.

[0147] Specifically, since pre-emphasis processing is also a type of filtering, pre-emphasis processing of each sub-signal based on the second linear prediction coefficients will employ a high-pass filter. The high-pass filter is used to suppress prominent frequency components near the fundamental frequency, and its transfer function is: H(z) = 1 - μz -1 , which are the preset filter coefficients.

[0148] Expressed using a difference equation:

[0149]

[0150] in This represents the processed low-frequency residual signal, where μ is the pre-filtering coefficient. μ determines the degree of suppression of lower frequency components and the degree of emphasis on higher frequency components in the low-frequency residual signal. The larger the value of μ, the higher the degree of suppression of lower frequency components and the higher the degree of emphasis on higher frequency components.

[0151] S209. Modify the amplitude of the sampling points with odd indexes in the encoded suppression signal to their opposite values ​​to obtain a spectrum inverted signal.

[0152] Since the spectrum of the high-frequency signal obtained after the audio signal of the target audio frame is divided by the orthogonal mirror filter is inverted, in order to ensure that the spectrum of the spectrum-inverted signal corresponds to the spectrum of the original high-frequency signal, the spectrum of the coding suppression signal needs to be inverted.

[0153] To obtain a spectrum inverted signal, the sampling points with odd indices in the coded suppression signal are inverted. Specifically, the spectrum inverted signal can be obtained using the following formula and the coded suppression signal:

[0154] res lb(i) = res lb (i)*(-1) i

[0155] Where i is the index of the sampling point in the coded suppression signal. For example, when the index of the sampling point in the coded suppression signal is 1, i.e., i = 1, the formula is denoted as: res lb (1) = res lb (1)*(-1) 1 , get res lb (1) = -res lb (1) indicates that when i = 1, the index of the sample point corresponding to the spectrum inversion signal is 1, which is the negative of the index of the sample point of the coded suppression signal; when the index of the sample point in the coded suppression signal is 2, that is, when i = 2, the formula is written as: res lb (2) = res lb (2)*(-1) 2 , get res lb (2) = res lb (2) indicates that when i = 2, the index of the spectrum inversion signal is 2 sampling points, which is equal to the index of the coding suppression signal is 2 sampling points.

[0156] For example, if the encoding suppression signal is: {a1, a2, a3, ... a...} 64}, then the spectrum inverted signal obtained after calculation by the above formula is: {-a1, a2, -a3, ... a 64}

[0157] S210. Obtain the high-frequency energy gain of the target audio signal based on the spectrum inversion signal and the high-frequency residual signal.

[0158] The high-frequency energy gain includes the energy gain of each sub-signal.

[0159] In some embodiments, the energy gain value of the sub-signal at index i is:

[0160]

[0161] Where N is the length of the sub-signal, gain i The energy gain value of the sub-signal with index i. The energy of the spectrum inverted signal, Let i be the energy of the sub-signal with index i.

[0162] S211. Encode the low-frequency coding information, the LSP coefficients, and the high-frequency energy gain to generate the encoded data of the target audio frame.

[0163] That is, the low-frequency coding information, the LSP coefficients, and the high-frequency energy gain are encapsulated into audio signal packets to obtain the encoded data of the target audio frame.

[0164] In some embodiments, before generating the encoded data of the target audio frame based on the low-frequency coding information, the LSP coefficients, and the high-frequency energy gain, the audio signal encoding method provided in this embodiment of the invention further includes: performing dual codebook quantization on the LSP coefficients.

[0165] For example: first perform double codebook quantization on the LSP coefficients, and then use 12 bits to encode the corresponding codebook index into the main bitstream.

[0166] Among them, dual-codebook quantization involves obtaining the LSP coefficients by performing coefficient retrieval through two different codebooks to obtain the LSP coefficients and the corresponding codebook index codes, and then synthesizing new LSP coefficient index codes through the two codebook retrievals.

[0167] The correspondence between the dual-codebook encoding subscripts and LSP coefficients can be shown in Table 1 below:

[0168] Table 1

[0169]

[0170] As shown in Table 1 above, when the LSP coefficients are {1111, 1112, 1113, 1115, 1117, 1118, 1119}, after dual-codebook quantization, the corresponding codebook index codes {C1, C2, C3, C4, C5, C6, C7, C8} are obtained.

[0171] By performing dual codebook quantization on LSP coefficients, the amount of data in the LSP coefficients can be reduced, thereby improving the efficiency of audio signal transmission.

[0172] In some embodiments, before generating the encoded data of the target audio frame based on the low-frequency coding information, the LSP coefficients, and the high-frequency energy gain, the audio signal encoding method provided in this embodiment of the invention further includes: performing codebook quantization on the high-frequency energy gain.

[0173] For example, the high-frequency energy gain can be quantized and the corresponding index can be encoded into the main bitstream using 5 bits. When there are 4 sub-signals, the encoded data of the high-frequency energy gain consumes a total of 20 bits.

[0174] The correspondence between the encoding subscript and the high-frequency energy gain can be shown in Table 2 below:

[0175] Table 2

[0176]

[0177] Codebook quantization of high-frequency energy gain can reduce the amount of data in high-frequency energy gain, thereby improving the efficiency of audio signal transmission.

[0178] This application provides another method for encoding audio signals, referring to... Figure 3 As shown, the encoding method for this audio signal includes the following steps:

[0179] S301. Divide the target audio frame into low-frequency signals and high-frequency signals.

[0180] S302. Perform linear prediction analysis on the high-frequency signal to obtain the first linear prediction coefficient.

[0181] S303. Convert the first linear prediction coefficients into line spectrum pair coefficients.

[0182] S304. Restore the line spectrum pair coefficients to the second linear prediction coefficients.

[0183] S305. Divide the high-frequency signal into a preset number of sub-signals.

[0184] S306. Based on the second linear prediction coefficient, each sub-signal is filtered to obtain the residual signal of each sub-signal, thereby obtaining the high-frequency residual signal.

[0185] S307. Encode the low-frequency signal to obtain low-frequency coding information and the low-frequency residual signal.

[0186] The implementation methods of the above steps S301 to S307 can be the same as... Figure 2 The implementation methods of steps S201 to S207 in the illustrated embodiment are the same, and will not be described in detail here to avoid redundancy.

[0187] S308. The low-frequency residual signal is filtered based on a ramp filter to suppress the frequency components in the target frequency range of the low-frequency residual signal and obtain an encoded suppression signal.

[0188] That is, the low-frequency residual signal is filtered by a ramp filter, thereby suppressing frequency components within the target frequency range whose center frequency is the fundamental frequency of the low-frequency residual signal.

[0189] In some embodiments, the ramp filter transfer function can be as follows:

[0190]

[0191] Expressed using a difference equation:

[0192]

[0193]

[0194]

[0195]

[0196]

[0197] Among them, f c The frequency to be adjusted is indicated by G = 1 + B0, which represents the gain value at the corresponding frequency. The range and degree of frequency suppression of the filter can be specified according to the degree of spectral tilt, thereby reducing the spectral tilt of the low-frequency residual.

[0198] S309. Invert the frequency components in the encoded suppression signal that meet the preset conditions to obtain the spectrum inverted signal.

[0199] Similarly, after the audio signal is divided by the orthogonal mirror filter, the spectrum of the resulting high-frequency signal is inverted. To ensure that the spectrum-inverted signal corresponds to the original high-frequency spectrum, the low-frequency residual signal needs to be spectrum-inverted. The method for spectrum inversion of the encoded suppression signal is the same as described in step S209 above, and will not be repeated here.

[0200] S310. Obtain the high-frequency energy gain of the target audio signal based on the spectrum inversion signal and the high-frequency residual signal.

[0201] The implementation method of the above step S310 can be the same as Figure 2 The implementation of step S210 in the illustrated embodiment is the same, and will not be described in detail here to avoid redundancy.

[0202] S311. Encode the low-frequency coding information, the LSP coefficients, and the high-frequency energy gain to generate the encoded data of the target audio frame.

[0203] This application provides another method for encoding audio signals, referring to... Figure 4 As shown, the encoding method for the audio signal includes the following steps:

[0204] S401. Divide the target audio frame into low-frequency signals and high-frequency signals.

[0205] S402. Perform linear prediction analysis on the high-frequency signal to obtain the first linear prediction coefficient.

[0206] S403. Convert the first linear prediction coefficients into line spectrum pair coefficients.

[0207] S404. Restore the line spectrum coefficients to the second linear prediction coefficients.

[0208] S405. Divide the high-frequency signal into a preset number of sub-signals.

[0209] S406. Based on the second linear prediction coefficient, each sub-signal is filtered to obtain the residual signal of each sub-signal, thereby obtaining the high-frequency residual signal.

[0210] S407. Encode the low-frequency signal to obtain low-frequency coding information and the low-frequency residual signal.

[0211] The implementation methods of the above steps S401 to S407 can be the same as... Figure 2 The implementation methods of steps S201 to S207 in the illustrated embodiment are the same, and will not be described in detail here to avoid redundancy.

[0212] S408: Perform notch filtering on the frequency components within the target frequency range based on a second-order notch filter to obtain an encoded notch signal.

[0213] That is, firstly, the gene frequency of the low-frequency residual signal is obtained, then the target frequency range is determined based on the gene frequency of the low-frequency residual signal, and a second-order notch filter is used to notch the frequency components within the target frequency range to obtain an encoded notch signal.

[0214] Since the spectrum inverted signal has high frequency components mainly near the fundamental frequency (within the target frequency range), the spectrum inverted signal is passed into a second-order notch filter to notch the frequency components within the target frequency range.

[0215] In some embodiments, the transfer function of the second-order notch filter is as follows:

[0216]

[0217] Expressed using a difference equation:

[0218]

[0219] in,

[0220]

[0221]

[0222]

[0223]

[0224]

[0225] γ = G * tanf(bw / 2)

[0226] in, This represents the low-frequency residual signal after second-order notch filtering, bw represents the notch bandwidth of the filter, Ω0 represents the center frequency of the notch filter, and G represents the notch gain value at the specified frequency.

[0227] S409. The coded notch signal is whitened to obtain the coded suppression signal.

[0228] That is, after notch filtering is performed on the low-frequency residual signal, the result is further whitened.

[0229] In some embodiments, the whitening process for the coded notch signal includes:

[0230] First, the LPC coefficients of the low-frequency residual signal are obtained using the Burger algorithm.

[0231] Secondly, the LPC coefficients are used to perform high-order LPC filtering on the coded notch signal obtained in the above steps to obtain the coded suppression signal.

[0232] For example, a high-order LPC filter is 8th order, which can be calculated using the following formula:

[0233]

[0234] S410. Modify the amplitude of the sampling points with odd indexes in the encoded suppression signal to their opposite values ​​to obtain a spectrum inverted signal.

[0235] S411. Obtain the high-frequency energy gain of the target audio signal based on the spectrum inversion signal and the high-frequency residual signal.

[0236] S412. Encode the low-frequency coding information, the line spectrum pair coefficients, and the high-frequency energy gain to generate the encoded data of the target audio frame.

[0237] Reference Figure 5 As shown, Figure 5 The present invention provides a hardware block diagram of an audio signal encoding device, which includes: an orthogonal mirror filter 501, an encoder 502, a suppression module 503, an inversion module 504, a splitting module 505, a linear prediction analyzer 506, a parameter quantizer 507, a restoration module 508, a high-frequency residual generator 509, a gain calculator 510, and a packager 511.

[0238] The orthogonal mirror filter 501 is used to divide a single frame audio signal into a low-frequency (Low Band, LB) signal and a high-frequency (High Band, HB) signal.

[0239] Encoder 502 is used to encode low-frequency signals to generate low-frequency coded information and low-frequency residual signals.

[0240] The suppression module 503 is used to suppress frequency components within a target frequency range whose center frequency is the fundamental frequency of the low-frequency residual signal, so as to obtain an encoded suppression signal.

[0241] The inversion module 504 is used to invert the spectrum of the encoded suppression signal to obtain the spectrum-inverted signal.

[0242] The splitting module 505 is used to divide the high-frequency signal of a single frame into a preset number of sub-signals.

[0243] The linear predictive analyzer 506 is used to perform linear predictive analysis on high-frequency signals to obtain the first LPC coefficients of the high-frequency signals.

[0244] The parameter quantizer 507 is used to convert the first linear prediction coefficients into LSP coefficients.

[0245] The restoration module 508 is used to restore the LSP coefficients to the second linear prediction coefficients.

[0246] The high-frequency residual generator 509 generates the residual signals of each sub-signal based on the second linear prediction coefficient and each sub-signal to obtain the high-frequency residual signal.

[0247] The Gain Calculator 510 calculates high-energy gain values ​​based on the spectrum inversion signal and the high-frequency residual signal.

[0248] Encapsulator 511 is used to encapsulate the low-frequency encoded information, the LSP coefficients, and the encoded data of the high-frequency energy gain generating audio signal.

[0249] Another embodiment of this application provides a method for decoding audio signals, referring to... Figure 6 As shown, the decoding method for this audio signal includes the following steps:

[0250] S601. Parse the encoded data of the target audio frame to obtain low-frequency encoded information.

[0251] That is, the encoded data of the received audio frame is decapsulated to obtain the low-frequency encoded information carried in the encoded data.

[0252] S602. Decode the low-frequency encoded information to obtain the low-frequency signal and the low-frequency residual signal.

[0253] In some embodiments, the low-frequency encoded information can be decoded using a decoder to obtain the low-frequency signal and the low-frequency residual signal.

[0254] S603. Suppress the frequency components within the target frequency range in the low-frequency residual signal to obtain a decoding suppression signal.

[0255] Wherein, the center frequency of the target frequency range is the fundamental frequency of the low-frequency residual signal.

[0256] S604. Perform spectrum inversion on the decoded suppression signal to obtain the low-frequency excitation signal.

[0257] S605. Reconstruct the signal based on the low-frequency excitation signal to obtain the high-frequency signal.

[0258] S606. Generate the audio signal of the target audio frame based on the low-frequency signal and the high-frequency signal.

[0259] The audio signal decoding method provided in this application embodiment obtains low-frequency encoding information by parsing the encoded data of the target audio frame, then decodes the low-frequency encoding information to obtain a low-frequency signal and a low-frequency residual signal, then suppresses the frequency components within the target frequency range in the low-frequency residual signal, then performs spectrum inversion on the obtained decoded and suppressed signal to obtain a low-frequency excitation signal, and then reconstructs the signal based on the low-frequency excitation signal to obtain a high-frequency signal. Finally, the audio signal of the target audio frame is generated based on the low-frequency signal and the high-frequency signal. Because this application embodiment suppresses the spectrum of the low-frequency excitation signal without attenuating the high-frequency signal, it avoids the problem of low high-frequency signal energy. Furthermore, because this application embodiment also inverts the spectrum values ​​of sampling points that meet preset conditions when reconstructing the high-frequency signal, it avoids the problem of missing harmonic components in the high-frequency signal. In summary, this application embodiment can avoid low high-frequency energy and missing high-frequency harmonics when reconstructing the high-frequency signal at the decoding end, thus improving audio quality.

[0260] This application provides another method for decoding audio signals, referring to... Figure 7 As shown, the decoding method for this audio signal includes the following steps:

[0261] S701. Analyze the encoded data of the target audio frame to obtain low-frequency encoding information, LSP coefficients, and high-frequency energy gain.

[0262] S702. Decode the low-frequency encoded information to obtain the low-frequency signal and the low-frequency residual signal.

[0263] S703. Based on the high-pass filter, the low-frequency residual signal is pre-emphasized to suppress the frequency components in the target frequency range of the low-frequency residual signal, thereby obtaining the coded suppression signal.

[0264] S704. Modify the amplitude of the sampling points with odd indexes in the decoding suppression signal to their opposite values ​​to obtain a low-frequency excitation signal.

[0265] S705. Reconstruct the signal based on the low-frequency excitation signal, the LSP coefficient, and the high-frequency energy gain to obtain the high-frequency signal.

[0266] The process of reconstructing the signal based on the low-frequency excitation signal, the LSP coefficients, and the high-frequency energy gain to obtain the high-frequency signal includes steps 1 to 6:

[0267] Step 1: Obtain the energy gain corresponding to each sub-signal in the high-frequency energy gain.

[0268] Step 2: Obtain the residual signal of each sub-signal based on the low-frequency excitation signal and the energy gain of each sub-signal.

[0269] Step 3: Restore the LSP coefficients to LPC coefficients.

[0270] Step 4: Obtain each prediction sub-signal based on the LPC coefficients.

[0271] Step 5: Generate each sub-signal based on each predicted sub-signal and the residual signal of each sub-signal.

[0272] Step 6: Generate the high-frequency signal based on each sub-signal.

[0273] S706. Generate the audio signal of the target audio frame based on the low-frequency signal and the high-frequency signal.

[0274] In some embodiments, the low-frequency signal and the high-frequency signal can be synthesized by an orthogonal mirror filter to generate the audio signal of the target audio frame.

[0275] This application provides another method for decoding audio signals, referring to... Figure 8 As shown, the method for suppressing frequency components within the target frequency range of the low-frequency residual signal to obtain a decoding suppression signal includes the following steps:

[0276] S801. Parse the encoded data of the target audio frame to obtain low-frequency encoding information, LSP coefficients, and high-frequency energy gain.

[0277] S802. Decode the low-frequency encoded information to obtain the low-frequency signal and the low-frequency residual signal.

[0278] S803. The low-frequency residual signal is filtered based on a ramp filter to suppress the frequency components in the target frequency range of the low-frequency residual signal and obtain a decoding suppression signal.

[0279] S804. Modify the amplitude of the sampling points with odd indexes in the decoding suppression signal to their opposite values ​​to obtain a low-frequency excitation signal.

[0280] S805. Reconstruct the signal based on the low-frequency excitation signal, the LSP coefficient, and the high-frequency energy gain to obtain the high-frequency signal.

[0281] S806. Generate the audio signal of the target audio frame based on the low-frequency signal and the high-frequency signal.

[0282] This application provides another method for decoding audio signals, referring to... Figure 9 As shown, the method for suppressing frequency components within the target frequency range of the low-frequency residual signal to obtain a decoding suppression signal includes the following steps:

[0283] S901. Analyze the encoded data of the target audio frame to obtain low-frequency encoding information, LSP coefficients, and high-frequency energy gain.

[0284] S902. Decode the low-frequency encoded information to obtain the low-frequency signal and the low-frequency residual signal.

[0285] S903. Based on a second-order notch filter, notch processing is performed on the frequency components within the target frequency range to obtain the decoded notch signal.

[0286] S904. The decoded notch signal is whitened to obtain the decoded suppression signal.

[0287] S905. Modify the amplitude of the sampling points with odd indexes in the decoding suppression signal to their opposite values ​​to obtain a low-frequency excitation signal.

[0288] S906. Reconstruct the signal based on the low-frequency excitation signal, the LSP coefficient, and the high-frequency energy gain to obtain the high-frequency signal.

[0289] S907. Generate the audio signal of the target audio frame based on the low-frequency signal and the high-frequency signal.

[0290] In conjunction with the above embodiments, refer to Figure 10 As shown, Figure 10This is a hardware block diagram of an audio signal decoding device provided in an embodiment of this application. The decoding device includes: a decapsulator 101, a decoder 102, a suppression module 103, an inversion module 104, a residual generator 105, a restoration module 106, a prediction module 107, a reconstruction module 108, a splicing module 109, and an orthogonal mirror filter 1010.

[0291] Among them, the unsealer 101 is used to parse and obtain low-frequency coding information, LSP coefficients and high-frequency energy gain.

[0292] Decoder 102 is used to decode the low-frequency encoded information to obtain low-frequency signals and low-frequency residual signals.

[0293] The suppression module 103 is used to suppress frequency components within a target frequency range whose center frequency is the fundamental frequency of the low-frequency residual signal, so as to obtain a decoding suppression signal.

[0294] The inversion module 104 is used to invert the spectrum of the decoded suppression signal to obtain the low-frequency excitation signal.

[0295] The residual generator 105 is used to obtain the residual signal of each sub-signal based on the energy gain corresponding to each sub-signal in the low-frequency excitation signal and the high-frequency energy gain.

[0296] The restoration module 106 is used to restore the LSP coefficients to the LPC coefficients.

[0297] The prediction module 107 is used to obtain each high-frequency sub-signal based on the LPC coefficients.

[0298] The reconstruction module 108 is used to generate each sub-signal based on each predicted sub-signal and the residual signal of each sub-signal.

[0299] The splicing module 109 is used to splice the various sub-signals into a high-frequency signal.

[0300] The quadrature mirror filter 1010 is used to combine high-frequency and low-frequency signals into an audio signal.

[0301] Based on the same inventive concept, as an implementation of the above method, this application embodiment also provides an audio signal encoding device and an audio signal decoding device. This embodiment corresponds to the aforementioned method embodiment. For ease of reading, this application embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the audio signal decoding device and audio signal decoding device in this application embodiment can correspondingly implement all the contents of the aforementioned method embodiment.

[0302] Based on the same concept, embodiments of this application provide an audio signal encoding device. Figure 11A schematic diagram of the encoding device for this audio signal is shown below. Figure 11 As shown, the audio signal encoding device 1100 includes:

[0303] The acquisition unit 1101 is used to acquire the high-frequency residual signal and the low-frequency residual signal of the target audio frame.

[0304] The suppression unit 1102 is used to suppress the frequency components in the target frequency range of the low-frequency residual signal to obtain the encoded suppression signal; the center frequency of the target frequency range is the fundamental frequency of the low-frequency residual signal.

[0305] The inversion unit 1103 is used to perform spectral inversion on the encoded suppression signal to obtain the spectral inverted signal.

[0306] The processing unit 1104 is used to obtain the high-frequency energy gain of the target audio signal based on the spectrum inversion signal and the high-frequency residual signal.

[0307] The generation unit 1105 is used to generate the encoded data of the target audio frame based on the high-frequency energy gain.

[0308] As an optional implementation of this application, the suppression unit 1102 is specifically used for:

[0309] The low-frequency residual signal is pre-emphasized using a high-pass filter to suppress frequency components within the target frequency range, thereby obtaining a coded suppression signal.

[0310] As an optional implementation of this application, the suppression unit 1102 is specifically used to filter the low-frequency residual signal based on a ramp filter to suppress the frequency components in the target frequency range of the low-frequency residual signal and obtain a coded suppression signal.

[0311] As an optional implementation of this application, the suppression unit 1102 is specifically used to perform notch processing on the frequency components in the target frequency range based on a second-order notch filter to obtain an coded notch signal, and to perform whitening processing on the coded notch signal to obtain the coded suppression signal.

[0312] As an optional implementation of this application, the inversion unit 1103 is specifically used to modify the amplitude of the sampling points with odd indexes in the coded suppression signal to the opposite number in order to obtain a spectrum inverted signal.

[0313] As an optional implementation of this application, the processing unit 1104 is specifically used to divide the target audio frame into low-frequency signals and high-frequency signals; perform linear prediction analysis on the high-frequency signals to obtain first linear prediction (LPC) coefficients; convert the first linear prediction coefficients into line spectrum pair (LSP) coefficients; restore the line spectrum pair coefficients to second linear prediction coefficients; divide the high-frequency signals into a preset number of sub-signals; perform filtering processing on each sub-signal based on the second linear prediction coefficients to obtain the residual signals of each sub-signal, thereby obtaining the high-frequency residual signal; and encode the low-frequency signals to obtain low-frequency coding information and the low-frequency residual signal.

[0314] As an optional implementation of this application, the generation unit 1105 is specifically used to encode the low-frequency coding information, the line spectrum pair coefficients, and the high-frequency energy gain to generate the encoded data of the target audio frame.

[0315] The audio signal encoding device provided in this application embodiment can execute the audio signal encoding method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.

[0316] Based on the same concept, embodiments of this application provide an audio signal decoding device. Figure 12 A schematic diagram of the audio signal decoding device is shown below. Figure 12 As shown, the audio signal decoding device 1200 includes:

[0317] The acquisition unit 1201 is used to parse the encoded data of the target audio frame and obtain low-frequency encoding information;

[0318] The decoding unit 1202 is used to decode the low-frequency encoded information to obtain the low-frequency signal and the low-frequency residual signal.

[0319] The suppression unit 1203 is used to suppress the frequency components in the target frequency range of the low-frequency residual signal to obtain the decoding suppression signal.

[0320] The center frequency of the target frequency range is the fundamental frequency of the low-frequency residual signal.

[0321] The inversion unit 1204 is used to invert the spectrum of the decoded suppression signal to obtain the low-frequency excitation signal.

[0322] The reconstruction unit 1205 is used to reconstruct the signal based on the low-frequency excitation signal to obtain the high-frequency signal.

[0323] The generation unit 1206 is used to generate the audio signal of the target audio frame based on the low-frequency signal and the high-frequency signal.

[0324] As an optional implementation of this application, the suppression unit 1203 is specifically used to pre-emphasize the low-frequency residual signal based on a high-pass filter in order to suppress the frequency components in the target frequency range of the low-frequency residual signal and obtain a decoding suppression signal.

[0325] As an optional implementation of this application, the suppression unit 1203 is specifically used to filter the low-frequency residual signal based on a ramp filter to suppress the frequency components in the target frequency range of the low-frequency residual signal and obtain a decoding suppression signal.

[0326] As an optional implementation of this application, the suppression unit 1203 is specifically used to perform notch processing on the frequency components in the target frequency range based on a second-order notch filter to obtain a decoded notch signal, and to perform whitening processing on the decoded notch signal to obtain the decoded suppression signal.

[0327] As an optional implementation of this application, the inversion unit 1204 is specifically used to modify the amplitude of the sampling points with odd indexes in the decoded suppression signal to the opposite number in order to obtain a low-frequency excitation signal.

[0328] As an optional implementation of this application, the encoded data of the target audio frame further includes: LSP coefficients and high-frequency energy gain. The reconstruction unit 1205 is specifically used to reconstruct the signal based on the low-frequency excitation signal, the LSP coefficients and the high-frequency energy gain to obtain the high-frequency signal.

[0329] As an optional implementation of this application, the reconstruction unit 1205 is specifically used to obtain the energy gain corresponding to each sub-signal in the high-frequency energy gain; obtain the residual signal of each sub-signal based on the low-frequency excitation signal and the energy gain of each sub-signal; restore the LSP coefficients to LPC coefficients; obtain each predicted sub-signal based on the LPC coefficients; generate each sub-signal based on each predicted sub-signal and the residual signal of each sub-signal; and generate the high-frequency signal based on each sub-signal.

[0330] The audio signal decoding device provided in this application embodiment can execute the audio signal decoding method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.

[0331] Based on the same inventive concept, embodiments of this application also provide an electronic device. Figure 13 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, with reference to... Figure 13As shown, the electronic device provided in this application embodiment includes: a memory 131 and a processor 132. The memory 131 is used to store computer programs; the processor 132 is used to execute the audio signal encoding method or audio signal decoding method provided in the above embodiment when executing the computer program.

[0332] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the computing device to implement the audio signal encoding method or audio signal decoding method provided in the above embodiments.

[0333] Based on the same inventive concept, this application also provides a computer program product that, when run on a computer, enables the computing device to implement the audio signal encoding method or audio signal decoding method provided in the above embodiments.

[0334] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0335] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0336] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0337] Computer-readable media include both permanent and non-permanent, removable and non-removable storage media. Storage media can store information using any method or technology; the information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0338] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method of encoding an audio signal, characterized by, The method comprises the following steps: obtaining a high-frequency residual signal and a low-frequency residual signal of a target audio frame; the high-frequency residual signal refers to a difference between a value of each sample of a high-frequency signal of an audio signal and a corresponding predicted value, and the low-frequency residual signal refers to a difference between a value of each sample of a low-frequency signal of the audio signal and a corresponding predicted value, and the corresponding predicted value is a product of a linear prediction coefficient and a low-frequency signal of a historical audio signal; suppressing a frequency component in a target frequency range in the low-frequency residual signal to obtain an encoding suppression signal; a center frequency of the target frequency range is a pitch frequency of the low-frequency residual signal; performing spectrum inversion on the encoding suppression signal to obtain a spectrum inversion signal; obtaining a high-frequency energy gain of the target audio signal according to the spectrum inversion signal and the high-frequency residual signal; generating encoding data of the target audio frame according to the high-frequency energy gain.

2. The method of claim 1, wherein, The step of suppressing the frequency component in the target frequency range in the low-frequency residual signal to obtain the encoding suppression signal comprises the following steps: performing pre-emphasis processing on the low-frequency residual signal based on a high-pass filter to suppress the frequency component in the target frequency range in the low-frequency residual signal and obtain the encoding suppression signal.

3. The method of claim 1, wherein, The step of suppressing the frequency component in the target frequency range in the low-frequency residual signal to obtain the encoding suppression signal comprises the following steps: performing filter processing on the low-frequency residual signal based on a ramp filter to suppress the frequency component in the target frequency range in the low-frequency residual signal and obtain the encoding suppression signal.

4. The method of claim 1, wherein, The step of suppressing the frequency component in the target frequency range in the low-frequency residual signal to obtain the encoding suppression signal comprises the following steps: performing notch processing on the frequency component in the target frequency range based on a second-order notch filter to obtain an encoding notch signal; performing whitening processing on the encoding notch signal to obtain the encoding suppression signal.

5. The method of claim 1, wherein, The step of performing spectrum inversion on the encoding suppression signal to obtain the spectrum inversion signal comprises the following steps: modifying an amplitude of a sample point with an odd index in the encoding suppression signal to an opposite number to obtain the spectrum inversion signal.

6. The method according to any one of claims 1 to 5, characterized in that, The step of obtaining the high-frequency residual signal and the low-frequency residual signal of the target audio signal comprises the following steps: dividing the target audio frame into a low-frequency signal and a high-frequency signal; performing linear prediction analysis on the high-frequency signal to obtain first linear prediction (LPC) coefficients; converting the first linear prediction coefficients into line spectrum pair (LSP) coefficients; restoring the line spectrum pair coefficients into second linear prediction coefficients; averaging the high-frequency signal into a preset number of sub-signals; performing filter processing on each sub-signal based on the second linear prediction coefficients to obtain a residual signal of each sub-signal, so as to obtain the high-frequency residual signal; performing encoding on the low-frequency signal to obtain low-frequency encoding information and the low-frequency residual signal.

7. The method of claim 6, wherein, The step of generating the encoding data of the target audio frame according to the high-frequency energy gain comprises the following steps: performing encoding on the low-frequency encoding information, the line spectrum pair coefficients and the high-frequency energy gain to generate the encoding data of the target audio frame.

8. A method of decoding an audio signal, characterized by, The method comprises the following steps: parsing encoding data of a target audio frame to obtain low-frequency encoding information; decode the low-frequency coded information to obtain a low-frequency signal and a low-frequency residual signal; the low-frequency residual signal refers to a difference between a value of each sample of the low-frequency signal of the audio signal and a corresponding predicted value, the corresponding predicted value being a product of a linear prediction coefficient and a low-frequency signal of a historical audio signal; suppressing frequency components in a target frequency range in the low-frequency residual signal to obtain a decoded suppression signal, a center frequency of the target frequency range being a pitch frequency of the low-frequency residual signal; performing spectral inversion on the decoded suppression signal to obtain a low-frequency excitation signal; reconstructing a signal according to the low-frequency excitation signal to obtain a high-frequency signal; generating an audio signal of the target audio frame according to the low-frequency signal and the high-frequency signal.

9. The method of claim 8, wherein, The suppressing frequency components in a target frequency range in the low-frequency residual signal to obtain a decoded suppression signal comprises: performing pre-emphasis processing on the low-frequency residual signal based on a high-pass filter to suppress frequency components in a target frequency range in the low-frequency residual signal to obtain a decoded suppression signal.

10. The method of claim 8, wherein, The suppressing frequency components in a target frequency range in the low-frequency residual signal to obtain a decoded suppression signal comprises: performing filter processing on the low-frequency residual signal based on a slope filter to suppress frequency components in a target frequency range in the low-frequency residual signal to obtain a decoded suppression signal.

11. The method of claim 8, wherein, The suppressing frequency components in a target frequency range in the low-frequency residual signal to obtain a decoded suppression signal comprises: performing notch processing on the frequency components in the target frequency range based on a second-order notch filter to obtain a decoded notch signal; performing whitening processing on the decoded notch signal to obtain the decoded suppression signal.

12. The method of claim 8, wherein, The inverting the spectral values of the sampling points in the decoded suppression signal that meet a preset condition to obtain a spectral inversion signal comprises: modifying the amplitudes of the sampling points with odd indexes in the decoded suppression signal to their opposites to obtain a low-frequency excitation signal.

13. The method according to any one of claims 8-12, characterized in that, The encoding data of the target audio frame further comprises: LSP coefficients and high-frequency energy gain; The reconstructing a signal according to the low-frequency excitation signal to obtain a high-frequency signal comprises: reconstructing a signal according to the low-frequency excitation signal, the LSP coefficients and the high-frequency energy gain to obtain the high-frequency signal.

14. The method of claim 13, wherein, The reconstructing a signal according to the low-frequency excitation signal, the LSP coefficients and the high-frequency energy gain to obtain a high-frequency signal comprises: obtaining energy gains corresponding to each sub-signal in the high-frequency energy gain; obtaining residual signals of each sub-signal according to the low-frequency excitation signal and the energy gains of each sub-signal; restoring the LSP coefficients to LPC coefficients; obtaining each predicted sub-signal according to the LPC coefficients; generating each sub-signal according to each predicted sub-signal and the residual signal of each sub-signal; generating the high-frequency signal according to each sub-signal.

15. An apparatus for encoding an audio signal, characterized by The method comprises: The acquisition unit is used for acquiring a high-frequency residual signal and a low-frequency residual signal of a target audio frame; the high-frequency residual signal refers to a difference between a value of each sample of a high-frequency signal of an audio signal and a corresponding predicted value, and the low-frequency residual signal refers to a difference between a value of each sample of a low-frequency signal of the audio signal and a corresponding predicted value, and the corresponding predicted value of each sample is a product of a linear prediction coefficient and a low-frequency signal of a historical audio signal; The suppression unit is used for suppressing a frequency component in a target frequency range in the low-frequency residual signal to acquire an encoding suppression signal; a center frequency of the target frequency range is a pitch frequency of the low-frequency residual signal; The inversion unit is used for performing spectral inversion on the encoding suppression signal to acquire a spectral inversion signal; The processing unit is used for acquiring a high-frequency energy gain of the target audio signal according to the spectral inversion signal and the high-frequency residual signal; The generation unit is used for generating encoding data of the target audio frame according to the high-frequency energy gain.

16. An apparatus for decoding an audio signal, characterized by The acquisition unit is used for parsing encoding data of a target audio frame to acquire low-frequency encoding information; The decoding unit is used for decoding the low-frequency encoding information to acquire a low-frequency signal and a low-frequency residual signal; the low-frequency residual signal refers to a difference between a value of each sample of a low-frequency signal of an audio signal and a corresponding predicted value, and the corresponding predicted value of each sample is a product of a linear prediction coefficient and a low-frequency signal of a historical audio signal; The suppression unit is used for suppressing a frequency component in a target frequency range in the low-frequency residual signal to acquire a decoding suppression signal; a center frequency of the target frequency range is a pitch frequency of the low-frequency residual signal; The inversion unit is used for performing spectral inversion on the decoding suppression signal to acquire a low-frequency excitation signal; The reconstruction unit is used for performing signal reconstruction according to the low-frequency excitation signal to acquire a high-frequency signal; The generation unit is used for generating an audio signal of the target audio frame according to the low-frequency signal and the high-frequency signal. The memory is used for storing a computer program; and the processor is used for, when the computer program is executed, enabling the electronic device to implement the audio signal encoding method in any one of claims 1-7 or the audio signal decoding method in any one of claims 8-14.

17. An electronic device, comprising: The computer program is stored on the computer readable storage medium, and when the computer program is executed by a computing device, the computing device is enabled to implement the audio signal encoding method in any one of claims 1-7 or the audio signal decoding method in any one of claims 8-14. When the computer program product runs on a computer, the computer is enabled to implement the audio signal encoding method in any one of claims 1-7 or the audio signal decoding method in any one of claims 8-14.

18. A computer-readable storage medium, characterized in that, ​ 19. A computer program product, characterised in that, ​

Citation Information

Patent Citations

  • Audio signal processing method and device

    CN117995203A

  • Audio signal coding method and apparatus, and audio signal decoding method and apparatus

    WO2024094006A1