Anti-interference method and device
By adjusting the LPC filter coefficients in the communication system and using the zero-pole analysis method to judge and adjust the stability of the all-pole filter, the instability problem of the LPC filter caused by interference in the business channel is solved and the normal voice frame is achieved. Recovery and user experience improvements.
Patent Information
- Application Number
- CN202010952800.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-11
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-09-11
AI Technical Summary
In modern communication systems, LPC filter coefficients are susceptible to interference during service channel transmission, leading to filter instability, which in turn causes abnormal voice frame recovery and affects user experience.
By receiving the encoded data of the speech frame, an all-pole filter is generated, and the zero-pole analysis method is used to determine the stability of the filter. If it is unstable, the LPC filter coefficient is adjusted until the stability conditions are met or the preset number of adjustments is reached, and the target is determined. LPC filter coefficients to ensure filter stability.
Effectively restore the LPC filter coefficients to ensure normal recovery of voice frames, improve user experience, and avoid the problem of abnormally harsh voice frames.
Smart Images

Figure CN114171035B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to an anti-interference method and device. Background Art
[0002] In modern communication systems, speech coding and decoding technologies with high coding efficiency, high speech restoration and strong anti-interference performance are required. Linear predictive coding (LPC) is a speech coding and decoding technology that is widely used in various vocoder standards.
[0003] In modern communication systems, the sending device and the receiving device can be installed with a vocoder. The sending device uses the encoding module of the vocoder to encode the current voice frame to obtain encoded data, and sends the encoded data to the receiving device via the service channel. The receiving device uses the decoding module of the vocoder to perform a decoding operation on the encoded data to obtain the decoded current voice frame. Summary of the invention
[0004] During the research process, the applicant found that:
[0005] When the sending device encodes the current voice frame, the LPC filter coefficients are generally calculated by Durbin (Levinson-Durbin algorithm), and all poles of the LPC filter coefficient synthesis filter are within the unit circle, so that the filter synthesized based on the LPC filter coefficients in the voice coder decoding module has a better filtering effect.
[0006] During the encoding process, the LPC filter coefficients are converted into line spectral pair parameters (Linear spectral pair, LSP), and the encoding process also generates other parameters, and then constructs the encoded data including the LSP coefficients and other parameters.
[0007] Due to interference during the transmission of the service channel, after the encoded data is transmitted through the service channel to the receiving device, the LSP coefficient may be affected by the service channel and cause bit errors, resulting in bit errors in the LPC filter coefficients converted based on the LSP coefficients. Further, some poles in the filter synthesized based on the LPC filter coefficients may exceed the unit circle, causing the filter to be unstable.
[0008] When the filter is unstable, the excitation signal passing through the filter will diverge, which will eventually cause abnormal harshness in the restored voice frame, that is, the voice frame cannot be restored normally, resulting in a poor user experience.
[0009] In view of this, the present application provides an anti-interference method and device, which can adjust the LPC filter coefficients to ensure the stability of the filter.
[0010] In order to achieve the above object, the present invention provides the following technical features:
[0011] An anti-interference method, comprising:
[0012] Receiving encoded data of a current speech frame and obtaining current LPC filter coefficients based on the encoded data;
[0013] generating an all-pole filter based on the current LPC filter coefficients;
[0014] If the all-pole filter is stable, determining the current LPC filter coefficients as target LPC filter coefficients;
[0015] If the all-pole filter is unstable and the number of times the current LPC filter coefficients have been adjusted does not reach a preset number, the current LPC filter coefficients are adjusted, and the step of generating an all-pole filter based on the current LPC filter coefficients is entered;
[0016] If the all-pole filter is unstable and the number of times the current LPC filter coefficient has been adjusted reaches a preset number, the LPC filter coefficient corresponding to the nearest valid speech frame is determined as the target LPC filter coefficient.
[0017] Wherein, adjusting the LPC filter coefficient comprises:
[0018] Determine, among the plurality of speech frames after the decoding operation is performed, a reference LPC filter coefficient corresponding to the nearest valid speech frame;
[0019] Adjusting a first weight corresponding to the reference LPC filter coefficient and a second weight corresponding to the current LPC filter coefficient;
[0020] Determine a sum of a product of the reference LPC filter coefficient and the first weight and a product of the current LPC filter coefficient and the second weight as an adjusted current LPC filter coefficient;
[0021] The sum of the first weight and the second weight is 1, and the preset number is greater than 1.
[0022] Wherein, adjusting the LPC filter coefficient comprises:
[0023] Determining a plurality of reference LPC filter coefficients corresponding to a plurality of valid speech frames among a plurality of speech frames after performing the decoding operation;
[0024] adjusting weights of the plurality of reference LPC filter coefficients and the current LPC filter coefficients;
[0025] Determining a sum of the products of the multiple reference LPC filter coefficients and the current LPC filter coefficient and their respective weights as the adjusted current LPC filter coefficient;
[0026] The sum of the weights is 1, and the preset number is greater than 1.
[0027] Wherein, adjusting the LPC filter coefficient comprises:
[0028] Determining a plurality of reference LPC filter coefficients corresponding to the plurality of speech frames after the decoding operation is performed;
[0029] Determine an average value of the plurality of reference LPC filter coefficients and the current LPC filter coefficient as an adjusted current LPC filter coefficient;
[0030] Among them, the preset number of times is 1.
[0031] Wherein, after determining the target LPC filter coefficient, the method further includes:
[0032] Determine the LPC filter coefficients of each subframe in the current speech frame respectively by using the target LPC filter coefficients and the LPC filter coefficients of the previous speech frame;
[0033] Based on the LPC filter coefficients of each subframe, generate an all-pole filter for each subframe respectively;
[0034] Based on the all-pole filter of each subframe, the synthesized speech signal of each subframe is obtained;
[0035] According to the synthesized speech signals of each subframe, a decoded current speech frame is obtained.
[0036] Wherein, after obtaining the decoded current voice frame according to the synthesized voice signals of each subframe, the method further includes:
[0037] If the current speech frame is determined to be a valid speech frame according to the speech activity detection technology and the speech features extracted from the current speech frame do not conform to the human voice features, or if the current speech frame is determined to be an invalid speech frame according to the speech activity detection technology, the current speech frame is filled with preset noise data and the current speech frame is output.
[0038] Wherein, adjusting the current LPC filter coefficients includes: adjusting the current LSP coefficients, and converting the current LSP coefficients into current LPC filter coefficients;
[0039] The determining the LPC filter coefficient corresponding to the nearest valid speech frame as the target LPC filter coefficient includes: determining the LSP coefficient corresponding to the nearest valid speech frame as the target LSP coefficient, and converting the target LSP coefficient into the target LPC filter coefficient.
[0040] Wherein, adjusting the current LSP coefficient includes:
[0041] Determine a reference LSP coefficient corresponding to a most adjacent valid speech frame among the plurality of speech frames after the decoding operation is performed;
[0042] Adjusting a first weight corresponding to the reference LSP coefficient and a second weight corresponding to the current LSP coefficient;
[0043] Determine the sum of the product of the reference LSP coefficient and the first weight and the product of the current LSP coefficient and the second weight as the adjusted current LSP coefficient;
[0044] The sum of the first weight and the second weight is 1, and the preset number is greater than 1.
[0045] Wherein, adjusting the current LSP coefficient includes:
[0046] Determining a plurality of reference LSP coefficients corresponding to a plurality of valid speech frames in a plurality of speech frames after performing the decoding operation;
[0047] adjusting weights of the plurality of reference LSP coefficients and the current LSP coefficient;
[0048] Determine the sum of the multiple reference LSP coefficients and the product of the current LSP coefficient and the respective weights as the adjusted current LSP coefficient;
[0049] The sum of the weights is 1, and the preset number is greater than 1.
[0050] Wherein, adjusting the current LSP coefficient includes:
[0051] Determining a plurality of reference LSP coefficients corresponding to the plurality of speech frames one by one in the plurality of speech frames after the decoding operation is performed;
[0052] Determine an average value of the multiple reference LSP coefficients and the current LSP coefficient as the adjusted current LSP coefficient;
[0053] Among them, the preset number of times is 1.
[0054] A device includes a memory and a processor, wherein the processor implements the anti-interference method when executing program instructions stored in the memory.
[0055] A computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the steps of the anti-interference method are implemented. Through the above technical means, the following beneficial effects can be achieved:
[0056] The present invention provides an anti-interference method, which can receive the coded data of the current speech frame and obtain the current LPC filter coefficient based on the coded data, generate an all-pole filter based on the current LPC filter coefficient; and then judge the stability of the all-pole filter by using the zero-pole analysis method.
[0057] If the full-pole filter is unstable, the current LPC filter coefficients will be adjusted, a full-pole filter will be generated based on the current LPC filter coefficients, and the stability of the full-pole filter will be judged by using the zero-pole analysis method. The adjustment operation and the judgment operation will be executed repeatedly until the adjustment end condition is triggered to exit the loop.
[0058] When the all-pole filter is stable in the adjustment termination triggering condition, it means that the current LPC filter coefficients can be restored through the adjustment operation, and thus the current LPC filter coefficients can be determined as the target LPC filter coefficients.
[0059] When the adjustment times reach the preset times in the trigger adjustment end condition, it means that the current LPC filter coefficient cannot be restored through the adjustment operation, so the LPC filter coefficient corresponding to the nearest valid speech frame can be used as the target LPC filter coefficient. Here, the valid speech frame is a speech frame containing human voice features.
[0060] Through this solution, the LPC filter coefficients can be adjusted to ensure the stability of the filter so that the voice frames can be restored normally later, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0062] Figure 1 A schematic diagram of the structure of an anti-interference system disclosed in an embodiment of the present application;
[0063] Figure 2 A flowchart of an anti-interference method embodiment 1 disclosed in an embodiment of the present application;
[0064] Figure 3This is a flow chart of a second embodiment of an anti-interference method disclosed in an embodiment of the present application;
[0065] Figure 4 This is a flow chart of a third embodiment of an anti-interference method disclosed in an embodiment of the present application;
[0066] Figure 5 This is a flow chart of a fourth embodiment of an anti-interference method disclosed in an embodiment of the present application;
[0067] Figure 6 A schematic diagram of the structure of an anti-interference device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0069] See also Figure 1 The present invention provides an anti-interference system, including: a sending device 100 and a receiving device 200. The sending device 100 and the receiving device 200 are equipped with a vocoder, and the vocoder integrates a coding module and a decoding module.
[0070] When the sending device 100 needs to send the current voice frame, it can use the encoding module in the vocoder to perform an encoding operation on the current voice frame to generate encoded data, and send the encoded data to the receiving device 200 through the service channel.
[0071] The receiving device 200 uses the decoding module in the vocoder to perform a decoding operation on the encoded data, adjusts the LPC filter coefficients in the decoding operation, and obtains the target LPC filter coefficients. The decoding operation is continued based on the target LPC filter coefficients to obtain the decoded current speech frame.
[0072] See also Figure 2 The present invention provides an anti-interference method embodiment 1, which is applied to a decoding module of a vocoder in a receiving device and may include the following steps:
[0073] Step S201: receiving the encoded data of the current speech frame and obtaining the current LPC filter coefficients based on the encoded data.
[0074] After receiving the encoded data of the current speech frame, the decoding module of the vocoder performs a demultiplexing operation on the encoded data to obtain a demultiplexed data set; wherein the demultiplexed data set includes line-spectrum pairs and line-spectrum pair index parameters, as well as other parameters.
[0075] LSP coefficients are extracted from the line spectrum pair using line spectrum pair index parameters, and a polynomial conversion operation is performed on the LSP coefficients to obtain the current LPC filter coefficients.
[0076] In the encoding operation, the LPC filter coefficients are generally calculated by Durbin (Levinson-Durbin algorithm) and converted into LSP coefficients. In the decoding operation, the inverse operation is performed to achieve the purpose of converting the LSP coefficients into LPC filter coefficients.
[0077] Step S202: Generate an all-pole filter based on the current LPC filter coefficients.
[0078] Generate LPC polynomial from current LPC filter coefficients The all-pole filter can be expressed as
[0079] in, p is the order of LPC linear prediction, a k is the coefficient predicted by the LPC filter, and z is the transformation variable of the z-domain transformation.
[0080] If the LSP coefficients are not interfered with in the service channel, the current LPC filter coefficients converted from the LSP coefficients are not interfered with, and the full-pole filter generated based on the current LPC filter coefficients is stable, that is, all poles of the full-pole filter are within the unit circle.
[0081] On the contrary, if the LSP coefficient is interfered in the service channel, the current LPC filter coefficient converted from the LSP coefficient is interfered, and the full-pole filter generated based on the current LPC filter coefficient is unstable, that is, some poles of the full-pole filter are not within the unit circle.
[0082] Step S203: using the zero-pole analysis method to determine the stability of the all-pole filter.
[0083] The pole values of all poles of the all-pole filter are determined in the Z domain using the zero-pole analysis method. If all pole values are within the unit circle, the all-pole filter is stable. If there are pole values outside the unit circle, the all-pole filter is unstable.
[0084] If the all-pole filter is stable, steps S204 to S206 are directly skipped, the current LPC filter coefficients are directly used as target LPC filter coefficients, and the decoding operation is continued based on the target LPC filter coefficients to obtain the decoded current speech frame.
[0085] Step S204: If the all-pole filter is unstable and the adjustment end condition is not triggered, the current LPC filter coefficients are adjusted and the process proceeds to step S202.
[0086] This embodiment provides three implementation methods for adjusting the current LPC filter coefficients:
[0087] The first implementation method: interpolation method in the case of a valid speech frame.
[0088] S11: Determine a reference LPC filter coefficient corresponding to the nearest valid speech frame among the multiple speech frames after the decoding operation is performed.
[0089] It can be understood that multiple speech frames have been decoded before the current speech frame, some of which are noise, i.e. invalid speech frames, and some of which are human voices, i.e. valid speech frames. The LPC filter coefficients corresponding to the nearest valid speech frames can be determined from the multiple speech frames after the decoding operation is performed as reference LPC filter coefficients.
[0090] The purpose of selecting the nearest valid speech frame is that the speech frame nearest to the current speech frame has a greater correlation or similarity with the current speech frame, so the nearest speech frame is used.
[0091] When restoring the current speech frame, if the speech frame is a noise speech frame, it means there is no voice. In this case, there is no reference. If the speech frame is a human voice speech frame and becomes a noise speech frame after being greatly disturbed, the speech frame cannot be used. Therefore, a valid speech frame is selected from multiple speech frames.
[0092] Therefore, through the above two points, the LPC filter coefficients corresponding to the most adjacent valid speech frames can be selected from the multiple speech frames after the decoding operation is performed as the reference LPC filter coefficients.
[0093] S12: Adjusting the first weight corresponding to the reference LPC filter coefficient and the second weight corresponding to the current LPC filter coefficient.
[0094] Initially, the first weight and the second weight are respectively 0. During the adjustment process, the first weight corresponding to the reference LPC filter coefficient is continuously increased, and the second weight corresponding to the current LPC filter coefficient is continuously decreased.
[0095] Because the all-pole filter synthesized with reference to the LPC filter coefficients is stable, the first weight corresponding to the reference LPC filter coefficients is continuously increased and the second weight corresponding to the current LPC filter coefficients is continuously decreased during the weight adjustment process.
[0096] This embodiment provides a specific method for adjusting the first weight a1 and the second weight a2:
[0097] a1=a1+(1 / 2) n ;
[0098] a2=1-a1;
[0099] The sum of the first weight and the second weight is 1.
[0100] S13: Determine the sum of the products of the reference LPC filter coefficient and the first weight, and the current LPC filter coefficient and the second weight as the adjusted current LPC filter coefficient.
[0101] The adjusted current LPC filter coefficient is represented by New_LPC, the reference LPC filter coefficient is represented by Last_LPC, the current LPC filter coefficient is represented by Current_LPC, the first weight is represented by a1, and the second weight is represented by a2. The calculation formula can be expressed as:
[0102] New_LPC=Last_LPC*a1+Current_LPC*a2.
[0103] In a first implementation manner, the current LPC filter coefficient may be adjusted multiple times, with the preset number of times being greater than one.
[0104] The second implementation method: interpolation method in the case of multiple valid speech frames.
[0105] Similar to the first implementation, this implementation uses multiple valid speech frames.
[0106] S21: Determine, in a plurality of speech frames after the decoding operation is performed, a plurality of reference LPC filter coefficients corresponding to a plurality of valid speech frames in order from near to far.
[0107] S22: Adjust the weights of the multiple reference LPC filter coefficients and the current LPC filter coefficients.
[0108] Initially, the weights of the reference LPC filter coefficients and the current LPC filter coefficients are all zero.
[0109] Because the all-pole filter synthesized from multiple reference LPC filter coefficients is stable, the weights corresponding to the multiple reference LPC filter coefficients are continuously increased and the weights corresponding to the current LPC filter coefficients are continuously reduced during the weight adjustment process.
[0110] Since the closer to the current speech frame, the better it can represent the current speech frame, the closer the reference LPC filter coefficient is to the current speech frame, the greater its weight is, and the farther the reference LPC filter coefficient is from the current speech frame, the smaller its weight is.
[0111] This embodiment provides a specific method for adjusting multiple weights. Taking three reference LPC filter coefficients and current LPC filter coefficients, a total of four weights, as an example, initially, a1=0.25, a2=0.25, a3=0.25, and a4=0.25.
[0112] a1=a1+(1 / 4) n ;
[0113] a2=a2+(1 / 8) n ;
[0114] a3=a3+(1 / 16) n ;
[0115] a4=1-a1-a2-a3;
[0116] The sum of the four weights is 1.
[0117] S23: Determine the sum of the products of the multiple reference LPC filter coefficients and the current LPC filter coefficient with their respective weights as the adjusted current LPC filter coefficient.
[0118] The adjusted current LPC filter coefficient is represented by New_LPC, the reference LPC filter coefficient is represented by Last_LPC1, Last_LPC2 and Last_LPC3, the current LPC filter coefficient is represented by Current_LPC, and the weights are represented by a1, a2, a3 and a4 respectively. The calculation formula can be expressed as:
[0119] New_LPC=Last_LPC1*a1+Last_LPC2*a2+Last_LPC3*a3+Current_LPC*a4
[0120] In a second implementation manner, the current LPC filter coefficient may be adjusted multiple times, with the preset number of times being greater than one.
[0121] The third implementation method: averaging method under multiple speech frames.
[0122] S31: in the multiple speech frames after the decoding operation is performed, a plurality of reference LPC filter coefficients corresponding to the multiple speech frames are determined in a sliding window order from near to far.
[0123] According to the preset sliding window, multiple speech frames are determined in a time sequence from near to far. The speech frames in this implementation can be reference LPC filter coefficients corresponding to valid speech frames or invalid speech frames.
[0124] S32: Determine an average value of the multiple reference LPC filter coefficients and the current LPC filter coefficient as the adjusted current LPC filter coefficient.
[0125] The average value of the plurality of reference LPC filter coefficients is determined as the adjusted current LPC filter coefficient. In this implementation, the average value is obtained, so the preset number is 1.
[0126] Step S205: when the all-pole filter is stable in the adjustment termination condition, the current LPC filter coefficients are determined to be target LPC filter coefficients.
[0127] In the process of repeating adjustment and judgment in step S202 to step S205, if the adjustment end condition is triggered, the loop is exited. The adjustment end condition includes that the all-pole filter is stable and the number of adjustments reaches a preset number.
[0128] When the full-pole filter is stable in the trigger adjustment end condition, it means that the adjusted LPC filter coefficients have been restored, and the full-pole filter generated based on the current LPC filter coefficients is stable, so the current LPC filter coefficients are determined to be the target LPC filter coefficients.
[0129] Step S206: when the adjustment times in the adjustment termination condition are reached to a preset times, the LPC filter coefficients corresponding to the nearest valid speech frame are determined as the target LPC filter coefficients.
[0130] When the number of adjustments reaches the preset number in the adjustment termination triggering condition, it means that the current LPC filter coefficients after adjustment cannot be restored, and the full-pole filter generated based on the current LPC filter coefficients is unstable.
[0131] Therefore, in order to ensure the stability of the full-pole filter, the LPC filter coefficients corresponding to the nearest valid speech frame are determined as the target LPC filter coefficients. The full-pole filter synthesized by the LPC filter coefficients corresponding to the nearest valid speech frame is stable.
[0132] Optionally, this embodiment may further include an adjustment flag bit. When the LPC filter coefficients are adjusted, the adjustment flag bit is set to "1", otherwise the adjustment flag bit is set to "0".
[0133] This embodiment has the following beneficial effects:
[0134] This embodiment provides an anti-interference method, which can receive the encoded data of the current speech frame and obtain the current LPC filter coefficients based on the encoded data, generate an all-pole filter based on the current LPC filter coefficients; and then determine the stability of the all-pole filter by using the zero-pole analysis method.
[0135] If the full-pole filter is unstable, the current LPC filter coefficients will be adjusted, a full-pole filter will be generated based on the current LPC filter coefficients, and the stability of the full-pole filter will be judged by using the zero-pole analysis method. The adjustment operation and the judgment operation will be executed repeatedly until the adjustment end condition is triggered to exit the loop.
[0136] When the all-pole filter is stable in the adjustment termination triggering condition, it means that the current LPC filter coefficients can be restored through the adjustment operation, and thus the current LPC filter coefficients can be determined as the target LPC filter coefficients.
[0137] When the adjustment times reach the preset times in the trigger adjustment end condition, it means that the current LPC filter coefficient cannot be restored through the adjustment operation, so the LPC filter coefficient corresponding to the nearest valid speech frame can be used as the target LPC filter coefficient. Here, the valid speech frame is a speech frame containing human voice features.
[0138] Through this solution, the LPC filter coefficients can be adjusted to ensure the stability of the filter so that the voice frames can be restored normally later, thereby improving the user experience.
[0139] See also Figure 3 The present invention provides a second embodiment of an anti-interference method, which is applied to a decoding module of a vocoder in a receiving device.
[0140] It can be understood that a current speech frame includes multiple subframes. After the target LPC filter coefficients corresponding to the current speech frame are determined in the first embodiment, the decoding operation can be performed based on the target LPC filter coefficients.
[0141] In the process of performing a demultiplexing operation on the encoded data in step S201 to obtain a demultiplexed data set, in addition to obtaining line spectrum pairs and line spectrum pair index parameters, adaptive codebooks and fundamental frequency index parameters, algebraic codebooks and codebook index parameters of each subframe can also be obtained.
[0142] Based on the first embodiment, the following steps may be further included after steps S205 and S206:
[0143] Step S301: using the target LPC filter coefficient and the LPC filter coefficient of the previous speech frame, respectively determine the LPC filter coefficient of each subframe in the current speech frame.
[0144] Different vocoders have different standards and include different numbers of subframes. For example, the ACELP vocoder in the Tetra standard includes four subframes, and some vocoders include two subframes.
[0145] The formula and weight for calculating each subframe are preset in the vocoder standard. Taking a current speech frame including four subframes as an example, this step is described in detail:
[0146] q 1 =0.75q n-1 +0.25q n-1 ;
[0147] q 2 =0.5q n-1 +0.5q n-1 ;
[0148] q 3 =0.25q n-1 +0.75q n-1 ;
[0149] q 4 =q n-1 ;
[0150] Among them, the LPC filter coefficients of the four subframes of the current speech frame are respectively q 1 ,q 2 ,q 3 and q 4 It means that q n-1 It indicates the LPC filter coefficients of the previous speech frame. It should be noted that the LPC filter coefficients of the previous speech frame are also Figure 2 The steps S201 to S205 shown determine that the synthesized all-pole filter is stable.
[0151] Since the target LPC filter coefficients of the current speech frame and the LPC filter coefficients of the previous speech frame are both repaired, the LPC filter coefficients of each subframe calculated based on the target LPC filter coefficients of the current speech frame and the LPC filter coefficients of the previous speech frame are repaired LPC filter coefficients without bit errors.
[0152] Step S302: Generate an all-pole filter for each subframe based on the LPC filter coefficients of each subframe.
[0153] The full-pole filter of each subframe is generated based on the LPC filter coefficient of each subframe. Since the LPC filter coefficient of each subframe is repaired and no bit error occurs, the full-pole filter of each subframe is also stable.
[0154] Step S303: Based on the encoded data and the target LPC filter coefficients, respectively determine the excitation signal of each subframe.
[0155] S41: extracting pitch period information of each subframe from a corresponding adaptive codebook using a pitch index parameter of each subframe, and extracting a random pulse sequence of each subframe from a corresponding algebraic codebook using a codebook index parameter of each subframe.
[0156] S42: Determine the pitch gain of each subframe by using the adaptive codebook of each subframe and the target LPC filter coefficient respectively.
[0157] S43: Determine the codebook gain of each subframe by using the algebraic codebook of each subframe and the target LPC filter coefficient respectively.
[0158] S44: Determine the sum of the products of the pitch period information of each subframe and the corresponding pitch gain and the random pulse sequence and the corresponding codebook gain as the excitation signal of each subframe.
[0159] Taking a subframe as an example, the excitation signal is represented by u(n), its pitch period information is represented by v(n), and the pitch gain is represented by g p Indicates that the random pulse sequence uses c(n) and the codebook gain uses g c Indicates that
[0160] u(n)=g p v(n)+g c c(n).
[0161] The step S303 of determining the excitation signal of each subframe is a mature technology, and the specific implementation process thereof will not be described in detail here.
[0162] Step S304: inputting the excitation signal of each subframe to the corresponding all-pole filter respectively to obtain the synthesized speech signal of each subframe.
[0163] After determining the full-pole filter of each subframe and the excitation signal of each subframe, the excitation signal of each subframe is respectively input into the corresponding full-pole filter, i.e., the speech synthesis filter, to synthesize the speech signal of each subframe, so as to perform synthesis operation on each excitation signal using the full-pole filter.
[0164] Step S305: According to the synthesized speech signals of each subframe, the amplitude and saturation control processing operation of the post-filter is performed to obtain the decoded current speech frame.
[0165] The synthesized speech signals of each subframe are reassembled according to the original order of each subframe in the current speech frame, and the decoded current speech frame is obtained after the amplitude and saturation control processing of the post-filter.
[0166] After obtaining the current voice frame, the receiving device can directly output the current voice frame.
[0167] This embodiment can achieve the following beneficial effects:
[0168] Based on the beneficial effects of the first embodiment, this embodiment can restore voice frames normally and improve user experience.
[0169] See also Figure 4 The present invention provides a third embodiment of an anti-interference method, which is applied to a decoding module of a vocoder in a receiving device.
[0170] On the basis of adjusting the flag bit to "1", Figure 3 Based on the third embodiment of the anti-interference method shown, after step S305, the following steps may also be included:
[0171] Step S401: Use voice activity detection technology to determine whether the current voice frame is a valid voice frame. If yes, proceed to step S402, if no, proceed to step S405.
[0172] Using voice activity detection technology (VAD technology), determine whether the current voice frame is a valid voice frame, that is, determine whether there is a human voice in the current voice frame. If so, go to step S402. If there is no human voice, it means that the current voice frame is noise, and go directly to step S405.
[0173] Step S402: If the current speech frame is a valid speech frame representing human voice, then extracting speech features from the current speech frame.
[0174] In order to ensure the accuracy of the detection, another solution is used to detect whether the current speech frame actually contains human voice. Speech features, such as formant features, are extracted from the current speech frame.
[0175] Step S403: Determine whether the speech feature is consistent with the human voice feature, if so, proceed to step S404, otherwise proceed to step S405.
[0176] Determine whether the speech feature is consistent with the human voice feature. If it is consistent with the human voice feature, it means that the current speech frame is truly a valid speech frame containing human voice, and the current speech frame is marked with an identifier of a valid speech frame. Otherwise, the current speech frame is marked with an identifier of an invalid speech frame.
[0177] Step S404: If the speech feature is determined to be a human voice feature, the current speech frame is output.
[0178] If the current voice frame is a valid voice frame containing human voice, the current voice frame is directly output, that is, the receiving device plays the current voice frame for the user to listen to the voice.
[0179] Step S405: If the current speech frame is an invalid speech frame representing noise or the speech feature is not a human voice feature, fill the current speech frame with preset noise data and output the current speech frame, or perform a mute operation on the current speech frame.
[0180] If the current voice frame is a noisy voice frame or does not contain human voice, it means that the current voice frame contains invalid environmental noise or sharp noise. In order to improve the user experience, the current voice frame is filled with preset noise data, which is adjusted to be comfortable to the human body, such as non-sharp white noise, etc. Then, the current voice frame is output.
[0181] Alternatively, the current voice frame may be muted directly. A current voice frame is usually short, for example, 30 ms, so the muting operation can eliminate noise without affecting the user experience.
[0182] This embodiment can achieve the following beneficial effects:
[0183] This embodiment fundamentally identifies whether there are abnormal sharp sounds in the speech, and fundamentally eliminates the abnormal sharp sounds and restores the speech frames, avoiding the problems of missed detection, false detection and loss of speech frame information of abnormal sharp sounds in existing technologies.
[0184] The LPC filter adjustment process in Example 1 and the two detection processes in Example 3 are effectively combined. The LPC filter adjustment can identify and eliminate abnormal sharp sounds and restore voice frames from the source. The two detection processes can detect the quality of the current voice frame based on the results. If the current voice frame is noise, it is muted or filled with preset noise to achieve a smooth transition and improve user experience.
[0185] This embodiment does not require changing the hardware settings of the receiving device and the sending device, and can improve the anti-interference capability of the speech decoding process without increasing any cost, making the vocoder more adaptable to complex service channel environments and improving customer experience.
[0186] This embodiment has high versatility and is applicable to all speech channel coding and decoding standards based on the LPC linear prediction technology, and can be applied to 2G, 3G, and 4G speech coding and decoding standards.
[0187] See also Figure 5 The present invention provides an anti-interference method embodiment 4, which is applied to a decoding module of a vocoder in a receiving device and may include the following steps:
[0188] Step S501: Receive the encoded data of the current speech frame and obtain the current LSP coefficient based on the encoded data.
[0189] After receiving the encoded data of the current speech frame, the decoding module of the vocoder performs a demultiplexing operation on the encoded data to obtain a demultiplexed data set; wherein the demultiplexed data set includes line-spectrum pairs and line-spectrum pair index parameters, as well as other parameters.
[0190] The current LSP coefficient is extracted from the line spectrum pair using the line spectrum pair index parameter.
[0191] Step S502: Convert the current LSP coefficients into current LPC filter coefficients.
[0192] In the encoding operation, the LPC filter coefficients are generally calculated by Durbin (Levinson-Durbin algorithm) and converted into LSP coefficients. In the decoding operation, the inverse operation is performed to achieve the purpose of converting the LSP coefficients into LPC filter coefficients.
[0193] Step S503: Generate an all-pole filter based on the current LPC filter coefficients.
[0194] The current LPC filter coefficients are Indicates that the LPC polynomial is generated by the current LPC filter coefficients The all-pole filter can be expressed as
[0195] in, p is the order of LPC linear prediction, a k is the coefficient predicted by the LPC filter, and z is the transformation variable of the z-domain transformation.
[0196] If the LSP coefficients are not interfered with in the service channel, the current LPC filter coefficients converted from the LSP coefficients are not interfered with, and the full-pole filter generated based on the current LPC filter coefficients is stable, that is, all poles of the full-pole filter are within the unit circle.
[0197] On the contrary, if the LSP coefficient is interfered in the service channel, the current LPC filter coefficient converted from the LSP coefficient is interfered, and the full-pole filter generated based on the current LPC filter coefficient is unstable, that is, some poles of the full-pole filter are not within the unit circle.
[0198] Step S504: using the zero-pole analysis method to determine the stability of the all-pole filter.
[0199] The pole values of all poles of the all-pole filter are determined in the Z domain using the zero-pole analysis method. If all pole values are within the unit circle, the all-pole filter is stable. If there are pole values outside the unit circle, the all-pole filter is unstable.
[0200] If the all-pole filter is stable, steps S204 to S206 are directly skipped, the current LPC filter coefficients are directly used as target LPC filter coefficients, and the decoding operation is continued based on the target LPC filter coefficients to obtain the decoded current speech frame.
[0201] Step S505: If the all-pole filter is unstable and the adjustment end condition is not triggered, the current LSP coefficient is adjusted and the process proceeds to step S202.
[0202] This embodiment provides three implementation methods for adjusting the current LSP coefficient:
[0203] The first implementation method: interpolation method in the case of a valid speech frame.
[0204] S11: Determine a reference LSP coefficient corresponding to the nearest valid speech frame among the multiple speech frames after the decoding operation is performed.
[0205] It can be understood that multiple speech frames have been decoded before the current speech frame, some of which are noise, i.e. invalid speech frames, and some of which are human voices, i.e. valid speech frames. The LSP coefficient corresponding to the nearest valid speech frame can be determined from the multiple speech frames after the decoding operation is performed as a reference LSP coefficient.
[0206] The purpose of selecting the nearest valid speech frame is that the speech frame nearest to the current speech frame has a greater correlation or similarity with the current speech frame, so the nearest speech frame is used.
[0207] When restoring the current speech frame, if the speech frame is a noise speech frame, it means there is no voice. In this case, there is no reference. If the speech frame is a human voice speech frame and becomes a noise speech frame after being greatly disturbed, the speech frame cannot be used. Therefore, a valid speech frame is selected from multiple speech frames.
[0208] Therefore, through the above two points, the LSP coefficient corresponding to the most adjacent valid speech frame can be selected from the multiple speech frames after the decoding operation is performed as the reference LSP coefficient.
[0209] S12: Adjust the first weight corresponding to the reference LSP coefficient and the second weight corresponding to the current LSP coefficient.
[0210] Initially, the first weight and the second weight are respectively 0. During the adjustment process, the first weight corresponding to the reference LSP coefficient is continuously increased, and the second weight corresponding to the current LSP coefficient is continuously reduced.
[0211] Because the all-pole filter synthesized with reference to the LSP coefficient is stable, the first weight corresponding to the reference LSP coefficient is continuously increased and the second weight corresponding to the current LSP coefficient is continuously reduced during the weight adjustment process.
[0212] This embodiment provides a specific method for adjusting the first weight a1 and the second weight a2:
[0213] a1=a1+(1 / 2) n ;
[0214] a2=1-a1;
[0215] The sum of the first weight and the second weight is 1.
[0216] S13: Determine the sum of the products of the reference LSP coefficient and the first weight, and the current LSP coefficient and the second weight as the adjusted current LSP coefficient.
[0217] The adjusted current LSP coefficient is represented by New_LSP, the reference LSP coefficient is represented by Last_LSP, the current LSP coefficient is represented by Current_LSP, the first weight is represented by a1, and the second weight is represented by a2. The calculation formula can be expressed as follows:
[0218] New_LSP=Last_LSP*a1+Current_LSP*a2.
[0219] In a first implementation manner, the current LSP coefficient may be adjusted multiple times, with the preset number of times being greater than one.
[0220] The second implementation method: interpolation method in the case of multiple valid speech frames.
[0221] Similar to the first implementation, this implementation uses multiple valid speech frames.
[0222] S21: Determine, in a plurality of speech frames after the decoding operation is performed, a plurality of reference LSP coefficients corresponding to a plurality of valid speech frames in order from near to far.
[0223] S22: Adjust the weights of the multiple reference LSP coefficients and the current LSP coefficient.
[0224] Initially, the weights of the multiple reference LSP coefficients and the current LSP coefficient are all zero.
[0225] Because the full-pole filter synthesized by multiple reference LSP coefficients is stable, the weights corresponding to the multiple reference LSP coefficients are continuously increased and the weight corresponding to the current LSP coefficient is continuously reduced during the weight adjustment process.
[0226] Since the closer to the current speech frame, the better it can represent the current speech frame, the closer the reference LSP coefficient is to the current speech frame, the greater its weight is, and the farther the reference LSP coefficient is from the current speech frame, the smaller its weight is.
[0227] This embodiment provides a specific method for adjusting multiple weights. Taking four weights including three reference LSP coefficients and the current LSP coefficient as an example, initially, a1=0.25, a2=0.25, a3=0.25, and a4=0.25.
[0228] a1=a1+(1 / 4) n ;
[0229] a2=a2+(1 / 8) n ;
[0230] a3=a3+(1 / 16) n ;
[0231] a4=1-a1-a2-a3;
[0232] The sum of the four weights is 1.
[0233] S23: Determine the sum of the products of the multiple reference LSP coefficients and the current LSP coefficient with their respective weights as the adjusted current LSP coefficient.
[0234] The adjusted current LSP coefficient is represented by New_LSP, the reference LSP coefficient is represented by Last_LSP1, Last_LSP2 and Last_LSP3, the current LSP coefficient is represented by Current_LSP, and the weights are represented by a1, a2, a3 and a4 respectively. The calculation formula can be expressed as follows:
[0235] New_LSP=Last_LSP1*a1+Last_LSP2*a2+Last_LSP3*a3+Current_LSP*a4 In the second implementation, the current LSP coefficient can be adjusted multiple times, and the preset number of times is greater than 1.
[0236] The third implementation method: averaging method under multiple speech frames.
[0237] S31: in a plurality of speech frames after the decoding operation is performed, a plurality of reference LSP coefficients corresponding to the plurality of speech frames are determined in a sliding window order from near to far.
[0238] According to the preset sliding window, multiple speech frames are determined in a time sequence from near to far. The speech frames in this implementation manner may be reference LSP coefficients corresponding to valid speech frames or invalid speech frames.
[0239] S32: Determine an average value of the multiple reference LSP coefficients and the current LSP coefficient as the adjusted current LSP coefficient.
[0240] The average value of the multiple reference LSP coefficients is determined as the adjusted current LSP coefficient. In this implementation, the average value is calculated, so the preset number is 1.
[0241] Step S506: When the all-pole filter is stable in the adjustment end condition, the current LSP coefficient is determined to be the target LSP coefficient, and the target LSP coefficient is converted into a target LPC filter coefficient.
[0242] In the process of repeated adjustment and judgment in step S502 to step S506, if the adjustment end condition is triggered, the loop is exited. The adjustment end condition includes that the all-pole filter is stable and the number of adjustments reaches a preset number.
[0243] When the full-pole filter is stable in the trigger adjustment end condition, it means that the adjusted LSP coefficient has been restored, and the current LPC filter coefficient is converted based on the current LSP coefficient. The full-pole filter generated by the LPC filter coefficient is stable, so the current LPC filter coefficient is determined to be the target LPC filter coefficient.
[0244] Step S507: When the number of adjustments in the adjustment termination condition is triggered to reach a preset number, the LSP coefficient corresponding to the nearest valid speech frame is determined as the target LSP coefficient, and the target LSP coefficient is converted into a target LPC filter coefficient.
[0245] When the adjustment times reach the preset times in the trigger adjustment end condition, it means that the adjusted LSP coefficient cannot be restored.
[0246] Therefore, in order to ensure the stability of the all-pole filter, the LSP coefficient corresponding to the nearest valid speech frame is determined as the current LSP coefficient, and the current LSP coefficient is converted into the current LPC filter coefficient and used as the target LPC filter coefficient.
[0247] Optionally, this embodiment may further include an adjustment flag bit. When the LPC filter coefficients are adjusted, the adjustment flag bit is set to "1", otherwise the adjustment flag bit is set to "0".
[0248] After the target LPC filter coefficients are obtained in the fourth embodiment, the operation may be continued according to the solutions of the second and third embodiments, which will not be described in detail here.
[0249] The present application provides a device, including a memory and a processor, wherein the processor implements an anti-interference method when executing program instructions stored in the memory.
[0250] A computer-readable storage medium stores a computer program, which implements the steps of an anti-interference method when executed by a processor.
[0251] See also Figure 6 The present invention provides an anti-interference device, comprising:
[0252] A receiving unit 61, configured to receive the encoded data of the current speech frame and obtain the current LPC filter coefficients based on the encoded data;
[0253] A generating unit 62, configured to generate an all-pole filter based on the current LPC filter coefficients;
[0254] A first determining unit 63, configured to determine the current LPC filter coefficients as target LPC filter coefficients if the all-pole filter is stable;
[0255] an adjusting unit 64, configured to adjust the current LPC filter coefficients if the all-pole filter is unstable and the number of adjustments of the current LPC filter coefficients does not reach a preset number, and enter the step of generating an all-pole filter based on the current LPC filter coefficients;
[0256] The second determination unit 65 is configured to determine the LPC filter coefficient corresponding to the nearest valid speech frame as the target LPC filter coefficient if the all-pole filter is unstable and the number of adjustments of the current LPC filter coefficient reaches a preset number.
[0257] The first aspect: directly adjust the LPC filter coefficients.
[0258] The first implementation method of the first aspect:
[0259] The adjustment unit 64 includes:
[0260] A first coefficient determination unit, used to determine the reference LPC filter coefficient corresponding to the most adjacent valid speech frame among the multiple speech frames after the decoding operation is performed;
[0261] A first weight adjustment unit, configured to adjust a first weight corresponding to the reference LPC filter coefficient and a second weight corresponding to the current LPC filter coefficient;
[0262] a first product-sum unit, configured to determine a sum of a product of the reference LPC filter coefficient and the first weight and a product of the current LPC filter coefficient and the second weight as an adjusted current LPC filter coefficient;
[0263] The sum of the first weight and the second weight is 1, and the preset number is greater than 1.
[0264] The second implementation of the first aspect:
[0265] The adjustment unit 64 includes:
[0266] A second coefficient determination unit, used to determine a plurality of reference LPC filter coefficients corresponding to a plurality of valid speech frames in a plurality of speech frames after the decoding operation is performed;
[0267] A second weight adjustment unit, configured to adjust weights of the plurality of reference LPC filter coefficients and the current LPC filter coefficient;
[0268] a second product-sum unit, configured to determine the sum of the products of the multiple reference LPC filter coefficients and the current LPC filter coefficient with their respective weights as the adjusted current LPC filter coefficient;
[0269] The sum of the weights is 1, and the preset number is greater than 1.
[0270] The third implementation method of the first aspect:
[0271] The adjustment unit 64 includes:
[0272] A third coefficient determination unit is used to determine a plurality of reference LPC filter coefficients corresponding to the plurality of speech frames in the plurality of speech frames after the decoding operation is performed;
[0273] an average value unit, configured to determine an average value of the plurality of reference LPC filter coefficients and the current LPC filter coefficient as the adjusted current LPC filter coefficient;
[0274] Among them, the preset number of times is 1.
[0275] The second aspect: adjust the LSP parameters and indirectly adjust the LPC filter coefficients.
[0276] The adjustment unit 64 includes:
[0277] An LSP adjustment unit, used for adjusting a current LSP coefficient and converting the current LSP coefficient into a current LPC filter coefficient;
[0278] The determining the LPC filter coefficient corresponding to the nearest valid speech frame as the target LPC filter coefficient includes: determining the LSP coefficient corresponding to the nearest valid speech frame as the target LSP coefficient, and converting the target LSP coefficient into the target LPC filter coefficient.
[0279] The first implementation method of the second aspect is:
[0280] The LSP adjustment unit comprises:
[0281] A first LSP coefficient determination unit is used to determine a reference LSP coefficient corresponding to the nearest valid speech frame among the multiple speech frames after the decoding operation is performed;
[0282] A first LSP weight adjustment unit, used for adjusting a first weight corresponding to the reference LSP coefficient and a second weight corresponding to the current LSP coefficient;
[0283] A first LSP product-sum unit, configured to determine the sum of the product of the reference LSP coefficient and the first weight and the product of the current LSP coefficient and the second weight as the adjusted current LSP coefficient;
[0284] The sum of the first weight and the second weight is 1, and the preset number is greater than 1.
[0285] The second implementation method of the second aspect:
[0286] The LSP adjustment unit comprises:
[0287] A second LSP coefficient determination unit is used to determine a plurality of reference LSP coefficients corresponding to a plurality of valid speech frames in a plurality of speech frames after the decoding operation is performed;
[0288] A second LSP weight adjustment unit, configured to adjust the weights of the plurality of reference LSP coefficients and the current LSP coefficient;
[0289] A second LSP product-sum unit, configured to determine the sum of the products of the multiple reference LSP coefficients and the current LSP coefficient with their respective weights as the adjusted current LSP coefficient;
[0290] The sum of the weights is 1, and the preset number is greater than 1.
[0291] The third implementation method of the second aspect:
[0292] The LSP adjustment unit comprises:
[0293] A third LSP coefficient determination unit is used to determine a plurality of reference LSP coefficients corresponding to the plurality of speech frames one by one in the plurality of speech frames after the decoding operation is performed;
[0294] An LSP average unit, configured to determine an average value of the plurality of reference LSP coefficients and the current LSP coefficient as an adjusted current LSP coefficient;
[0295] Among them, the preset number of times is 1.
[0296] The device also includes:
[0297] A subframe coefficient determination unit 66, configured to determine the LPC filter coefficients of each subframe in the current speech frame respectively by using the target LPC filter coefficients and the LPC filter coefficients of the previous speech frame;
[0298] A subframe filter generating unit 67 is used to generate an all-pole filter for each subframe based on the LPC filter coefficients of each subframe;
[0299] A subframe speech signal synthesis unit 68, configured to obtain a synthesized speech signal of each subframe based on an all-pole filter of each subframe;
[0300] The decoding unit 69 is used to obtain a decoded current speech frame according to the synthesized speech signals of each subframe.
[0301] The output unit 610 is used to fill the current speech frame with preset noise data and output the current speech frame if the current speech frame is determined to be a valid speech frame according to the speech activity detection technology and the speech features extracted from the current speech frame do not conform to the human voice features, or if the current speech frame is determined to be an invalid speech frame according to the speech activity detection technology.
[0302] Through the above technical means, the following beneficial effects can be achieved:
[0303] The present invention provides an anti-interference method, which can receive the coded data of the current speech frame and obtain the current LPC filter coefficient based on the coded data, generate an all-pole filter based on the current LPC filter coefficient; and then judge the stability of the all-pole filter by using the zero-pole analysis method.
[0304] If the full-pole filter is unstable, the current LPC filter coefficients will be adjusted, a full-pole filter will be generated based on the current LPC filter coefficients, and the stability of the full-pole filter will be judged by using the zero-pole analysis method. The adjustment operation and the judgment operation will be executed repeatedly until the adjustment end condition is triggered to exit the loop.
[0305] When the all-pole filter is stable in the adjustment termination triggering condition, it means that the current LPC filter coefficients can be restored through the adjustment operation, and thus the current LPC filter coefficients can be determined as the target LPC filter coefficients.
[0306] When the adjustment times reach the preset times in the trigger adjustment end condition, it means that the current LPC filter coefficient cannot be restored through the adjustment operation, so the LPC filter coefficient corresponding to the nearest valid speech frame can be used as the target LPC filter coefficient. Here, the valid speech frame is a speech frame containing human voice features.
[0307] Through this solution, the LPC filter coefficients can be adjusted to ensure the stability of the filter so that the voice frames can be restored normally later, thereby improving the user experience.
[0308] If the functions described in the method of this embodiment are implemented in the form of software functional units and sold or used as independent products, they can be stored in a storage medium readable by a computing device. Based on this understanding, the part of the embodiment of the present application that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computing device (which can be a personal computer, server, mobile computing device or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0309] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0310] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be 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 application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An anti-interference method, characterized in that: include: Receiving encoded data of a current speech frame and obtaining current LPC filter coefficients based on the encoded data; generating an all-pole filter based on the current LPC filter coefficients; If the all-pole filter is stable, determining the current LPC filter coefficients as target LPC filter coefficients; If the all-pole filter is unstable and the number of times the current LPC filter coefficients have been adjusted has not reached a preset number, adjusting the current LPC filter coefficients and entering the step of generating an all-pole filter based on the current LPC filter coefficients; If the all-pole filter is unstable and the number of times the current LPC filter coefficient has been adjusted reaches a preset number, the LPC filter coefficient corresponding to the nearest valid speech frame is determined as the target LPC filter coefficient.
2. The method according to claim 1, characterized in that The adjusting the LPC filter coefficients comprises: Determine, among the plurality of speech frames after the decoding operation is performed, a reference LPC filter coefficient corresponding to the nearest valid speech frame; Adjusting a first weight corresponding to the reference LPC filter coefficient and a second weight corresponding to the current LPC filter coefficient; Determine a sum of a product of the reference LPC filter coefficient and the first weight and a product of the current LPC filter coefficient and the second weight as an adjusted current LPC filter coefficient; The sum of the first weight and the second weight is 1, and the preset number is greater than 1.
3. The method according to claim 1, characterized in that The adjusting the LPC filter coefficients comprises: Determining a plurality of reference LPC filter coefficients corresponding to a plurality of valid speech frames among a plurality of speech frames after performing the decoding operation; adjusting weights of the plurality of reference LPC filter coefficients and the current LPC filter coefficients; Determining a sum of the products of the multiple reference LPC filter coefficients and the current LPC filter coefficient and their respective weights as the adjusted current LPC filter coefficient; The sum of all weights is 1, and the preset number is greater than 1.
4. The method according to claim 1, characterized in that The adjusting the LPC filter coefficients comprises: Determining a plurality of reference LPC filter coefficients corresponding to the plurality of speech frames after the decoding operation is performed; Determine an average value of the plurality of reference LPC filter coefficients and the current LPC filter coefficient as an adjusted current LPC filter coefficient; Among them, the preset number of times is 1.
5. The method according to any one of claims 2 to 4, characterized in that: After determining the target LPC filter coefficient, the method further includes: Determine the LPC filter coefficients of each subframe in the current speech frame respectively by using the target LPC filter coefficients and the LPC filter coefficients of the previous speech frame; Based on the LPC filter coefficients of each subframe, generate an all-pole filter for each subframe respectively; Based on the all-pole filter of each subframe, the synthesized speech signal of each subframe is obtained; According to the synthesized speech signals of each subframe, a decoded current speech frame is obtained.
6. The method according to claim 5, characterized in that After obtaining the decoded current voice frame according to the synthesized voice signals of each subframe, the method further includes: If the current speech frame is determined to be a valid speech frame according to the speech activity detection technology and the speech features extracted from the current speech frame do not conform to the human voice features, or if the current speech frame is determined to be an invalid speech frame according to the speech activity detection technology, the current speech frame is filled with preset noise data and the current speech frame is output.
7. The method according to claim 1, characterized in that The adjusting the current LPC filter coefficients comprises: adjusting the current LSP coefficients and converting the current LSP coefficients into current LPC filter coefficients; The determining the LPC filter coefficient corresponding to the nearest valid speech frame as the target LPC filter coefficient includes: determining the LSP coefficient corresponding to the nearest valid speech frame as the target LSP coefficient, and converting the target LSP coefficient into the target LPC filter coefficient.
8. The method according to claim 7, characterized in that The adjusting the current LSP coefficient comprises: Determine a reference LSP coefficient corresponding to a most adjacent valid speech frame among the plurality of speech frames after the decoding operation is performed; Adjusting a first weight corresponding to the reference LSP coefficient and a second weight corresponding to the current LSP coefficient; Determine the sum of the product of the reference LSP coefficient and the first weight and the product of the current LSP coefficient and the second weight as the adjusted current LSP coefficient; The sum of the first weight and the second weight is 1, and the preset number is greater than 1.
9. The method according to claim 7, characterized in that The adjusting the current LSP coefficient comprises: Determining a plurality of reference LSP coefficients corresponding to a plurality of valid speech frames in a plurality of speech frames after performing a decoding operation; adjusting weights of the plurality of reference LSP coefficients and the current LSP coefficient; Determine the sum of the products of the multiple reference LSP coefficients and the current LSP coefficient and their respective weights as the adjusted current LSP coefficient; The sum of all weights is 1, and the preset number is greater than 1.
10. The method according to claim 7, characterized in that The adjusting the current LSP coefficient comprises: Determining a plurality of reference LSP coefficients corresponding to the plurality of speech frames one by one in the plurality of speech frames after the decoding operation is performed; Determine an average value of the multiple reference LSP coefficients and the current LSP coefficient as the adjusted current LSP coefficient; Among them, the preset number of times is 1.
11. A device, characterized in that: The method comprises a memory and a processor, wherein the processor implements the method according to any one of claims 1 to 10 when executing program instructions stored in the memory.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Vector conversion device and vector conversion method
CN101057275A
Recovery of hidden data embedded in an audio signal
CN101715549A
High band excitation signal generation
CN106256000A
On -board communication system
CN207678000U
Linear prediction coefficient calculating device
JP1997130261A
