Method, device, system and storage medium for processing audio signal frame loss

By processing the sampling points before and after the audio signal frame drop position, it is continuously solved, and the poor playback effect caused by the audio signal frame drop is reduced, spectrum energy leakage and noise reduction are achieved, and the audio playback quality is improved.

CN114121027BActive Publication Date: 2025-09-05GEER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111675270.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-09-05
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The phenomenon of audio signal dropping frames during transmission leads to poor playback effect, especially when there are many frames dropped when the process is not processed, which seriously affects the audio playback quality.

Method used

By determining the frame drop position of the audio signal and processing the sample points before and after the frame drop position to make it continuous, the specific method includes calculating the sample values ​​of the sample points to be supplemented to change in a sinusoidal function and performing fill or gradient processing.

Benefits of technology

Reduces spectral energy leakage at the dropped frame location, reduces noise, and improves audio playback effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114121027B_ABST
    Figure CN114121027B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, system and computer-readable storage medium for processing frame loss of an audio signal. The method comprises: determining the frame loss position of the audio signal; processing the original sampling values ​​of a first preset number of sampling points before the frame loss position and a second preset number of sampling points after the frame loss position, so that the first sampling point before the frame loss position and the first sampling point after the frame loss position are continuous. During use, the present invention can reduce spectrum energy leakage and noise at the frame loss position, thereby improving audio playback effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of audio decoding technology, and in particular to a method, device, system and computer-readable storage medium for processing audio signal frame loss. Background Art

[0002] During the transmission of audio signals, the real-time transmission mode (i.e., ISO mode) commonly used in streaming media transmission is usually selected. Due to the poor reliability of this transmission mode, frame loss may occur during the transmission of the audio signal. As a result, when the audio signal is played, "popping" noise is easily generated at the frame loss point. If handled improperly, the frame loss will increase, seriously affecting the playback effect.

[0003] In view of this, how to provide a method, device, system and computer-readable storage medium for processing audio signal frame loss that can improve audio playback effect has become a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a method, device, system and computer-readable storage medium for processing audio signal frame loss, which can reduce spectral energy leakage at the frame loss location and reduce noise during use, thereby improving audio playback quality.

[0005] To solve the above technical problems, an embodiment of the present invention provides a method for processing audio signal frame loss, comprising:

[0006] Determine the frame loss position of the audio signal;

[0007] The original sampling values ​​of a first preset number of sampling points before the frame drop position and a second preset number of sampling points after the frame drop position are processed to make the first sampling point before the frame drop position and the first sampling point after the frame drop position continuous.

[0008] Optionally, the first preset number and the second preset number are both 1;

[0009] The process of processing the original sampling values ​​of the sampling points located a first preset number of times before the frame drop position and the sampling points located a second preset number of times after the frame drop position to make the first sampling point located before the frame drop position and the first sampling point located after the frame drop position continuous is as follows:

[0010] Obtaining an original sampling value of a first sampling point before the frame loss position and an original sampling value of a first sampling point after the frame loss position;

[0011] Calculating the sampling values ​​of each sampling point to be supplemented between the first sampling point before the frame drop position and the first sampling point after the frame drop position based on a preset length of data to be supplemented, a preset sampling interval, an original sampling value of the first sampling point before the frame drop position, and an original sampling value of the first sampling point after the frame drop position, so that the sampling value of each sampling point to be supplemented varies in a sinusoidal function;

[0012] The sampling points to be supplemented within the length of the data to be supplemented are filled with the sampling values ​​of the sampling points to be supplemented.

[0013] Optionally, the process of calculating the sampling values ​​of each sampling point to be supplemented between the first sampling point before the frame drop position and the first sampling point after the frame drop position based on a preset length of data to be supplemented, a preset sampling interval, the original sampling value of the first sampling point before the frame drop position, and the original sampling value of the first sampling point after the frame drop position, so that the sampling value of each sampling point to be supplemented changes in a sinusoidal function is:

[0014] The midpoint of the preset length of the data to be supplemented is used as the reference point, the original sampling value of the first sampling point before the frame loss position is used as the first amplitude, the original sampling value of the first sampling point after the frame loss position is used as the second amplitude, the distance between the first sampling point before the frame loss position and the reference point is used as T1 / 4, and the distance between the first sampling point after the frame loss position and the reference point is used as T2 / 4, where T1 is the first period and T2 is the second period;

[0015] Calculating, based on the first amplitude, T1 / 4, and a preset sampling interval, a sampling value of each to-be-supplemented sampling point between a first sampling point before the frame drop position and the reference point, so that each to-be-supplemented sampling point between the first sampling point before the frame drop position and the reference point changes in a first sinusoidal function and gradually decreases to 0;

[0016] The sampling value of each to-be-supplemented sampling point between the reference point and the first sampling point after the dropped frame position is calculated based on the second amplitude, T2 / 4, and a preset sampling interval, so that each to-be-supplemented sampling point between the reference point and the first sampling point after the dropped frame position changes according to a second sinusoidal function and gradually increases from 0.

[0017] Optionally, the first preset number is m, and the second preset number is n, and both m and m are positive integers not less than 2;

[0018] The process of processing a first preset number of sampling points before the frame drop position and a second preset number of sampling points after the frame drop position to make the first sampling point before the frame drop position and the first sampling point after the frame drop position continuous is as follows:

[0019] performing a gradient process on m sampling points before the frame drop position, so that the sampling values ​​from the Lm-th sampling point to the L1-th sampling point before the frame drop position gradually decay from a normal value to 0; wherein the distance between the L1-th sampling point and the frame drop position is the smallest, and the distance between the Lm-th sampling point and the frame drop position is the largest;

[0020] Gradual change processing is performed on n sampling points located after the frame drop position, so that the sampling values ​​from the R1th sampling point to the Rnth sampling point located after the frame drop position gradually increase from 0 to a normal value, wherein the distance between the R1th sampling point among the n sampling points and the frame drop position is the smallest, the distance between the Rnth sampling point and the frame drop position is the largest, and after the gradual change processing, the sampling value of the L1th sampling point and the sampling value of the R1th sampling point are both 0.

[0021] Optionally, the process of performing the gradual change processing on the m sampling points before the frame loss position so that the sampling values ​​from the Lm-th sampling point to the L1-th sampling point before the frame loss position gradually decay from a normal value to 0 is:

[0022] Preset m first gradient coefficients that gradually increase from 0 to 1, wherein the first first gradient coefficient is 0 and the mth first gradient coefficient is 1;

[0023] Multiply the 1st, 2nd ... mth first gradient coefficients by the original sampling values ​​of the L1th, L2 ... Lmth sampling points respectively to obtain new sampling values ​​corresponding to the L1th, L2 ... Lmth sampling points respectively;

[0024] Replace the corresponding original sampling values ​​with the new sampling values ​​of the L1th, L2th, ..., Lmth sampling points, so that the new sampling values ​​from the Lmth sampling point before the frame loss position to the L1th sampling point gradually decay from a normal value to 0;

[0025] Then, the process of performing the gradual change processing on the n sampling points located after the frame loss position so that the sampling values ​​from the R1-th sampling point to the Rn-th sampling point located after the frame loss position gradually increase from 0 to the normal value is:

[0026] Preset n second gradient coefficients that gradually increase from 0 to 1, wherein the first second gradient coefficient is 0 and the nth second gradient coefficient is 1;

[0027] Multiply the first, second, ... nth second gradient coefficients by the original sampling values ​​of the R1th, R2th, ... Rnth sampling points respectively to obtain new sampling values ​​corresponding to the R1th, R2th, ... Rnth sampling points respectively;

[0028] The new sampling values ​​of the R1th, R2 . . . Rnth sampling points are used to replace the corresponding original sampling values, so that the sampling values ​​from the R1th sampling point to the Rnth sampling point located after the frame loss position gradually increase from 0 to a normal value.

[0029] Optionally, both n and m are 51;

[0030] The m first gradient coefficients gradually increasing from 0 to 1 and the n second gradient coefficients gradually increasing from 0 to 1 are all: 0, 0.02, 0.04, 0.06, 0.08, ..., 0.94, 0.96, 0.98, 1.

[0031] An embodiment of the present invention further provides a device for processing audio signal frame loss, comprising:

[0032] A determination module, used to determine a frame loss position of the audio signal;

[0033] The processing module is used to process the original sampling values ​​of a first preset number of sampling points before the frame drop position and a second preset number of sampling points after the frame drop position, so as to make the first sampling point before the frame drop position and the first sampling point after the frame drop position continuous.

[0034] An embodiment of the present invention further provides a system for processing audio signal frame loss, comprising:

[0035] memory for storing computer programs;

[0036] A processor is configured to implement the steps of the method for processing audio signal frame loss as described above when executing the computer program.

[0037] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for processing audio signal frame loss as described above are implemented.

[0038] Embodiments of the present invention provide a method, apparatus, system, and computer-readable storage medium for processing frame loss in an audio signal. The method includes: determining a frame loss position of an audio signal; and processing original sample values ​​of a first preset number of sampling points before the frame loss position and a second preset number of sampling points after the frame loss position to ensure continuity between the first sampling point before the frame loss position and the first sampling point after the frame loss position.

[0039] It can be seen that in the present invention, when determining the frame loss position of the audio signal, the original sampling values ​​of the first preset number of sampling points before the frame loss position and the second preset number of sampling points after the frame loss position are processed, and after the processing, the first sampling point before the frame loss position and the first sampling point after the frame loss position are made continuous with each other. During use, the present invention can reduce the spectrum energy leakage at the frame loss position and weaken the noise, which is conducive to improving the audio playback effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the prior art and the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 A flowchart of a method for processing audio signal frame loss provided by an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of audio data with frame loss provided by an embodiment of the present invention;

[0043] Figure 3 For Figure 2 Spectrum image corresponding to the audio data in ;

[0044] Figure 4 A schematic diagram of audio data after frame loss processing provided by an embodiment of the present invention;

[0045] Figure 5 for Figure 4 Spectrum image corresponding to the audio data in ;

[0046] Figure 6 A schematic structural diagram of a device for processing audio signal frame loss provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] Embodiments of the present invention provide a method, device, system, and computer-readable storage medium for processing audio signal frame loss, which can reduce spectrum energy leakage at the frame loss location and reduce noise during use, thereby improving audio playback quality.

[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0049] Please refer to Figure 1 , Figure 1 A flowchart of a method for processing audio signal frame loss provided by an embodiment of the present invention. The method includes:

[0050] S110: Determine a frame loss position of the audio signal;

[0051] It should be noted that after receiving the audio signal, the frame loss position can be determined according to the specific situation of the audio signal. Specifically, during the audio signal transmission process, when audio signal frame loss occurs, an interruption will be generated. At this time, it can be known that the currently transmitted audio signal frame is lost. This method can also be used to determine the frame loss position of the audio signal.

[0052] S120: Processing original sampling values ​​of a first preset number of sampling points before the frame drop position and a second preset number of sampling points after the frame drop position to make the first sampling point before the frame drop position and the first sampling point after the frame drop position continuous.

[0053] It should be noted that after determining the frame drop position of the audio signal, a first preset number of sampling points located before the frame drop position and a second preset number of sampling points located after the frame drop position are obtained, wherein the sampling points before the frame drop position and after the frame drop position are both based on the sampling time, that is, the sampling points whose sampling time is less than the sampling time of the frame drop position are the sampling points before the frame drop position, and the sampling points whose sampling time is greater than the sampling time of the frame drop position are the sampling points after the frame drop position.

[0054] Specifically, since the sampling points before and after the frame loss position are discontinuous, a large spectrum energy leakage occurs at the frame loss position, resulting in jumps, which leads to the generation of large noise. In the embodiment of the present invention, the original sampling values ​​of the sampling points located at a first preset number before the frame loss position and the sampling points located at a second preset number after the frame loss position are processed. After the processing, the first sampling point before the frame loss position and the first sampling point after the frame loss position are made continuous with each other, thereby reducing the spectrum energy leakage at the frame loss position and avoiding jumps there, thereby effectively reducing the generation of noise at the frame loss position.

[0055] Furthermore, in the embodiment of the present invention, the first preset number and the second preset number are both 1;

[0056] Then, the process of processing the original sample values ​​of the first preset number of sampling points before the frame drop position and the second preset number of sampling points after the frame drop position in S120 to make the first sampling point before the frame drop position and the first sampling point after the frame drop position continuous may be specifically as follows:

[0057] Obtain the original sampling value of the first sampling point before the frame loss position and the original sampling value of the first sampling point after the frame loss position;

[0058] Calculating the sampling values ​​of each sampling point to be supplemented between the first sampling point before the frame drop position and the first sampling point after the frame drop position based on a preset length of data to be supplemented, a preset sampling interval, an original sampling value of the first sampling point before the frame drop position, and an original sampling value of the first sampling point after the frame drop position, so that the sampling value of each sampling point to be supplemented changes in a sinusoidal function;

[0059] The sampling points to be supplemented within the length of the data to be supplemented are filled with the sampling values ​​of each sampling point to be supplemented.

[0060] It should be noted that, in an embodiment of the present invention, the length of the data to be supplemented and the preset sampling interval can be pre-set, wherein the length of the data to be supplemented is also the length of the data that needs to be supplemented at the frame loss position, and the preset sampling interval can be specifically the same as the actual sampling interval of the audio data. In an embodiment of the present invention, the first sampling point before the frame loss position can be taken as L1, and the first sampling point after the frame loss position can be taken as R1, and then the original sampling value of L1 and the original sampling value of R1 are obtained, and then the sampling values ​​of each sampling point to be supplemented within the length of the data to be supplemented at the frame loss position are determined according to the original sampling value of L1 and the original sampling value of R1, the length of the data to be supplemented and the preset sampling interval, and the sampling values ​​of each sampling point to be supplemented satisfy the change according to the sine function from the L1 sampling point to the R1 sampling point.

[0061] Furthermore, the process of calculating the sampling values ​​of each sampling point to be supplemented between the first sampling point before the frame drop position and the first sampling point after the frame drop position based on the preset length of the data to be supplemented, the preset sampling interval, the original sampling value of the first sampling point before the frame drop position, and the original sampling value of the first sampling point after the frame drop position, so that the sampling value of each sampling point to be supplemented changes in a sinusoidal function, may specifically be:

[0062] The midpoint of the preset length of the data to be supplemented is used as the reference point, the original sampling value of the first sampling point before the frame loss position is used as the first amplitude, the original sampling value of the first sampling point after the frame loss position is used as the second amplitude, the distance between the first sampling point before the frame loss position and the reference point is used as T1 / 4, and the distance between the first sampling point after the frame loss position and the reference point is used as T2 / 4, where T1 is the first period and T2 is the second period;

[0063] Calculating, based on the first amplitude, T1 / 4, and a preset sampling interval, a sampling value of each to-be-supplemented sampling point between a first sampling point before the frame drop position and a reference point, so that each to-be-supplemented sampling point between the first sampling point before the frame drop position and the reference point changes in a first sinusoidal function and gradually decreases to 0;

[0064] The sampling value of each to-be-supplemented sampling point between the reference point and the first sampling point after the frame drop position is calculated based on the second amplitude, T2 / 4, and the preset sampling interval, so that each to-be-supplemented sampling point between the reference point and the first sampling point after the frame drop position changes according to a second sinusoidal function and gradually increases from 0.

[0065] Specifically, in actual applications, the data area to be supplemented at the frame loss position can be determined based on the L1 sampling point, the length of the data to be supplemented, and the R1 sampling point. Specifically, the starting end of the data length to be supplemented is coincided with the L1 sampling point, and the end of the data length to be supplemented is coincided with the R1 sampling point. The area covered by the data length to be supplemented is the data area to be supplemented. Then, the midpoint of the data length to be supplemented is used as the reference point, and the amplitude at the reference point can be set to 0. For the half section from the L1 sampling point to the reference point, the original sampling value of the L1 sampling point can be used as the first amplitude, and the distance between the L1 sampling point and the reference point can be used as a quarter period, so as to determine the first sinusoidal function between the L1 sampling point and the reference point. According to the preset sampling interval, the sampling value of each sampling point to be supplemented between the L1 sampling point and the reference point is further calculated. From L1 to the reference point, the sampling value of each sampling point to be supplemented gradually decreases to 0. For the half section from the reference point to the R1 sampling point, the original sampling value of the R1 sampling point can be used as the second amplitude, and the distance between the reference point and the R1 sampling point is used as a quarter period, so as to determine the second sinusoidal function between the reference point and the R1 sampling point. According to the preset sampling interval, the sampling value of each sampling point to be supplemented between the reference point and the R1 sampling point is further calculated. From the reference point to R1, the sampling value of each sampling point to be supplemented gradually increases to the normal value of the R1 sampling point, thereby obtaining the sampling values ​​of each sampling point to be supplemented within the entire length of the data to be supplemented. Of course, in practical applications, any one of the original sampling values ​​of the L1 sampling point and the R1 sampling point can be used as the amplitude. According to the preset length of the data to be supplemented, the preset sampling interval and the amplitude, a reference point in the area to be supplemented between L1 and R1 is determined. The reference point is a point with an amplitude of 0. In addition, a sine function passing through the L1 sampling point, the reference point and the R1 sampling point, as well as the sampling values ​​of each sampling point to be supplemented in the area to be supplemented are further determined, so that the L1 sampling point and the R1 sampling point are continuous with each other.

[0066] Furthermore, in the embodiment of the present invention, the first preset number is m, and the second preset number is n, and m and m are both positive integers not less than 2;

[0067] Then, the process of processing a first preset number of sampling points before the frame drop position and a second preset number of sampling points after the frame drop position in S120 to make the first sampling point before the frame drop position and the first sampling point after the frame drop position continuous may be specifically as follows:

[0068] Performing a gradient process on the m sampling points before the frame loss position, so that the sampling values ​​from the Lm-th sampling point to the L1-th sampling point before the frame loss position gradually decay from a normal value to 0; wherein, the distance between the L1-th sampling point and the frame loss position is the smallest, and the distance between the Lm-th sampling point and the frame loss position is the largest;

[0069] Gradual change processing is performed on n sampling points located after the frame drop position, so that the sampling values ​​from the R1th sampling point to the Rnth sampling point located after the frame drop position gradually increase from 0 to a normal value, wherein the distance between the R1th sampling point and the frame drop position is the smallest, the distance between the Rnth sampling point and the frame drop position is the largest, and after the gradual change processing, the sampling values ​​of the L1th sampling point and the R1th sampling point are both 0.

[0070] It should be noted that, in the embodiment of the present invention, the existing data on both sides of the frame loss position can also be directly processed to make the two sampling points on both sides of the frame loss position continuous. Specifically, the sampling values ​​of the m sampling points before the frame loss position, from the Lm-th sampling point with the largest distance from the frame loss position to the L1-th sampling point with the smallest distance from the frame loss position, can be gradually attenuated from a normal value to 0, wherein the normal value is the original sampling value of the Lm-th sampling point, that is, the original sampling value of the Lm-th sampling point remains unchanged, and the sampling values ​​of each other sampling point are attenuated to a certain extent on the basis of the original sampling value, until the sampling value of the L1-th sampling point is attenuated to 0 on the basis of the original sampling value; correspondingly, in the embodiment of the present invention, the sampling values ​​of the n sampling points after the frame loss position, from the R1-th sampling point with the smallest distance from the frame loss position to the Rn-th sampling point with the largest distance from the frame loss position, gradually increase from 0 to a normal value, wherein the normal value is the Rn-th sampling point. That is, the R1th sampling point decays to 0 on the basis of the original sampling value, the R2th sampling point decays by a certain proportion on the basis of the original sampling point to a value slightly larger than 0, the R3th sampling point decays by a certain proportion on the basis of the original sampling value to a value slightly larger than the new sampling value of the R2th sampling point, until it increases to the Rnth sampling point, the sampling value of the Rnth sampling point remains unchanged, so that the processed R1 to Rn have a trend of gradually increasing from 0 to a normal value, and the new sampling values ​​of the processed L1 to Lm sampling points are used to replace the corresponding original sampling values, and the new sampling values ​​of the processed R1 to Rn sampling points are used to replace the corresponding original sampling values, so that the L1 sampling points and R1 sampling points on both sides of the frame loss position are continuous with each other.

[0071] Furthermore, the above-mentioned process of performing the gradual change processing on the m sampling points before the frame loss position so that the sampling values ​​from the Lm-th sampling point to the L1-th sampling point before the frame loss position gradually decay from the normal value to 0 can be specifically as follows:

[0072] Preset m first gradient coefficients that gradually increase from 0 to 1, wherein the first first gradient coefficient is 0 and the mth first gradient coefficient is 1;

[0073] Multiply the 1st, 2nd ... mth first gradient coefficients by the original sampling values ​​of the L1th, L2 ... Lmth sampling points respectively to obtain new sampling values ​​corresponding to the L1th, L2 ... Lmth sampling points respectively;

[0074] Replace the corresponding original sampling values ​​with the new sampling values ​​of the L1th, L2th, ..., Lmth sampling points, so that the new sampling values ​​from the Lmth sampling point before the frame loss position to the L1th sampling point gradually decay from the normal value to 0;

[0075] It should be noted that, for example, if m is 51, 51 sampling points are obtained before the frame drop position, that is, a total of 51 sampling points are obtained from the first data point before the frame drop position, and then 51 first gradient coefficients are set that gradually increase from 0 to 1. For example, the 1st to mth gradient coefficients can be 0, 0.02, 0.04, 0.06, 0.08, ..., 0.94, 0.96, 0.98, and 1, respectively. Then, the original sampling values ​​of the L1th, L2th, ..., Lmth sampling points are multiplied by 0, 0.02, 0.04, 0.06, 0.08, ..., 0.94, 0.96, 0.98, and 1, respectively, to obtain corresponding new sampling values. The new sampling values ​​from the Lmth sampling point to the L1th sampling point gradually decay from the normal value to 0.

[0076] Then, the above process of performing the gradual change processing on the n sampling points after the frame loss position so that the sampling values ​​from the R1th sampling point to the Rnth sampling point after the frame loss position gradually increase from 0 to the normal value can be specifically as follows:

[0077] Preset n second gradient coefficients that gradually increase from 0 to 1, wherein the first second gradient coefficient is 0 and the nth second gradient coefficient is 1;

[0078] Multiply the first, second, ... nth second gradient coefficients by the original sampling values ​​of the R1th, R2th, ... Rnth sampling points respectively to obtain new sampling values ​​corresponding to the R1th, R2th, ... Rnth sampling points respectively;

[0079] The new sampling values ​​of the R1, R2, ..., Rn sampling points are used to replace the corresponding original sampling values, so that the sampling values ​​from the R1 sampling point to the Rn sampling point located after the frame loss position gradually increase from 0 to the normal value.

[0080] It should be noted that, for example, n is also 51, that is, 51 sampling points are obtained after the frame drop position, that is, a total of 51 sampling points are obtained starting from the first data point after the frame drop position. Among them, 51 second gradient coefficients gradually increasing from 0 to 1 are preset. For example, the 1st to nth gradient coefficients can be 0, 0.02, 0.04, 0.06, 0.08, ..., 0.94, 0.96, 0.98, and 1, respectively. Then, the original sampling values ​​of the R1th, R2th, ..., Rnth sampling points are multiplied by 0, 0.02, 0.04, 0.06, 0.08, ..., 0.94, 0.96, 0.98, and 1, respectively, to obtain corresponding new sampling values. The new sampling values ​​from the R1th sampling point to the Rnth sampling point gradually increase from 0 to the normal value.

[0081] Of course, in practical applications, each first gradient coefficient and each second gradient coefficient, as well as the difference between two adjacent gradient coefficients, can be determined according to actual needs. The embodiment of the present invention does not make any specific limitation on this, as long as the purpose of the present invention can be achieved. It should also be noted that, please refer to Figures 2 to 5 , where there is audio data with lost frame data such as Figure 2 Shown with Figure 2 The spectrum image corresponding to the audio data in is as follows Figure 3 As shown, the audio data processed by the method provided in the embodiment of the present invention is as follows Figure 4 As shown, Figure 4 The spectrum image corresponding to the audio data in is as follows Figure 5 As shown in Figure 1, the spectrum leakage has been detected and the spectrum color of the spectrum leakage has been weakened. Figures 2 to 5 The results were verified in a swept frequency audio file, where the frequency is relatively simple and the phenomenon is more obvious. If used in a complex audio environment, the improvement effect of this solution will be more effective, making it possible for human ears to hear almost no noise.

[0082] It can be seen that in the present invention, when determining the frame loss position of the audio signal, the original sampling values ​​of the first preset number of sampling points before the frame loss position and the second preset number of sampling points after the frame loss position are processed, and after the processing, the first sampling point before the frame loss position and the first sampling point after the frame loss position are made continuous with each other. During use, the present invention can reduce the spectrum energy leakage at the frame loss position and weaken the noise, which is conducive to improving the audio playback effect.

[0083] Based on the above embodiment, the embodiment of the present invention further provides a device for processing audio signal frame loss. Figure 6 , the device comprises:

[0084] A determination module 21 is used to determine a frame loss position of the audio signal;

[0085] The processing module 22 is used to process the original sampling values ​​of a first preset number of sampling points before the frame drop position and a second preset number of sampling points after the frame drop position, so as to make the first sampling point before the frame drop position and the first sampling point after the frame drop position continuous.

[0086] Furthermore, the first preset number and the second preset number are both 1;

[0087] The processing module 22 includes:

[0088] an acquiring unit, configured to acquire an original sampling value of a first sampling point before a frame loss position and an original sampling value of a first sampling point after a frame loss position;

[0089] a calculation unit, configured to calculate the sampling values ​​of each sampling point to be supplemented between the first sampling point before the frame drop position and the first sampling point after the frame drop position based on a preset length of data to be supplemented, a preset sampling interval, an original sampling value of the first sampling point before the frame drop position, and an original sampling value of the first sampling point after the frame drop position, so that the sampling value of each sampling point to be supplemented varies in a sinusoidal function;

[0090] The filling unit is used to fill the sampling points to be supplemented within the length of the data to be supplemented with the sampling values ​​of each sampling point to be supplemented.

[0091] Furthermore, the first preset number is m, and the second preset number is n, and m and m are both positive integers not less than 2;

[0092] The processing module 22 includes:

[0093] a first processing unit, configured to perform a gradient process on m sampling points located before a frame drop position, so that sampling values ​​from an Lm-th sampling point to an L1-th sampling point located before the frame drop position gradually decay from a normal value to 0; wherein the distance between the L1-th sampling point and the frame drop position is the smallest, and the distance between the Lm-th sampling point and the frame drop position is the largest;

[0094] The second processing unit is configured to perform a gradient process on n sampling points located after the frame drop position, so that the sampling values ​​from the R1th sampling point to the Rnth sampling point located after the frame drop position gradually increase from 0 to a normal value, wherein the distance between the R1th sampling point and the frame drop position is the smallest, the distance between the Rnth sampling point and the frame drop position is the largest, and after the gradient process, the sampling values ​​of the L1th sampling point and the R1th sampling point are both 0.

[0095] It should be noted that the device for processing audio signal frame loss provided in the embodiment of the present invention has the same beneficial effects as the method for processing audio signal frame loss provided in the above embodiment, and for the specific reception of the method for processing audio signal frame loss involved in the embodiment of the present invention, please refer to the above embodiment, and the present invention will not be repeated here.

[0096] Based on the above embodiment, an embodiment of the present invention further provides a system for processing audio signal frame loss, the system comprising:

[0097] memory for storing computer programs;

[0098] A processor is configured to implement the steps of the above-mentioned method for processing audio signal frame loss when executing a computer program.

[0099] For example, the processor in an embodiment of the present invention can be specifically used to determine the frame loss position of the audio signal; process the original sampling values ​​of the first preset number of sampling points before the frame loss position and the second preset number of sampling points after the frame loss position to make the first sampling point before the frame loss position and the first sampling point after the frame loss position continuous.

[0100] Based on the above embodiment, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method for processing audio signal frame loss are implemented as described above.

[0101] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., which can store program codes.

[0102] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0103] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

[0104] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing audio signal frame loss, characterized in that: include: Determine the frame loss position of the audio signal; Processing original sampling values ​​of a first preset number of sampling points before the frame drop position and a second preset number of sampling points after the frame drop position to make the first sampling point before the frame drop position and the first sampling point after the frame drop position continuous; wherein: The first preset number and the second preset number are both 1; and the process of processing the original sampling values ​​of the first preset number of sampling points before the frame drop position and the second preset number of sampling points after the frame drop position to make the first sampling point before the frame drop position and the first sampling point after the frame drop position continuous is: Obtaining an original sampling value of a first sampling point before the frame loss position and an original sampling value of a first sampling point after the frame loss position; The midpoint of the preset length of the data to be supplemented is used as the reference point, the original sampling value of the first sampling point before the frame loss position is used as the first amplitude, the original sampling value of the first sampling point after the frame loss position is used as the second amplitude, the distance between the first sampling point before the frame loss position and the reference point is used as T1 / 4, and the distance between the first sampling point after the frame loss position and the reference point is used as T2 / 4, where T1 is the first period and T2 is the second period; Calculating, based on the first amplitude, T1 / 4, and a preset sampling interval, a sampling value of each to-be-supplemented sampling point between a first sampling point before the frame drop position and the reference point, so that each to-be-supplemented sampling point between the first sampling point before the frame drop position and the reference point changes in a first sinusoidal function and gradually decreases to 0; calculating, based on the second amplitude, T2 / 4, and a preset sampling interval, a sampling value of each to-be-supplemented sampling point between the reference point and the first sampling point after the frame drop position, so that each to-be-supplemented sampling point between the reference point and the first sampling point after the frame drop position varies according to a second sinusoidal function and gradually increases from 0; the preset sampling interval being the same as an actual sampling interval of the audio data; The sampling points to be supplemented within the length of the data to be supplemented are filled with the sampling values ​​of the sampling points to be supplemented.

2. A device for processing audio signal frame loss, characterized in that: include: A determination module, used to determine a frame loss position of the audio signal; a processing module, configured to process original sampling values ​​of a first preset number of sampling points before the frame drop position and a second preset number of sampling points after the frame drop position, so as to make the first sampling point before the frame drop position and the first sampling point after the frame drop position continuous; wherein: The first preset number and the second preset number are both 1; the processing module is specifically used to: obtain the original sampling value of the first sampling point before the frame loss position and the original sampling value of the first sampling point after the frame loss position; use the midpoint of the preset length of the data to be supplemented as the reference point, use the original sampling value of the first sampling point before the frame loss position as the first amplitude, use the original sampling value of the first sampling point after the frame loss position as the second amplitude, use the distance between the first sampling point before the frame loss position and the reference point as T1 / 4, and use the distance between the first sampling point after the frame loss position and the reference point as T2 / 4, where T1 is the first period and T2 is the second period; according to the The sampling value of each to-be-supplemented sampling point between the first sampling point before the frame drop position and the reference point is calculated based on the first amplitude, the T1 / 4, and a preset sampling interval, so that each to-be-supplemented sampling point between the first sampling point before the frame drop position and the reference point changes in a first sinusoidal function and gradually decreases to 0; the sampling value of each to-be-supplemented sampling point between the reference point and the first sampling point after the frame drop position is calculated based on the second amplitude, the T2 / 4, and the preset sampling interval, so that each to-be-supplemented sampling point between the reference point and the first sampling point after the frame drop position changes in a second sinusoidal function and gradually increases from 0; the preset sampling interval is the same as the actual sampling interval of the audio data; The sampling points to be supplemented within the length of the data to be supplemented are filled with the sampling values ​​of the sampling points to be supplemented.

3. A system for processing audio signal frame loss, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the method for processing audio signal frame loss as claimed in claim 1 when executing the computer program.

4. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for processing audio signal frame loss according to claim 1.

Citation Information

Patent Citations

  • Packet loss recovery method and device of audio data packet, electronic equipment and storage medium

    CN113838477A

  • Enhanced audio frame loss concealment

    US20150371641A1