WO2017166800A1 - 丢帧补偿处理方法和装置 - Google Patents

丢帧补偿处理方法和装置 Download PDF

Info

Publication number
WO2017166800A1
WO2017166800A1 PCT/CN2016/103481 CN2016103481W WO2017166800A1 WO 2017166800 A1 WO2017166800 A1 WO 2017166800A1 CN 2016103481 W CN2016103481 W CN 2016103481W WO 2017166800 A1 WO2017166800 A1 WO 2017166800A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
ith
signal
ith frame
spectral frequency
Prior art date
Application number
PCT/CN2016/103481
Other languages
English (en)
French (fr)
Inventor
刘泽新
张兴涛
王宾
苗磊
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2017166800A1 publication Critical patent/WO2017166800A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/005Correction of errors induced by the transmission channel, if related to the coding algorithm
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/02Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/02Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
    • G10L19/0204Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders using subband decomposition
    • G10L19/0208Subband vocoders
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/06Determination or coding of the spectral characteristics, e.g. of the short-term prediction coefficients
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/08Determination or coding of the excitation function; Determination or coding of the long-term prediction parameters
    • G10L19/083Determination or coding of the excitation function; Determination or coding of the long-term prediction parameters the excitation function being an excitation gain
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/08Determination or coding of the excitation function; Determination or coding of the long-term prediction parameters
    • G10L19/087Determination or coding of the excitation function; Determination or coding of the long-term prediction parameters using mixed excitation models, e.g. MELP, MBE, split band LPC or HVXC
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/08Determination or coding of the excitation function; Determination or coding of the long-term prediction parameters
    • G10L19/10Determination or coding of the excitation function; Determination or coding of the long-term prediction parameters the excitation function being a multipulse excitation
    • G10L19/107Sparse pulse excitation, e.g. by using algebraic codebook
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • G10L21/0208Noise filtering
    • G10L21/0216Noise filtering characterised by the method used for estimating noise
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/03Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters
    • G10L25/06Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters the extracted parameters being correlation coefficients
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/78Detection of presence or absence of voice signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/08Determination or coding of the excitation function; Determination or coding of the long-term prediction parameters
    • G10L19/09Long term prediction, i.e. removing periodical redundancies, e.g. by using adaptive codebook or pitch predictor
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L2019/0001Codebooks
    • G10L2019/0002Codebook adaptations
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L2019/0001Codebooks
    • G10L2019/0007Codebook element generation
    • G10L2019/0008Algebraic codebooks
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L2019/0001Codebooks
    • G10L2019/0016Codebook for LPC parameters
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/78Detection of presence or absence of voice signals
    • G10L2025/783Detection of presence or absence of voice signals based on threshold decision

Definitions

  • the embodiments of the present invention relate to communication technologies, and in particular, to a frame loss compensation processing method and apparatus.
  • An existing method for performing frame loss compensation is as follows: performing code stream analysis on the decoding end to determine whether the current frame is a dropped frame, and if the current frame is a dropped frame, estimating the current frame loss parameter, according to the current frame loss parameter. And the parameters of the historical frame recover the spectral frequency parameter and the excitation signal of the frame loss signal, and then obtain the frame loss signal according to the spectral frequency parameter and the excitation signal. If the current frame is a normal frame, the decoding obtains the parameters of the current frame. If the current frame is a normal frame and the previous frame is a dropped frame, the parameters of the current frame are corrected according to the parameters of the previous frame, and the modified parameters are obtained according to the modified parameters.
  • the spectral frequency parameter of the current frame and the excitation signal is synthesized based on the spectral frequency parameter and the excitation signal.
  • the foregoing frame parameter includes at least one of a signal type, a signal energy, a phase, and the like.
  • Embodiments of the present invention provide a frame loss compensation processing method and apparatus, which can improve the accuracy of parameter estimation of a lost frame, thereby improving the quality of the decoded signal.
  • a first aspect of the present invention provides a frame loss compensation processing method, which first determines whether an ith frame is a lost frame by using a lost frame flag bit, and when the ith frame is a lost frame, according to an inter-frame relationship of the first N frame of the ith frame. And at least one of the intra-frame relationships of the first N frames, estimating a spectral frequency parameter, a pitch period, and a gain of the ith frame, and acquiring an algebraic codebook of the ith frame, according to the estimated pitch period, gain, and The acquired algebraic codebook of the ith frame generates an excitation signal of the ith frame, and further synthesizes the spectral frequency parameter of the ith frame obtained by the estimation and the generated excitation signal of the ith frame.
  • the inter-frame relationship of the first N frames includes at least one of correlation and energy stability of the first N frames, and the intra-frame relationship of the first N frames includes correlation between sub-frames in the first N frames and energy stability. At least one, by considering the correlation between the signals and the energy stability, makes the estimated parameters of the ith frame more accurate, thereby improving the quality of the decoded speech signal.
  • the spectral frequency parameter of the ith frame is estimated according to the inter-frame relationship of the first N frames of the ith frame, and may be estimated by using the following manner: first, according to the ith frame The correlation of the first N frames determines the weight of the spectral frequency parameter of the i-1th frame and the weight of the preset spectral frequency parameter of the i-th frame, and then according to the weight of the spectral frequency parameter of the i-1th frame and the i-th frame The weight of the preset spectral frequency parameter is weighted by the spectral frequency parameter of the i-1th frame and the preset spectral frequency parameter of the ith frame to obtain a spectral frequency parameter of the ith frame.
  • Correlation of the first N frames of the ith frame includes: a size relationship between a spectral tilt parameter of the i-1th frame signal and a second threshold, a normalized autocorrelation value of the i-1th frame signal, and a size of the first threshold
  • the weight of the spectral frequency parameter of the i-1th frame and the ith frame are determined according to the correlation between the first N frames of the i-th frame.
  • the weight of the preset spectral frequency parameter is specifically as follows:
  • condition one is: the normalized autocorrelation value of the i-1th frame signal is greater than the first threshold
  • the second condition is: the spectral tilt parameter of the i-1th frame signal is greater than The second threshold
  • condition three is that the deviation of the pitch period of the i-1th frame signal is less than the third threshold.
  • the weight of the spectral frequency parameter of the i-1th frame is the second weight, and the weight of the preset spectral frequency parameter of the i-th frame is the first A weight.
  • the gene period of the ith frame is estimated according to the correlation between the first N frames of the ith frame and the correlation between the subframes of the first N frames of the ith frame.
  • the correlation includes: a size relationship between a normalized autocorrelation value of the i-2th frame signal and a fifth threshold, a magnitude relationship between a deviation of a gene period of the i-2th frame signal and a fourth threshold, and an i-th The magnitude of the deviation of the gene period of the 1-frame signal from the magnitude of the fourth threshold.
  • the gene period of the ith frame is estimated as follows:
  • the pitch period of the signal determines a pitch period offset value of the i-1th frame signal; determining a pitch period of the ith frame signal according to a pitch period offset value of the i-1th frame signal and a pitch period of the i-1th frame signal;
  • the pitch period of the ith frame signal includes the pitch period of each subframe of the ith frame, and the pitch period offset value of the i-1th frame signal is the difference of the pitch periods of all adjacent subframes of the i-1th frame.
  • the normalized autocorrelation value of the i-2th frame signal is greater than the fifth threshold, and the pitch period of the i-2th frame signal is less than a fourth threshold, determining a pitch period offset value of the i-th frame signal and the i-1th frame signal according to a pitch period of the i-2th frame signal and the i-1th frame signal; according to the i-1th frame signal.
  • the pitch period and the pitch period offset value of the i-2th frame signal and the i-1th frame signal determine the pitch period of the ith frame signal.
  • the pitch period offset value pv of the i-1th frame signal may be determined according to the following formula:
  • pv is the pitch period offset value of the i-1th frame signal
  • p cur (j) is the pitch period of the jth subframe of the ith frame.
  • the pitch period offset value pv of the i-th frame signal and the i-1th frame signal may be determined according to the following formula:
  • p (-2) (m) is the pitch period of the mth subframe of the i-2th frame
  • p (-1) (n) is the pitch period of the nth subframe of the i-1th frame
  • the pitch period of the ith frame signal is determined according to the following formula:
  • p (-1) (3) is the pitch period of the third subframe of the i-1th frame
  • pv is the pitch period offset value of the i-2th frame signal and the i-1th frame signal
  • p cur ( x) is the pitch period of the xth subframe of the i-th frame.
  • the gain of the ith frame is according to the ith frame
  • the correlation of the first N frames and the energy stability are estimated, wherein the gain of the ith frame includes: an adaptive codebook gain and an algebraic book gain.
  • it is estimated according to the following method: first, according to the adaptive codebook gain of the i-1th frame or a preset fixed value, the correlation of the i-1th frame, and the sequence number of the ith frame in consecutive consecutive lost frames.
  • the adaptive codebook gain of the i-th frame Determining the adaptive codebook gain of the i-th frame, and then determining the weight of the algebraic book gain of the i-1th frame and the weight of the gain of the voice activation detection VAD frame according to the energy stability of the i-1th frame, and finally according to the The weight of the algebraic book gain of the i-1 frame and the weight of the gain of the VAD frame are weighted by the algebraic book gain of the i-1th frame and the gain of the VAD frame to obtain the algebraic book gain of the i-th frame.
  • the more stable the energy of the i-1th frame the greater the weight of the algebraic book gain of the i-1th frame.
  • the weight of the gain of the VAD frame also increases accordingly.
  • the first correction factor may be determined according to the codec rate, and the generation digital book gain of the i-1th frame is corrected by using the first correction factor.
  • the algebraic book of the ith frame may be obtained by: obtaining a generational digital book of the ith frame according to the random noise estimation, or according to the first N frames of the ith frame Generational digital books determine the generation of digital books for the i-th frame.
  • the ith frame is further generated according to the i-th Any one of the deviation of the pitch period of one frame, the correlation of the signal, the magnitude of the spectral slope, and the zero-crossing rate determines the weight of the algebraic book contribution of the i-th frame, or the deviation of the pitch period of the i-th frame, A weighting operation is performed on any combination of signal correlation, spectral slope magnitude, and zero-crossing rate to determine the weight of the algebraic book contribution of the i-th frame.
  • the spectral frequency parameter, the pitch period, the gain, and the algebraic code of the ith frame are obtained according to the received code stream decoding.
  • the book then generates an excitation signal of the ith frame and the state of the ith frame based on the pitch period, the gain, and the algebraic book of the decoded i-th frame.
  • the i-1th frame or the i-2th frame is a lost frame, further determining whether to the ith frame according to at least one of an interframe relationship and an intra frame relationship of the first N frames of the i-th frame and the i-th frame Correcting at least one of a spectral frequency parameter, an excitation signal, and a state updated excitation signal, wherein the inter-frame relationship includes at least one of correlation and energy stability of the ith frame and the first N frame of the ith frame, the frame The inner relationship includes at least one of inter-subframe correlation and energy stability of the first N frames of the i-th frame and the i-th frame.
  • the ith frame signal is synthesized based on the spectral frequency parameter of the i-th frame, the excitation signal, and the state-updated excitation signal.
  • the correlation of the ith frame includes: a size relationship between one of the two spectral frequency parameters corresponding to the index of the minimum value of the difference of the adjacent spectral frequency parameters of the i-th frame and the sixth threshold, The magnitude relationship between the minimum value of the difference between the adjacent spectral frequency parameters of the i frame and the seventh threshold and the magnitude of the minimum value of the difference between the adjacent spectral frequency parameters of the i-th frame and the eighth threshold.
  • the condition four includes: the adjacent spectral frequency parameter of the i-th frame
  • condition five includes: the index of the minimum value of the difference of the adjacent spectral frequency parameters of the i-th frame is smaller than The eighth threshold, and the minimum difference is less than the seventh threshold.
  • determining the spectral frequency parameter after the ith frame correction according to the weighting operation of the spectral frequency parameter of the i-1th frame and the spectral frequency parameter of the ith frame, or according to the spectral frequency parameter of the ith frame and the advance
  • the weighting operation of the spectral frequency parameter determines the corrected spectral frequency parameter of the i-th frame.
  • the spectral frequency parameter of the i-th frame is corrected according to the spectral frequency parameter of the i-th frame and the i-th frame, or the ith frame is determined according to the spectral frequency parameter of the i-th frame and the preset spectral frequency parameter.
  • the spectral frequency parameters are corrected.
  • the correlation between the ith frame and the ith frame includes: a relationship between a sum of spectral parameter parameter differences corresponding to a part or all of the same index of the i-1th frame and the ith frame and a ninth threshold.
  • the spectral frequency parameter of the ith frame When determining whether to correct the spectral frequency parameter of the ith frame, first determine the difference of the adjacent spectral frequency parameters of the ith frame, each difference corresponding to an index, and the spectral frequency parameter includes the impedance spectrum frequency ISF or line spectrum The frequency LSF is then determined whether the spectral frequency parameter of the i-th frame and the spectral frequency parameter of the i-1th frame satisfy the condition six, and the condition six includes: the spectral frequency corresponding to the same index of some or all of the i-1th frame and the ith frame The sum of the parameter differences is greater than the ninth threshold.
  • the spectral frequency parameter of the ith frame and the spectral frequency parameter of the i-1th frame satisfy the condition six, it is determined to correct the spectral frequency parameter of the ith frame, if the spectral frequency parameter of the ith frame and the spectrum of the i-1th frame If the frequency parameter does not satisfy the condition six, it is determined that the spectrum frequency parameter of the ith frame is not corrected.
  • determining the spectral frequency parameter after the ith frame correction according to the weighting operation of the spectral frequency parameter of the i-1th frame and the spectral frequency parameter of the ith frame, or according to the spectral frequency parameter and the pre-frame of the ith frame
  • the weighting operation of the spectral frequency parameter is performed to determine the spectral frequency parameter after the correction of the i-th frame.
  • the excitation signal of the ith frame is corrected according to the correlation and energy stability of the ith frame and the ith frame, when determining the ith frame
  • the signal excitation signal is corrected, according to the energy stability of the ith frame and the i-1th
  • the excitation signal of the i-th frame is corrected.
  • the pre-synthesized signal of the ith frame is first determined according to the excitation signal of the ith frame and the spectral frequency parameter of the ith frame.
  • the eleventh threshold is greater than 1, if the energy of the pre-synthesized signal of the i-th frame is If the ratio of the energy of the synthesized signal of the i-1th frame is greater than the eleventh threshold, it is determined that the excitation signal of the ith frame is corrected if the energy of the pre-synthesized signal of the i-th frame and the synthesized signal of the i-th frame are If the ratio of the energy is less than or equal to the eleventh threshold, it is determined that the excitation signal of the i frame is not corrected.
  • the ratio of the energy of the pre-synthesized signal of the i-1th frame to the energy of the synthesized signal of the i-th frame is less than a twelfth threshold, and the twelfth threshold is less than 1, if the pre-synthesized signal of the i-1th frame.
  • the ratio of the energy of the energy of the synthesized signal of the ith frame to the twelfth threshold is determined to be corrected for the excitation signal of the ith frame, if the energy of the pre-synthesized signal of the i-1th frame and the synthesized signal of the ith frame If the ratio of the energy is greater than or equal to the twelfth threshold, it is determined that the excitation signal of the ith frame is not corrected.
  • the second correction factor is a ratio of the energy of the i-1th frame to the energy of the ith frame, or the second correction factor is a ratio of the energy of the same number of subframes of the i-1th frame and the ith frame.
  • determining whether to modify the excitation signal of the ith frame according to the correlation of the i-1th frame signal when determining to correct the signal excitation signal of the ith frame
  • the excitation signal of the ith frame is corrected according to the energy stability of the ith frame and the ith-1.
  • the correlation of the i-1th frame signal includes: a relationship between a correlation value of the i-1th frame signal and a thirteenth threshold, and a deviation of a gene period of the i-1th frame signal and a fourteenth threshold Size relationship.
  • condition seven When determining whether to correct the excitation signal of the i-th frame, by determining whether the i-th frame signal satisfies the condition seven, if the i-th frame signal satisfies the condition seven, determining to correct the excitation signal of the i-th frame, If the i-1th frame signal does not satisfy the condition seven, it is determined that the excitation signal of the i-th frame is not corrected.
  • Condition seven is: the i-1th frame is a lost frame, the correlation value of the i-1th signal is greater than the thirteenth threshold, and the pitch period of the i-1th frame signal is less than the fourteenth threshold.
  • the third correction factor When performing the correction, first determining the third correction factor according to the energy stability of the i-th frame and the i-1th, the third correction factor is less than 1, and then multiplying the excitation signal of the i-th frame by the third correction factor to obtain the i-th Frame-corrected excitation signal.
  • determining whether to modify the excitation signal of the ith frame according to the correlation between the ith frame and the i-1th frame signal when determining the signal excitation for the ith frame
  • the excitation signal of the i-th frame is corrected based on the energy stability of the ith frame and the i-1th.
  • the correlation between the i-th frame and the i-th frame signal includes: a relationship between a correlation value of the i-1th frame signal and a thirteenth threshold value, and a deviation of a gene period of the i-th frame signal and a thirteenth threshold value. relationship.
  • condition 8 includes: the i-1th frame is a lost frame, the correlation value of the i-1th frame signal is greater than a preset thirteenth threshold, and the pitch period of the ith frame signal is less than a preset fourteenth threshold.
  • the third correction factor is less than 1, and then multiplying the excitation signal of the i-th frame by the third correction factor to obtain the i-th Frame-corrected excitation signal.
  • the third correction factor is a ratio of the energy of the i-1th frame to the energy of the ith frame, or the third correction factor is a ratio of the energy of the same number of subframes of the i-1th frame and the ith frame.
  • determining whether to modify the excitation signal of the ith frame according to the correlation between the i-1th frame and the i-2th frame signal when determining the ith frame
  • the excitation signal of the i-th frame is corrected based on the energy stability of the ith frame and the i-1th.
  • the correlation between the i-1th frame and the i-2th frame signal includes: The relationship between the correlation value of the i-2th frame signal and the thirteenth threshold value, and whether the excitation signal of the i-1th frame has been corrected.
  • Condition 9 includes: the i-2th frame is a lost frame, the correlation value of the i-2th frame signal is greater than the thirteenth threshold, and the excitation signal of the i-1th frame signal is corrected.
  • the fourth correction factor When performing the correction, determining the fourth correction factor according to the energy stability of the ith frame and the i-1th, the fourth correction factor is less than 1, and multiplying the excitation signal of the ith frame by the fourth correction factor to obtain the i frame correction.
  • the motivation signal When performing the correction, determining the fourth correction factor according to the energy stability of the ith frame and the i-1th, the fourth correction factor is less than 1, and multiplying the excitation signal of the ith frame by the fourth correction factor to obtain the i frame correction.
  • determining whether to modify the excitation signal of the ith frame according to the correlation between the i-1th frame and the i-2th frame signal when determining the ith frame
  • the excitation signal of the i-th frame is corrected based on the energy stability of the ith frame and the i-1th.
  • the correlation between the i-1th frame and the i-2th frame signal includes: a relationship between a correlation value of the i-2th frame signal and a thirteenth threshold value, and a generational digital book in the excitation signal of the i-1th frame The contribution is related to the magnitude of the fifteenth threshold.
  • Condition 10 includes: the i-2th frame is a lost frame, the correlation value of the i-2th frame signal is greater than the thirteenth threshold, and the algebraic code contribution in the excitation signal of the i-1th frame signal is less than the fifteenth threshold.
  • the fourth correction factor When performing the correction, determining the fourth correction factor according to the energy stability of the ith frame and the i-1th, the fourth correction factor is less than 1, and multiplying the excitation signal of the ith frame by the fourth correction factor to obtain the i frame correction.
  • the motivation signal When performing the correction, determining the fourth correction factor according to the energy stability of the ith frame and the i-1th, the fourth correction factor is less than 1, and multiplying the excitation signal of the ith frame by the fourth correction factor to obtain the i frame correction.
  • the excitation signal of the status update of the ith frame is corrected according to the correlation between the i-1th frame and the ith frame signal, when determining the ith frame
  • the excitation signal of the state update of the i-th frame is corrected based on the energy stability of the i-th frame and the i-th-1.
  • the correlation of the frame signal includes: the correlation between the i-1th frame and the ith frame, and whether the excitation signal of the i-1th frame signal has been corrected.
  • Condition 11 includes that the i-th frame or the i-th frame is a strongly correlated frame, and the excitation signal of the i-1th frame signal is corrected.
  • the fifth correction factor is less than 1, and multiplying the excitation signal of the state update of the i-th frame by the fifth correction factor to obtain the The i-frame corrected state update excitation signal.
  • the method further includes: processing the decoded signal of the ith frame to obtain a correlation value of the decoded signal of the ith frame, according to the Determination of the correlation value of the decoded signal of the i frame, the magnitude relationship between the pitch periods of the subframes of the i-th frame, the spectral tilt value of the i-th frame, and the zero-crossing rate of the i-th frame, or any combination thereof Correlation of the ith frame signal, determining the energy of the ith frame according to the decoded signal of the ith frame, and determining the energy of the ith frame and the i-1th frame according to the energy of the ith frame and the energy of the ith frame.
  • the energy stability is determined, and the energy of each subframe of the ith frame is determined according to the decoded signal of the ith frame, and the energy stability between the subframes of the ith frame is determined according to the energy of each subframe of
  • a second aspect of the present invention provides a frame loss compensation processing apparatus, which includes a lost frame determination module, an estimation module, an acquisition module, a generation module, and a signal synthesis module.
  • the lost frame determining module is configured to determine, by using the lost frame marking bit, whether the ith frame is a lost frame
  • the estimating module is configured to: when the ith frame is a lost frame, according to an inter-frame relationship and a front N of the first N frame of the ith frame At least one of an intra-frame relationship of the frame, estimating a spectral frequency parameter, a pitch period, and a gain of the ith frame
  • the acquiring module is configured to acquire an algebraic codebook of the ith frame
  • the generating module is configured to estimate the ith frame according to the estimating module
  • the pitch period, the gain, and the generation digital book of the ith frame acquired by the acquisition module generate an excitation signal of the ith frame
  • the signal synthesis module is configured to use the spectral frequency of the ith frame estimated by
  • the number and the excitation signal of the ith frame generated by the generation module synthesize the ith frame signal.
  • the inter-frame relationship of the first N frames includes at least one of correlation and energy stability of the first N frames, and the intra-frame relationship of the first N frames includes correlation between sub-frames in the first N frames and energy stability. At least one of the parameters of the estimated ith frame is more accurate, thereby improving the quality of the decoded speech signal.
  • the spectral frequency parameter of the ith frame is obtained by the estimation module according to the inter-frame relationship of the first N frames of the ith frame, and the estimation module is specifically configured to: according to the ith frame The correlation of the first N frames determines the weight of the spectral frequency parameter of the i-1th frame and the weight of the preset spectral frequency parameter of the i-th frame, according to the weight of the spectral frequency parameter of the i-1th frame and the preset of the ith frame The weight of the spectral frequency parameter is weighted by the spectral frequency parameter of the i-1th frame and the preset spectral frequency parameter of the ith frame to obtain the spectral frequency parameter of the ith frame.
  • the correlation of the first N frames of the ith frame includes: a relationship between a spectral tilt parameter of the i-1th frame signal and a second threshold, and an i-1th frame signal.
  • the estimating module is specifically configured to: if the i-1th frame signal satisfies at least one of the condition one, the condition two, and the condition three, determine that the weight of the spectral frequency parameter of the i-1th frame is the first weight, i The weight of the preset spectral frequency parameter of the frame is the second weight.
  • the weight of the preset spectral frequency parameter of the i-1th frame is the first weight.
  • the first weight is greater than the second weight
  • the condition one is: the normalized autocorrelation value of the i-1th frame signal is greater than the first threshold
  • the second condition is: the spectral tilt parameter of the i-1th frame signal is greater than the second threshold.
  • the condition three is that the deviation of the pitch period of the signal of the i-1th frame is smaller than the third threshold.
  • the gene period of the ith frame is estimated by the estimation module according to the correlation between the first N frames of the ith frame and the correlation between the subframes of the first N frames of the ith frame.
  • the correlation includes: a magnitude relationship between a normalized autocorrelation value of the i-2th frame signal and a fifth threshold, a magnitude relationship between a deviation of a gene period of the i-2th frame signal and a fourth threshold, and an i-th The magnitude of the deviation of the gene period of the 1-frame signal from the magnitude of the fourth threshold.
  • the estimating module is specifically configured to: if the deviation of the pitch period of the i-1th frame signal is less than the fourth threshold, determine a pitch period offset value of the i-1th frame signal according to a pitch period of the i-1th frame signal Determining a pitch period of the ith frame signal according to a pitch period offset value of the i-1th frame signal and a pitch period of the i-1th frame signal; a pitch period of the ith frame signal including each of the ith frame
  • the pitch period of the sub-frame, the pitch period offset value of the i-1th frame signal is the mean value of the difference of the pitch periods of all adjacent sub-frames of the i-1th frame.
  • the normalized autocorrelation value of the i-2th frame signal is greater than the fifth threshold, and the pitch period of the i-2th frame signal is less than a fourth threshold, determining a pitch period offset value of the i-th frame signal and the i-1th frame signal according to a pitch period of the i-2th frame signal and the i-1th frame signal; according to the i-1th frame signal.
  • the pitch period and the pitch period offset value of the i-2th frame signal and the i-1th frame signal determine the pitch period of the ith frame signal.
  • the estimation module determines a pitch period offset value pv of the i-1th frame signal according to the following formula:
  • the estimation module determines the pitch period of the ith frame signal according to the following formula:
  • pv is the pitch period offset value of the i-1th frame signal
  • p cur (j) is the pitch period of the jth subframe of the ith frame.
  • the estimation module determines a pitch period offset value pv of the i-th frame signal and the i-1th frame signal according to the following formula:
  • the estimation module determines the pitch period of the ith frame signal according to the following formula:
  • p (-1) (3) is the pitch period of the third subframe of the i-1th frame
  • pv is the pitch period offset value of the i-2th frame signal and the i-1th frame signal
  • p cur ( x) is the pitch period of the xth subframe of the i-th frame.
  • the gain of the ith frame is obtained by the estimation module according to the correlation and energy stability of the first N frames of the ith frame, where the gain of the ith frame includes: Codebook gain and algebraic book gain.
  • the estimation module is specifically configured to: firstly, according to the adaptive codebook gain of the i-1th frame or a preset fixed value, the correlation of the i-1th frame, and the sequence number of the ith frame in consecutive consecutive lost frames, Determining the adaptive codebook gain of the ith frame, and then according to The energy stability of the i-1th frame determines the weight of the algebraic book gain of the i-1th frame and the weight of the gain of the VAD frame, and finally according to the weight of the algebraic code gain of the i-1th frame and the gain of the VAD frame.
  • the weight is weighted by the algebraic book gain of the i-1th frame and the gain of the VAD frame to obtain the algebraic book gain of the i-th frame.
  • the more stable the energy of the i-1th frame the greater the weight of the algebraic book gain of the i-1th frame.
  • the weight of the gain of the VAD frame also increases accordingly.
  • the estimation module is further configured to: determine a first correction factor according to the codec rate, and correct the algebraic book gain of the i-1th frame by using the first correction factor.
  • the acquiring module may obtain the algebraic book by obtaining the algebraic codebook of the ith frame according to the random noise estimation, or the algebraic code of the first N frames according to the i-th frame The book determines the generational digital book of the i-th frame.
  • the acquiring module is further configured to: determine, according to the deviation of the pitch period of the i-1th frame, the correlation of the signal, the magnitude of the spectral slope, and the zero-crossing rate, determine the i-th
  • the weight of the contribution, and the excitation signal of the state update of the i-1th frame are interpolated to determine the adaptive codebook of the i-th frame.
  • the generating module is specifically configured to: determine, according to the product of the algebraic codebook of the i-th frame and the algebraic book gain of the i-th frame, determine the algebraic book contribution of the i-th frame, according to the adaptive codebook of the i-th frame and the i-th frame
  • the product of the adaptive codebook gain determines the adaptive codebook contribution of the i-th frame, and contributes to the i-th frame of the i-th frame based on the weight of the algebraic book contribution of the i-th frame and the weight of the adaptive codebook contribution.
  • the adaptive codebook contribution performs a weighting operation to determine the excitation signal of the i-th frame, and the weight of the adaptive codebook is 1.
  • the device further includes: a decoding module, a determining module, and a correcting module.
  • the decoding module is configured to obtain a spectral frequency parameter, a pitch period, a gain, and an algebraic codebook of the ith frame according to the received code stream decoding, and the generating module is further configured to use, according to the pitch period, the gain, and the generation of the ith frame decoded by the decoding module.
  • the digital book generates an excitation signal of the ith frame and a state update excitation signal of the ith frame
  • the determining module is configured to: when the i-1th frame or the i-2th frame is a lost frame, according to the ith frame and the ith frame Interframe relationship of the first N frames Determining whether to correct at least one of a spectral frequency parameter of the ith frame, an excitation signal, and a state updated excitation signal
  • the correction module is configured to determine a spectral frequency for the ith frame when the determining module determines at least one of the intra-frame relationship
  • the spectral frequency of the ith frame is based on at least one of an inter-frame relationship and an intra-frame relationship of the first N frames of the ith frame and the ith frame At least one of the parameter, the excitation signal, and the state updated excitation signal is corrected.
  • the signal synthesis module is further configured to synthesize the ith frame signal according to the correction result of the correction module for at least one of the spectral frequency parameter of the ith frame, the excitation signal, and the state updated excitation signal, or when the determining module determines that the ith frame is not correct
  • the ith frame signal is synthesized based on the spectral frequency parameter of the i-th frame, the excitation signal, and the state-updated excitation signal.
  • the inter-frame relationship includes at least one of correlation and energy stability of the ith frame and the first N frame of the ith frame
  • the intra-frame relationship includes: a subframe-to-subframe correlation between the ith frame and the first N frame of the ith frame At least one of sex and energy stability.
  • the determining module is configured to determine, according to the correlation of the ith frame, whether to correct the spectral frequency parameter of the ith frame, and when the determining module determines the spectral frequency parameter of the ith frame
  • the correction module is configured to: correct the spectral frequency parameter of the i-th frame according to the spectral frequency parameter of the i-th frame and the i-th frame, or according to the spectral frequency parameter and the preset spectral frequency parameter of the i-th frame The spectral frequency parameters of the ith frame are corrected.
  • the correlation of the ith frame includes: a size relationship between one of the two spectral frequency parameters corresponding to the index of the minimum value of the difference of the adjacent spectral frequency parameters of the i-th frame and the sixth threshold, The magnitude relationship between the minimum value of the difference between the adjacent spectral frequency parameters of the i frame and the seventh threshold and the magnitude of the minimum value of the difference between the adjacent spectral frequency parameters of the i-th frame and the eighth threshold.
  • the determining module is specifically configured to: first determine a difference of adjacent spectral frequency parameters of the i-th frame, each difference corresponding to an index, and the spectral frequency parameter includes an impedance spectrum frequency ISF or a line spectrum frequency LSF, and then judges Whether the difference of the adjacent spectral frequency parameters of the i frame satisfies at least one of the condition four and the condition five, and if the difference of the adjacent spectral frequency parameters of the i-th frame satisfies at least one of the condition four and the condition five, determining the pair The ith frame spectral frequency parameter is corrected.
  • the spectral frequency of the ith frame is determined not to be determined.
  • the parameters are corrected.
  • the condition four includes: one of the two spectral frequency parameters corresponding to the index of the minimum value of the difference of the adjacent spectral frequency parameters of the i-th frame is smaller than the sixth threshold, and the condition five includes: the i-th frame
  • the index value of the minimum value of the difference of the adjacent spectral frequency parameters is less than the eighth threshold, and the minimum difference is less than the seventh threshold.
  • the correction module is specifically configured to: determine a spectral frequency parameter corrected by the ith frame according to a weighting operation of the spectral frequency parameter of the i-1th frame and the spectral frequency parameter of the ith frame, or according to the spectral frequency parameter of the ith frame The weighting operation of the pre-spectral spectral frequency parameter determines the spectral frequency parameter after the ith frame correction.
  • the determining module is configured to determine, according to the correlation between the ith frame and the i-1th frame, whether to correct the spectral frequency parameter of the ith frame, when the determining module determines the first
  • the correction module is configured to: correct the spectral frequency parameter of the ith frame according to the spectral frequency parameter of the i-th frame and the i-1th frame, or according to the spectral frequency parameter of the ith frame
  • the preset spectral frequency parameter corrects the spectral frequency parameter of the ith frame.
  • the correlation between the ith frame and the ith frame includes: a relationship between a sum of spectral parameter parameter differences corresponding to a part or all of the same index of the i-1th frame and the ith frame and a ninth threshold.
  • the determining module is specifically configured to: first determine a difference of adjacent spectral frequency parameters of the i-th frame, each difference corresponding to an index, and the spectral frequency parameter includes an impedance spectrum frequency ISF or a line spectrum frequency LSF, and then judges Whether the spectral frequency parameter of the i frame and the spectral frequency parameter of the i-1th frame satisfy the condition six, if the spectral frequency parameter of the i-th frame and the spectral frequency parameter of the i-1th frame satisfy the condition six, determining the spectrum of the ith frame The frequency parameter is corrected.
  • the condition six includes: the i-th frame
  • the sum of the spectral frequency parameter differences corresponding to the partial or all identical indexes of the i-th frame is greater than the ninth threshold.
  • the correction module is specifically configured to: determine a spectral frequency parameter corrected by the ith frame according to a weighting operation of the spectral frequency parameter of the i-1th frame and the spectral frequency parameter of the ith frame, or according to the spectral frequency parameter of the ith frame The weighting operation of the preset spectral frequency parameter determines the spectral frequency parameter after the correction of the ith frame.
  • the determining module is configured to determine, according to the correlation and energy stability of the ith frame and the i-1th frame, whether to modify the excitation signal of the ith frame, when the determining module When it is determined that the signal excitation signal of the i-th frame is corrected, the correction module is used to The energy stability of the i-th frame and the i-th is corrected for the excitation signal of the i-th frame.
  • the determining module is specifically configured to: first determine a pre-synthesized signal of the ith frame according to the excitation signal of the ith frame and the spectral frequency parameter of the ith frame.
  • the absolute value of the difference between the energy of the pre-synthesized signal of the i-th frame and the energy of the synthesized signal of the i-th frame is greater than a tenth threshold, if the energy of the pre-synthesized signal of the i-th frame and the i-1th If the absolute value of the difference of the energy of the synthesized signal of the frame is greater than the tenth threshold, it is determined that the excitation signal of the ith frame is corrected if the energy of the pre-synthesized signal of the ith frame and the energy of the synthesized signal of the i-1th frame If the absolute value of the difference is less than or equal to the tenth threshold, it is determined that the excitation signal of the i frame is not corrected.
  • the eleventh threshold is greater than 1, if the energy of the pre-synthesized signal of the i-th frame is If the ratio of the energy of the synthesized signal of the i-1th frame is greater than the eleventh threshold, it is determined that the excitation signal of the ith frame is corrected if the energy of the pre-synthesized signal of the i-th frame and the synthesized signal of the i-th frame are If the ratio of the energy is less than or equal to the eleventh threshold, it is determined that the excitation signal of the i frame is not corrected.
  • the ratio of the energy of the pre-synthesized signal of the i-1th frame to the energy of the synthesized signal of the i-th frame is less than a twelfth threshold, and the twelfth threshold is less than 1, if the pre-synthesized signal of the i-1th frame.
  • the ratio of the energy of the energy of the synthesized signal of the ith frame to the twelfth threshold is determined to be corrected for the excitation signal of the ith frame, if the energy of the pre-synthesized signal of the i-1th frame and the synthesized signal of the ith frame If the ratio of the energy is greater than or equal to the twelfth threshold, it is determined that the excitation signal of the ith frame is not corrected.
  • the correction module is specifically configured to: determine a second correction factor according to the energy stability of the ith frame and the i-1th, the second correction factor is smaller than, and multiply the excitation signal of the ith frame by the second correction factor to obtain the ith frame correction
  • the excitation signal is 1.
  • the second correction factor is a ratio of the energy of the i-1th frame to the energy of the ith frame, or the second correction factor is a ratio of the energy of the same number of subframes of the i-1th frame and the ith frame.
  • the determining module is configured to determine, according to the correlation of the i-1th frame signal, whether to modify the excitation signal of the ith frame, and when the determining module determines the signal for the ith frame
  • the correction module is configured to correct the excitation signal of the ith frame according to the energy stability of the ith frame and the i-1th.
  • the correlation of the i-1th frame signal The relationship between the correlation value of the i-1th frame signal and the thirteenth threshold value, and the magnitude of the deviation of the gene period of the i-1th frame signal from the fourteenth threshold value.
  • the determining module is specifically configured to: determine whether the i-1th frame signal satisfies the condition seven, and if the i-1th frame signal satisfies the condition seven, determining to correct the excitation signal of the ith frame, if the i-1th frame If the signal does not satisfy the condition seven, it is determined that the excitation signal of the ith frame is not corrected.
  • the condition seven is: the i-1th frame is a lost frame, the correlation value of the i-1th signal is greater than the thirteenth threshold, and the pitch period of the i-1th frame signal is less than the fourteenth threshold.
  • the correction module is specifically configured to: determine a third correction factor according to the energy stability of the ith frame and the i-1th, the third correction factor is less than 1, and multiply the excitation signal of the ith frame by the third correction factor to obtain the ith frame The corrected excitation signal.
  • the determining module is configured to determine, according to the correlation between the ith frame and the i-1th frame signal, whether to modify the excitation signal of the ith frame, when the determining module determines the
  • the correction module is configured to correct the excitation signal of the ith frame according to the energy stability of the ith frame and the i-1th.
  • the correlation between the i-th frame and the i-th frame signal includes: a relationship between a correlation value of the i-1th frame signal and a thirteenth threshold value, and a deviation of a gene period of the i-th frame signal and a thirteenth threshold value. relationship.
  • the determining module is specifically configured to: determine whether the i-th frame signal and the ith frame signal satisfy the condition eight, and if the i-th frame signal and the ith frame signal satisfy the condition eight, determine the excitation of the i-th frame The signal is corrected. If the i-th frame signal and the ith frame signal do not satisfy the condition eight, it is determined that the excitation signal of the i-th frame is not corrected.
  • the condition 8 includes: the i-1th frame is a lost frame, the correlation value of the i-1th frame signal is greater than a preset thirteenth threshold, and the pitch period of the ith frame signal is less than the preset fourteenth threshold. Threshold.
  • the correction module is specifically configured to: determine a third correction factor according to the energy stability of the ith frame and the i-1th, the third correction factor is less than 1, and multiply the excitation signal of the ith frame by the third correction factor to obtain the ith frame The corrected excitation signal.
  • the determining module is configured to determine, according to the correlation between the i-1th frame and the i-2th frame signal, whether to modify the excitation signal of the ith frame, when the determining module determines
  • the correction module is configured to correct the excitation signal of the ith frame according to the energy stability of the ith frame and the ith-1.
  • the correlation between the i-1th frame and the i-2th frame signal includes: a correlation value of the i-2th frame signal and a thirteenth threshold value. Relationship, whether the excitation signal of the i-1th frame has been corrected.
  • the determining module is specifically configured to: determine whether the i-th frame signal and the i-th frame signal satisfy the condition nine, and if the i-th frame signal and the i-1th frame signal satisfy the condition nine, determine the first The excitation signal of the i frame is corrected. If the i-th frame signal and the i-1st frame signal do not satisfy the condition nine, it is determined that the excitation signal of the i-th frame is not corrected.
  • the condition 9 includes: the i-2th frame is a lost frame, the correlation value of the i-2th frame signal is greater than the thirteenth threshold, and the excitation signal of the i-1th frame signal is corrected.
  • the correction module is specifically configured to: determine a fourth correction factor according to the energy stability of the ith frame and the i-1th, the fourth correction factor is less than 1, and multiply the excitation signal of the ith frame by the fourth correction factor to obtain an i frame correction. After the excitation signal.
  • the determining module is configured to determine, according to the correlation between the i-1th frame and the i-2th frame signal, whether to modify the excitation signal of the ith frame, when the determining module determines
  • the correction module is configured to correct the excitation signal of the ith frame according to the energy stability of the ith frame and the ith-1.
  • the correlation between the i-1th frame and the i-2th frame signal includes: a relationship between a correlation value of the i-2th frame signal and a thirteenth threshold value, and a generational digital book in the excitation signal of the i-1th frame The contribution is related to the magnitude of the fifteenth threshold.
  • the determining module is specifically configured to: determine whether the i-th frame signal and the i-th frame signal satisfy the condition ten, and if the i-th frame signal and the i-1th frame signal satisfy the condition ten, determine the pair The excitation signal of the i frame is corrected. If the i-2th frame signal and the i-1st frame signal do not satisfy the condition ten, it is determined that the excitation signal of the i th frame is not corrected.
  • the condition ten includes: the i-2th frame is a lost frame, the correlation value of the i-2th frame signal is greater than the thirteenth threshold, and the algebraic code contribution in the excitation signal of the i-1th frame signal is less than the fifteenth Threshold.
  • the correction module is specifically configured to: determine a fourth correction factor according to the energy stability of the ith frame and the i-1th, the fourth correction factor is less than 1, and multiply the excitation signal of the ith frame by the fourth correction factor to obtain an i frame correction. After the excitation signal.
  • the determining module is configured to determine, according to the correlation between the i-1th frame and the ith frame signal, whether to modify the excitation signal of the state update of the ith frame, when the determining module
  • the correction module is configured to correct the excitation signal of the state update of the i-th frame according to the energy stability of the ith frame and the i-1th.
  • the correlation between the i-1th frame and the ith frame signal includes: an i-1th frame and an ith frame The correlation size and whether the excitation signal of the i-1th frame signal has been corrected.
  • the determining module is specifically configured to: determine whether the ith frame signal and the ith frame signal satisfy the condition eleven, and if the ith frame signal and the i-1 frame signal satisfy the condition eleven, determine the ith frame The state update excitation signal is corrected. If the ith frame signal and the i-1st frame signal do not satisfy the condition XI, it is determined that the excitation signal of the state update of the ith frame is not corrected, and condition 11 includes: the ith frame Or the i-1th frame is a strong correlation frame, and the excitation signal of the i-1th frame signal is corrected.
  • the correction module is specifically configured to: determine, according to the energy stability of the ith frame and the i-1th, the fifth correction factor, the fifth correction factor is less than 1, and multiply the excitation signal of the state update of the ith frame by the fifth correction factor.
  • the excitation signal of the state update after the ith frame correction is specifically configured to: determine, according to the energy stability of the ith frame and the i-1th, the fifth correction factor, the fifth correction factor is less than 1, and multiply the excitation signal of the state update of the ith frame by the fifth correction factor. The excitation signal of the state update after the ith frame correction.
  • the frame loss compensation processing method and apparatus determines whether the ith frame is a lost frame by using a lost frame flag bit, and when the ith frame is a lost frame, according to the inter-frame relationship of the first N frame of the i-th frame At least one of the intra-frame relationships of the first N frames, the spectral frequency parameter, the pitch period, and the gain of the ith frame are estimated, and the inter-frame relationship of the first N frames includes at least one of correlation and energy stability of the first N frames, The intra-frame relationship of the N frame includes at least one of correlation and energy stability between the subframes in the first N frames.
  • the parameters of the ith frame are determined by the signal correlation and energy stability of the first N frames, and the correlation and energy stability of the signals in each frame, and the parameters of the ith frame are estimated by considering the relationship between the signals. More accurate, which improves the quality of the decoded speech signal.
  • FIG. 1 is a flowchart of a method for processing a frame loss compensation according to Embodiment 1 of the present invention
  • FIG. 2 is a flowchart of a method for estimating a spectral spectrum parameter according to Embodiment 2 of the present invention
  • FIG. 3 is a flowchart of a method for estimating a gene period according to Embodiment 3 of the present invention.
  • FIG. 4 is a flowchart of a gain estimation method according to Embodiment 4 of the present invention.
  • FIG. 5 is a flowchart of a method for processing a frame loss compensation according to Embodiment 5 of the present invention.
  • Figure 6 is a comparison diagram of the spectrum of the i-th frame before and after the correction
  • Figure 7 is a comparison diagram of the time domain signal of the ith frame before and after correction
  • FIG. 8 is a flowchart of a method for processing a frame loss compensation according to Embodiment 6 of the present invention.
  • FIG. 9 is a schematic structural diagram of a frame loss compensation processing apparatus according to Embodiment 7 of the present invention.
  • FIG. 10 is a schematic structural diagram of a frame loss compensation processing apparatus according to Embodiment 8 of the present invention.
  • FIG. 11 is a schematic diagram showing the physical structure of a frame loss compensation processing apparatus according to Embodiment 9 of the present invention.
  • FIG. 1 is a flowchart of a method for processing a frame loss compensation according to Embodiment 1 of the present invention. As shown in FIG. 1 , the method in this embodiment may include the following steps:
  • Step 101 Determine, by using the lost frame flag bit, whether the ith frame is a lost frame.
  • the frame sent by the encoding end may be lost during transmission.
  • the network side will record whether the current frame is a lost frame.
  • the decoding end determines whether the ith frame is a lost frame according to the lost frame flag bit in the received data packet.
  • the ith frame is the current frame being processed, and so on, the i-1th frame is the previous frame of the current frame, and the i+1th frame is the next frame of the current frame, wherein the previous frame of the current frame is Refers to a frame that is adjacent to the current frame and that is ahead of the current frame in the time domain.
  • the latter frame of the current frame refers to a frame that is adjacent to the current frame and that is behind the current frame in the time domain.
  • Step 102 If the ith frame is a lost frame, estimate the parameter of the ith frame according to at least one of an inter-frame relationship of the first N frames of the ith frame and an intra-frame relationship of the first N frames.
  • the inter-frame relationship of the first N frames includes at least one of correlation and energy stability of the first N frames, and the intra-frame relationship of the first N frames includes correlation between sub-frames in the first N frames and energy stability.
  • the correlation includes the magnitude relationship of the spectral frequency parameters of the signal, the magnitude relationship of the correlation values, the magnitude relationship of the spectral tilt parameters, the magnitude relationship of the gene periods, and the relationship between the excitation signals.
  • the parameters of the i-th frame include: spectral frequency parameters, pitch period, gain, and algebraic book, N is A positive integer greater than or equal to 1, wherein the spectral frequency parameter, the pitch period, and the gain may be estimated by at least one of an inter-frame relationship of the first N frames of the ith frame and an intra-frame relationship of the first N frames.
  • the correlation of the signal can be represented by the normalized autocorrelation value of the signal.
  • the normalized autocorrelation value of the signal is obtained by normalizing the autocorrelation of the signal.
  • the correlation of the signal can also be represented by the autocorrelation value.
  • the value can be obtained by autocorrelation processing, and normalization processing is not required when determining, and the normalized autocorrelation value and the autocorrelation value can be mutually converted, and the correlation of the finally obtained signals is the same.
  • the correlation of the signal may specifically perform autocorrelation processing or return to any one or any combination of the correlation value of the decoded signal of each frame, the magnitude relationship between the pitch periods, the spectral tilt value of each frame, or the zero-crossing rate. A self-correlation process is obtained.
  • the correlation of signals can be divided into the following cases: low correlation, low correlation rising edge, low correlation falling edge, medium correlation, high correlation, high correlation rising edge, and high correlation falling edge.
  • the correlation value of the signal can be compared with the correlation threshold, and the correlation threshold can also select some threshold values from the above situation. If the correlation threshold takes a low correlation falling edge, then the correlation value of the signal is greater than The low correlation falling edge, that is, the correlation is related to the correlation, the high correlation, the high correlation rising edge, and the high correlation falling edge.
  • the energy stability between frames of the first N frames refers to the energy relationship between adjacent frames of the first N frames, and the adjacent frames refer to two frames connected in the time domain during transmission, and energy stability It can be represented by the ratio of the energy between the frames, and the energy of each frame can be obtained by determining the root mean square of the average energy of the signal, or by determining the average amplitude of the signal.
  • the average energy E and the average amplitude M of each frame can be determined by the following two formulas:
  • N is the frame length or the subframe length
  • s[j] represents the amplitude of the jth frame
  • the value of j is 1, 2, ..., N.
  • Spectral spectral parameters include Immittance Spectral Frequencies (ISF) and Line Spectral Frequencies (LSF).
  • the gain includes an adaptive codebook gain and a codebook gain.
  • the pitch period is a periodic characteristic caused by the vibration of the vocal cords when a person makes a voiced sound, that is, the period of the vocal cord vibration when the person makes a sound is inversely related to the vibration frequency of the vocal cord.
  • the parameters of the ith frame when estimating the parameters of the ith frame, determining the parameters of the ith frame according to the correlation and energy stability of the historical frame (ie, the first N frames), and the correlation and energy stability of each frame, considering the signal The relationship between the estimated ith frames is more accurate.
  • Step 103 Obtain a generation digital book of the i-th frame.
  • the algebraic codebook of the ith frame may be obtained according to the random noise estimation, or the algebraic codebook of the ith frame may be obtained according to the algebraic codebook of the first N frames of the i-th frame.
  • the algebraic book of the i-th frame may be estimated by an existing method.
  • Step 104 Generate an excitation signal of the ith frame according to the estimated pitch period of the ith frame, the gain, and the acquired algebraic codebook of the ith frame.
  • the weight contribution of the algebraic book can be obtained by performing a weighting operation according to any one or any combination of the deviation of the pitch period of the i-1th frame, the correlation of the signal, the magnitude of the spectral slope, and the zero-crossing rate.
  • the gain of the ith frame includes an adaptive codebook gain and an algebraic book gain.
  • synthesizing the excitation signal of the ith frame firstly, according to the algebraic codebook of the i-th frame and the algebraic code gain of the ith frame.
  • the multiplication product obtains the algebraic book contribution of the i-th frame
  • the adaptive codebook contribution of the i-th frame is obtained from the product of the adaptive codebook of the i-th frame and the adaptive codebook gain of the i-th frame.
  • the algebraic digital book contribution of the i-th frame and the adaptive codebook contribution are weighted to obtain an excitation signal of the i-th frame, wherein
  • the weight of the adaptation codebook is fixed at 1.
  • Step 105 Synthesize an ith frame signal according to the estimated spectral frequency parameter of the ith frame and the generated excitation signal of the ith frame.
  • step 105 may be a simple modification of the existing method or the existing method, and details are not described herein again.
  • the parameter of the ith frame, the first N frames is estimated according to at least one of an inter-frame relationship of the first N frames of the ith frame and an intra-frame relationship of the first N frames.
  • the inter-frame relationship includes at least one of correlation and energy stability of the first N frames
  • the intra-frame relationship of the first N frames includes at least one of correlation and energy stability between subframes in the first N frames.
  • the spectral frequency parameter of the ith frame is estimated according to the inter-frame relationship of the first N frames of the ith frame.
  • the method provided in this embodiment may include the following steps:
  • Step 201 Determine, according to the correlation of the first N frames of the ith frame, the weight of the spectral frequency parameter of the i-1th frame and the weight of the preset spectral frequency parameter of the ith frame.
  • the correlation of the first N frames of the ith frame includes: a size relationship between a spectral tilt parameter of the i-1th frame signal and a second threshold, and a normalized autocorrelation value of the i-1th frame signal and the first The magnitude relationship of a threshold and the magnitude of the deviation of the gene period of the i-1th frame signal from the third threshold.
  • the first threshold, the second threshold, and the third threshold are all preset.
  • the first threshold may be taken from the value range of [0.3, 0.8], and specifically, may be 0.3, 0.5, 0.6, or 0.8.
  • the second threshold may be taken from a value interval of [-0.5, 0.5], and specifically may be -0.5, -0.1, 0, 0.1 or 0.5 or the like.
  • the third threshold may take a value from the value range [0.5, 5], and specifically, may be 0.5, 1 or 5, and the like.
  • the ith frame spectral frequency parameter may be determined according to the correlation of the signal of the previous frame of the i-th frame (ie, the i-1th frame) and the spectral frequency parameter.
  • the correlation of the signal of the i-1th frame is performed.
  • the weight of the spectral frequency parameter of the i-1th frame is significant, and the weight of the preset spectral frequency parameter of the i-th frame is small, i-
  • the weight of the spectral frequency parameter of the i-1th frame is small, and the weight of the preset spectral frequency parameter of the i-th frame is significant.
  • condition one is: the normalized autocorrelation value of the i-1th frame signal is greater than the first threshold
  • the second condition is: the spectral tilt parameter of the i-1th frame signal is greater than the second threshold
  • condition three is: the pitch of the i-1th frame signal The deviation of the period is less than the third threshold.
  • the first weight and the second weight may be preset, or may be determined according to the correlation size of the spectral frequency parameter between the first N frames of the i-th frame, and correspondingly, before step 201.
  • the first weight and the second weight need to be determined according to the correlation size of the spectral frequency parameters between the first N frames of the i-th frame.
  • the normalized autocorrelation value of the i-1th frame signal can be obtained by performing normalized autocorrelation processing on the decoded signal of the i-1th frame.
  • the deviation of the pitch period of the i-1th frame signal is the sum of the deviations of the pitch period of each subframe of the i-1th frame with respect to the mean of the pitch period of each subframe, and the pitch period of the i-1th frame signal is determined.
  • the pitch periods of the subframes of the i-1th frame are first added and averaged to obtain the mean value of the pitch period of each subframe, and then the deviation of each subframe from the mean of the pitch period is determined, and finally, The absolute values of the deviations of the pitch periods of the respective sub-frames are added to obtain the deviation of the pitch period of the i-1th frame signal.
  • the deviation of the pitch period of the i-1th frame signal is obtained by determining the sum of the absolute values of the differences of the pitch periods between adjacent sub-frames.
  • the first weight is 0.8
  • the second weight is 0.2
  • the first threshold is 0.8
  • the second threshold is 0.6
  • the third threshold is 0.2.
  • Step 202 Weight the spectral frequency parameter of the i-1th frame and the preset spectral frequency parameter of the ith frame according to the weight of the spectral frequency parameter of the i-1th frame and the weight of the preset spectral frequency parameter of the i-th frame. The operation obtains the spectral frequency parameter of the ith frame.
  • the decoding end presets a spectral frequency parameter for the lost frame, which is called a preset spectral spectrum parameter.
  • a preset spectral spectrum parameter When the ith frame is a lost frame, according to the spectral rate parameter of the i-1th frame and the ith frame.
  • the preset spectral frequency parameter is weighted to obtain the spectral frequency parameter of the ith frame.
  • the correlation of the i-1th frame is large, there is a great possibility that the correlation between the preceding and succeeding frames is also large.
  • the i-th The weight of the spectral rate parameter of one frame is significant, and the weight of the preset spectral frequency parameter of the corresponding i-th frame is small, so that the determined spectral frequency parameter of the ith frame mainly depends on the spectral frequency parameter of the ith frame, and Add accuracy.
  • the third embodiment of the present invention provides a method for estimating a pitch period.
  • the gene period of the ith frame is based on the correlation of the first N frames of the ith frame and the ith frame.
  • the correlation between the subframes of the first N frames is estimated; wherein the correlation includes: the size relationship between the normalized autocorrelation value of the i-2th frame signal and the fifth threshold, and the gene period of the i-2th frame signal.
  • the fourth threshold may be taken from the value range [2, 50], and specifically, may be 2, 5, 10 or 50.
  • the fifth threshold may be selected from a low correlation rising edge to a high correlation rising edge.
  • a low correlation rising edge, a low correlation falling edge, or a high correlation may be selected. Rising edge and so on.
  • the low correlation rising edge and the high correlation rising edge are the division of the correlation value set first, for example, the correlation value may be sequentially divided into low correlation according to the magnitude of the correlation value, and the low correlation rising edge , low correlation falling edge, high correlation rising edge, high correlation, medium correlation, high correlation falling edge, etc.
  • FIG. 3 is a flowchart of a method for estimating a gene period according to Embodiment 3 of the present invention. As shown in FIG. 3, the method provided in this embodiment may include the following steps:
  • Step 301 Determine whether the deviation of the pitch period of the i-1st frame signal is less than a fourth threshold.
  • step 302 If the deviation of the pitch period of the i-1th frame signal is less than the fourth threshold, step 302 is performed, and if the deviation of the pitch period of the i-1th frame signal is greater than or equal to the fourth threshold, step 303 is performed.
  • each frame includes a plurality of subframes
  • a deviation of a pitch period of the i-1th frame signal is a sum of a deviation of a pitch period of each subframe of the i-1th frame with respect to a mean value of a pitch period of each subframe
  • Step 302 Determine a pitch period offset value of the i-1th frame signal according to a pitch period of the i-1th frame signal, according to a pitch period offset value of the i-1th frame signal and a pitch period of the i-1th frame signal. The pitch period of the ith frame signal is determined.
  • the pitch period offset value of the i-1th frame signal is the mean value of the difference of the pitch periods of all adjacent subframes of the i-th frame, and if each frame includes 4 subframes, the following formula may be used according to the following formula. Determine the pitch period offset value pv of the i-1th frame signal:
  • the pitch period of the ith frame signal can be determined according to the following formula:
  • p (-1) (3) is the i-1th frame
  • pv is the pitch period offset value of the i-1th frame signal
  • p cur (j) is the jth subframe of the ith frame Pitch period.
  • Step 303 If the normalized autocorrelation value of the i-2th frame signal is greater than the fifth threshold, and the deviation of the pitch period of the i-2th frame signal is less than the fourth threshold, according to the i-2th frame signal and the i th
  • the pitch period of the -1 frame signal determines the pitch period offset value of the i-th frame signal and the i-1th frame signal, according to the pitch period of the i-1th frame signal and the i-2th frame signal and the i-1th
  • the pitch period offset value of the frame signal determines the pitch period of the ith frame signal.
  • the i-2th frame is the previous frame of the i-1th frame
  • the pitch period offset value pv of the i-th frame signal and the i-1th frame signal may be determined according to the following formula:
  • p (-2) (m) is the pitch period of the mth subframe of the i-2th frame
  • p (-1) (n) is the pitch period of the nth subframe of the i-1th frame
  • the pitch period of the ith frame signal is determined using the following formula:
  • the pitch period of the sub-frames pv is the pitch period offset value of the i-th frame signal and the i-th frame signal
  • p cur (x) is the pitch period of the x-th subframe of the i-th frame.
  • p (-2) (3) and p (-2) (2) are the last two subframes of the i-2, p (-1) (1) and p (-1) (0)
  • the last two subframes of the i-2 and the first two subframes of the i-1th frame have four consecutive subframes to determine the i-2th frame.
  • the pitch period offset value of the signal and the i-1th frame signal It can be understood that the last three subframes of the i-2 and the first three subframes of the i-1th frame may also select six consecutive subframes to determine the i-2th frame signal and the i-1th frame signal.
  • Pitch period offset value or, selecting all sub-frames of the i-th frame and the i-th frame to determine a pitch period offset value of the i-th frame signal and the i-th frame signal, or, selecting the i-th
  • the last sub-frame of -2 and the first sub-frame of the i-1th frame have two consecutive sub-frames to determine the pitch period offset values of the i-th frame signal and the i-th frame signal.
  • the fourth embodiment of the present invention provides a method for estimating a gain.
  • 4 is a flowchart of a gain estimation method according to Embodiment 4 of the present invention, where the gain of the ith frame includes: an adaptive codebook gain and an algebraic code gain.
  • the gain of the ith frame is based on the i th
  • the method provided in this embodiment may include the following steps:
  • Step 401 Determine an ith frame according to an adaptive codebook gain of the i-1th frame or a preset fixed value, a correlation of the i-1th frame, and a sequence number of the ith frame in consecutive consecutive lost frames.
  • Adaptive codebook gain
  • the ith frame is the first one of the plurality of consecutive lost frames, and if the m frames before the ith frame are all lost frames, the ith frame is a non-first of the plurality of consecutive lost frames.
  • Lost frames m is a positive integer greater than or equal to 1. If the ith frame is a non-first lost frame among consecutive multiple lost frames, the adaptive codebook gain, the attenuation factor, and the ith frame corresponding to the first lost frame in the consecutive plurality of lost frames are consecutive The sequence number in the plurality of lost frames determines the adaptive codebook gain of the ith frame.
  • the decoding end will be the first An adaptive codebook gain is set for a lost frame, and the adaptive codebook gain is gradually attenuated according to the increase of the number of consecutive dropped frame frames.
  • the adaptive codebook gain corresponding to the first lost frame is 1 and the attenuation factor is 0.1
  • the second The adaptive codebook gain of consecutive lost frames is 1-0.1
  • the adaptive codebook gain of the third consecutive lost frame is 1-2*0.1
  • the adaptive codebook gain of the m+1th consecutive lost frame is 1 -m*0.1.
  • the attenuation factor may be a fixed value or may vary with the energy stability between frames. For example, in the energy drop delay, the attenuation factor is smaller.
  • the adaptive codebook gain of the ith frame is determined to be a fixed value. That is, when the first lost frame occurs after a normal frame, an adaptive is set for the first lost frame. The codebook gain should be followed. If there are no consecutive lost frames, then the adaptive codebook gain of these discontinuous lost frames is the same as the adaptive codebook gain of the first lost frame.
  • Step 402 Determine, according to the energy stability of the i-1th frame, the weight of the algebraic book gain of the i-1th frame and the weight of the gain of the voice activity detection (VAD) frame.
  • VAD voice activity detection
  • step 402 can also be performed before step 401, that is, the order of determining the digital book gain and the adaptive codebook is not sequential.
  • the voice activation detection VAD frame gain can be determined by the root mean square of the energy, the mean value of the amplitude, and the like.
  • the sum of the weight of the algebraic book gain of the i-1th frame and the weight of the gain of the VAD frame is a fixed value, and the more stable the energy of the i-1th frame, the weight of the algebraic book gain of the i-1th frame The larger the weight of the corresponding VAD frame, the smaller the weight. Or, as the number of consecutive lost frames increases, the weight of the gain of the VAD frame increases accordingly, and accordingly, the weight of the algebraic book gain decreases. If the energy of the i-1th frame is more stable and the number of consecutive lost frames increases, the energy stability and the number of consecutive frame drops can be comprehensively considered, and the weight of the algebraic book gain of the i-1th frame is not increased, or The increase is reduced.
  • the decoding end periodically performs VAD detection to obtain the energy of the VAD frame.
  • Step 403 performing weighting operation according to the weight of the algebraic book gain of the i-1th frame, the gain of the VAD frame, the weight of the algebraic code gain of the i-1th frame, and the gain of the VAD frame to obtain the algebraic code of the i-th frame. Book gain.
  • the algebraic book gain of the i-th frame is Indicates the algebraic book gain of the i-1th frame, and g cg is the gain of the VAD frame.
  • the gain of the contemporary digital book is less than the gain of the VAD frame, the digital book gain weight remains unchanged or gradually increases on the basis of the previous frame as the number of frames increases.
  • the method before performing step 403, the method further includes: determining a first correction factor according to the codec rate, and correcting the algebraic book gain of the i-1th frame by using the first correction factor, for example, for the i-1th
  • the algebraic book gain of the frame is multiplied by the first correction factor to correct the algebraic book gain of the i-1th frame.
  • FIG. 5 is a frame loss compensation processing method according to Embodiment 5 of the present invention. As shown in FIG. 5, the method provided in this embodiment may include the following steps:
  • Step 501 Obtain a parameter of an ith frame according to the received code stream, where the parameters of the ith frame include: a spectral frequency parameter, a pitch period, a gain, and an algebraic code book.
  • Step 502 Generate an excitation signal updated by the excitation signal of the ith frame and the state of the ith frame according to the pitch period, the gain, and the algebraic codebook of the ith frame obtained by the decoding.
  • the excitation signal consists of two parts: an adaptive codebook contribution and a proxy codebook contribution.
  • the adaptive codebook contribution is obtained by multiplying the adaptive codebook by the adaptive codebook gain, and the generation of the digital book is multiplied by the generational digital book.
  • the digital book gain is obtained.
  • the adaptive codebook is obtained by interpolating the gene period of the current frame and the update signal of the state update.
  • the digital book can be estimated by an existing method, and the excitation signal is used for synthesizing the ith frame signal.
  • the status updated excitation signal is used to generate the next frame adaptive codebook.
  • Step 503 If the i-1th frame or the i-2th frame is a lost frame, determine whether to the ith frame according to at least one of an interframe relationship and an intra frame relationship of the first N frames of the i-th frame and the i-th frame. At least one of the spectral frequency parameter, the excitation signal, and the state updated excitation signal is corrected.
  • the inter-frame relationship includes at least one of correlation and energy stability of the ith frame and the first N frames of the ith frame
  • the intra-frame relationship includes: inter-subframe correlation between the ith frame and the first N frames of the ith frame At least one of energy stability.
  • Step 504 Perform at least one of a spectral frequency parameter, an excitation signal, and a status update excitation signal of the ith frame according to at least one of a frame component relationship and an intra-frame relationship of the first N frame of the ith frame and the ith frame. Corrected.
  • Step 505 Synthesize the signal of the ith frame according to the ith frame spectral frequency parameter, the excitation signal, and the state updated excitation signal.
  • Step 506 Synthesize an ith frame signal according to a correction result of at least one of a spectral frequency parameter of the ith frame, an excitation signal, and a state updated excitation signal.
  • step 506 is performed. If only the spectral frequency parameters of the ith frame are If the correction is made, the ith frame signal is synthesized based on the corrected spectral frequency parameter of the i-th frame, the decoded excitation signal of the ith frame, and the decoded excitation signal of the ith frame. If only the excitation signal of the i-th frame is corrected, the excitation signal of the modified i-th frame, the spectral frequency parameter of the decoded i-th frame, and the decoded excitation signal of the i-th frame are decoded. i frame signal.
  • the excitation signal is synthesized into the ith frame signal. If the spectral frequency parameter and the excitation signal of the ith frame are corrected, the excitation of the spectral frequency parameter of the corrected i-th frame, the modified excitation signal of the ith frame, and the state of the decoded i-th frame are updated. The signal is synthesized into an ith frame signal.
  • the excitation signal according to the corrected spectral frequency parameter of the i-th frame, the corrected state of the i-th frame, and the decoded i-th The excitation signal of the frame synthesizes the ith frame signal. If the excitation signal of the i-th frame and the state-updated excitation signal are modified, the excitation signal of the modified i-th frame, the updated excitation signal of the state of the i-th frame, and the decoded i-th frame are obtained.
  • the spectral frequency parameter synthesizes the ith frame signal.
  • the spectral frequency parameter of the i-th frame, the excitation signal, and the state-updated excitation signal are corrected, the spectral frequency parameter of the corrected i-th frame, the corrected excitation signal of the ith frame, and the corrected i-th frame
  • the excitation signal of the state update of the frame synthesizes the ith frame signal.
  • the ith frame signal can be directly synthesized according to the decoded parameters of the ith frame, and the parameters of the i frame need not be corrected. If the i-1th frame or the i-2th frame is a lost frame, the estimated parameters of the i-1th frame or the i-2th frame may have a certain error, and subsequent changes in the energy between the frames may be caused.
  • the decoded speech signal is not stable as a whole. Therefore, in this embodiment, the decoding end performs the spectral frequency parameter of the ith frame according to the correlation and energy stability of the ith frame and the first N frame of the ith frame. At least one of the excitation signal and the state updated excitation signal is corrected such that the overall energy between the preceding and succeeding frames and the energy of the same frequency band are smoothly transitioned.
  • the spectral frequency parameter includes an ISF or an LSF.
  • the ISF parameter is taken as an example. Since the ISF parameter is weighted and converted by the ISP parameter of the i-th frame and the ISP parameter of the i-1th frame, in the i-1th frame or the i-2th frame. Is the ISF parameter and the normal ISF parameter determined by the ith frame when the frame is lost (no frame loss) There may be some deviation in the ISF parameter, which results in the energy at the determined low frequency resonance peak being much larger than the true energy.
  • whether the spectral frequency parameter of the ith frame is corrected may be determined according to the correlation of the ith frame.
  • the spectral frequency parameter of the ith frame is corrected according to the spectral frequency parameter of the ith frame and the i-1th frame, or according to the spectral frequency parameter of the ith frame
  • the preset spectral frequency parameter corrects the spectral frequency parameter of the ith frame.
  • the correlation of the ith frame includes: a size relationship between one of the two spectral frequency parameters corresponding to the index of the minimum value of the difference of the adjacent spectral frequency parameters of the i-th frame and the sixth threshold, The magnitude relationship between the minimum value of the difference between the adjacent spectral frequency parameters of the i frame and the seventh threshold and the magnitude of the minimum value of the difference between the adjacent spectral frequency parameters of the i-th frame and the eighth threshold.
  • the sixth threshold may be taken from the value range of [500, 2000], and specifically may be 500, 1000 or 2000.
  • the seventh threshold may be taken from the value range of [100, 1000], and specifically may be 100, 200, 300 or 1000 or the like.
  • the eighth threshold may be taken from the value interval [1, 5], and specifically, may be 1, 2 or 5, and the like.
  • determining whether to correct the spectral frequency parameter of the ith frame according to the correlation between the ith frame and the i-1th frame specifically: first determining a difference of adjacent spectral frequency parameters of the ith frame, each The difference corresponds to an index, wherein the spectral frequency parameters are arranged in ascending order, and the index values are also in order from small to large. Then determining whether the difference between the adjacent spectral frequency parameters of the i-th frame satisfies at least one of the condition four and the condition five, and the condition four includes: the two indexes corresponding to the minimum value of the difference of the adjacent spectral frequency parameters of the i-th frame One of the spectral frequency parameters is less than a sixth threshold.
  • Condition 5 includes: an index value of a minimum value of a difference value of adjacent spectral frequency parameters of the i-th frame is smaller than a preset eighth threshold value, and the minimum difference value is smaller than a preset seventh threshold value. If the difference of the adjacent spectral frequency parameters of the ith frame satisfies at least one of the condition four and the condition five, determining to correct the ith frame spectral frequency parameter, if the difference of the adjacent spectral frequency parameters of the ith frame is simultaneously If condition 4 and condition 5 are not satisfied, it is determined that the spectrum frequency parameter of the ith frame is not corrected.
  • the correlation between the ith frame and the ith frame includes: a relationship between a sum of spectral parameter parameter differences corresponding to a part or all of the same index of the i-1th frame and the ith frame and a ninth threshold.
  • the ninth threshold may be taken from the value range of [100, 2000], and specifically, may be 100, 200, 300 or 2000.
  • determining whether to correct the spectral frequency parameter of the ith frame according to the correlation between the ith frame and the i-1th frame specifically: first determining a difference of adjacent spectral frequency parameters of the ith frame, each The difference corresponds to an index, and then determines whether the spectral frequency parameter of the i-th frame and the spectral frequency parameter of the i-1th frame satisfy the condition six, and the condition 6 includes: the partial index of the i-th frame and the i-th frame correspond to the same index The sum of the spectral frequency parameter difference values is greater than the ninth threshold.
  • the ith frame spectral frequency parameter is corrected, if the i If the spectral frequency parameter of the frame and the spectral frequency parameter of the i-1th frame do not satisfy the condition six, it is determined that the spectral frequency parameter of the ith frame is not corrected.
  • the spectral frequency parameter of the ith frame is corrected according to the spectral frequency parameters of the i-th frame and the i-th frame, specifically: according to the spectral frequency parameter of the i-1th frame and the ith frame
  • the weighting operation of the spectral frequency parameter determines the spectral frequency parameter after the correction of the i-th frame.
  • Correcting the spectral frequency parameter of the ith frame according to the spectral frequency parameter of the i-th frame and the preset spectral frequency parameter specifically: determining the ith frame according to the weighting operation of the spectral frequency parameter of the i-th frame and the preset spectral frequency parameter The corrected spectral frequency parameter.
  • Figure 6 is a comparison diagram of the spectrum of the i-th frame before and after the correction, as shown in Figure 6,
  • Figure 6 (a) is the spectrum of the original signal, the original signal is the signal sent by the encoding end
  • Figure 6 (b) A spectrogram of a signal synthesized in the prior art
  • Fig. 6(c) is a spectrogram of the synthesized signal of the present invention.
  • Passing Figure 6(a) and Figure 6 (b) The comparison shows that the portion of the oval frame of Fig. 6(b) is much brighter than the portion of the original signal ellipse frame of Fig. 6(a), that is, the low-frequency formant energy ratio recovered by the i-th frame is correctly restored. The energy is much larger.
  • the ISF parameter of the i-th frame needs to be corrected accordingly, so that the energy of the resonance position of the i-th frame is closer to the real energy, and the effect as shown in FIG. 6(c) is achieved.
  • the ith frame is adaptive to the ith frame when the adaptive codebook of the ith frame is interpolated by the excitation signal of the i-1th frame.
  • the codebook has a strong periodicity.
  • LPC Linear Predictive Coding
  • the energy of the real composite signal is much larger, obviously affecting the normal frame after the lost frame (sometimes affecting one or two frames after the lost frame, sometimes if the excitation signal is too periodic, it may affect more frames), then it is necessary
  • the excitation signal and/or the state-updated excitation signal are modified to make the energy of the composite signal equal to the real energy.
  • the excitation signal of the ith frame is corrected according to the energy stability of the ith frame and the ith-1.
  • the pre-synthesized signal of the ith frame is determined, and then the energy of the pre-synthesized signal of the ith frame and the synthesized signal of the ith frame are determined. Whether the absolute value of the difference of the energy is greater than the tenth threshold, and if the absolute value of the difference between the energy of the pre-synthesized signal of the i-th frame and the energy of the synthesized signal of the i-th frame is greater than the tenth threshold, determining the The excitation signal of the frame is corrected.
  • the tenth threshold may be 0.2 to 1 times the smaller of the energy of the pre-synthesized signal of the ith frame and the energy of the synthesized signal of the ith frame, for example, It can be 0.2 times, 0.5 times or 1 time, and the like.
  • the eleventh threshold is greater than one. If the ratio of the energy of the pre-synthesized signal of the i-th frame to the energy of the synthesized signal of the i-th frame is greater than the eleventh threshold, it is determined that the excitation signal of the i-th frame is corrected.
  • the eleventh threshold may be taken from the value range of [1.1, 5], and specifically, may be 1.1, 1.25, 2, 2.5 or 5, and the like.
  • the ratio of the energy of the pre-synthesized signal of the i-1th frame to the energy of the synthesized signal of the i-th frame is less than the twelfth threshold, and the twelfth threshold is less than 1. If the ratio of the energy of the pre-synthesized signal of the i-1th frame to the energy of the synthesized signal of the i-th frame is less than the twelfth threshold, it is determined that the excitation signal of the ith frame is corrected if the pre-synthesis of the i-1th frame is performed.
  • the fourth threshold may take a value from the value range [0.1, 0.8], and specifically, may be 0.1, 0.3, 0.4, or 0.8.
  • the excitation signal of the ith frame is corrected according to the energy stability of the ith frame and the ith-1, specifically: determining the second correction factor according to the energy stability of the ith frame and the ith-1, The second correction factor is less than, and then the excitation signal of the ith frame is multiplied by the second correction factor to obtain the excitation signal 1 after the ith frame correction.
  • the second correction factor is determined according to the energy stability of the ith frame and the ith-1, specifically: determining that the ratio of the energy of the i-1th frame to the energy of the ith frame is a second correction factor, or determining The ratio of the energy of the same number of subframes of the i-1 frame and the ith frame is the second correction factor.
  • the same number of subframes of the i-1th frame and the ith frame are consecutive, for example, the ratio of the determined energy of the last two subframes of the i-1th frame and the first two subframes of the i th frame are determined, of course,
  • the selected subframes may also be discontinuous.
  • the energy stability of -1 corrects the excitation signal of the ith frame.
  • the correlation of the i-1th frame signal includes: a magnitude relationship between a correlation value of the i-1th frame signal and a thirteenth threshold value, and a magnitude relationship between a deviation of a gene period of the i-1th frame signal and a fourteenth threshold value.
  • determining whether to modify the excitation signal of the ith frame specifically: determining whether the signal of the i-1th frame satisfies the condition seven, and the condition seven is: the i-1th frame
  • the correlation value of the i-1th frame signal is greater than the thirteenth threshold, and the pitch period of the i-1th frame signal is less than the fourteenth threshold. If the i-1th frame signal satisfies the condition seven, it is determined that the excitation signal of the i-th frame is corrected, and if the i-th frame signal does not satisfy the condition seven, it is determined that the excitation signal of the i-th frame is not corrected.
  • the thirteenth threshold may be selected from a low correlation rising edge to a high correlation rising edge, and specifically, may be selected as a low correlation rising edge or a high correlation rising edge.
  • the fourteenth threshold may be taken from the value range of [0.5, 20], and specifically may be 0.5, 2, 5, 10 or 20 or the like.
  • the correlation between the i-th frame and the i-1th frame signal includes: a relationship between a correlation value of the i-1th frame signal and a thirteenth threshold value, and a deviation of a gene period of the i-th frame signal and a thirteenth threshold value. relationship.
  • determining whether to modify the excitation signal of the ith frame according to the correlation between the i-th frame and the i-th frame signal specifically: determining whether the i-th frame signal and the ith frame signal satisfy the condition eight, Condition 8 includes: the i-1th frame is a lost frame, the correlation value of the i-1th frame signal is greater than the thirteenth threshold, and the pitch period of the i-th frame is less than the fourteenth threshold. If the i-th frame signal and the ith frame signal satisfy the condition eight, it is determined that the excitation signal of the i-th frame is corrected.
  • the excitation signal of the i-th frame is not corrected. Correcting the excitation signal of the ith frame according to the energy stability of the ith frame and the i-1th, specifically: determining the third correction factor according to the energy stability of the ith frame and the i-1th, the third correction factor If it is less than 1, the excitation signal of the ith frame is multiplied by the third correction factor to obtain the excitation signal after the ith frame correction.
  • the third correction factor may be determined according to the energy stability of the ith frame and the i-1th, and the ratio of the energy of the i-1th frame to the energy of the ith frame is determined as a second correction factor, or The ratio of the energy of the same number of subframes of the i-1 frame and the ith frame is a third correction factor.
  • determining whether to modify the excitation signal of the ith frame according to the correlation between the i-1th frame and the i-2th frame signal when determining to correct the signal excitation signal of the ith frame, according to The energy stability of the i-th frame and the i-th is corrected for the excitation signal of the i-th frame.
  • the correlation between the i-1th frame and the i-2th frame signal includes: a relationship between a correlation value of the i-2th frame signal and a thirteenth threshold value, and whether the excitation signal of the i-1th frame is corrected.
  • condition 9 includes: the i-2th frame is a lost frame, the correlation value of the i-2th frame signal is greater than a preset thirteenth threshold, and the excitation signal of the i-1th frame is corrected.
  • the excitation signal of the i-th frame is corrected, and if the i-th frame signal and the i-th frame signal do not satisfy the condition nine, then It is determined that the excitation signal of the i-th frame is not corrected. Correcting the excitation signal of the ith frame according to the energy stability of the ith frame and the i-1th, specifically: determining the fourth correction factor according to the energy stability of the ith frame and the i-1th, the fourth correction factor If less than 1, the excitation signal of the i-th frame is multiplied by the fourth correction factor to obtain an i-frame-corrected excitation signal.
  • determining whether to modify the excitation signal of the ith frame according to the correlation between the i-1th frame and the i-2th frame signal, and when determining to correct the signal excitation signal of the ith frame, according to The energy stability of the i-th frame and the i-th is corrected for the excitation signal of the i-th frame.
  • the correlation between the i-1th frame and the i-2th frame signal includes: a relationship between a correlation value of the i-2th frame signal and a thirteenth threshold value, and a generational digital book in the excitation signal of the i-1th frame The contribution is related to the magnitude of the fifteenth threshold.
  • the fifteenth threshold may be selected from 0.1 to 0.5 times of the excitation signal of the i-1th frame, and specifically, may be selected as 0.1 times of the excitation signal of the i-1th frame, 0.2. Times or 0.5 times and so on.
  • determining whether to modify the excitation signal of the ith frame according to the correlation between the i-1th frame and the i-2th frame signal specifically: determining whether the i-th frame signal and the i-1th frame signal are Satisfying the condition ten, the condition ten includes: the i-2th frame is a lost frame, the correlation value of the i-2th frame signal is greater than the thirteenth threshold, and the algebraic code contribution in the excitation signal of the i-1th frame signal is less than the first Fifteen thresholds. If the i-th frame signal and the i-th frame signal satisfy the condition ten, it is determined that the excitation signal of the i-th frame is corrected.
  • the excitation signal of the i-th frame is not corrected. Correcting the excitation signal of the ith frame according to the energy stability of the ith frame and the i-1th, specifically: determining the fourth correction factor according to the energy stability of the ith frame and the i-1th, the fourth correction factor If less than 1, the excitation signal of the i-th frame is multiplied by the fourth correction factor to obtain an i-frame-corrected excitation signal.
  • FIG. 7 is a comparison diagram of the time domain signal of the ith frame before and after the correction, as shown in FIG. 7,
  • FIG. 7(a) is an original time domain signal
  • the original time domain signal is a time domain signal transmitted by the encoding end
  • FIG. 7(b) is an existing technology
  • FIG. 7(c) shows the time domain preference of the recovered signal of the present invention. It can be seen from the comparison between 7(a) and FIG. 7(b) that the portion of the elliptical frame of FIG. 7(b) is much larger than the partial energy of the original signal elliptical frame of FIG. 7(a). Obviously, the excitation signal for the ith frame is required. Or the state update excitation signal is corrected so that the energy of the ith frame recovery signal is closer to the energy of the original signal, achieving the effect as shown in FIG. 7(c).
  • whether the excitation signal of the state update of the i-th frame is corrected may be determined according to the correlation between the i-1th frame and the ith frame signal, and the excitation signal for updating the state of the i-th frame is determined to be corrected.
  • the excitation signal of the state update of the i-th frame is corrected based on the energy stability of the i-th frame and the i-th-1.
  • the correlation between the i-1th frame and the ith frame signal includes: a correlation between the i-1th frame and the ith frame, and whether the excitation signal of the i-1th frame signal is corrected.
  • determining whether to modify the excitation signal of the state update of the ith frame according to the correlation between the ith frame and the ith frame signal specifically: determining whether the ith frame signal and the ith frame signal are satisfied Condition XI, Condition 11 includes: the i-th frame or the i-th frame is a strongly correlated frame, and the excitation signal of the i-1th frame signal is corrected.
  • the excitation signal of the state update of the ith frame is corrected, and if the ith frame signal and the i-1th frame signal do not satisfy the condition XI, Then, it is determined that the excitation signal of the status update of the i-th frame is not corrected.
  • Correcting the excitation signal of the ith frame according to the energy stability of the ith frame and the ith-1 specifically: determining the fifth correction factor and the fifth correction factor according to the energy stability of the ith frame and the ith-1 If less than 1, the excitation signal of the state update of the i-th frame is multiplied by the fifth correction factor to obtain an excitation signal of the state update after the i-th frame correction.
  • the parameter of the ith frame is obtained according to the received code stream decoding, and the ith frame is generated according to the pitch period, the gain of the ith frame obtained by decoding, and the generation of the i-th frame.
  • the excitation signal of the signal and the status update if the i-1th frame or the i-2th frame is a lost frame, further according to the inter-frame relationship and the intra-frame relationship of the first N frames of the i-th frame and the i-th frame, for the i-th At least one of the spectral frequency parameter of the frame, the excitation signal, and the state-updated excitation signal is corrected, and the signal of the ith frame is synthesized according to the modified parameter.
  • the method of this embodiment corrects at least one of the spectral frequency parameter of the ith frame, the excitation signal, and the state-updated excitation signal, so that the overall energy between the preceding and succeeding frames can be smoothly transitioned, thereby improving the decoded voice signal.
  • the quality of the number is the quality of the number.
  • FIG. 8 is a flowchart of a method for processing a frame loss compensation according to Embodiment 6 of the present invention. As shown in FIG. 8 , the method in this embodiment may further include the following steps:
  • Step 601 Processing the decoded signal of the ith frame to obtain a correlation value of the decoded signal of the ith frame.
  • the decoded signal of the ith frame can be normalized autocorrelation processing, and the decoded signal of the ith frame is normalized to a certain range by normalized autocorrelation processing, and the existing homing can be utilized.
  • the autocorrelation function is processed.
  • the decoded signal of the ith frame is not normalized, and the autocorrelation process is directly performed. For example, 100 points are sampled from the decoded signal of the i-th frame, and then the points numbered 0-98 and 1-99 are selected for autocorrelation processing to obtain the correlation value of the decoded signal of the ith frame.
  • Step 602 Depending on the correlation value of the decoded signal of the i-th frame, the size relationship between the pitch periods of each subframe of the i-th frame, the spectral tilt value of the i-th frame, and the zero-crossing rate of the i-th frame, any one or any of A combination of several determines the correlation of the ith frame signal.
  • a threshold is generally set, and if the correlation value of the ith frame signal is greater than the threshold, determining the correlation of the ith frame signal High, if the correlation value of the ith frame signal is less than the threshold, it is determined that the correlation of the ith frame signal is low.
  • Step 603 Determine, according to the decoded signal of the ith frame, the energy of the ith frame, and determine the energy stability between the energy of the ith frame and the ith frame according to the energy of the ith frame and the energy of the ith frame. And/or determining the energy of each subframe of the ith frame according to the decoded signal of the ith frame, and determining the energy stability between the subframes of the ith frame according to the energy of each subframe of the ith frame.
  • determining the correlation of the signal, the energy stability between the ith frame and the i-1th frame, and/or the energy stability in the frame of the ith frame are used to estimate the i+1th frame signal, In this embodiment, the correlation and energy stability of the previous frame are used when estimating the parameters of each frame.
  • FIG. 9 is a schematic structural diagram of a frame loss compensation processing apparatus according to Embodiment 7 of the present invention.
  • the frame loss compensation processing apparatus provided in this embodiment includes: a lost frame determination module 11
  • the lost frame determination module 11 is configured to determine whether the ith frame is a lost frame by the lost frame flag.
  • the estimating module 12 is configured to: when the ith frame is a lost frame, estimate the ith according to at least one of an inter-frame relationship of a first N frame of the ith frame and an intra-frame relationship of the first N frame a parameter of the frame; the inter-frame relationship of the first N frame includes at least one of correlation and energy stability of the first N frame, and the intra-frame relationship of the first N frame includes a subframe in the first N frame At least one of the correlation and the energy stability, the parameters of the ith frame include: a spectral frequency parameter, a pitch period, and a gain, and N is an integer greater than or equal to 1.
  • the obtaining module 13 is configured to acquire a generational digital book of the ith frame.
  • the generating module 14 is configured to generate an excitation signal of the ith frame according to a pitch period, a gain of the ith frame estimated by the estimation module, and an algebraic codebook of the ith frame acquired by the acquiring module.
  • the signal synthesizing module 15 is configured to synthesize the ith frame signal according to the spectral frequency parameter of the ith frame estimated by the estimation module and the excitation signal of the ith frame generated by the generating module.
  • the spectral frequency parameter of the ith frame is obtained by the estimation module 12 according to the inter-frame relationship of the first N frames of the ith frame, and the estimation module is specifically configured to: according to the first N of the ith frame
  • the correlation of the frame determines the weight of the spectral frequency parameter of the i-1th frame and the weight of the preset spectral frequency parameter of the ith frame, according to the weight of the spectral frequency parameter of the ith frame and the ith
  • the weight of the preset spectral frequency parameter of the frame is weighted by the spectral frequency parameter of the ith frame and the preset spectral frequency parameter of the ith frame to obtain a spectral frequency parameter of the ith frame.
  • the correlation includes: a relationship between a spectrum tilt parameter of the ith frame and a second threshold, and a normalized autocorrelation value of the ith frame to a first threshold.
  • the size relationship and the magnitude of the deviation of the gene period of the i-1st frame signal from the third threshold is a relationship between a spectrum tilt parameter of the ith frame and a second threshold, and a normalized autocorrelation value of the ith frame to a first threshold.
  • the estimating module 12 is specifically configured to:
  • the i-1th frame signal satisfies at least one of the condition one, the condition two, and the condition three, determining that the weight of the spectral frequency parameter of the i-1th frame is the first weight, and the preset spectrum of the ith frame
  • the weight of the frequency parameter is a second weight
  • the first weight is greater than the second weight
  • the condition one is: the normalized autocorrelation value of the ith-1th frame signal is greater than the first threshold
  • Condition 2 is: the spectral tilt parameter of the (i-1)th frame signal is greater than the second threshold
  • the condition three The deviation of the pitch period of the signal of the i-1th frame is smaller than the third threshold;
  • the weight of the spectral frequency parameter of the ith frame is the second weight
  • the weight of the preset spectral frequency parameter of the ith frame is the first weight.
  • the gene period of the ith frame is estimated by the estimation module 12 according to the correlation between the first N frames of the ith frame and the correlation between the subframes of the first N frames of the ith frame, where
  • the correlation includes: a magnitude relationship between a normalized autocorrelation value of the i-2th frame signal and a fifth threshold, a magnitude relationship between a deviation of a gene period of the i-2th frame signal and a fourth threshold, and an i th The magnitude of the deviation of the gene period of the -1 frame signal from the magnitude of the fourth threshold.
  • the estimating module 12 is specifically configured to:
  • determining a pitch period offset value of the (i-1)th frame signal according to a pitch period of the (i-1)th frame signal Determining a pitch period of the ith frame signal according to a pitch period offset value of the ith frame and a pitch period of the ith frame; the pitch period of the ith frame signal includes the a pitch period of each subframe of the i-th frame, and a pitch period offset value of the i-th frame signal is a mean value of a difference of pitch periods of all adjacent subframes of the i-th frame;
  • the normalized autocorrelation value of the (i-2)th frame signal is greater than the fifth threshold, and The deviation of the pitch period of the i-2th frame signal is smaller than the fourth threshold, and determining the (i-2)th frame signal according to the pitch period of the (i-2)th frame signal and the (i-1th)th frame signal.
  • a pitch period offset value of the i-1th frame signal a pitch period according to the ith frame and a pitch period offset of the ith frame and the ith frame The value determines the pitch period of the ith frame signal.
  • the estimating module 12 determines a pitch period offset value pv of the (i-1)th frame signal according to the following formula:
  • the estimating module 12 determines a pitch period of the ith frame signal according to the following formula:
  • the estimating module 12 determines a pitch period offset value pv of the ith frame and the ith frame signal according to the following formula:
  • p (-2) (m) is the pitch period of the mth subframe of the i-th frame
  • p (-1) (n) is the pitch of the nth subframe of the i-1th frame Period
  • the estimating module 12 determines a pitch period of the ith frame signal according to the following formula:
  • p (-1) (3) is the pitch period of the third subframe of the i-1th frame
  • pv is the pitch period deviation of the ith frame and the ith frame
  • the shift value, p cur (x) is the pitch period of the xth subframe of the ith frame.
  • the gain of the ith frame includes: an adaptive codebook gain and an algebraic book gain, and the gain of the ith frame is a correlation and energy stability of the first N frames of the ith frame according to the estimation module 12 Estimated.
  • the estimating module 12 is specifically configured to:
  • the algebraic code gain of the i-th frame and the gain of the VAD frame are based on the weight of the algebraic code gain of the i-th frame and the weight of the gain of the VAD frame.
  • the estimating module 12 is further configured to: determine a first correction factor according to the codec rate, and use the first correction factor to the ith frame The generation of the digital book gain is corrected.
  • the obtaining module 12 is specifically configured to: obtain a generational digital book of the ith frame according to random noise estimation, or determine a generation digital book of the ith frame according to a generational digital book of the first N frames of the ith frame .
  • the obtaining module 12 is further configured to: determine, according to a deviation of a pitch period of the i-1th frame, a correlation of a signal, a magnitude of a spectrum slope, and a zero-crossing rate, determining a digital book contribution of the ith frame Weighting, or performing a weighting operation on any combination of the pitch period deviation, the signal correlation, the spectral slope magnitude, and the zero-crossing rate of the i-th frame to determine the algebraic book contribution of the ith frame And performing an interpolation operation on the excitation signal of the state update of the i-1th frame to determine an adaptive codebook of the ith frame.
  • the generating module 14 is specifically configured to: determine, according to the product of the algebraic codebook of the ith frame and the algebraic codebook gain of the ith frame, the algebraic book contribution of the ith frame; Determining, by the product of the adaptive codebook of the frame and the adaptive codebook gain of the ith frame, determining an adaptive codebook contribution of the ith frame; weighting and adapting according to the contribution of the generational digital book of the ith frame The weight of the codebook contribution is weighted by the algebraic book contribution and the adaptive codebook contribution of the ith frame to determine an excitation signal of the ith frame, and the weight of the adaptive codebook is 1.
  • the device in this embodiment may be used to perform the methods in the first embodiment to the fourth embodiment.
  • the specific implementation manners and technical effects are similar, and details are not described herein again.
  • FIG. 10 is a schematic structural diagram of a frame loss compensation processing apparatus according to Embodiment 8 of the present invention. As shown in FIG. 10, the apparatus of this embodiment further includes: a decoding module 16, a judging module 17 and Correction module 18.
  • the ith frame is a normal frame
  • the decoding module 16 is configured to obtain the parameter of the ith frame according to the received code stream, where the parameters of the ith frame include: a spectral frequency parameter, a pitch period, Gain and digital books.
  • the generating module 14 is further configured to: according to the base of the ith frame decoded by the decoding module 16 The tone period, the gain, and the algebraic codebook generate an excitation signal of the ith frame and an excitation signal of a state update of the ith frame.
  • the determining module 17 is configured to: when the i-th frame or the i-th frame is a lost frame, according to at least one of an inter-frame relationship and an intra-frame relationship between the ith frame and the first N frames of the ith frame Determining whether to correct at least one of a spectral frequency parameter of the ith frame, an excitation signal, and a state updated excitation signal, the inter-frame relationship including the ith frame and the first N frame of the ith frame At least one of a correlation and an energy stability, the intra-frame relationship comprising: at least one of inter-subframe correlation and energy stability of the ith frame and the first N frames of the ith frame.
  • the correction module 18 is configured to: when the determining module 17 determines to correct at least one of a spectral frequency parameter, an excitation signal, and a status update excitation signal of the ith frame, according to the ith frame and the ith At least one of an inter-frame relationship and an intra-frame relationship of the first N frames of the frame corrects at least one of a spectral frequency parameter of the ith frame, an excitation signal, and an excitation signal of a status update.
  • the signal synthesizing module 15 is further configured to: synthesize the ith frame signal according to the correction result of the at least one of the spectral frequency parameter, the excitation signal, and the state updated excitation signal of the ith frame by the correction module.
  • the determining module 17 determines that the spectral frequency parameter, the excitation signal, and the state updated excitation signal of the ith frame are not corrected, the spectral frequency parameter, the excitation signal, and the state update incentive according to the ith frame are The signal is synthesized into an ith frame signal.
  • the determining module 17 is configured to determine, according to the correlation of the ith frame, whether to modify a spectral frequency parameter of the ith frame, when the determining module 17 determines the ith frame
  • the correction module 18 is configured to: correct the spectral frequency parameter of the ith frame according to the spectral frequency parameter of the ith frame and the i-1th frame, or according to the The spectral frequency parameter of the i frame and the preset spectral frequency parameter correct the spectral frequency parameter of the ith frame.
  • the correlation of the ith frame includes: one of the two spectral frequency parameters corresponding to the index of the minimum value of the difference of the adjacent spectral frequency parameters of the ith frame and the sixth threshold a size relationship, a magnitude relationship between a minimum value of a difference value of adjacent spectral frequency parameters of the ith frame and a seventh threshold value, and an index of a minimum value of a difference value between adjacent spectral frequency parameters of the ith frame and an eighth The size relationship of the threshold.
  • the determining module 17 is specifically configured to:
  • the spectral frequency parameter comprising an impedance spectrum frequency ISF or a line spectrum frequency LSF;
  • condition four comprising: a minimum value of a difference value of adjacent spectral frequency parameters of the ith frame One of the two spectral frequency parameters corresponding to the index is smaller than the sixth threshold, and the condition five includes: the index value of the minimum value of the difference of the adjacent spectral frequency parameters of the ith frame is smaller than The eighth threshold, and the minimum difference is less than the seventh threshold;
  • the difference between the adjacent spectral frequency parameters of the ith frame satisfies at least one of the condition four and the condition five, determining to correct the ith frame spectral frequency parameter if the ith frame If the difference between the adjacent spectral frequency parameters does not satisfy the condition four and the condition five, it is determined that the spectrum frequency parameter of the ith frame is not corrected;
  • the correction module 18 is specifically configured to: determine a spectral frequency parameter after the ith frame is corrected according to a weighting operation of the spectral frequency parameter of the ith frame and the spectral frequency parameter of the ith frame.
  • the spectral frequency parameter after the ith frame correction is determined according to a weighting operation of the spectral frequency parameter of the ith frame and a previous spectral frequency parameter.
  • the determining module 17 is configured to determine, according to the correlation between the ith frame and the i-1th frame, whether to correct the spectral frequency parameter of the ith frame, when the determining module 17 determines When the spectral frequency parameter of the ith frame is corrected, the correction module 18 is configured to: correct the spectral frequency parameter of the ith frame according to the spectral frequency parameter of the ith frame and the i-1th frame, Or correcting the spectral frequency parameter of the ith frame according to the spectral frequency parameter of the ith frame and the preset spectral frequency parameter.
  • the correlation between the ith frame and the ith frame includes: a sum of a spectral frequency parameter difference corresponding to a part or all of the same index of the ith frame and the ith frame, and a ninth threshold The size relationship.
  • the determining module 17 is specifically configured to:
  • the spectral frequency parameter comprising an impedance spectrum frequency ISF or a line spectrum frequency LSF;
  • condition six includes: part or all of the ith frame and the ith frame And a sum of spectral parameter parameter differences corresponding to the same index is greater than the ninth threshold;
  • the spectral frequency parameter of the ith frame and the spectral frequency parameter of the i-1th frame satisfy the condition six, determining to correct the ith frame spectral frequency parameter if the spectrum of the ith frame If the frequency parameter and the spectral frequency parameter of the (i-1)th frame do not satisfy the condition six, it is determined that the ith frame spectral frequency parameter is not corrected.
  • the correction module 18 is specifically configured to: determine a spectral frequency parameter after the ith frame is corrected according to a weighting operation of the spectral frequency parameter of the ith frame and the spectral frequency parameter of the ith frame. Or determining, according to the weighting operation of the spectral frequency parameter of the ith frame and the preset spectral frequency parameter, the spectral frequency parameter after the ith frame correction.
  • the determining module 17 is configured to determine, according to the correlation and energy stability of the ith frame and the i-1th frame, whether to modify the excitation signal of the ith frame, when the determining module When the signal excitation signal of the ith frame is modified, the correction module 18 is configured to perform the excitation signal of the ith frame according to the energy stability of the ith frame and the ith-1 Corrected.
  • the determining module 17 is specifically configured to:
  • the ratio of the energy of the pre-synthesized signal of the ith frame to the energy of the synthesized signal of the ith frame is greater than an eleventh threshold, the eleventh threshold being greater than one. If the ratio of the energy of the pre-synthesized signal of the ith frame to the energy of the synthesized signal of the ith frame is greater than the eleventh threshold, determining to correct the excitation signal of the ith frame if If the ratio of the energy of the pre-synthesized signal of the ith frame to the energy of the synthesized signal of the ith frame is less than or equal to the eleventh threshold, it is determined that the excitation signal of the i frame is not corrected.
  • the energy of the pre-synthesized signal of the (i-1)th frame and the synthesized message of the ith frame Whether the ratio of the energy of the number is less than a twelfth threshold, the twelfth threshold being less than one.
  • the ratio of the energy of the pre-synthesized signal of the i-th frame to the energy of the synthesized signal of the ith frame is less than the twelfth threshold, determining to correct the excitation signal of the ith frame if If the ratio of the energy of the pre-synthesized signal of the ith frame to the energy of the synthesized signal of the ith frame is greater than or equal to the twelfth threshold, it is determined that the excitation signal of the ith frame is not corrected.
  • the correction module 18 is specifically configured to: determine, according to the energy stability of the ith frame and the (i-1)th, a second correction factor, where the second correction factor is less than 1, and the excitation signal of the ith frame is Multiplying the second correction factor to obtain the excitation signal after the ith frame correction.
  • the second correction factor may be a ratio of the energy of the ith frame to the energy of the ith frame, or the second correction factor is the ith frame and the first The ratio of the energy of the same number of sub-frames of the i-frame.
  • the determining module 17 is configured to determine, according to the correlation of the i-1th frame signal, whether to modify the excitation signal of the ith frame, when the determining module 17 determines the ith frame.
  • the correction module 18 is configured to correct the excitation signal of the ith frame according to the energy stability of the ith frame and the ith-1.
  • the correlation of the (i-1)th frame signal includes: a magnitude relationship between a correlation value of the i-th frame signal and a thirteenth threshold, and a deviation of a gene period of the i-1th frame signal and a tenth The size relationship of the four thresholds.
  • the determining module 17 is specifically configured to: determine whether the ith frame of the i-1th frame satisfies the condition VII, and the condition VII is: the ith frame is a lost frame, and the correlation value of the ith signal is It is greater than the thirteenth threshold, and a deviation of a pitch period of the i-1st frame signal is smaller than the fourteenth threshold. Determining, if the ith i-1 frame signal satisfies the condition VII, correcting an excitation signal of the ith frame, and if the ith ith frame signal does not satisfy the condition VII, determining that the The excitation signal of the i-th frame is corrected.
  • the modifying module 18 is specifically configured to: determine, according to the energy stability of the ith frame and the (i-1)th, a third correction factor, where the third correction factor is less than 1, and the excitation of the ith frame The signal is multiplied by the third correction factor to obtain the excitation signal after the ith frame correction.
  • the determining module 17 is configured to determine, according to the correlation between the ith frame and the i-1th frame signal, whether to modify the excitation signal of the ith frame, when the determining module 17 determines
  • the correction module 18 is used for rooting when the signal excitation signal of the ith frame is corrected.
  • the excitation signal of the ith frame is corrected according to the energy stability of the ith frame and the ith-1.
  • the correlation between the ith frame and the i-1th frame signal includes: a relationship between a correlation value of the ith frame and a thirteenth threshold, and a deviation of a gene period of the ith frame signal The size relationship of the fourteenth threshold.
  • the determining module 17 is specifically configured to: determine whether the i-th frame signal and the ith frame signal satisfy condition eight, and the condition eight includes: the i-th frame is a lost frame, where the The correlation value of the i-1 frame signal is greater than a preset thirteenth threshold, and the deviation of the pitch period of the ith frame signal is less than a preset fourteenth threshold. If the ith frame and the ith frame signal satisfy the condition VIII, determining to modify the excitation signal of the ith frame, if the ith frame and the ith frame If the frame signal does not satisfy the condition eight, it is determined that the excitation signal of the ith frame is not corrected.
  • the modifying module 18 is specifically configured to: determine, according to the energy stability of the ith frame and the (i-1)th, a third correction factor, where the third correction factor is less than 1, and the excitation of the ith frame The signal is multiplied by the third correction factor to obtain the excitation signal after the ith frame correction.
  • the determining module 17 is configured to determine, according to the correlation between the ith frame and the ith frame, whether to modify the excitation signal of the ith frame, when the determining module 17 determines
  • the correction module 18 is configured to correct the excitation signal of the ith frame according to the energy stability of the ith frame and the ith-1.
  • the correlation between the i-1th frame and the i-2th frame signal includes: a relationship between a correlation value of the i-th frame signal and a thirteenth threshold, and whether the excitation signal of the i-1th frame is Was corrected.
  • the determining module 17 is specifically configured to: determine whether the i-th frame signal and the i-th frame signal satisfy the condition nine, and the condition nine includes: the i-th frame is a lost frame, The correlation value of the i-2th frame signal is greater than the thirteenth threshold, and the excitation signal of the i-1th frame signal is corrected. If the i-th frame signal and the i-th frame signal satisfy the condition nine, determining to modify the excitation signal of the ith frame, if the i-th frame signal and the If the i-1th frame signal does not satisfy the condition ninth, it is determined that the excitation signal of the ith frame is not corrected.
  • the modifying module 18 is specifically configured to: determine, according to the energy stability of the ith frame and the (i-1)th, a fourth correction factor, where the fourth correction factor is less than 1, and the excitation of the ith frame The signal is multiplied by the fourth correction factor to obtain the i frame modified signal.
  • the determining module 17 is configured to determine, according to the correlation between the ith frame and the ith frame, whether to modify the excitation signal of the ith frame, when the determining module 17 determines
  • the correction module 18 is configured to correct the excitation signal of the ith frame according to the energy stability of the ith frame and the ith-1.
  • the correlation between the i-1th frame and the ith-2th frame signal includes: a relationship between a correlation value of the ith frame and the thirteenth threshold, and an excitation signal of the ith frame
  • the generation of the digital book is related to the size of the fifteenth threshold.
  • the determining module 17 is specifically configured to: determine whether the i-th frame signal and the i-th frame signal satisfy the condition ten, and the condition ten includes: the i-th frame is a lost frame, The correlation value of the i-2th frame signal is greater than the thirteenth threshold, and the algebraic code contribution in the excitation signal of the i-1th frame signal is less than the fifteenth threshold. If the i-th frame signal and the i-th frame signal satisfy the condition ten, determining to modify the excitation signal of the ith frame, if the i-th frame signal and the If the i-1th frame signal does not satisfy the condition ten, it is determined that the excitation signal of the ith frame is not corrected.
  • the modifying module 18 is specifically configured to: determine, according to the energy stability of the ith frame and the (i-1)th, a fourth correction factor, where the fourth correction factor is less than 1, and the excitation of the ith frame The signal is multiplied by the fourth correction factor to obtain the i frame modified signal.
  • the determining module 17 is configured to determine, according to the correlation between the i-1th frame and the ith frame signal, whether to modify the excitation signal of the status update of the ith frame, when the determining module 17 determines the location
  • the correction module 18 is configured to update the excitation signal of the state of the ith frame according to the energy stability of the ith frame and the ith-1 Make corrections.
  • the correlation between the ith frame and the ith frame signal includes: a correlation between the ith frame and the ith frame, and a signal of the ith frame Whether the stimulus signal has been corrected.
  • the determining module 17 is specifically configured to: determine whether the ith frame signal and the ith i-1 frame signal satisfy condition XI, and the condition XI includes: the ith frame or the i-1th The frame is a strongly correlated frame, and the excitation signal of the i-1th frame signal is corrected. If the ith frame signal and the ith 1-1 frame signal satisfy the condition eleven, determining to modify a state update update signal of the ith frame, if the ith frame signal and the The i-1th frame signal is not satisfied The condition eleven determines that the excitation signal of the status update of the ith frame is not corrected.
  • the modifying module 18 is specifically configured to: determine, according to the energy stability of the ith frame and the ith-1, a fifth correction factor, where the fifth correction factor is less than 1, and the state of the ith frame The updated excitation signal is multiplied by the fifth correction factor to obtain an excitation signal of the state update after the ith frame correction.
  • the frame loss compensation processing apparatus 200 includes a communication interface 21, a processor 22, a memory 23, and a bus 24, where The communication interface 21, the processor 22, and the memory 23 are connected to one another via a bus 24.
  • the bus 24 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 11, but it does not mean that there is only one bus or one type of bus.
  • the communication interface 21 is used to implement communication between the database access device and other devices such as a client, a read-write library, and a read-only library.
  • the memory 23 may include a random access memory (RAM), and may also include a non-volatile memory such as at least one disk storage.
  • the processor 22 executes the program code stored in the memory 23 to implement the methods of the first embodiment to the sixth embodiment.
  • the processor 22 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP Processor, etc.), or a digital signal processor (DSP), an application specific integrated circuit. (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
  • CPU central processing unit
  • NP Processor network processor
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA Field Programmable Gate Array
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Algebra (AREA)
  • Quality & Reliability (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)
  • Television Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种丢帧补偿处理方法和装置,该方法包括:通过丢失帧标记位确定第i帧是否为丢失帧(101);当第i帧为丢失帧时,根据第i帧的前N帧的帧间关系和前N帧的帧内关系中的至少一个,估计第i帧的谱频率参数、基音周期和增益(102)。前N帧的帧间关系包括前N帧的相关性和能量稳定性中的至少一个,前N帧的帧内关系包括前N帧中子帧间的相关性和能量稳定性中的至少一个。通过前N帧的信号相关性和能量稳定性,以及每帧帧内信号的相关性和能量稳定性确定第i帧的参数,考虑到了信号之间的关系,使得估计得到的第i帧的参数更加准确,从而提升了解码语音信号的质量。

Description

丢帧补偿处理方法和装置 技术领域
本发明实施例涉及通信技术,尤其涉及一种丢帧补偿处理方法和装置。
背景技术
在语音业务中,对于弱覆盖场景、干扰场景以及高速移动场景等情况,时常出现语音丢包、错包等问题,不可避免地造成用户有断续或者杂音等不良体验。
现有的一种进行丢帧补偿的方法如下:在解码端进行码流分析,判断当前帧是否为丢帧,如果当前帧为丢帧,则估计当前丢帧的参数,根据当前丢帧的参数和历史帧的参数恢复丢帧信号的谱频率参数及激励信号,进而根据谱频率参数及激励信号得到丢帧信号。如果当前帧为正常帧,则解码获得当前帧的参数,如果当前帧为正常帧且前一帧为丢帧,则根据前一帧的参数对当前帧的参数进行修正,根据修正后的参数得到当前帧的谱频率参数和激励信号,进而根据谱频率参数和激励信号合成当前帧信号。其中,前述帧参数包括信号类型、信号能量和相位等等参数中的至少一个。
由于上述方法对于丢失帧的参数估计不准确,因此无法保证解码音频质量。
发明内容
本发明实施例提供一种丢帧补偿处理方法和装置,能够提高丢失帧的参数估计的准确度,从而提升解码信号的质量。
本发明第一方面提供一种丢帧补偿处理方法,先通过丢失帧标记位确定第i帧是否为丢失帧,当第i帧为丢失帧时,根据第i帧的前N帧的帧间关系和前N帧的帧内关系中的至少一个,估计第i帧的谱频率参数、基音周期和增益,并获取第i帧的代数码书,根据估计得到的第i帧的基音周期、增益以及获取的第i帧的代数码书生成第i帧的激励信号,进一步根据估计得到的第i帧的谱频率参数和生成的第i帧的激励信号合成第 i帧信号。其中,前N帧的帧间关系包括前N帧的相关性和能量稳定性中的至少一个,前N帧的帧内关系包括前N帧中的子帧间的相关性和能量稳定性中的至少一个,通过考虑信号之间的相关性和能量稳定性,使得估计得到的第i帧的参数更加准确,从而提升了解码语音信号的质量。
在第一方面的一种可能的实现方式中,第i帧的谱频率参数是根据第i帧的前N帧的帧间关系估计得到的,具体可以采用如下方式估计得到:首先根据第i帧的前N帧的相关性确定第i-1帧的谱频率参数的权重和第i帧的预置谱频率参数的权重,然后根据第i-1帧的谱频率参数的权重和第i帧的预置谱频率参数的权重,对第i-1帧的谱频率参数和第i帧的预置谱频率参数进行加权运算得到第i帧的谱频率参数。
当第i帧的前N帧的相关性包括:第i-1帧信号的谱倾斜参数与第二阈值的大小关系、第i-1帧信号的归一化自相关值与第一阈值的大小关系和第i-1帧信号的基因周期的偏差与第三阈值的大小关系时,根据第i帧的前N帧间的相关性确定第i-1帧的谱频率参数的权重和第i帧的预置谱频率参数的权重,具体为:
如果第i-1帧信号满足条件一、条件二和条件三中的至少一个,则确定第i-1帧的谱频率参数的权重为第一权重,第i帧的预置谱频率参数的权重为第二权重,第一权重大于第二权重,条件一为:第i-1帧信号的归一化自相关值大于第一阈值,条件二为:第i-1帧信号的谱倾斜参数大于第二阈值,条件三为:第i-1帧信号的基音周期的偏差小于第三阈值。如果第i-1帧信号同时不满足条件一、条件二和条件三,则确定第i-1帧的谱频率参数的权重为第二权重,第i帧的预置谱频率参数的权重为第一权重。
在第一方面的一种可能的实现方式中,第i帧的基因周期是根据第i帧的前N帧的相关性和第i帧的前N帧的子帧间的相关性估计得到的。其中,该相关性包括:第i-2帧信号的归一化自相关值与第五阈值的大小关系、第i-2帧信号的基因周期的偏差与第四阈值的大小关系和第i-1帧信号的基因周期的偏差与第四阈值的大小关系。相应的,第i帧的基因周期采用如下方式估计得到:
如果第i-1帧信号的基音周期的偏差小于第四阈值,则根据第i-1帧 信号的基音周期确定第i-1帧信号的基音周期偏移值;根据第i-1帧信号的基音周期偏移值和第i-1帧信号的基音周期确定第i帧信号的基音周期;第i帧信号的基音周期包括第i帧的每个子帧的基音周期,第i-1帧信号的基音周期偏移值为第i-1帧的所有相邻子帧的基音周期的差值的均值。
如果第i-1帧信号的基音周期的偏差大于或等于第四阈值,第i-2帧信号的归一化自相关值大于第五阈值,且第i-2帧信号的基音周期的偏差小于第四阈值,则根据第i-2帧信号和第i-1帧信号的基音周期确定第i-2帧信号和第i-1帧信号的基音周期偏移值;根据第i-1帧信号的基音周期以及第i-2帧信号和第i-1帧信号的基音周期偏移值确定第i帧信号的基音周期。
一种实现方式中,可以根据如下公式确定第i-1帧信号的基音周期偏移值pv:
pv=(p(-1)(3)-p(-1)(2))+(p(-1)(2)-p(-1)(1))+(p(-1)(1)-p(-1)(0))/3,其中,p(-1)(j)是第i-1帧的第j个子帧的基音周期,j=0,1,2,3。相应的,根据如下公式确定第i帧信号的基音周期:
pcur(j)=p(-1)(3)+(j+1)*pv,j=0,1,2,3,其中,p(-1)(3)是第i-1帧的第3个子帧的基音周期,pv是第i-1帧信号的基音周期偏移值,pcur(j)是第i帧的第j个子帧的基音周期。
另一种实现方式中,可以根据如下公式确定第i-2帧信号和第i-1帧信号的基音周期偏移值pv:
pv=(p(-2)(3)-p(-2)(2))+(p(-1)(0)-p(-2)(3))+(p(-1)(1)-p(-1)(0))/3;
其中,p(-2)(m)是第i-2帧的第m个子帧的基音周期,p(-1)(n)是第i-1帧的第n个子帧的基音周期,m=2,3,n=0,1。
相应的,根据如下公式确定第i帧信号的基音周期:
pcur(x)=p(-1)(3)+(x+1)*pv,x=0,1,2,3;
其中,p(-1)(3)是第i-1帧的第3个子帧的基音周期,pv是第i-2帧信号和第i-1帧信号的基音周期偏移值,pcur(x)是第i帧的第x个子帧的基音周期。
在第一方面的一种可能的实现方式中,第i帧的增益是根据第i帧的 前N帧的相关性和能量稳定性估计得到的,其中第i帧的增益包括:自适应码书增益和代数码书增益。具体采用如下方式估计得到:先根据第i-1帧的自适应码书增益或预先设定的固定值、第i-1帧的相关性以及第i帧在连续的多个丢失帧中的序号,确定第i帧的自适应码书增益,然后根据第i-1帧的能量稳定性确定第i-1帧的代数码书增益的权重以及话音激活检测VAD帧的增益的权重,最后根据第i-1帧的代数码书增益的权重和VAD帧的增益的权重,对第i-1帧的代数码书增益和VAD帧的增益进行加权运算得到第i帧的代数码书增益。可选的,第i-1帧的能量越稳定,第i-1帧的代数码书增益的权重越大。或者,随着连续丢失帧个数的增加,VAD帧的增益的权重也相应增加。
可选的,在根据第i-1帧的代数码书增益的权重和VAD帧的增益的权重,对第i-1帧的代数码书增益和VAD帧的增益进行加权运算得到第i帧的代数码书增益之前,还可以根据编解码速率确定第一修正因子,使用第一修正因子对第i-1帧的代数码书增益进行修正。
在第一方面的一种可能的实现方式中,可通过如下方式获取第i帧的代数码书:根据随机噪声估计得到第i帧的代数码书,或者,根据第i帧的前N帧的代数码书确定第i帧的代数码书。
在第一方面的一种可能的实现方式中,根据估计得到的第i帧的基音周期、增益以及获取的第i帧的代数码书生成第i帧的激励信号之前,还需要根据第i-1帧的基音周期的偏差、信号的相关性、谱斜率大小和过零率中的任意一个确定第i帧的代数码书贡献的权重,或者,对第i-1帧的基音周期的偏差、信号的相关性、谱斜率大小和过零率中的任意组合进行加权运算确定第i帧的代数码书贡献的权重。在生成第i帧的激励信号时,先根据第i帧的代数码书和第i帧的代数码书增益的乘积,确定第i帧的代数码书贡献,以及根据第i帧的自适应码书和第i帧的自适应码书增益的乘积,确定第i帧的自适应码书贡献,然后根据第i帧的代数码书贡献的权重和自适应码书贡献的权重,对第i帧的代数码书贡献和自适应码书贡献进行加权运算,确定第i帧的激励信号,自适应码书的权重为1。
在第一方面的一种可能的实现方式中,当第i帧为正常帧时,则根据接收到的码流解码获得第i帧的谱频率参数、基音周期、增益以及代数码 书,然后根据解码得到的第i帧的基音周期、增益以及代数码书生成第i帧的激励信号和第i帧的状态更新的激励信号。如果第i-1帧或第i-2帧为丢失帧,还需要进一步根据第i帧与第i帧的前N帧的帧间关系和帧内关系中的至少一个,确定是否对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正,其中,帧间关系包括第i帧与第i帧的前N帧的相关性和能量稳定性中的至少一个,帧内关系包括:第i帧与第i帧的前N帧的子帧间相关性和能量稳定性中的至少一个。
当确定对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正时,根据第i帧与第i帧的前N帧的帧间关系和帧内关系中的至少一个,对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正;根据对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个的修正结果合成第i帧信号。当确定不对第i帧的谱频率参数、激励信号和状态更新的激励信号进行修正时,根据第i帧的谱频率参数、激励信号和状态更新的激励信号合成第i帧信号。通过对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正,使得使得前后帧之间的整体能量及相同频段的能量都能平滑过渡。
在第一方面的一种可能的实现方式中,可以根据第i帧的相关性,确定是否对第i帧的谱频率参数进行修正,当确定对第i帧的谱频率参数进行修正时,根据第i帧与第i-1帧的谱频率参数对第i帧的谱频率参数进行修正,或者,根据第i帧的谱频率参数和预置谱频率参数对第i帧的谱频率参数进行修正。其中,第i帧的相关性包括:第i帧的相邻谱频率参数的差值的最小值的索引对应的两个谱频率参数中的其中一个谱频率参数与第六阈值的大小关系、第i帧的相邻谱频率参数的差值的最小值与第七阈值的大小关系以及第i帧的相邻谱频率参数的差值的最小值的索引与第八阈值的大小关系。
在确定是否对第i帧的谱频率参数进行修正时,先确定第i帧的相邻谱频率参数的差值,每个差值对应一个索引,谱频率参数包括导抗谱频率ISF或线谱频率LSF,然后判断第i帧的相邻谱频率参数的差值是否满足条件四和条件五中的至少一个,条件四包括:第i帧的相邻谱频率参数 的差值的最小值的索引对应的两个谱频率参数中的其中一个谱频率参数小于第六阈值,条件五包括:第i帧的相邻谱频率参数的差值的最小值的索引值小于第八阈值,且最小差值小于第七阈值。如果第i帧的相邻谱频率参数的差值满足条件四和条件五中的至少一个,则确定对第i帧谱频率参数进行修正,如果第i帧的相邻谱频率参数的差值同时不满足条件四和条件五,则确定不对第i帧谱频率参数进行修正。
在进行修正时,根据第i-1帧的谱频率参数和第i帧的谱频率参数的加权运算,确定第i帧修正后的谱频率参数,或者,根据第i帧的谱频率参数和预先的谱频率参数的加权运算,确定第i帧修正后的谱频率参数。
在第一方面的一种可能的实现方式中,可以根据第i帧与第i-1帧的相关性,确定是否对第i帧的谱频率参数进行修正,当确定对第i帧的谱频率参数进行修正时,根据第i帧与第i-1帧的谱频率参数对第i帧的谱频率参数进行修正,或者,根据第i帧的谱频率参数和预置谱频率参数对第i帧的谱频率参数进行修正。其中,第i帧与第i-1帧的相关性包括:第i-1帧和第i帧的部分或全部相同索引对应的谱频率参数差值的和与第九阈值的大小关系。
在确定是否对第i帧的谱频率参数进行修正时,先确定第i帧的相邻谱频率参数的差值,每个差值对应一个索引,谱频率参数包括导抗谱频率ISF或线谱频率LSF,然后判断第i帧的谱频率参数和第i-1帧的谱频率参数是否满足条件六,条件六包括:第i-1帧和第i帧的部分或全部相同索引对应的谱频率参数差值的和大于第九阈值。如果第i帧的谱频率参数和第i-1帧的谱频率参数满足条件六,则确定对第i帧谱频率参数进行修正,如果第i帧的谱频率参数和第i-1帧的谱频率参数不满足条件六,则确定不对第i帧谱频率参数进行修正。
在进行修正时,根据第i-1帧的谱频率参数和第i帧的谱频率参数的加权运算,确定第i帧修正后的谱频率参数,或者,根据第i帧的谱频率参数和预置谱频率参数的加权运算,确定第i帧修正后的谱频率参数。
在第一方面的一种可能的实现方式中,可以根据第i帧与第i-1帧的相关性和能量稳定性,确定是否对第i帧的激励信号进行修正,当确定对第i帧的信号激励信号进行修正时,根据第i帧与第i-1的能量稳定性对 第i帧的激励信号进行修正。具体的,首先根据第i帧的激励信号和第i帧的谱频率参数,确定第i帧的预合成信号。
然后判断第i帧的预合成信号的能量和第i-1帧的合成信号的能量的差值的绝对值是否大于第十阈值,如果第i帧的预合成信号的能量和第i-1帧的合成信号的能量的差值的绝对值大于第十阈值,则确定对第i帧的激励信号进行修正,如果第i帧的预合成信号的能量和第i-1帧的合成信号的能量的差值的绝对值小于或等于第十阈值,则确定不对i帧的激励信号进行修正。
或者,判断第i帧的预合成信号的能量和第i-1帧的合成信号的能量的比值是否大于第十一阈值,第十一阈值大于1,如果第i帧的预合成信号的能量和第i-1帧的合成信号的能量的比值大于第十一阈值,则确定对第i帧的激励信号进行修正,如果第i帧的预合成信号的能量和第i-1帧的合成信号的能量的比值小于或等于第十一阈值,则确定不对i帧的激励信号进行修正。
或者,判断第i-1帧的预合成信号的能量和第i帧的合成信号的能量的比值是否小于第十二阈值,第十二阈值小于1,如果第i-1帧的预合成信号的能量和第i帧的合成信号的能量的比值小于第十二阈值,则确定对第i帧的激励信号进行修正,如果第i-1帧的预合成信号的能量和第i帧的合成信号的能量的比值大于或等于第十二阈值,则确定不对第i帧的激励信号进行修正。
在进行修正时,根据第i帧与第i-1的能量稳定性确定第二修正因子,第二修正因子小于,然后将第i帧的激励信号乘以第二修正因子得到第i帧修正后的激励信号1。可选的,第二修正因子为第i-1帧的能量和第i帧的能量的比值,或者,第二修正因子为第i-1帧和第i帧相同个数子帧的能量的比值。
在第一方面的一种可能的实现方式中,可以根据第i-1帧信号的相关性,确定是否对第i帧的激励信号进行修正,当确定对第i帧的信号激励信号进行修正时,根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。其中,第i-1帧信号的相关性包括:第i-1帧信号的相关值与十三阈值的大小关系以及第i-1帧信号的基因周期的偏差与第十四阈值的 大小关系。
在确定是否对第i帧的激励信号进行修正时,通过判断第i-1帧信号是否满足条件七,如果第i-1帧信号满足条件七,则确定对第i帧的激励信号进行修正,如果第i-1帧信号不满足条件七,则确定不对第i帧的激励信号进行修正。条件七为:第i-1帧为丢失帧,第i-1信号的相关值大于第十三阈值,并且第i-1帧信号的基音周期的偏差小于第十四阈值。
在进行修正时,先根据第i帧与第i-1的能量稳定性,确定第三修正因子,第三修正因子小于1,然后将第i帧的激励信号乘以第三修正因子得到第i帧修正后的激励信号。
在第一方面的一种可能的实现方式中,可以根据第i帧与第i-1帧信号的相关性,确定是否对第i帧的激励信号进行修正,当确定对第i帧的信号激励信号进行修正时,根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。其中,第i帧与第i-1帧信号的相关性包括:第i-1帧信号的相关值与十三阈值的大小关系以及第i帧信号的基因周期的偏差与第十四阈值的大小关系。
在确定是否对第i帧的激励信号进行修正时,通过判断第i-1帧信号和第i帧信号是否满足条件八,如果第i-1帧信号和第i帧信号满足条件八,则确定对第i帧的激励信号进行修正,如果第i-1帧信号和第i帧信号不满足条件八,则确定不对第i帧的激励信号进行修正。条件八包括:第i-1帧为丢失帧,第i-1帧信号的相关值大于预设的第十三阈值,并且第i帧信号的基音周期的偏差小于预设的第十四阈值。
在进行修正时,先根据第i帧与第i-1的能量稳定性,确定第三修正因子,第三修正因子小于1,然后将第i帧的激励信号乘以第三修正因子得到第i帧修正后的激励信号。可选的,第三修正因子为第i-1帧的能量和第i帧的能量的比值,或者,第三修正因子为第i-1帧和第i帧相同个数子帧的能量的比值。
在第一方面的一种可能的实现方式中,可以根据第i-1帧与第i-2帧信号的相关性,确定是否对第i帧的激励信号进行修正,当确定对第i帧的信号激励信号进行修正时,根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。其中,第i-1帧与第i-2帧信号的相关性,包括: 第i-2帧信号的相关值与十三阈值的大小关系,第i-1帧的激励信号是否被修正过。
在确定是否对第i帧的激励信号进行修正时,通过判断第i-2帧信号和第i-1帧信号是否满足条件九,如果第i-2帧信号和第i-1帧信号满足条件九,则确定对第i帧的激励信号进行修正,如果第i-2帧信号和第i-1帧信号不满足条件九,则确定不对第i帧的激励信号进行修正。条件九包括:第i-2帧为丢失帧,第i-2帧信号的相关值大于第十三阈值,且第i-1帧信号的激励信号进行了修正。
在进行修正时,根据第i帧与第i-1的能量稳定性,确定第四修正因子,第四修正因子小于1,将第i帧的激励信号乘以第四修正因子得到i帧修正后的激励信号。
在第一方面的一种可能的实现方式中,可以根据第i-1帧与第i-2帧信号的相关性,确定是否对第i帧的激励信号进行修正,当确定对第i帧的信号激励信号进行修正时,根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。其中,第i-1帧与第i-2帧信号的相关性,包括:第i-2帧信号的相关值与十三阈值的大小关系,第i-1帧的激励信号中的代数码书贡献与第十五阈值的大小关系。
在确定是否对第i帧的激励信号进行修正时,通过判断第i-2帧信号和第i-1帧信号是否满足条件十,如果第i-2帧信号和第i-1帧信号满足条件十,则确定对第i帧的激励信号进行修正,如果第i-2帧信号和第i-1帧信号不满足条件十,则确定不对第i帧的激励信号进行修正。条件十包括:第i-2帧为丢失帧,第i-2帧信号的相关值大于第十三阈值,且第i-1帧信号的激励信号中的代数码书贡献小于第十五阈值。
在进行修正时,根据第i帧与第i-1的能量稳定性,确定第四修正因子,第四修正因子小于1,将第i帧的激励信号乘以第四修正因子得到i帧修正后的激励信号。
在第一方面的一种可能的实现方式中,可以根据第i-1帧与第i帧信号的相关性,确定是否对第i帧的状态更新的激励信号进行修正,当确定对第i帧的状态更新的激励信号进行修正时,根据第i帧与第i-1的能量稳定性对第i帧的状态更新的激励信号进行修正。其中,第i-1帧与第i 帧信号的相关性,包括:第i-1帧与第i帧的相关性大小,以及第i-1帧信号的激励信号是否被修正过。
在确定是否对第i帧的状态更新的激励信号进行修正时,通过判断第i帧信号和第i-1帧信号是否满足条件十一,如果第i帧信号和第i-1帧信号满足条件十一,则确定对第i帧的状态更新的激励信号进行修正,如果第i帧信号和第i-1帧信号不满足条件十一,则确定不对第i帧的状态更新的激励信号进行修正。条件十一包括:第i帧或第i-1帧是强相关帧,且第i-1帧信号的激励信号做了修正。
在进行修正时,根据第i帧与第i-1的能量稳定性,确定第五修正因子,第五修正因子小于1,将第i帧的状态更新的激励信号乘以第五修正因子得到第i帧修正后的状态更新的激励信号。
在第一方面的一种可能的实现方式中,当第i帧为正常帧时,该方法还包括:对第i帧的解码信号进行处理,得到第i帧的解码信号的相关值,根据第i帧的解码信号的相关值、第i帧各子帧的基音周期间的大小关系、第i帧的谱倾斜值、第i帧的过零率中的任何一个或任意几个的组合,确定第i帧信号的相关性,根据第i帧的解码信号确定第i帧的能量,根据第i帧的能量和第i-1帧的能量确定第i帧的能量和第i-1帧之间的能量稳定性,以及根据第i帧的解码信号确定第i帧的各子帧的能量,根据第i帧的各子帧的能量确定第i帧的各子帧之间的能量稳定性。确定第i帧信号的相关性、第i帧的各子帧之间的能量稳定性、第i帧的能量和第i-1帧之间的能量稳定性,目的是为了在对第i+1帧的参数进行估计或者修正时使用。
本发明第二方面提供一种丢帧补偿处理装置,该装置包括丢失帧确定模块、估计模块、获取模块、生成模块和信号合成模块。其中,丢失帧确定模块用于通过丢失帧标记位确定第i帧是否为丢失帧,估计模块用于当第i帧为丢失帧时,根据第i帧的前N帧的帧间关系和前N帧的帧内关系中的至少一个,估计第i帧的谱频率参数、基音周期和增益,获取模块用于获取第i帧的代数码书,生成模块用于根据估计模块估计得到的第i帧的基音周期、增益以及获取模块获取的第i帧的代数码书生成第i帧的激励信号,信号合成模块用于根据估计模块估计得到的第i帧的谱频率参 数和生成模块生成的第i帧的激励信号合成第i帧信号。其中,前N帧的帧间关系包括前N帧的相关性和能量稳定性中的至少一个,前N帧的帧内关系包括前N帧中的子帧间的相关性和能量稳定性中的至少一个,使得估计得到的第i帧的参数更加准确,从而提升了解码语音信号的质量。
在第二方面的一种可能的实现方式中,第i帧的谱频率参数是估计模块根据第i帧的前N帧的帧间关系估计得到的,估计模块具体用于:根据第i帧的前N帧的相关性确定第i-1帧的谱频率参数的权重和第i帧的预置谱频率参数的权重,根据第i-1帧的谱频率参数的权重和第i帧的预置谱频率参数的权重,对第i-1帧的谱频率参数和第i帧的预置谱频率参数进行加权运算得到第i帧的谱频率参数。
在第二方面的一种可能的实现方式中,第i帧的前N帧的相关性包括:第i-1帧信号的谱倾斜参数与第二阈值的大小关系、第i-1帧信号的归一化自相关值与第一阈值的大小关系和第i-1帧信号的基因周期的偏差与第三阈值的大小关系。相应的,估计模块具体用于:如果第i-1帧信号满足条件一、条件二和条件三中的至少一个,则确定第i-1帧的谱频率参数的权重为第一权重,第i帧的预置谱频率参数的权重为第二权重,如果第i-1帧信号同时不满足条件一、条件二和条件三,则确定第i-1帧的谱频率参数的权重为第二权重,第i帧的预置谱频率参数的权重为第一权重。其中,第一权重大于第二权重,条件一为:第i-1帧信号的归一化自相关值大于第一阈值,条件二为:第i-1帧信号的谱倾斜参数大于第二阈值,条件三为:第i-1帧信号的基音周期的偏差小于第三阈值。
在第二方面的一种可能的实现方式中,第i帧的基因周期是估计模块根据第i帧的前N帧的相关性和第i帧的前N帧的子帧间的相关性估计得到的,该相关性包括:第i-2帧信号的归一化自相关值与第五阈值的大小关系、第i-2帧信号的基因周期的偏差与第四阈值的大小关系和第i-1帧信号的基因周期的偏差与第四阈值的大小关系。
相应的,估计模块具体用于:如果第i-1帧信号的基音周期的偏差小于第四阈值,则根据第i-1帧信号的基音周期确定第i-1帧信号的基音周期偏移值;根据第i-1帧信号的基音周期偏移值和第i-1帧信号的基音周期确定第i帧信号的基音周期;第i帧信号的基音周期包括第i帧的每个 子帧的基音周期,第i-1帧信号的基音周期偏移值为第i-1帧的所有相邻子帧的基音周期的差值的均值。如果第i-1帧信号的基音周期的偏差大于或等于第四阈值,第i-2帧信号的归一化自相关值大于第五阈值,且第i-2帧信号的基音周期的偏差小于第四阈值,则根据第i-2帧信号和第i-1帧信号的基音周期确定第i-2帧信号和第i-1帧信号的基音周期偏移值;根据第i-1帧信号的基音周期以及第i-2帧信号和第i-1帧信号的基音周期偏移值确定第i帧信号的基音周期。
一种实现方式中,估计模块根据如下公式确定第i-1帧信号的基音周期偏移值pv:
pv=(p(-1)(3)-p(-1)(2))+(p(-1)(2)-p(-1)(1))+(p(-1)(1)-p(-1)(0))/3,其中,p(-1)(j)是第i-1帧的第j个子帧的基音周期,j=0,1,2,3。
估计模块根据如下公式确定第i帧信号的基音周期:
pcur(j)=p(-1)(3)+(j+1)*pv,j=0,1,2,3,其中,p(-1)(3)是第i-1帧的第3个子帧的基音周期,pv是第i-1帧信号的基音周期偏移值,pcur(j)是第i帧的第j个子帧的基音周期。
另一种实现方式中,估计模块根据如下公式确定第i-2帧信号和第i-1帧信号的基音周期偏移值pv:
pv=(p(-2)(3)-p(-2)(2))+(p(-1)(0)-p(-2)(3))+(p(-1)(1)-p(-1)(0))/3,其中,p(-2)(m)是第i-2帧的第m个子帧的基音周期,p(-1)(n)是第i-1帧的第n个子帧的基音周期,m=2,3,n=0,1。
估计模块根据如下公式确定第i帧信号的基音周期:
pcur(x)=p(-1)(3)+(x+1)*pv,x=0,1,2,3;
其中,p(-1)(3)是第i-1帧的第3个子帧的基音周期,pv是第i-2帧信号和第i-1帧信号的基音周期偏移值,pcur(x)是第i帧的第x个子帧的基音周期。
在第二方面的一种可能的实现方式中,第i帧的增益是估计模块根据第i帧的前N帧的相关性和能量稳定性估计得到的,其中第i帧的增益包括:自适应码书增益和代数码书增益。估计模块具体用于:先根据第i-1帧的自适应码书增益或预先设定的固定值、第i-1帧的相关性以及第i帧在连续的多个丢失帧中的序号,确定第i帧的自适应码书增益,然后根据 第i-1帧的能量稳定性确定第i-1帧的代数码书增益的权重以及VAD帧的增益的权重,最后根据第i-1帧的代数码书增益的权重和VAD帧的增益的权重,对第i-1帧的代数码书增益和VAD帧的增益进行加权运算得到第i帧的代数码书增益。可选的,第i-1帧的能量越稳定,第i-1帧的代数码书增益的权重越大。或者,随着连续丢失帧个数的增加,VAD帧的增益的权重也相应增加。
可选的,根据第i-1帧的代数码书增益的权重和VAD帧的增益的权重,对第i-1帧的代数码书增益和VAD帧的增益进行加权运算得到第i帧的代数码书增益之前,估计模块还用于:根据编解码速率确定第一修正因子,使用第一修正因子对第i-1帧的代数码书增益进行修正。
在第二方面的一种可能的实现方式中,获取模块可以通过如下方式获取代数码书:根据随机噪声估计得到第i帧的代数码书,或者,根据第i帧的前N帧的代数码书确定第i帧的代数码书。
在第二方面的一种可能的实现方式中,获取模块还用于:根据第i-1帧的基音周期的偏差、信号的相关性、谱斜率大小和过零率中的任意一个确定第i帧的代数码书贡献的权重,或者,对第i-1帧的基音周期的偏差、信号的相关性、谱斜率大小和过零率中的任意组合进行加权运算确定第i帧的代数码书贡献的权重,以及对第i-1帧的状态更新的激励信号进行内插运算确定第i帧的自适应码书。生成模块具体用于:根据第i帧的代数码书和第i帧的代数码书增益的乘积,确定第i帧的代数码书贡献,根据第i帧的自适应码书和第i帧的自适应码书增益的乘积,确定第i帧的自适应码书贡献,根据第i帧的代数码书贡献的权重和自适应码书贡献的权重,对第i帧的代数码书贡献和自适应码书贡献进行加权运算,确定第i帧的激励信号,自适应码书的权重为1。
在第二方面的一种可能的实现方式中,如果第i帧为正常帧,装置还包括:解码模块、判断模块和修正模块。解码模块用于根据接收到的码流解码获得第i帧的谱频率参数、基音周期、增益以及代数码书,生成模块还用于根据解码模块解码得到的第i帧的基音周期、增益以及代数码书生成第i帧的激励信号和第i帧的状态更新的激励信号,判断模块用于当第i-1帧或第i-2帧为丢失帧时,根据第i帧与第i帧的前N帧的帧间关系 和帧内关系中的至少一个,确定是否对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正,修正模块用于当判断模块确定对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正时,根据第i帧与第i帧的前N帧的帧间关系和帧内关系中的至少一个,对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正。
信号合成模块还用于根据修正模块对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个的修正结果合成第i帧信号,或者,当判断模块确定不对第i帧的谱频率参数、激励信号和状态更新的激励信号进行修正时,根据第i帧的谱频率参数、激励信号和状态更新的激励信号合成第i帧信号。其中,帧间关系包括第i帧与第i帧的前N帧的相关性和能量稳定性中的至少一个,帧内关系包括:第i帧与第i帧的前N帧的子帧间相关性和能量稳定性中的至少一个。通过对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正,使得使得前后帧之间的整体能量及相同频段的能量都能平滑过渡。
在第二方面的一种可能的实现方式中,判断模块用于根据第i帧的相关性,确定是否对第i帧的谱频率参数进行修正,当判断模块确定对第i帧的谱频率参数进行修正时,修正模块用于:根据第i帧与第i-1帧的谱频率参数对第i帧的谱频率参数进行修正,或者,根据第i帧的谱频率参数和预置谱频率参数对第i帧的谱频率参数进行修正。其中,第i帧的相关性包括:第i帧的相邻谱频率参数的差值的最小值的索引对应的两个谱频率参数中的其中一个谱频率参数与第六阈值的大小关系、第i帧的相邻谱频率参数的差值的最小值与第七阈值的大小关系以及第i帧的相邻谱频率参数的差值的最小值的索引与第八阈值的大小关系。
相应的,判断模块具体用于:先确定第i帧的相邻谱频率参数的差值,每个差值对应一个索引,谱频率参数包括导抗谱频率ISF或线谱频率LSF,然后判断第i帧的相邻谱频率参数的差值是否满足条件四和条件五中的至少一个,如果第i帧的相邻谱频率参数的差值满足条件四和条件五中的至少一个,则确定对第i帧谱频率参数进行修正,如果第i帧的相邻谱频率参数的差值同时不满足条件四和条件五,则确定不对第i帧谱频率 参数进行修正。其中,条件四包括:第i帧的相邻谱频率参数的差值的最小值的索引对应的两个谱频率参数中的其中一个谱频率参数小于第六阈值,条件五包括:第i帧的相邻谱频率参数的差值的最小值的索引值小于第八阈值,且最小差值小于第七阈值。
修正模块具体用于:根据第i-1帧的谱频率参数和第i帧的谱频率参数的加权运算,确定第i帧修正后的谱频率参数,或者,根据第i帧的谱频率参数和预先的谱频率参数的加权运算,确定第i帧修正后的谱频率参数。
在第二方面的一种可能的实现方式中,判断模块用于根据第i帧与第i-1帧的相关性,确定是否对第i帧的谱频率参数进行修正,当判断模块确定对第i帧的谱频率参数进行修正时,修正模块用于:根据第i帧与第i-1帧的谱频率参数对第i帧的谱频率参数进行修正,或者,根据第i帧的谱频率参数和预置谱频率参数对第i帧的谱频率参数进行修正。其中,第i帧与第i-1帧的相关性包括:第i-1帧和第i帧的部分或全部相同索引对应的谱频率参数差值的和与第九阈值的大小关系。
相应的,判断模块具体用于:先确定第i帧的相邻谱频率参数的差值,每个差值对应一个索引,谱频率参数包括导抗谱频率ISF或线谱频率LSF,然后判断第i帧的谱频率参数和第i-1帧的谱频率参数是否满足条件六,如果第i帧的谱频率参数和第i-1帧的谱频率参数满足条件六,则确定对第i帧谱频率参数进行修正,如果第i帧的谱频率参数和第i-1帧的谱频率参数不满足条件六,则确定不对第i帧谱频率参数进行修正,其中条件六包括:第i-1帧和第i帧的部分或全部相同索引对应的谱频率参数差值的和大于第九阈值。
修正模块具体用于:根据第i-1帧的谱频率参数和第i帧的谱频率参数的加权运算,确定第i帧修正后的谱频率参数,或者,根据第i帧的谱频率参数和预置谱频率参数的加权运算,确定第i帧修正后的谱频率参数。
在第二方面的一种可能的实现方式中,判断模块用于根据第i帧与第i-1帧的相关性和能量稳定性,确定是否对第i帧的激励信号进行修正,当判断模块确定对第i帧的信号激励信号进行修正时,修正模块用于根据 第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。
判断模块具体用于:首先根据第i帧的激励信号和第i帧的谱频率参数,确定第i帧的预合成信号。
然后,判断第i帧的预合成信号的能量和第i-1帧的合成信号的能量的差值的绝对值是否大于第十阈值,如果第i帧的预合成信号的能量和第i-1帧的合成信号的能量的差值的绝对值大于第十阈值,则确定对第i帧的激励信号进行修正,如果第i帧的预合成信号的能量和第i-1帧的合成信号的能量的差值的绝对值小于或等于第十阈值,则确定不对i帧的激励信号进行修正。
或者,判断第i帧的预合成信号的能量和第i-1帧的合成信号的能量的比值是否大于第十一阈值,第十一阈值大于1,如果第i帧的预合成信号的能量和第i-1帧的合成信号的能量的比值大于第十一阈值,则确定对第i帧的激励信号进行修正,如果第i帧的预合成信号的能量和第i-1帧的合成信号的能量的比值小于或等于第十一阈值,则确定不对i帧的激励信号进行修正。
或者,判断第i-1帧的预合成信号的能量和第i帧的合成信号的能量的比值是否小于第十二阈值,第十二阈值小于1,如果第i-1帧的预合成信号的能量和第i帧的合成信号的能量的比值小于第十二阈值,则确定对第i帧的激励信号进行修正,如果第i-1帧的预合成信号的能量和第i帧的合成信号的能量的比值大于或等于第十二阈值,则确定不对第i帧的激励信号进行修正。
修正模块具体用于:根据第i帧与第i-1的能量稳定性确定第二修正因子,第二修正因子小于,将第i帧的激励信号乘以第二修正因子得到第i帧修正后的激励信号1。可选的,第二修正因子为第i-1帧的能量和第i帧的能量的比值,或者,第二修正因子为第i-1帧和第i帧相同个数子帧的能量的比值。
在第二方面的一种可能的实现方式中,判断模块用于根据第i-1帧信号的相关性,确定是否对第i帧的激励信号进行修正,当判断模块确定对第i帧的信号激励信号进行修正时,修正模块用于根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。其中,第i-1帧信号的相关性 包括:第i-1帧信号的相关值与十三阈值的大小关系以及第i-1帧信号的基因周期的偏差与第十四阈值的大小关系。
相应的,判断模块具体用于:判断第i-1帧信号是否满足条件七,如果第i-1帧信号满足条件七,则确定对第i帧的激励信号进行修正,如果第i-1帧信号不满足条件七,则确定不对第i帧的激励信号进行修正。其中,条件七为:第i-1帧为丢失帧,第i-1信号的相关值大于第十三阈值,并且第i-1帧信号的基音周期的偏差小于第十四阈值。
修正模块具体用于:根据第i帧与第i-1的能量稳定性,确定第三修正因子,第三修正因子小于1,将第i帧的激励信号乘以第三修正因子得到第i帧修正后的激励信号。
在第二方面的一种可能的实现方式中,判断模块用于根据第i帧与第i-1帧信号的相关性,确定是否对第i帧的激励信号进行修正,当判断模块确定对第i帧的信号激励信号进行修正时,修正模块用于根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。其中,第i帧与第i-1帧信号的相关性包括:第i-1帧信号的相关值与十三阈值的大小关系以及第i帧信号的基因周期的偏差与第十四阈值的大小关系。
相应的,判断模块具体用于:判断第i-1帧信号和第i帧信号是否满足条件八,如果第i-1帧信号和第i帧信号满足条件八,则确定对第i帧的激励信号进行修正,如果第i-1帧信号和第i帧信号不满足条件八,则确定不对第i帧的激励信号进行修正。其中,条件八包括:第i-1帧为丢失帧,第i-1帧信号的相关值大于预设的第十三阈值,并且第i帧信号的基音周期的偏差小于预设的第十四阈值。
修正模块具体用于:根据第i帧与第i-1的能量稳定性,确定第三修正因子,第三修正因子小于1,将第i帧的激励信号乘以第三修正因子得到第i帧修正后的激励信号。
在第二方面的一种可能的实现方式中,判断模块用于根据第i-1帧与第i-2帧信号的相关性,确定是否对第i帧的激励信号进行修正,当判断模块确定对第i帧的信号激励信号进行修正时,修正模块用于根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。其中,第i-1帧与第i-2帧信号的相关性,包括:第i-2帧信号的相关值与十三阈值的大小 关系,第i-1帧的激励信号是否被修正过。
相应的,判断模块具体用于:判断第i-2帧信号和第i-1帧信号是否满足条件九,如果第i-2帧信号和第i-1帧信号满足条件九,则确定对第i帧的激励信号进行修正,如果第i-2帧信号和第i-1帧信号不满足条件九,则确定不对第i帧的激励信号进行修正。其中,条件九包括:第i-2帧为丢失帧,第i-2帧信号的相关值大于第十三阈值,且第i-1帧信号的激励信号进行了修正。
修正模块具体用于:根据第i帧与第i-1的能量稳定性,确定第四修正因子,第四修正因子小于1,将第i帧的激励信号乘以第四修正因子得到i帧修正后的激励信号。
在第二方面的一种可能的实现方式中,判断模块用于根据第i-1帧与第i-2帧信号的相关性,确定是否对第i帧的激励信号进行修正,当判断模块确定对第i帧的信号激励信号进行修正时,修正模块用于根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。其中,第i-1帧与第i-2帧信号的相关性,包括:第i-2帧信号的相关值与十三阈值的大小关系,第i-1帧的激励信号中的代数码书贡献与第十五阈值的大小关系。
相应的,判断模块具体用于:判断第i-2帧信号和第i-1帧信号是否满足条件十,如果第i-2帧信号和第i-1帧信号满足条件十,则确定对第i帧的激励信号进行修正,如果第i-2帧信号和第i-1帧信号不满足条件十,则确定不对第i帧的激励信号进行修正。其中,条件十包括:第i-2帧为丢失帧,第i-2帧信号的相关值大于第十三阈值,且第i-1帧信号的激励信号中的代数码书贡献小于第十五阈值。
修正模块具体用于:根据第i帧与第i-1的能量稳定性,确定第四修正因子,第四修正因子小于1,将第i帧的激励信号乘以第四修正因子得到i帧修正后的激励信号。
在第二方面的一种可能的实现方式中,判断模块用于根据第i-1帧与第i帧信号的相关性,确定是否对第i帧的状态更新的激励信号进行修正,当判断模块确定对第i帧的状态更新的激励信号进行修正时,修正模块用于根据第i帧与第i-1的能量稳定性对第i帧的状态更新的激励信号进行修正。其中,第i-1帧与第i帧信号的相关性,包括:第i-1帧与第i帧 的相关性大小,以及第i-1帧信号的激励信号是否被修正过。
相应的,判断模块具体用于:判断第i帧信号和第i-1帧信号是否满足条件十一,如果第i帧信号和第i-1帧信号满足条件十一,则确定对第i帧的状态更新的激励信号进行修正,如果第i帧信号和第i-1帧信号不满足条件十一,则确定不对第i帧的状态更新的激励信号进行修正,条件十一包括:第i帧或第i-1帧是强相关帧,且第i-1帧信号的激励信号做了修正。
修正模块具体用于:根据第i帧与第i-1的能量稳定性,确定第五修正因子,第五修正因子小于1,将第i帧的状态更新的激励信号乘以第五修正因子得到第i帧修正后的状态更新的激励信号。
本发明实施例提供的丢帧补偿处理方法和装置,通过丢失帧标记位确定第i帧是否为丢失帧,当第i帧为丢失帧时,根据第i帧的前N帧的帧间关系和前N帧的帧内关系中的至少一个,估计第i帧的谱频率参数、基音周期和增益,前N帧的帧间关系包括前N帧的相关性和能量稳定性中的至少一个,前N帧的帧内关系包括前N帧中子帧间的相关性和能量稳定性中的至少一个。通过前N帧的信号相关性和能量稳定性,以及每帧帧内信号的相关性和能量稳定性确定第i帧的参数,考虑到了信号之间的关系,使得估计得到的第i帧的参数更加准确,从而提升了解码语音信号的质量。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例一提供的丢帧补偿处理方法的流程图;
图2为本发明实施例二提供的谱频谱参数估计方法的流程图;
图3为本发明实施例三提供的基因周期估计方法的流程图;
图4为本发明实施例四提供的增益估计方法的流程图;
图5为本发明实施例五提供的丢帧补偿处理方法的流程图;
图6为第i帧的语谱图在修正前后的对比图;
图7为第i帧的时域信号在修正前后的对比图;
图8为本发明实施例六提供的丢帧补偿处理方法的流程图;
图9为本发明实施例七提供的丢帧补偿处理装置的结构示意图;
图10为本发明实施例八提供的丢帧补偿处理装置的结构示意图;
图11为本发明实施例九提供的丢帧补偿处理装置的实体结构的示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1为本发明实施例一提供的丢帧补偿处理方法的流程图,如图1所示,本实施例的方法可以包括以下步骤:
步骤101、通过丢失帧标记位确定第i帧是否为丢失帧。
编码端发送的帧在传输过程中可能会丢失,网络侧会相应的记录当前帧是否为丢失帧,解码端根据接收到的数据包中的丢失帧标记位确定第i帧是否为丢失帧。这里第i帧即正在处理的当前帧,依次类推,第i-1帧为当前帧的前一帧,第i+1帧为为当前帧的后一帧,其中,当前帧的前一帧是指与当前帧相邻并且在时域上超前当前帧的帧,当前帧的后一帧是指与当前帧相邻并且在时域上落后当前帧的帧。
步骤102、如果第i帧为丢失帧,则根据第i帧的前N帧的帧间关系和前N帧的帧内关系中的至少一个,估计第i帧的参数。
其中,前N帧的帧间关系包括前N帧的相关性和能量稳定性中的至少一个,前N帧的帧内关系包括前N帧中的子帧间的相关性和能量稳定性中的至少一个,相关性包括信号的谱频率参数的大小关系、相关值的大小关系、谱倾斜参数的大小关系、基因周期的大小关系、激励信号之间的关系等。第i帧的参数包括:谱频率参数、基音周期、增益和代数码书,N为 大于或等于1的正整数,其中,谱频率参数、基音周期、增益可以通过第i帧的前N帧的帧间关系和前N帧的帧内关系中的至少一个估计得到。
信号的相关性可以用信号的归一化自相关值表示,信号的归一化自相关值通过对信号进行归一化自相关处理得到,信号的相关性也可以用自相关值表示,自相关值可以通过自相关处理得到,在确定时不需要进行归一化处理,归一化自相关值和自相关值可以互相转换,最终得到的信号的相关性是相同的。信号的相关性具体可以对每帧的解码信号的相关值、基音周期间的大小关系、每帧的谱倾斜值或过零率中的任何一个或任意几个的组合,进行自相关处理或者归一化自相关处理得到。
信号的相关性可以分为以下几种情况:低相关性,低相关上升沿,低相关下降沿,中相关,高相关,高相关上升沿,高相关下降沿。在确定信号的相关性时,可以将信号的相关值与相关性阈值进行比较,相关性阈值也可以从上述情况中选一些临界值,如相关性阈值取低相关下降沿,那么信号的相关值大于低相关下降沿,也就是相关性取中相关,高相关,高相关上升沿,高相关下降沿中的某一个值。
本实施例中,前N帧的帧间的能量稳定性是指前N帧的相邻帧之间能量的关系,相邻帧是指传输时在时域上相连的两个帧,能量稳定性可以通过帧与帧之间的能量的比值表示,每一帧的能量可以通过确定信号的平均能量的均方根得到,也可以通过确定信号的平均幅度得到。具体可以通过如下两个公式确定每一帧的平均能量E和平均幅度M:
Figure PCTCN2016103481-appb-000001
Figure PCTCN2016103481-appb-000002
其中,N为帧长或子帧长,s[j]表示第j帧的幅度,j的取值为1,2……,N。
谱频谱参数包括导抗谱频率(Immittance Spectral Frequencies,简称ISF)和线谱频率(Line Spectral Frequencies,简称LSF)等。增益包括自适应码书增益和代数码书增益。基音周期是人发出浊音时由于声带振动所造成的周期性特征,即人发出声音时其声带振动周期,与声带振动频率成倒数关系。
本实施例在估计第i帧的参数时,根据历史帧(即前N帧)的相关性和能量稳定性,以及每帧的相关性和能量稳定性确定第i帧的参数,考虑到了信号之间的关系,使得估计得到的第i帧的参数更加准确。
步骤103、获取第i帧的代数码书。
可选的,可以根据随机噪声估计得到第i帧的代数码书,或者,根据第i帧的前N帧的代数码书加权得到第i帧的代数码书。或者,也可以采用已有的方法估计第i帧的代数码书。
步骤104、根据估计得到的第i帧的基音周期、增益以及获取的第i帧的代数码书生成第i帧的激励信号。
在执行本步骤之前,还需要估计第i帧的代数码书贡献的权重和自适应码数,其中,自适应码书可以根据第i-1帧的状态更新的激励信号内插得到。代数码书贡献的权重可以根据第i-1帧的基音周期的偏差、信号的相关性、谱斜率大小和过零率中的任意一个或者任意组合进行加权运算得到。
本实施例中,第i帧的增益包括自适应码书增益和代数码书增益,在合成第i帧的激励信号时,先根据第i帧的代数码书和第i帧的代数码书增益的乘积,得到第i帧的代数码书贡献,以及根据第i帧的自适应码书和第i帧的自适应码书增益的乘积,得到第i帧的自适应码书贡献。然后根据第i帧的代数码书贡献的权重和自适应码书贡献的权重,对第i帧的代数码书贡献和自适应码书贡献进行加权运算,得到第i帧的激励信号,其中自适应码书的权重固定为1。
步骤105、根据估计得到的第i帧的谱频率参数和生成的第i帧的激励信号合成第i帧信号。
步骤105的具体实现方式可采用已有方法或已有方法的简单变形,这里不再赘述。
本实施例中,在第i帧为丢失帧时,则根据第i帧的前N帧的帧间关系和前N帧的帧内关系中的至少一个,估计第i帧的参数,前N帧的帧间关系包括前N帧的相关性和能量稳定性中的至少一个,前N帧的帧内关系包括前N帧中子帧间的相关性和能量稳定性中的至少一个。通过前N帧的信号相关性和能量稳定性,以及每帧帧内信号的相关性和能量稳定性确 定第i帧的参数,考虑到了信号之间的关系,使得估计得到的第i帧的参数更加准确,从而提升了解码语音信号的质量。
在实施例一的基础上,本发明实施例二中提供一种谱频率参数的估计方法,本实施例中,第i帧的谱频率参数是根据第i帧的前N帧的帧间关系估计得到的,图2为本发明实施例二提供的谱频谱参数估计方法的流程图,如图2所示,本实施例提供的方法可以包括以下步骤:
步骤201、根据第i帧的前N帧的相关性确定第i-1帧的谱频率参数的权重和第i帧的预置谱频率参数的权重。
本实施例中,第i帧的前N帧的相关性包括:第i-1帧信号的谱倾斜参数与第二阈值的大小关系、第i-1帧信号的归一化自相关值与第一阈值的大小关系和第i-1帧信号的基因周期的偏差与第三阈值的大小关系。第一阈值、第二阈值和第三阈值都是预先设定的。其中,在本发明的一个实现方式中,第一阈值可以从[0.3,0.8]这个数值区间内取值,具体地,可以是0.3,0.5,0.6或0.8等。在本发明的一个实现方式中,第二阈值可以从[-0.5,0.5]这个数值区间内取值,具体地,可以是-0.5,-0.1,0,0.1或0.5等。在本发明的一个实现方式中,第三阈值可以从[0.5,5]这个数值区间内取值,具体地,可以是0.5,1或5等。对于每帧信号,都会确定并保存信号的谱倾斜参数、归一化自相关值和基因周期,以便于解码端根据第i帧的前N帧的相关性解码当前帧的信号。例如,可以根据第i帧的前一帧(即第i-1帧)的信号的相关性和谱频率参数确定第i帧谱频率参数,通常情况下,第i-1帧的信号的相关性和谱频率参数的相关性大时,在确定第i帧的谱频率参数时,第i-1帧的谱频率参数的权重大,第i帧的预置谱频率参数的权重小,第i-1帧的信号的相关性和谱频率参数的相关性小时,第i-1帧的谱频率参数的权重小,第i帧的预置谱频率参数的权重大。
一种实现方式中,如果第i-1帧信号满足条件一、条件二和条件三中的至少一个,则确定第i-1帧的谱频率参数的权重为第一权重,第i帧的预置谱频率参数的权重为第二权重。其中,第一权重大于第二权重,条件一为:第i-1帧信号的归一化自相关值大于第一阈值,条件二为:第i-1帧信号的谱倾斜参数大于第二阈值,条件三为:第i-1帧信号的基音 周期的偏差小于第三阈值。
或者,如果第i-1帧信号同时不满足条件一、条件二和条件三,则确定第i-1帧的谱频率参数的权重为第二权重,第i帧的预置谱频率参数的权重为第一权重。本实施例中,第一权重和第二权重可以是预先设置的,也可以是根据第i帧的前N帧帧间的谱频率参数的相关性大小确定的,相应的,在步骤201之前还需要根据第i帧的前N帧帧间的谱频率参数的相关性大小确定第一权重和第二权重。
其中,第i-1帧信号的归一化自相关值可以通过对第i-1帧的解码信号的进行归一化自相关处理得到。第i-1帧信号的基音周期的偏差为第i-1帧的各子帧的基音周期相对于各子帧的基音周期的均值的偏差之和,在确定第i-1帧信号的基音周期的偏差时,先将第i-1帧的各子帧的基音周期相加进行平均得到各子帧的基音周期的均值,然后,分别确定每个子帧相对于基音周期的均值的偏差,最后,将各子帧的基音周期的偏差的绝对值相加得到第i-1帧信号的基音周期的偏差。或通过确定相邻子帧间基音周期的差值的绝对值的和得到第i-1帧信号的基音周期的偏差。
例如,第一权重为0.8,第二权重为0.2,第一阈值为0.8,第二阈值为0.6,第三阈值为0.2,那么当第i-1帧信号的归一化自相关值大于0.8,第i-1帧信号的谱斜率参数大于0.6,第i-1帧信号的基音周期的偏差小于0.2时,第i-1帧的谱频率参数的权重为0.8,第i帧的预置谱频率参数的权重为0.2,否则,第i-1帧的谱频率参数的权重为0.2,第i帧的预置谱频率参数的权重为0.8。
步骤202、根据第i-1帧的谱频率参数的权重和第i帧的预置谱频率参数的权重,对第i-1帧的谱频率参数和第i帧的预置谱频率参数进行加权运算得到第i帧的谱频率参数。
本实施例中,解码端会为丢失帧预先设置一个谱频率参数,称为预置谱频谱参数,在第i帧为丢失帧时,根据第i-1帧的频谱率参数和第i帧的预置谱频率参数进行加权运算得到第i帧的谱频率参数,在第i-1帧的相关性大时,有很大的可能前后帧之间的相关性也很大,因此,第i-1帧的频谱率参数的权重大,相应的第i帧的预置的谱频率参数的权重小,这样确定得到的第i帧的谱频率参数主要依赖于第i帧的谱频率参数,更 加准确。
在实施例一的基础上,本发明实施例三提供一种基音周期的估计方法,本实施例中,第i帧的基因周期是根据第i帧的前N帧的相关性和第i帧的前N帧的子帧间的相关性估计得到的;其中相关性包括:第i-2帧信号的归一化自相关值与第五阈值的大小关系、第i-2帧信号的基因周期的偏差与第四阈值的大小关系和第i-1帧信号的基因周期的偏差与第四阈值的大小关系。在本发明的一个实现方式中,第四阈值可以从[2,50]这个数值区间内取值,具体地,可以是2,5,10或50等。在本发明的一个实现方式中,第五阈值可以从低相关性上升沿~高相关性上升沿这个区间内选取,具体地,可以选取低相关性上升沿,低相关性下降沿或高相关性上升沿等。其中,低相关性上升沿和高相关性上升沿是与先设置的相关性值的划分,例如,可以根据相关性值的大小将相关性值按顺序划分成低相关性,低相关性上升沿,低相关性下降沿,高相关性上升沿,高相关性,中相关性,高相关性下降沿等。
图3为本发明实施例三提供的基因周期估计方法的流程图,如图3所示,本实施例提供的方法可以包括以下步骤:
步骤301、判断第i-1帧信号的基音周期的偏差是否小于第四阈值。
如果第i-1帧信号的基音周期的偏差小于第四阈值,则执行步骤302,如果第i-1帧信号的基音周期的偏差大于或等于第四阈值,则执行步骤303。
其中,每个帧包括多个子帧,第i-1帧信号的基音周期的偏差为第i-1帧的各子帧的基音周期相对于各子帧的基音周期的均值的偏差之和,第i-1帧信号的基音周期的偏差可参照实施例二中的确定方法。
步骤302、根据第i-1帧信号的基音周期确定第i-1帧信号的基音周期偏移值,根据第i-1帧信号的基音周期偏移值和第i-1帧信号的基音周期确定第i帧信号的基音周期。
本实施例中,第i-1帧信号的基音周期偏移值为第i帧的所有相邻子帧的基音周期的差值的均值,假设每个帧包括4个子帧,则可以根据如下公式确定第i-1帧信号的基音周期偏移值pv:
pv=(p(-1)(3)-p(-1)(2))+(p(-1)(2)-p(-1)(1))+(p(-1)(1)-p(-1)(0))/3,
其中,p(-1)(j)是第i-1帧的第j个子帧的基音周期,j=0,1,2,3。
可以根据如下公式确定第i帧信号的基音周期:
pcur(j)=p(-1)(3)+(j+1)*pv,j=0,1,2,3,其中,p(-1)(3)是第i-1帧的第3个子帧(第i-1帧的最后一个子帧)的基音周期,pv是第i-1帧信号的基音周期偏移值,pcur(j)是第i帧的第j个子帧的基音周期。
步骤303、如果第i-2帧信号的归一化自相关值大于第五阈值,且第i-2帧信号的基音周期的偏差小于第四阈值,则根据第i-2帧信号和第i-1帧信号的基音周期确定第i-2帧信号和第i-1帧信号的基音周期偏移值,根据第i-1帧信号的基音周期以及第i-2帧信号和第i-1帧信号的基音周期偏移值确定第i帧信号的基音周期。
第i-2帧为第i-1帧的前一帧,可以根据如下公式确定第i-2帧信号和第i-1帧信号的基音周期偏移值pv:
pv=(p(-2)(3)-p(-2)(2))+(p(-1)(0)-p(-2)(3))+(p(-1)(1)-p(-1)(0))/3,
其中,p(-2)(m)是第i-2帧的第m个子帧的基音周期,p(-1)(n)是第i-1帧的第n个子帧的基音周期,m=2,3,n=0,1。
然后,根据第i-2帧信号和第i-1帧信号的基音周期偏移值pv,使用如下公式确定第i帧信号的基音周期:
pcur(x)=p(-1)(3)+(x+1)*pv,x=0,1,2,3,p(-1)(3)是第i-1帧的第3个子帧的基音周期,pv是第i-2帧信号和第i-1帧信号的基音周期偏移值,pcur(x)是第i帧的第x个子帧的基音周期。
上述公式中,p(-2)(3)和p(-2)(2)为第i-2的最后两个子帧,p(-1)(1)和p(-1)(0)表示第i-1帧的最前两个子帧,可知上述公式中选择了第i-2的最后两个子帧以及第i-1帧的最前两个子帧共四个连续的子帧确定第i-2帧信号和第i-1帧信号的基音周期偏移值。可以理解的是,也可以选择第i-2的最后三个子帧以及第i-1帧的最前三个子帧共六个连续的子帧确定第i-2帧信号和第i-1帧信号的基音周期偏移值,或者,选择第i-2帧和第i-1帧的所有子帧确定第i-2帧信号和第i-1帧信号的基音周期偏移值,或者,选择第i-2的最后一个子帧以及第i-1帧的最前一个子帧共两个连续的子帧确定第i-2帧信号和第i-1帧信号的基音周期偏移值。
在实施例一的基础上,本发明实施例四提供一种增益的估计方法, 图4为本发明实施例四提供的增益估计方法的流程图,其中,第i帧的增益包括:自适应码书增益和代数码书增益,本实施例中第i帧的增益是根据第i帧的前N帧的相关性和能量稳定性估计得到的,如图4所示,本实施例提供的方法可以包括以下步骤:
步骤401、根据第i-1帧的自适应码书增益或预先设定的固定值、第i-1帧的相关性及第i帧在连续的多个丢失帧中的序号,确定第i帧的自适应码书增益。
首先,确定第i帧是否为连续的多个丢失帧中的第一个丢失帧,如果第i帧前m帧都为丢失帧,则第i帧为连续的多个丢失帧中的非第一个丢失帧,m为大于或等于1的正整数。如果第i帧为连续的多个丢失帧中非第一个丢失帧,则根据连续的多个丢失帧中的第一个丢失帧对应的自适应码书增益、衰减因子和第i帧在连续的多个丢失帧中的序号,确定第i帧的自适应码书增益。
如果第i帧的前m帧都为丢失帧,那么加上第i帧共有m+1个丢失帧,当这m+1个丢失帧中的第一丢失帧丢失后,解码端会为该第一个丢失帧设置一个自适应码书增益,根据连续丢帧帧数的增加,自适应码书增益逐渐衰减。一种实现方式中,在发生连续丢失帧时,每次都在会前一帧的自适应码书增益的基础上乘以一个衰减因子,假设第一个丢失帧对应的自适应码书增益为1,衰减因子为0.8,那么第二个连续丢失帧的自适应码书增益为1*0.8,第三个连续丢失帧的自适应码书增益为1*(0.8)2,那么第m+1个连续丢失帧的自适应码书增益为1*(0.8)m。当然,也可以用自适应码书增益减去衰减因子当前丢失帧的自适应码书增益,例如,第一个丢失帧对应的自适应码书增益为1,衰减因子为0.1,那么第二个连续丢失帧的自适应码书增益为1-0.1,第三个连续丢失帧的自适应码书增益为1-2*0.1,那么第m+1个连续丢失帧的自适应码书增益为1-m*0.1。本实施例中,衰减因子可以为一个固定值,也可以随帧之间的能量稳定性变化,例如,在能量下降延时,衰减因子更小。
如果第i帧为正常帧后的第一个丢失帧,即第i-1帧为正常帧,第i帧为丢失帧,则确定第i帧的自适应码书增益为一个固定值。也就是说,在某个正常帧之后出现第一个丢失帧时,为该第一个丢失帧设置一个自适 应码书增益,后续如果没有连续的丢失帧,那么这些非连续的丢失帧的自适应码书增益都与该第一个丢失帧的自适应码书增益相同。
步骤402、根据第i-1帧的能量稳定性确定第i-1帧的代数码书增益的权重以及语音激活检测(Voice Activity Detection,简称VAD)帧的增益的权重。
需要说明的是步骤402也可以在步骤401之前执行,即代数码书增益和自适应码书的确定顺序并没有先后。其中,话音激活检测VAD帧的增益,可以通过能量的均方根,幅度的均值等确定得到。
其中,第i-1帧的代数码书增益的权重和VAD帧的增益的权重之和为一个定值,第i-1帧的能量越稳定,第i-1帧的代数码书增益的权重越大,相应的VAD帧的增益的权重越小。或者,随着连续丢失帧个数的增加,VAD帧的增益的权重也相应增加,相应的,代数码书增益的权重会减小。如果第i-1帧的能量越稳定,且连续丢失帧个数的增加,那么可以综合考虑能量稳定性和连续丢帧个数,第i-1帧的代数码书增益的权重不增加,或者增加幅度减小。在语音帧中,解码端会周期性进行VAD检测,得到VAD帧的能量。
步骤403、根据第i-1帧的代数码书增益、VAD帧的增益、第i-1帧的代数码书增益的权重和VAD帧的增益的权重,进行加权运算得到第i帧的代数码书增益。
假设第i-1帧的代数码书增益的权重为α,VAD帧的增益的权重为β,那么第i帧的代数码书增益
Figure PCTCN2016103481-appb-000003
表示第i-1帧的代数码书增益,gcg为VAD帧的增益。当代数码书增益小于VAD帧的增益时,随着帧数的增加代数码书增益权重在前一帧基础上保持不变或者逐渐增大。
可选的,在执行步骤403之前,方法还包括:根据编解码速率确定第一修正因子,使用第一修正因子对第i-1帧的代数码书增益进行修正,例如,对第i-1帧的代数码书增益乘以第一修正因子对第i-1帧的代数码书增益进行修正。
在实施例一至实施例四中,具体描述了在第i帧为丢失帧的情况下,如何根据第i帧的前N帧的帧间关系和前N帧的帧内关系中的至少一个确 定第i帧的参数,本发明实施例五中针对第i帧为正常帧的情况下,如何对第i帧的参数进行修正,图5为本发明实施例五提供的丢帧补偿处理方法的流程图,如图5所示,本实施例提供的方法可以包括以下步骤:
步骤501、根据接收到的码流解码获得第i帧的参数,第i帧的参数包括:谱频率参数、基音周期、增益以及代数码书。
步骤502、根据解码得到的第i帧的基音周期、增益以及代数码书生成第i帧的激励信号和第i帧的状态更新的激励信号。
激励信号包括自适应码书贡献和代书码书贡献两部分组成,其中,自适应码书贡献由自适应码书乘以自适应码书增益得到,代数码书贡献由代数码书乘以代数码书增益得到,自适应码书是根据当前帧的基因周期以及状态更新的激励信号内插得到,代数码书可以通过已有的方法进行估计得到,激励信号用于进行第i帧信号的合成,状态更新的激励信号用于生成下一帧自适应码书。
步骤503、如果第i-1帧或第i-2帧为丢失帧,根据第i帧与第i帧的前N帧的帧间关系和帧内关系中的至少一个,确定是否对第i帧谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正。
帧间关系包括第i帧与第i帧的前N帧的相关性和能量稳定性中的至少一个,帧内关系包括:第i帧与第i帧的前N帧的子帧间相关性和能量稳定性中的至少一个。当确定对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个参数进行修正时,执行步骤504,当确定不对第i帧谱频率参数、激励信号和状态更新的激励信号进行修正时,则执行步骤505。
步骤504、根据第i帧与第i帧的前N帧的帧件关系和帧内关系中的至少一个,对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正。
步骤505、根据第i帧谱频率参数、激励信号和状态更新的激励信号合成第i帧的信号。
步骤506、根据对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个的修正结果合成第i帧信号。
步骤504之后,执行步骤506。如果只对第i帧的谱频率参数进行了 修正,那么根据修正后的第i帧的谱频率参数、解码得到的第i帧的激励信号和解码得到的第i帧的状态更新的激励信号合成第i帧信号。如果只对第i帧的激励信号进行了修正,那么根据修正后的第i帧的激励信号、解码得到的第i帧的谱频率参数和解码得到的第i帧的状态更新的激励信号合成第i帧信号。如果只对第i帧的状态更新的激励信号激励信号进行了修正,那么根据修正后的第i帧的状态更新的激励信号、解码得到的第i帧的谱频率参数和解码得到的第i帧的激励信号合成第i帧信号。如果对第i帧的谱频率参数和激励信号进行了修正,那么根据修正后的第i帧的谱频率参数、修正后的第i帧的激励信号和解码得到的第i帧的状态更新的激励信号合成第i帧信号。如果对第i帧的谱频率参数和状态更新的激励信号进行了修改,那么根据修正后的第i帧的谱频率参数、修正后的第i帧的状态更新的激励信号和解码得到的第i帧的激励信号合成第i帧信号。如果对第i帧的激励信号和状态更新的激励信号进行了修改,那么根据修正后的第i帧的激励信号、修正后的第i帧的状态更新的激励信号和解码得到的第i帧的谱频率参数合成第i帧信号。如果对第i帧的谱频率参数、激励信号和状态更新的激励信号进行了修正,那么根据修正后的第i帧的谱频率参数、修正后的第i帧的激励信号和修正后的第i帧的状态更新的激励信号合成第i帧信号。
需要说明的是,如果第i-1帧和第i-2帧均为正常帧,那么可以直接根据解码得到的第i帧的参数合成第i帧信号,不需要对i帧的参数进行修正。如果第i-1帧或第i-2帧为丢失帧,那么估计得到的第i-1帧或第i-2帧的参数可能会存在一定误差,后续会导致帧间的能量的变化较大,从整体上看解码的语音信号不平稳,因此,本实施例中,解码端根据第i帧与第i帧的前N帧的相关性和能量稳定性,对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正,使得前后帧之间的整体能量及相同频段的能量都能平滑过渡。
(1)对谱频率参数的修正
谱频率参数包括ISF或LSF,以ISF参数为例,由于ISF参数由第i帧的ISP参数和第i-1帧的ISP参数加权并转换得到,在第i-1帧或第i-2帧是丢失帧时,第i帧的确定得到的ISF参数和正常ISF参数(没有丢帧 时的ISF参数)可能会存在一定的偏差,从而导致确定得到的低频的共振峰处的能量比真正的能量大很多。
一种实现方式中,可以根据第i帧的相关性,确定是否对第i帧的谱频率参数进行修正。当确定对第i帧的谱频率参数进行修正时,根据第i帧与第i-1帧的谱频率参数对第i帧的谱频率参数进行修正,或者,根据第i帧的谱频率参数和预置谱频率参数对第i帧的谱频率参数进行修正。其中,第i帧的相关性包括:第i帧的相邻谱频率参数的差值的最小值的索引对应的两个谱频率参数中的其中一个谱频率参数与第六阈值的大小关系、第i帧的相邻谱频率参数的差值的最小值与第七阈值的大小关系以及第i帧的相邻谱频率参数的差值的最小值的索引与第八阈值的大小关系。在本发明的一个实现方式中,第六阈值可以从[500,2000]这个数值区间内取值,具体地,可以是500,1000或2000等。在本发明的一个实现方式中,第七阈值可以从[100,1000]这个数值区间内取值,具体地,可以是100,200,300或1000等。在本发明的一个实现方式中,第八阈值可以从[1,5]这个数值区间内取值,具体地,可以是1,2或5等。
相应的,根据第i帧与第i-1帧的相关性,确定是否对第i帧的谱频率参数进行修正,具体为:首先确定第i帧的相邻谱频率参数的差值,每个差值对应一个索引,其中,谱频率参数是按照从小到大的顺序排列的,索引值也是按照由小到大的顺序。然后判断第i帧的相邻谱频率参数的差值是否满足条件四和条件五中的至少一个,条件四包括:第i帧的相邻谱频率参数的差值的最小值的索引对应的两个谱频率参数中的其中一个谱频率参数小于第六阈值。条件五包括:第i帧的相邻谱频率参数的差值的最小值的索引值小于预设的第八阈值,且最小差值小于预设的第七阈值。如果第i帧的相邻谱频率参数的差值满足条件四和条件五中的至少一个,则确定对第i帧谱频率参数进行修正,如果第i帧的相邻谱频率参数的差值同时不满足条件四和条件五,则确定不对第i帧谱频率参数进行修正。
另一种实现方式中,根据第i帧与第i-1帧的相关性,确定是否对第i帧的谱频率参数进行修正,当确定对第i帧的谱频率参数进行修正时,根据第i帧与第i-1帧的谱频率参数对第i帧的谱频率参数进行修正,或者,根据第i帧的谱频率参数和预置谱频率参数对第i帧的谱频率参数进 行修正。其中,第i帧与第i-1帧的相关性包括:第i-1帧和第i帧的部分或全部相同索引对应的谱频率参数差值的和与第九阈值的大小关系。在本发明的一个实现方式中,第九阈值可以从[100,2000]这个数值区间内取值,具体地,可以是100,200,300或2000等。
相应的,根据第i帧与第i-1帧的相关性,确定是否对第i帧的谱频率参数进行修正,具体为:首先确定第i帧的相邻谱频率参数的差值,每个差值对应一个索引,然后判断第i帧的谱频率参数和第i-1帧的谱频率参数是否满足条件六,条件六包括:第i-1帧和第i帧的部分或全部相同索引对应的谱频率参数差值的和大于第九阈值,如果第i帧的谱频率参数和第i-1帧的谱频率参数满足条件六,则确定对第i帧谱频率参数进行修正,如果第i帧的谱频率参数和第i-1帧的谱频率参数不满足条件六,则确定不对第i帧谱频率参数进行修正。
上述两种实现方式中,根据第i帧与第i-1帧的谱频率参数对第i帧的谱频率参数进行修正,具体为:根据第i-1帧的谱频率参数和第i帧的谱频率参数的加权运算,确定第i帧修正后的谱频率参数。根据第i帧的谱频率参数和预置谱频率参数对第i帧的谱频率参数进行修正,具体为:根据第i帧的谱频率参数和预置谱频率参数的加权运算,确定第i帧修正后的谱频率参数。
以ISF参数为例,第i帧帧内相邻ISF参数间的差值可以表示为ISF_DIFF(i),ISF_DIFF(i)=ISF(i+1)-ISF(i),i=0,1,...,N-2,其中,N为ISF参数的阶数,如果第i帧的ISF_DIFF(i)的最小值的索引对应的ISF参数小于第六阈值(例如为800),且ISF_DIFF(i)的最小值小于第七阈值(例如为200),或者,第i-1帧和第i帧的部分或全部相同索引对应的谱频率参数差值的和大于第九阈值,则将第i帧的ISF参数和第i-1帧的ISF参数进行加权确定得到第i帧修正后的ISF参数,或将第i帧的ISF参数和预先设置的ISF参数的进行加权运算得到第i帧修正后的ISF参数。第i-1帧和第i帧的部分或全部相同索引对应的谱频率参数差值的和大于第九阈值说明前后帧间ISF参数相关性低。
图6为第i帧的语谱图在修正前后的对比图,如图6所示,图6(a)为原始信号的语谱图,原始信号即编码端发送的信号,图6(b)为现有技术合成后的信号的语谱图,图6(c)本发明合成后的信号的语谱图。通过图6(a)和图6 (b)对比可知,图6(b)椭圆框里的部分比图6(a)原始信号椭圆框的部分亮了很多,也就是说第i帧恢复的低频的共振峰能量比正确恢复时的能量大很多。显然,需要对第i帧的ISF参数做相应的修正,使得第i帧共振峰位置的能量和真正的能量更接近,达到如图6(c)所示的效果。
(2)对激励信号的修正
由于丢失帧估计的基音周期和真实的基音周期间存在一定误差,第i帧在利用第i-1帧的激励信号内插出第i帧的自适应码书时,导致第i帧的自适应码书有过强的周期性,在第i帧的激励信号通过线性预测编码(LinearPredictive Coding,简称LPC)合成滤波器及第i帧的合成信号进行去加重处理时,往往会导致得到的能量比真实合成信号的能量大很多,显然会影响丢失帧后的正常帧(有时影响丢失帧后的一两帧,有时如果激励信号周期性太强,可能会影响更多帧),这时就要对激励信号和/或状态更新的激励信号做一定的修正,使得合成信号的能量和真实能量相当。
第一种方式中,根据第i帧与第i-1帧的相关性和能量稳定性,确定是否对第i帧的激励信号进行修正,当确定对第i帧的信号激励信号进行修正时,根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。
具体的,首先根据第i帧的激励信号和第i帧的谱频率参数,确定第i帧的预合成信号,然后判断第i帧的预合成信号的能量和第i-1帧的合成信号的能量的差值的绝对值是否大于第十阈值,如果第i帧的预合成信号的能量和第i-1帧的合成信号的能量的差值的绝对值大于第十阈值,则确定对第i帧的激励信号进行修正,如果第i帧的预合成信号的能量和第i-1帧的合成信号的能量的差值的绝对值小于或等于第十阈值,则确定不对第i帧的激励信号进行修正。具体地,在本发明的一种实现方式中,第十阈值可以为第i帧的预合成信号的能量和第i-1帧的合成信号的能量中较小值的0.2~1倍,例如,可以为0.2倍,0.5倍或1倍等。
或者,判断第i帧的预合成信号的能量和第i-1帧的合成信号的能量的比值是否大于第十一阈值,第十一阈值大于1。如果第i帧的预合成信号的能量和第i-1帧的合成信号的能量的比值大于第十一阈值,则确定对第i帧的激励信号进行修正。如果第i帧的预合成信号的能量和第i-1帧的合成信号的能量的比值小于或等于第十一阈值,则确定不对i帧的激励 信号进行修正。在本发明的一个实现方式中,第十一阈值可以从[1.1,5]这个数值区间内取值,具体地,可以是1.1,1.25,2,2.5或5等。
或者,判断第i-1帧的预合成信号的能量和第i帧的合成信号的能量的比值是否小于第十二阈值,第十二阈值小于1。如果第i-1帧的预合成信号的能量和第i帧的合成信号的能量的比值小于第十二阈值,则确定对第i帧的激励信号进行修正,如果第i-1帧的预合成信号的能量和第i帧的合成信号的能量的比值大于或等于第十二阈值,则确定不对第i帧的激励信号进行修正。在本发明的一个实现方式中,第四阈值可以从[0.1,0.8]这个数值区间内取值,具体地,可以是0.1,0.3,0.4或0.8等。
相应的,根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正,具体为:先根据第i帧与第i-1的能量稳定性确定第二修正因子,第二修正因子小于,然后将第i帧的激励信号乘以第二修正因子得到第i帧修正后的激励信号1。
其中,根据第i帧与第i-1的能量稳定性确定第二修正因子,具体为:确定第i-1帧的能量和第i帧的能量的比值为第二修正因子,或者,确定第i-1帧和第i帧相同个数子帧的能量的比值为第二修正因子。优选的,第i-1帧和第i帧相同个数子帧是连续的,例如,分别取第i-1帧的后两个子帧和第i帧的前两个子帧确定能量的比值,当然,选取的子帧也可以是不连续的。
第二种方式中,根据第i-1帧信号的相关性,确定是否对第i帧的激励信号进行修正,当确定对第i帧的信号激励信号进行修正时,根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。其中,第i-1帧信号的相关性包括:第i-1帧信号的相关值与十三阈值的大小关系以及第i-1帧信号的基因周期的偏差与第十四阈值的大小关系。
相应的,根据第i-1帧信号的相关性,确定是否对第i帧的激励信号进行修正,具体为:判断第i-1帧信号是否满足条件七,条件七为:第i-1帧为丢失帧,第i-1帧信号的相关值大于第十三阈值,并且第i-1帧信号的基音周期的偏差小于第十四阈值。如果第i-1帧信号满足条件七,则确定对第i帧的激励信号进行修正,如果第i-1帧信号不满足条件七,则确定不对第i帧的激励信号进行修正。根据第i帧与第i-1的能量稳定 性对第i帧的激励信号进行修正,具体为:根据第i帧与第i-1的能量稳定性,确定第三修正因子,第三修正因子小于1,将第i帧的激励信号乘以第三修正因子得到第i帧修正后的激励信号。在本发明的一个实现方式中,第十三阈值可以从低相关上升沿~高相关上升沿中选取,具体地,可以选取为低相关上升沿或高相关上升沿等。在本发明的一个实现方式中,第十四阈值可以从[0.5,20]这个数值区间内取值,具体地,可以是0.5,2,5,10或20等。
第三种方式中,根据第i帧与第i-1帧信号的相关性,确定是否对第i帧的激励信号进行修正,当确定对第i帧的信号激励信号进行修正时,根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。其中,第i帧与第i-1帧信号的相关性包括:第i-1帧信号的相关值与十三阈值的大小关系以及第i帧信号的基因周期的偏差与第十四阈值的大小关系。
相应的,根据第i帧与第i-1帧信号的相关性,确定是否对第i帧的激励信号进行修正,具体为:判断第i-1帧信号和第i帧信号是否满足条件八,条件八包括:第i-1帧为丢失帧,第i-1帧信号的相关值大于第十三阈值,并且第i帧的基音周期的偏差小于第十四阈值。如果第i-1帧信号和第i帧信号满足条件八,则确定对第i帧的激励信号进行修正。如果第i-1帧信号和第i-1帧信号不满足条件八,则确定不对第i帧的激励信号进行修正。根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正,具体为:根据第i帧与第i-1的能量稳定性,确定第三修正因子,第三修正因子小于1,然后将第i帧的激励信号乘以第三修正因子得到第i帧修正后的激励信号。
其中,根据第i帧与第i-1的能量稳定性确定第三修正因子具体可以为:确定第i-1帧的能量和第i帧的能量的比值为第二修正因子,或者,确定第i-1帧和第i帧相同个数子帧的能量的比值为第三修正因子。
第四种方式中,根据第i-1帧与第i-2帧信号的相关性,确定是否对第i帧的激励信号进行修正,当确定对第i帧的信号激励信号进行修正时,根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。其中,第i-1帧与第i-2帧信号的相关性,包括:第i-2帧信号的相关值与十三阈值的大小关系,第i-1帧的激励信号是否被修正过。
相应的,根据第i-1帧与第i-2帧信号的相关性,确定是否对第i帧的激励信号进行修正,具体为:首先判断第i-2帧信号和第i-1帧信号是否满足条件九,条件九包括:第i-2帧为丢失帧,第i-2帧信号的相关值大于预设的第十三阈值,且第i-1帧的激励信号进行了修正。如果第i-2帧信号和第i-1帧信号满足条件九,则确定对第i帧的激励信号进行修正,如果第i-2帧信号和第i-1帧信号不满足条件九,则确定不对第i帧的激励信号进行修正。根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正,具体为:根据第i帧与第i-1的能量稳定性,确定第四修正因子,第四修正因子小于1,然后将第i帧的激励信号乘以第四修正因子得到i帧修正后的激励信号。
第五种方式中,根据第i-1帧与第i-2帧信号的相关性,确定是否对第i帧的激励信号进行修正,当确定对第i帧的信号激励信号进行修正时,根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正。其中,第i-1帧与第i-2帧信号的相关性,包括:第i-2帧信号的相关值与十三阈值的大小关系,第i-1帧的激励信号中的代数码书贡献与第十五阈值的大小关系。在本发明的一个实现方式中,第十五阈值可以从第i-1帧的激励信号的0.1~0.5倍中选取,具体地,可以选取为第i-1帧的激励信号的0.1倍,0.2倍或0.5倍等。
相应的,根据第i-1帧与第i-2帧信号的相关性,确定是否对第i帧的激励信号进行修正,具体为:判断第i-2帧信号和第i-1帧信号是否满足条件十,条件十包括:第i-2帧为丢失帧,第i-2帧信号的相关值大于第十三阈值,且第i-1帧信号的激励信号中的代数码书贡献小于第十五阈值。如果第i-2帧信号和第i-1帧信号满足条件十,则确定对第i帧的激励信号进行修正。如果第i-2帧信号和第i-1帧信号不满足条件十,则确定不对第i帧的激励信号进行修正。根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正,具体为:根据第i帧与第i-1的能量稳定性,确定第四修正因子,第四修正因子小于1,然后将第i帧的激励信号乘以第四修正因子得到i帧修正后的激励信号。
图7为第i帧的时域信号在修正前后的对比图,如图7所示,图7(a)为原始的时域信号,原始的时域信号即编码端发送的时域信号,图7(b)为现有技 术合成后的恢复信号的时域信号,图7(c)本发明合成后的恢复信号的时域喜好。通过7(a)和图7(b)对比可知,图7(b)椭圆框里的部分比图7(a)原始信号椭圆框的部分能量大很多,显然,需要对第i帧的激励信号或状态更新的激励信号做修正,使得第i帧恢复信号的能量和原始信号的能量更接近,达到如图7(c)所示的效果。
(3)对状态更新的激励信号进行修改
本实施例中,可以根据第i-1帧与第i帧信号的相关性,确定是否对第i帧的状态更新的激励信号进行修正,当确定对第i帧的状态更新的激励信号进行修正时,根据第i帧与第i-1的能量稳定性对第i帧的状态更新的激励信号进行修正。其中,第i-1帧与第i帧信号的相关性,包括:第i-1帧与第i帧的相关性大小,以及第i-1帧信号的激励信号是否被修正过。
相应的,根据第i-1帧与第i帧信号的相关性,确定是否对第i帧的状态更新的激励信号进行修正,具体为:判断第i帧信号和第i-1帧信号是否满足条件十一,条件十一包括:第i帧或第i-1帧是强相关帧,且第i-1帧信号的激励信号做了修正。如果第i帧信号和第i-1帧信号满足条件十一,则确定对第i帧的状态更新的激励信号进行修正,如果第i帧信号和第i-1帧信号不满足条件十一,则确定不对第i帧的状态更新的激励信号进行修正。根据第i帧与第i-1的能量稳定性对第i帧的激励信号进行修正,具体为:根据第i帧与第i-1的能量稳定性,确定第五修正因子,第五修正因子小于1,将第i帧的状态更新的激励信号乘以第五修正因子得到第i帧修正后的状态更新的激励信号。
本实施例中,如果第i帧为正常帧,则根据接收到的码流解码获得第i帧的参数,根据解码得到的第i帧的基音周期、增益以及代数码书生成第i帧的激励信号和状态更新的激励信号,如果第i-1帧或第i-2帧为丢失帧,则进一步根据第i帧与第i帧的前N帧的帧间关系和帧内关系,对第i帧的谱频率参数、激励信号和状态更新的激励信号至少一个进行修正,根据修正后的参数合成第i帧的信号。本实施例的方法通过对第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正,使得前后帧之间的整体能量能够平滑过渡,从而提升了解码语音信 号的质量。
图8为本发明实施例六提供的丢帧补偿处理方法的流程图,如图8所示,本实施例的方法在实施例五的基础上,还可以包括以下步骤:
步骤601、对第i帧的解码信号进行处理,得到第i帧的解码信号的相关值。
一种实现方式中,可以对第i帧的解码信号进行归一化自相关处理,通过归一化自相关处理将第i帧的解码信号归一化到一定范围内,可以利用已有的归一化自相关函数进行处理。另一种实现方式中,不对第i帧的解码信号进行归一化处理,直接进行自相关处理。例如,从第i帧的解码信号中采样了100个点,然后,选取编号为0-98和1-99的点进行自相关处理得到第i帧的解码信号的相关值。当然,也可以从第i-1帧和第i帧信号中各选取50个点,工作100个点,然后按照上述方式进行自相关处理得到第i帧信号的相关值。
步骤602、根据第i帧的解码信号的相关值、第i帧的各子帧的基音周期间的大小关系、第i帧的谱倾斜值、第i帧的过零率中的任何一个或任意几个的组合,确定第i帧信号的相关性。
例如,在根据第i帧的解码信号的相关值确定第i帧信号的相关性时,通常会设置一个阈值,如果第i帧信号的相关值大于该阈值,则确定第i帧信号的相关性高,如果第i帧信号的相关值小于该阈值,则确定第i帧信号的相关性低。
步骤603、根据第i帧的解码信号确定第i帧的能量,根据第i帧的能量和第i-1帧的能量确定第i帧的能量和第i-1帧之间的能量稳定性,和/或,根据第i帧的解码信号确定第i帧的各子帧的能量,根据第i帧的各子帧的能量确定第i帧的各子帧之间的能量稳定性。
本实施例中,确定信号的相关性、第i帧和第i-1帧之间的能量稳定性和/或第i帧帧内的能量稳定性是为了估计第i+1帧信号时使用,本实施例中,在估计每个帧的参数时,都会用到之前帧的相关性和能量稳定性。
图9为本发明实施例七提供的丢帧补偿处理装置的结构示意图,如图9所示,本实施例提供的丢帧补偿处理装置包括:丢失帧确定模块11、估 计模块12、获取模块13、生成模块14和信号合成模块15。
丢失帧确定模块11用于通过丢失帧标记位确定第i帧是否为丢失帧。
估计模块12用于当所述第i帧为丢失帧时,根据所述第i帧的前N帧的帧间关系和所述前N帧的帧内关系中的至少一个,估计所述第i帧的参数;所述前N帧的帧间关系包括所述前N帧的相关性和能量稳定性中的至少一个,所述前N帧的帧内关系包括所述前N帧中的子帧间的相关性和能量稳定性中的至少一个,所述第i帧的参数包括:谱频率参数、基音周期和增益,N为大于或等于1的整数。
获取模块13用于获取所述第i帧的代数码书。
生成模块14用于根据所述估计模块估计得到的所述第i帧的基音周期、增益以及所述获取模块获取的所述第i帧的代数码书生成所述第i帧的激励信号。
信号合成模块15用于根据所述估计模块估计得到的所述第i帧的谱频率参数和所述生成模块生成的所述第i帧的激励信号合成第i帧信号。
(1)第i帧的谱频率参数的估计
所述第i帧的谱频率参数是所述估计模块12根据所述第i帧的前N帧的帧间关系估计得到的,所述估计模块具体用于:根据所述第i帧的前N帧的相关性确定第i-1帧的谱频率参数的权重和所述第i帧的预置谱频率参数的权重,根据所述第i-1帧的谱频率参数的权重和所述第i帧的预置谱频率参数的权重,对所述第i-1帧的谱频率参数和所述第i帧的预置谱频率参数进行加权运算得到所述第i帧的谱频率参数。
可选的,所述相关性包括:所述第i-1帧信号的谱倾斜参数与第二阈值的大小关系、所述第i-1帧信号的归一化自相关值与第一阈值的大小关系和所述第i-1帧信号的基因周期的偏差与第三阈值的大小关系。
相应的,所述估计模块12具体用于:
如果第i-1帧信号满足条件一、条件二和条件三中的至少一个,则确定所述第i-1帧的谱频率参数的权重为第一权重,所述第i帧的预置谱频率参数的权重为第二权重,所述第一权重大于所述第二权重,所述条件一为:所述第i-1帧信号的归一化自相关值大于所述第一阈值,所述条件二为:所述第i-1帧信号的谱倾斜参数大于所述第二阈值,所述条件三 为:所述第i-1帧信号的基音周期的偏差小于所述第三阈值;
或者,如果所述第i-1帧信号同时不满足所述条件一、所述条件二和所述条件三,则确定所述第i-1帧的谱频率参数的权重为所述第二权重,所述第i帧的预置谱频率参数的权重为所述第一权重。
(2)第i帧的基因周期的估计
所述第i帧的基因周期是所述估计模块12根据所述第i帧的前N帧的相关性和所述第i帧的前N帧的子帧间的相关性估计得到的,其中,所述相关性包括:第i-2帧信号的归一化自相关值与第五阈值的大小关系、所述第i-2帧信号的基因周期的偏差与第四阈值的大小关系和第i-1帧信号的基因周期的偏差与所述第四阈值的大小关系。
相应的,所述估计模块12具体用于:
如果所述第i-1帧信号的基音周期的偏差小于所述第四阈值,则根据所述第i-1帧信号的基音周期确定所述第i-1帧信号的基音周期偏移值;根据所述第i-1帧信号的基音周期偏移值和所述第i-1帧信号的基音周期确定所述第i帧信号的基音周期;所述第i帧信号的基音周期包括所述第i帧的每个子帧的基音周期,所述第i-1帧信号的基音周期偏移值为所述第i-1帧的所有相邻子帧的基音周期的差值的均值;
或者,如果所述第i-1帧信号的基音周期的偏差大于或等于所述第四阈值,所述第i-2帧信号的归一化自相关值大于所述第五阈值,且所述第i-2帧信号的基音周期的偏差小于所述第四阈值,则根据所述第i-2帧信号和所述第i-1帧信号的基音周期确定所述第i-2帧信号和所述第i-1帧信号的基音周期偏移值;根据所述第i-1帧信号的基音周期以及所述第i-2帧信号和所述第i-1帧信号的基音周期偏移值确定所述第i帧信号的基音周期。
可选的,所述估计模块12根据如下公式确定所述第i-1帧信号的基音周期偏移值pv:
pv=(p(-1)(3)-p(-1)(2))+(p(-1)(2)-p(-1)(1))+(p(-1)(1)-p(-1)(0))/3,
其中,p(-1)(j)是所述第i-1帧的第j个子帧的基音周期,j=0,1,2,3。
相应的,所述估计模块12根据如下公式确定所述第i帧信号的基音周期:
pcur(j)=p(-1)(3)+(j+1)*pv,j=0,1,2,3,其中,p(-1)(3)是所述第i-1帧的第3个子帧的基音周期,pv是所述第i-1帧信号的基音周期偏移值,pcur(j)是所述第i帧的第j个子帧的基音周期。
可选的,所述估计模块12根据如下公式确定所述第i-2帧信号和所述第i-1帧信号的基音周期偏移值pv:
pv=(p(-2)(3)-p(-2)(2))+(p(-1)(0)-p(-2)(3))+(p(-1)(1)-p(-1)(0))/3;
其中,p(-2)(m)是所述第i-2帧的第m个子帧的基音周期,p(-1)(n)是所述第i-1帧的第n个子帧的基音周期,m=2,3,n=0,1。
相应的,所述估计模块12根据如下公式确定所述第i帧信号的基音周期:
pcur(x)=p(-1)(3)+(x+1)*pv,x=0,1,2,3;
其中,p(-1)(3)是所述第i-1帧的第3个子帧的基音周期,pv是所述第i-2帧信号和所述第i-1帧信号的基音周期偏移值,pcur(x)是所述第i帧的第x个子帧的基音周期。
(3)第i帧的增益估计
所述第i帧的增益包括:自适应码书增益和代数码书增益,所述第i帧的增益是所述估计模块12根据所述第i帧的前N帧的相关性和能量稳定性估计得到的。
所述估计模块12具体用于:
根据第i-1帧的自适应码书增益或预先设定的固定值、所述第i-1帧的相关性以及所述第i帧在连续的多个丢失帧中的序号,确定所述第i帧的自适应码书增益;
根据所述第i-1帧的能量稳定性确定所述第i-1帧的代数码书增益的权重以及话音激活检测VAD帧的增益的权重;
根据所述第i-1帧的代数码书增益的权重和所述VAD帧的增益的权重,对所述第i-1帧的代数码书增益和所述VAD帧的增益进行加权运算得到所述第i帧的代数码书增益。
其中,所述第i-1帧的能量越稳定,所述第i-1帧的代数码书增益的权重越大。或者,随着连续丢失帧个数的增加,VAD帧的增益的权重也相应增加。
可选的,在根据所述第i-1帧的代数码书增益的权重和所述VAD帧的增益的权重,对所述第i-1帧的代数码书增益和所述VAD帧的增益进行加权运算得到所述第i帧的代数码书增益之前,所述估计模块12还用于:根据编解码速率确定第一修正因子,使用所述第一修正因子对所述第i-1帧的代数码书增益进行修正。
(4)第i帧的代数码书的获取
所述获取模块12具体用于:根据随机噪声估计得到所述第i帧的代数码书,或者,根据所述第i帧的前N帧的代数码书确定所述第i帧的代数码书。
所述获取模块12还用于:根据所述第i-1帧的基音周期的偏差、信号的相关性、谱斜率大小和过零率中的任意一个确定所述第i帧的代数码书贡献的权重,或者,对所述第i-1帧的基音周期的偏差、信号的相关性、谱斜率大小和过零率中的任意组合进行加权运算确定所述第i帧的代数码书贡献的权重,以及对所述第i-1帧的状态更新的激励信号进行内插运算确定所述第i帧的自适应码书。
所述生成模块14具体用于:根据所述第i帧的代数码书和所述第i帧的代数码书增益的乘积,确定所述第i帧的代数码书贡献;根据所述第i帧的自适应码书和所述第i帧的自适应码书增益的乘积,确定所述第i帧的自适应码书贡献;根据所述第i帧的代数码书贡献的权重和自适应码书贡献的权重,对所述第i帧的代数码书贡献和自适应码书贡献进行加权运算,确定所述第i帧的激励信号,所述自适应码书的权重为1。
本实施例的装置可用于执行实施例一至实施例四的方法,具体实现方式和技术效果类似,这里不再赘述。
图10为本发明实施例八提供的丢帧补偿处理装置的结构示意图,如图10所示,本实施例的装置在图9所示装置的基础上还包括:解码模块16、判断模块17和修正模块18。
本实施例中所述第i帧为正常帧,解码模块16用于根据接收到的码流解码获得所述第i帧的参数,所述第i帧的参数包括:谱频率参数、基音周期、增益以及代数码书。
所述生成模块14还用于根据解码模块16解码得到的所述第i帧的基 音周期、增益以及代数码书生成所述第i帧的激励信号和所述第i帧的状态更新的激励信号。
判断模块17用于当第i-1帧或第i-2帧为丢失帧时,根据所述第i帧与所述第i帧的前N帧的帧间关系和帧内关系中的至少一个,确定是否对所述第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正,所述帧间关系包括所述第i帧与所述第i帧的前N帧的相关性和能量稳定性中的至少一个,所述帧内关系包括:所述第i帧与所述第i帧的前N帧的子帧间相关性和能量稳定性中的至少一个。
修正模块18用于当所述判断模块17确定对所述第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正时,根据所述第i帧与所述第i帧的前N帧的帧间关系和帧内关系中的至少一个,对所述第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正。
所述信号合成模块15还用于:根据所述修正模块对所述第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个的修正结果合成第i帧信号。或者,当所述判断模块17确定不对所述第i帧的谱频率参数、激励信号和状态更新的激励信号进行修正时,根据所述第i帧的谱频率参数、激励信号和状态更新的激励信号合成第i帧信号。
(1)对第i帧的谱频率参数进行修正
可选的,所述判断模块17用于根据所述第i帧的相关性,确定是否对所述第i帧的谱频率参数进行修正,当所述判断模块17确定对所述第i帧的谱频率参数进行修正时,所述修正模块18用于:根据所述第i帧与第i-1帧的谱频率参数对所述第i帧的谱频率参数进行修正,或者,根据所述第i帧的谱频率参数和预置谱频率参数对所述第i帧的谱频率参数进行修正。
其中,所述第i帧的相关性包括:所述第i帧的相邻谱频率参数的差值的最小值的索引对应的两个谱频率参数中的其中一个谱频率参数与第六阈值的大小关系、所述第i帧的相邻谱频率参数的差值的最小值与第七阈值的大小关系以及所述第i帧的相邻谱频率参数的差值的最小值的索引与第八阈值的大小关系。
所述判断模块17具体用于:
确定所述第i帧的相邻谱频率参数的差值,每个差值对应一个索引,所述谱频率参数包括导抗谱频率ISF或线谱频率LSF;
判断所述第i帧的相邻谱频率参数的差值是否满足条件四和条件五中的至少一个,所述条件四包括:所述第i帧的相邻谱频率参数的差值的最小值的索引对应的两个谱频率参数中的其中一个谱频率参数小于所述第六阈值,所述条件五包括:所述第i帧的相邻谱频率参数的差值的最小值的索引值小于所述第八阈值,且所述最小差值小于所述第七阈值;
如果所述第i帧的相邻谱频率参数的差值满足所述条件四和所述条件五中的至少一个,则确定对所述第i帧谱频率参数进行修正,如果所述第i帧的相邻谱频率参数的差值同时不满足所述条件四和条件五,则确定不对所述第i帧谱频率参数进行修正;
所述修正模块18具体用于:根据所述第i-1帧的谱频率参数和所述第i帧的谱频率参数的加权运算,确定所述第i帧修正后的谱频率参数。或者,根据所述第i帧的谱频率参数和预先的谱频率参数的加权运算,确定所述第i帧修正后的谱频率参数。
可选的,所述判断模块17用于根据所述第i帧与第i-1帧的相关性,确定是否对所述第i帧的谱频率参数进行修正,当所述判断模块17确定对所述第i帧的谱频率参数进行修正时,所述修正模块18用于:根据所述第i帧与第i-1帧的谱频率参数对所述第i帧的谱频率参数进行修正,或者,根据所述第i帧的谱频率参数和预置谱频率参数对所述第i帧的谱频率参数进行修正。其中,所述第i帧与第i-1帧的相关性包括:所述第i-1帧和所述第i帧的部分或全部相同索引对应的谱频率参数差值的和与第九阈值的大小关系。
所述判断模块17具体用于:
确定所述第i帧的相邻谱频率参数的差值,每个差值对应一个索引,所述谱频率参数包括导抗谱频率ISF或线谱频率LSF;
判断所述第i帧的谱频率参数和所述第i-1帧的谱频率参数是否满足条件六,所述条件六包括:所述第i-1帧和所述第i帧的部分或全部相同索引对应的谱频率参数差值的和大于所述第九阈值;
如果所述第i帧的谱频率参数和所述第i-1帧的谱频率参数满足所述条件六,则确定对所述第i帧谱频率参数进行修正,如果所述第i帧的谱频率参数和所述第i-1帧的谱频率参数不满足所述条件六,则确定不对所述第i帧谱频率参数进行修正。
所述修正模块18具体用于:根据所述第i-1帧的谱频率参数和所述第i帧的谱频率参数的加权运算,确定所述第i帧修正后的谱频率参数。或者,根据所述第i帧的谱频率参数和预置谱频率参数的加权运算,确定所述第i帧修正后的谱频率参数。
(2)对第i帧的激励信号进行修正
可选的,所述判断模块17用于根据所述第i帧与第i-1帧的相关性和能量稳定性,确定是否对所述第i帧的激励信号进行修正,当所述判断模块17确定对所述第i帧的信号激励信号进行修正时,所述修正模块18用于根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正。
所述判断模块17具体用于:
根据所述第i帧的激励信号和所述第i帧的谱频率参数,确定所述第i帧的预合成信号。
判断所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的差值的绝对值是否大于第十阈值。如果所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的差值的绝对值大于所述第十阈值,则确定对所述第i帧的激励信号进行修正,如果所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的差值的绝对值小于或等于所述第十阈值,则确定不对所述i帧的激励信号进行修正。
或者,判断所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的比值是否大于第十一阈值,所述第十一阈值大于1。如果所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的比值大于所述第十一阈值,则确定对所述第i帧的激励信号进行修正,如果所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的比值小于或等于所述第十一阈值,则确定不对所述i帧的激励信号进行修正。
或者,判断所述第i-1帧的预合成信号的能量和所述第i帧的合成信 号的能量的比值是否小于第十二阈值,所述第十二阈值小于1。如果所述第i-1帧的预合成信号的能量和所述第i帧的合成信号的能量的比值小于所述第十二阈值,则确定对所述第i帧的激励信号进行修正,如果所述第i-1帧的预合成信号的能量和所述第i帧的合成信号的能量的比值大于或等于所述第十二阈值,则确定不对所述第i帧的激励信号进行修正。
所述修正模块18具体用于:根据所述第i帧与所述第i-1的能量稳定性确定第二修正因子,所述第二修正因子小于1,将所述第i帧的激励信号乘以所述第二修正因子得到所述第i帧修正后的激励信号。其中,所述第二修正因子可以为所述第i-1帧的能量和所述第i帧的能量的比值,或者,所述第二修正因子为所述第i-1帧和所述第i帧相同个数子帧的能量的比值。
可选的,所述判断模块17用于根据第i-1帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,当所述判断模块17确定对所述第i帧的信号激励信号进行修正时,所述修正模块18用于根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正。其中,所述第i-1帧信号的相关性包括:所述第i-1帧信号的相关值与十三阈值的大小关系以及所述第i-1帧信号的基因周期的偏差与第十四阈值的大小关系。
所述判断模块17具体用于:判断所述第i-1帧信号是否满足条件七,所述条件七为:所述第i-1帧为丢失帧,所述第i-1信号的相关值大于所述第十三阈值,并且所述第i-1帧信号的基音周期的偏差小于所述第十四阈值。如果所述第i-1帧信号满足所述条件七,则确定对所述第i帧的激励信号进行修正,如果所述第i-1帧信号不满足所述条件七,则确定不对所述第i帧的激励信号进行修正。
所述修正模块18具体用于:根据所述第i帧与所述第i-1的能量稳定性,确定第三修正因子,所述第三修正因子小于1,将所述第i帧的激励信号乘以所述第三修正因子得到所述第i帧修正后的激励信号。
可选的,所述判断模块17用于根据所述第i帧与第i-1帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,当所述判断模块17确定对所述第i帧的信号激励信号进行修正时,所述修正模块18用于根 据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正。其中,所述第i帧与第i-1帧信号的相关性包括:所述第i-1帧信号的相关值与十三阈值的大小关系以及所述第i帧信号的基因周期的偏差与第十四阈值的大小关系。
所述判断模块17具体用于:判断所述第i-1帧信号和所述第i帧信号是否满足条件八,所述条件八包括:所述第i-1帧为丢失帧,所述第i-1帧信号的相关值大于预设的第十三阈值,并且所述第i帧信号的基音周期的偏差小于预设的第十四阈值。如果所述第i-1帧信号和所述第i帧信号满足所述条件八,则确定对所述第i帧的激励信号进行修正,如果所述第i-1帧信号和所述第i帧信号不满足所述条件八,则确定不对所述第i帧的激励信号进行修正。
所述修正模块18具体用于:根据所述第i帧与所述第i-1的能量稳定性,确定第三修正因子,所述第三修正因子小于1,将所述第i帧的激励信号乘以所述第三修正因子得到所述第i帧修正后的激励信号。
可选的,所述判断模块17用于根据第i-1帧与第i-2帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,当所述判断模块17确定对所述第i帧的信号激励信号进行修正时,所述修正模块18用于根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正。其中,第i-1帧与第i-2帧信号的相关性,包括:所述第i-2帧信号的相关值与十三阈值的大小关系,所述第i-1帧的激励信号是否被修正过。
所述判断模块17具体用于:判断所述第i-2帧信号和所述第i-1帧信号是否满足条件九,所述条件九包括:所述第i-2帧为丢失帧,所述第i-2帧信号的相关值大于所述第十三阈值,且所述第i-1帧信号的激励信号进行了修正。如果所述第i-2帧信号和所述第i-1帧信号满足所述条件九,则确定对所述第i帧的激励信号进行修正,如果所述第i-2帧信号和所述第i-1帧信号不满足所述条件九,则确定不对所述第i帧的激励信号进行修正。
所述修正模块18具体用于:根据所述第i帧与所述第i-1的能量稳定性,确定第四修正因子,所述第四修正因子小于1,将所述第i帧的激励信号乘以所述第四修正因子得到所述i帧修正后的激励信号。
可选的,所述判断模块17用于根据第i-1帧与第i-2帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,当所述判断模块17确定对所述第i帧的信号激励信号进行修正时,所述修正模块18用于根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正。其中,第i-1帧与第i-2帧信号的相关性,包括:所述第i-2帧信号的相关值与十三阈值的大小关系,所述第i-1帧的激励信号中的代数码书贡献与第十五阈值的大小关系。
所述判断模块17具体用于:判断所述第i-2帧信号和所述第i-1帧信号是否满足条件十,所述条件十包括:所述第i-2帧为丢失帧,所述第i-2帧信号的相关值大于所述第十三阈值,且所述第i-1帧信号的激励信号中的代数码书贡献小于所述第十五阈值。如果所述第i-2帧信号和所述第i-1帧信号满足所述条件十,则确定对所述第i帧的激励信号进行修正,如果所述第i-2帧信号和所述第i-1帧信号不满足所述条件十,则确定不对所述第i帧的激励信号进行修正。
所述修正模块18具体用于:根据所述第i帧与所述第i-1的能量稳定性,确定第四修正因子,所述第四修正因子小于1,将所述第i帧的激励信号乘以所述第四修正因子得到所述i帧修正后的激励信号。
(3)对第i帧的状态更新的激励信号进行修正
所述判断模块17用于根据第i-1帧与所述第i帧信号的相关性,确定是否对所述第i帧的状态更新的激励信号进行修正,当所述判断模块17确定对所述第i帧的状态更新的激励信号进行修正时,所述修正模块18用于根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的状态更新的激励信号进行修正。其中,所述第i-1帧与所述第i帧信号的相关性,包括:所述第i-1帧与所述第i帧的相关性大小,以及所述第i-1帧信号的激励信号是否被修正过。
所述判断模块17具体用于:判断所述第i帧信号和所述第i-1帧信号是否满足条件十一,所述条件十一包括:所述第i帧或所述第i-1帧是强相关帧,且所述第i-1帧信号的激励信号做了修正。如果所述第i帧信号和所述第i-1帧信号满足所述条件十一,则确定对所述第i帧的状态更新的激励信号进行修正,如果所述第i帧信号和所述第i-1帧信号不满足 所述条件十一,则确定不对所述第i帧的状态更新的激励信号进行修正。
所述修正模块18具体用于:根据所述第i帧与所述第i-1的能量稳定性,确定第五修正因子,所述第五修正因子小于1,将所述第i帧的状态更新的激励信号乘以所述第五修正因子得到所述第i帧修正后的状态更新的激励信号。
实施例七和至实施例八提供的丢帧补偿处理装置的各功能模块的具体实现方式,请参照实施例一至实施例六所示的方法的相关描述,这里不再赘述。
图11为本发明实施例九提供的丢帧补偿处理装置的实体结构的示意图,如图11所示,丢帧补偿处理装置200包括通信接口21、处理器22、存储器23和总线24,其中,通信接口21、处理器22、存储器23通过总线24相互连接。总线24可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。通信接口21用于实现数据库访问装置与其他设备(例如客户端、读写库和只读库)之间的通信。存储器23可能包含随机存取存储器(random access memory,简称RAM),也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
处理器22执行存储器23所存放的程序代码,实现实施例一至实施例六的方法。
上述的处理器22可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (48)

  1. 一种丢帧补偿处理方法,其特征在于,包括:
    通过丢失帧标记位确定第i帧是否为丢失帧;
    如果所述第i帧为丢失帧,则根据所述第i帧的前N帧的帧间关系和所述前N帧的帧内关系中的至少一个,估计所述第i帧的参数;所述前N帧的帧间关系包括所述前N帧的相关性和能量稳定性中的至少一个,所述前N帧的帧内关系包括所述前N帧中的子帧间的相关性和能量稳定性中的至少一个,所述第i帧的参数包括:谱频率参数、基音周期和增益,N为大于或等于1的整数;
    获取所述第i帧的代数码书;
    根据估计得到的所述第i帧的基音周期、增益以及获取的所述第i帧的代数码书生成所述第i帧的激励信号;
    根据估计得到的所述第i帧的谱频率参数和生成的所述第i帧的激励信号合成第i帧信号。
  2. 根据权利要求1所述的方法,其特征在于,如果所述第i帧为正常帧,所述方法进一步包括:
    根据接收到的码流解码获得所述第i帧的参数,所述第i帧的参数包括:谱频率参数、基音周期、增益以及代数码书;
    根据解码得到的所述第i帧的基音周期、增益以及代数码书生成所述第i帧的激励信号和所述第i帧的状态更新的激励信号;
    如果第i-1帧或第i-2帧为丢失帧,根据所述第i帧与所述第i帧的前N帧的帧间关系和帧内关系中的至少一个,确定是否对所述第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正,所述帧间关系包括所述第i帧与所述第i帧的前N帧的相关性和能量稳定性中的至少一个,所述帧内关系包括:所述第i帧与所述第i帧的前N帧的子帧间相关性和能量稳定性中的至少一个;
    当确定对所述第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正时,根据所述第i帧与所述第i帧的前N帧的帧间关系和帧内关系中的至少一个,对所述第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正;根据对所述第i帧的谱频率 参数、激励信号和状态更新的激励信号中的至少一个的修正结果合成第i帧信号;
    当确定不对所述第i帧的谱频率参数、激励信号和状态更新的激励信号进行修正时,根据所述第i帧的谱频率参数、激励信号和状态更新的激励信号合成第i帧信号。
  3. 根据权利要求1所述的方法,其特征在于,所述第i帧的谱频率参数是根据所述第i帧的前N帧的帧间关系估计得到的;
    所述第i帧的谱频率参数采用如下方式估计得到:
    根据所述第i帧的前N帧的相关性确定第i-1帧的谱频率参数的权重和所述第i帧的预置谱频率参数的权重;
    根据所述第i-1帧的谱频率参数的权重和所述第i帧的预置谱频率参数的权重,对所述第i-1帧的谱频率参数和所述第i帧的预置谱频率参数进行加权运算得到所述第i帧的谱频率参数。阈值
  4. 根据权利要求3所述的方法,其特征在于,所述相关性包括:所述第i-1帧信号的谱倾斜参数与第二阈值的大小关系、所述第i-1帧信号的归一化自相关值与第一阈值的大小关系和所述第i-1帧信号的基因周期的偏差与第三阈值的大小关系;
    所述根据所述第i帧的前N帧间的相关性确定所述第i-1帧的谱频率参数的权重和所述第i帧的预置谱频率参数的权重,包括:
    如果第i-1帧信号满足条件一、条件二和条件三中的至少一个,则确定所述第i-1帧的谱频率参数的权重为第一权重,所述第i帧的预置谱频率参数的权重为第二权重,所述第一权重大于所述第二权重,所述条件一为:所述第i-1帧信号的归一化自相关值大于所述第一阈值,所述条件二为:所述第i-1帧信号的谱倾斜参数大于所述第二阈值,所述条件三为:所述第i-1帧信号的基音周期的偏差小于所述第三阈值;
    或者,如果所述第i-1帧信号同时不满足所述条件一、所述条件二和所述条件三,则确定所述第i-1帧的谱频率参数的权重为所述第二权重,所述第i帧的预置谱频率参数的权重为所述第一权重。
  5. 根据权利要求1所述的方法,其特征在于,所述第i帧的基因周期是根据所述第i帧的前N帧的相关性和所述第i帧的前N帧的子帧间的 相关性估计得到的;所述相关性包括:第i-2帧信号的相关性值与第五阈值的大小关系、所述第i-2帧信号的基因周期的偏差与第四阈值的大小关系和第i-1帧信号的基因周期的偏差与所述第四阈值的大小关系;
    所述第i帧的基因周期采用如下方式估计得到:
    如果所述第i-1帧信号的基音周期的偏差小于所述第四阈值,则根据所述第i-1帧信号的基音周期确定所述第i-1帧信号的基音周期偏移值;根据所述第i-1帧信号的基音周期偏移值和所述第i-1帧信号的基音周期确定所述第i帧信号的基音周期;所述第i帧信号的基音周期包括所述第i帧的每个子帧的基音周期,所述第i-1帧信号的基音周期偏移值为所述第i-1帧的所有相邻子帧的基音周期的差值的均值;
    或者,如果所述第i-1帧信号的基音周期的偏差大于或等于所述第四阈值,所述第i-2帧信号的相关性值大于所述第五阈值,且所述第i-2帧信号的基音周期的偏差小于所述第四阈值,则根据所述第i-2帧信号和所述第i-1帧信号的基音周期确定所述第i-2帧信号和所述第i-1帧信号的基音周期偏移值;根据所述第i-1帧信号的基音周期以及所述第i-2帧信号和所述第i-1帧信号的基音周期偏移值确定所述第i帧信号的基音周期。
  6. 根据权利要求5所述的方法,其特征在于,根据如下公式确定所述第i-1帧信号的基音周期偏移值pv:
    pv=(p(-1)(3)-p(-1)(2))+(p(-1)(2)-p(-1)(1))+(p(-1)(1)-p(-1)(0))/3,
    其中,p(-1)(j)是所述第i-1帧的第j个子帧的基音周期,j=0,1,2,3;
    根据如下公式确定所述第i帧信号的基音周期:
    pcur(j)=p(-1)(3)+(j+1)*pv,j=0,1,2,3,其中,p(-1)(3)是所述第i-1帧的第3个子帧的基音周期,pv是所述第i-1帧信号的基音周期偏移值,pcur(j)是所述第i帧的第j个子帧的基音周期。
  7. 根据权利要求5所述的方法,其特征在于,根据如下公式确定所述第i-2帧信号和所述第i-1帧信号的基音周期偏移值pv:
    pv=(p(-2)(3)-p(-2)(2))+(p(-1)(0)-p(-2)(3))+(p(-1)(1)-p(-1)(0))/3;
    其中,p(-2)(m)是所述第i-2帧的第m个子帧的基音周期,p(-1)(n)是所述第i-1帧的第n个子帧的基音周期,m=2,3,n=0,1;
    根据如下公式确定所述第i帧信号的基音周期:
    pcur(x)=p(-1)(3)+(x+1)*pv,x=0,1,2,3;
    其中,p(-1)(3)是所述第i-1帧的第3个子帧的基音周期,pv是所述第i-2帧信号和所述第i-1帧信号的基音周期偏移值,pcur(x)是所述第i帧的第x个子帧的基音周期。
  8. 根据权利要求1所述的方法,其特征在于,所述第i帧的增益包括:自适应码书增益和代数码书增益,所述第i帧的增益是根据所述第i帧的前N帧的相关性和能量稳定性估计得到的;
    所述第i帧的增益采用如下方式估计得到:
    根据第i-1帧的自适应码书增益或预先设定的固定值、所述第i-1帧的相关性以及所述第i帧在连续的多个丢失帧中的序号,确定所述第i帧的自适应码书增益;
    根据所述第i-1帧的能量稳定性确定所述第i-1帧的代数码书增益的权重以及话音激活检测VAD帧的增益的权重;
    根据所述第i-1帧的代数码书增益的权重和所述VAD帧的增益的权重,对所述第i-1帧的代数码书增益和所述VAD帧的增益进行加权运算得到所述第i帧的代数码书增益。
  9. 根据权利要求8所述的方法,其特征在于,所述第i-1帧的能量越稳定,所述第i-1帧的代数码书增益的权重越大。
  10. 根据权利要求8所述的方法,其特征在于,随着连续丢失帧个数的增加,VAD帧的增益的权重也相应增加。
  11. 根据权利要求8所述的方法,其特征在于,所述根据所述第i-1帧的代数码书增益的权重和所述VAD帧的增益的权重,对所述第i-1帧的代数码书增益和所述VAD帧的增益进行加权运算得到所述第i帧的代数码书增益之前,所述方法还包括:
    根据编解码速率确定第一修正因子;
    使用所述第一修正因子对所述第i-1帧的代数码书增益进行修正。
  12. 根据权利要求1所述的方法,其特征在于,所述获取所述第i帧的代数码书,包括:
    根据随机噪声估计得到所述第i帧的代数码书;
    或者,根据所述第i帧的前N帧的代数码书确定所述第i帧的代数码书。
  13. 根据权利要求1所述的方法,其特征在于,所述第i帧的增益包括:自适应码书增益和代数码书增益;
    所述根据估计得到的所述第i帧的基音周期、增益以及获取的所述第i帧的代数码书生成所述第i帧的激励信号之前,所述方法还包括:
    根据所述第i-1帧的基音周期的偏差、信号的相关性、谱斜率大小和过零率中的任意一个确定所述第i帧的代数码书贡献的权重,或者,对所述第i-1帧的基音周期的偏差、信号的相关性、谱斜率大小和过零率中的任意组合进行加权运算确定所述第i帧的代数码书贡献的权重;
    对所述第i-1帧的状态更新的激励信号进行内插运算确定所述第i帧的自适应码书;
    所述根据估计得到的所述第i帧的基音周期、增益以及获取的所述第i帧的代数码书生成所述第i帧的激励信号,包括:
    根据所述第i帧的代数码书和所述第i帧的代数码书增益的乘积,确定所述第i帧的代数码书贡献;
    根据所述第i帧的自适应码书和所述第i帧的自适应码书增益的乘积,确定所述第i帧的自适应码书贡献;
    根据所述第i帧的代数码书贡献的权重和自适应码书贡献的权重,对所述第i帧的代数码书贡献和自适应码书贡献进行加权运算,确定所述第i帧的激励信号,所述自适应码书的权重为1。
  14. 根据权利要求2所述的方法,其特征在于,根据所述第i帧的相关性,确定是否对所述第i帧的谱频率参数进行修正,当确定对所述第i帧的谱频率参数进行修正时,根据所述第i帧与第i-1帧的谱频率参数对所述第i帧的谱频率参数进行修正,或者,根据所述第i帧的谱频率参数和预置谱频率参数对所述第i帧的谱频率参数进行修正;
    其中,所述第i帧的相关性包括:所述第i帧的相邻谱频率参数的差值的最小值的索引对应的两个谱频率参数中的其中一个谱频率参数与第六阈值的大小关系、所述第i帧的相邻谱频率参数的差值的最小值与第七阈值的大小关系以及所述第i帧的相邻谱频率参数的差值的最小值的索引 与第八阈值的大小关系;
    所述根据所述第i帧的相关性,确定是否对所述第i帧的谱频率参数进行修正,包括:
    确定所述第i帧的相邻谱频率参数的差值,每个差值对应一个索引,所述谱频率参数包括导抗谱频率ISF或线谱频率LSF;
    判断所述第i帧的相邻谱频率参数的差值是否满足条件四和条件五中的至少一个,所述条件四包括:所述第i帧的相邻谱频率参数的差值的最小值的索引对应的两个谱频率参数中的其中一个谱频率参数小于所述第六阈值,所述条件五包括:所述第i帧的相邻谱频率参数的差值的最小值的索引值小于所述第八阈值,且所述最小差值小于所述第七阈值;
    如果所述第i帧的相邻谱频率参数的差值满足所述条件四和所述条件五中的至少一个,则确定对所述第i帧谱频率参数进行修正,如果所述第i帧的相邻谱频率参数的差值同时不满足所述条件四和条件五,则确定不对所述第i帧谱频率参数进行修正;
    所述根据所述第i帧与第i-1帧的谱频率参数对所述第i帧的谱频率参数进行修正,包括:
    根据所述第i-1帧的谱频率参数和所述第i帧的谱频率参数的加权运算,确定所述第i帧修正后的谱频率参数;
    或者,所述根据所述第i帧的谱频率参数和预置谱频率参数对所述第i帧的谱频率参数进行修正,包括:
    根据所述第i帧的谱频率参数和预先的谱频率参数的加权运算,确定所述第i帧修正后的谱频率参数。
  15. 根据权利要求2所述的方法,其特征在于,根据所述第i帧与第i-1帧的相关性,确定是否对所述第i帧的谱频率参数进行修正,当确定对所述第i帧的谱频率参数进行修正时,根据所述第i帧与第i-1帧的谱频率参数对所述第i帧的谱频率参数进行修正,或者,根据所述第i帧的谱频率参数和预置谱频率参数对所述第i帧的谱频率参数进行修正;
    其中,所述第i帧与第i-1帧的相关性包括:所述第i-1帧和所述第i帧的部分或全部相同索引对应的谱频率参数差值的和与第九阈值的大小关系;
    所述根据所述第i帧与第i-1帧的相关性,确定是否对所述第i帧的谱频率参数进行修正,包括:
    确定所述第i帧的相邻谱频率参数的差值,每个差值对应一个索引,所述谱频率参数包括导抗谱频率ISF或线谱频率LSF;
    判断所述第i帧的谱频率参数和所述第i-1帧的谱频率参数是否满足条件六,所述条件六包括:所述第i-1帧和所述第i帧的部分或全部相同索引对应的谱频率参数差值的和大于所述第九阈值;
    如果所述第i帧的谱频率参数和所述第i-1帧的谱频率参数满足所述条件六,则确定对所述第i帧谱频率参数进行修正,如果所述第i帧的谱频率参数和所述第i-1帧的谱频率参数不满足所述条件六,则确定不对所述第i帧谱频率参数进行修正;
    所述根据所述第i帧与第i-1帧的谱频率参数对所述第i帧的谱频率参数进行修正,包括:
    根据所述第i-1帧的谱频率参数和所述第i帧的谱频率参数的加权运算,确定所述第i帧修正后的谱频率参数;
    所述根据所述第i帧的谱频率参数和预置谱频率参数对所述第i帧的谱频率参数进行修正,包括:
    根据所述第i帧的谱频率参数和预置谱频率参数的加权运算,确定所述第i帧修正后的谱频率参数。
  16. 根据权利要求2所述的方法,其特征在于,根据所述第i帧与第i-1帧的相关性和能量稳定性,确定是否对所述第i帧的激励信号进行修正,当确定对所述第i帧的信号激励信号进行修正时,根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    所述根据所述第i帧与第i-1帧的相关性和能量稳定性,确定是否对所述第i帧的激励信号进行修正,包括:
    根据所述第i帧的激励信号和所述第i帧的谱频率参数,确定所述第i帧的预合成信号;
    判断所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的差值的绝对值是否大于第十阈值;
    如果所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能 量的差值的绝对值大于所述第十阈值,则确定对所述第i帧的激励信号进行修正,如果所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的差值的绝对值小于或等于所述第十阈值,则确定不对所述i帧的激励信号进行修正;
    所述根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正,包括:
    根据所述第i帧与所述第i-1的能量稳定性确定第二修正因子,所述第二修正因子小于1;
    将所述第i帧的激励信号乘以所述第二修正因子得到所述第i帧修正后的激励信号。
  17. 根据权利要求2所述的方法,其特征在于,根据所述第i帧与第i-1帧的相关性和能量稳定性,确定是否对所述第i帧的激励信号进行修正,当确定对所述第i帧的信号激励信号进行修正时,根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    所述根据所述第i帧与第i-1帧的相关性和能量稳定性,确定是否对所述第i帧的激励信号进行修正,包括:
    根据所述第i帧的激励信号和所述第i帧的谱频率参数,确定所述第i帧的预合成信号;
    判断所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的比值是否大于第十一阈值,所述第十一阈值大于1;
    如果所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的比值大于所述第十一阈值,则确定对所述第i帧的激励信号进行修正,如果所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的比值小于或等于所述第十一阈值,则确定不对所述i帧的激励信号进行修正;
    所述根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正,包括:
    根据所述第i帧与所述第i-1的能量稳定性确定第二修正因子,所述第二修正因子小于1;
    将所述第i帧的激励信号乘以所述第二修正因子得到所述第i帧修正 后的激励信号。
  18. 根据权利要求2所述的方法,其特征在于,根据所述第i帧与第i-1帧的相关性和能量稳定性,确定是否对所述第i帧的激励信号进行修正,当确定对所述第i帧的信号激励信号进行修正时,根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    所述根据所述第i帧与第i-1帧的相关性和能量稳定性,确定是否对所述第i帧的激励信号进行修正,包括:
    根据所述第i帧的激励信号和所述第i帧的谱频率参数,确定所述第i帧的预合成信号;
    判断所述第i-1帧的预合成信号的能量和所述第i帧的合成信号的能量的比值是否小于第十二阈值,所述第十二阈值小于1;
    如果所述第i-1帧的预合成信号的能量和所述第i帧的合成信号的能量的比值小于所述第十二阈值,则确定对所述第i帧的激励信号进行修正,如果所述第i-1帧的预合成信号的能量和所述第i帧的合成信号的能量的比值大于或等于所述第十二阈值,则确定不对所述第i帧的激励信号进行修正;
    所述根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正,包括:
    根据所述第i帧与所述第i-1的能量稳定性确定第二修正因子,所述第二修正因子小于;
    将所述第i帧的激励信号乘以所述第二修正因子得到所述第i帧修正后的激励信号1。
  19. 根据权利要求16-18任一项所述的方法,其特征在于,所述根据所述第i帧与所述第i-1的能量稳定性确定第二修正因子,包括:
    确定所述第i-1帧的能量和所述第i帧的能量的比值为所述第二修正因子;
    或者,确定所述第i-1帧和所述第i帧相同个数子帧的能量的比值为所述第二修正因子。
  20. 根据权利要求2所述的方法,其特征在于,根据第i-1帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,当确定对所述第i 帧的信号激励信号进行修正时,根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    其中,所述第i-1帧信号的相关性包括:所述第i-1帧信号的相关性与十三阈值的大小关系以及所述第i-1帧信号的基因周期的偏差与第十四阈值的大小关系;
    所述根据第i-1帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,包括:
    判断所述第i-1帧信号是否满足条件七,所述条件七为:所述第i-1帧为丢失帧,所述第i-1信号的相关值大于所述第十三阈值,并且所述第i-1帧信号的基音周期的偏差小于所述第十四阈值;
    如果所述第i-1帧信号满足所述条件七,则确定对所述第i帧的激励信号进行修正,如果所述第i-1帧信号不满足所述条件七,则确定不对所述第i帧的激励信号进行修正;
    所述根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正,包括:
    根据所述第i帧与所述第i-1的能量稳定性,确定第三修正因子,所述第三修正因子小于1;
    将所述第i帧的激励信号乘以所述第三修正因子得到所述第i帧修正后的激励信号。
  21. 根据权利要求2所述的方法,其特征在于,根据所述第i帧与第i-1帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,当确定对所述第i帧的信号激励信号进行修正时,根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    其中,所述第i帧与第i-1帧信号的相关性包括:所述第i-1帧信号的相关值与十三阈值的大小关系以及所述第i帧信号的基因周期的偏差与第十四阈值的大小关系;
    所述根据所述第i帧与第i-1帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,包括:
    判断所述第i-1帧信号和所述第i帧信号是否满足条件八,所述条件八包括:所述第i-1帧为丢失帧,所述第i-1帧信号的相关值大于预设的 第十三阈值,并且所述第i帧信号的基音周期的偏差小于预设的第十四阈值;
    如果所述第i-1帧信号和所述第i帧信号满足所述条件八,则确定对所述第i帧的激励信号进行修正,如果所述第i-1帧信号和所述第i帧信号不满足所述条件八,则确定不对所述第i帧的激励信号进行修正;
    所述根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正,包括:
    根据所述第i帧与所述第i-1的能量稳定性,确定第三修正因子,所述第三修正因子小于1;
    将所述第i帧的激励信号乘以所述第三修正因子得到所述第i帧修正后的激励信号。
  22. 根据权利要求2所述的方法,其特征在于,根据第i-1帧与第i-2帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,当确定对所述第i帧的信号激励信号进行修正时,根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    其中,第i-1帧与第i-2帧信号的相关性,包括:所述第i-2帧信号的相关值与十三阈值的大小关系,所述第i-1帧的激励信号是否被修正过;
    所述根据第i-1帧与第i-2帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,包括:
    判断所述第i-2帧信号和所述第i-1帧信号是否满足条件九,所述条件九包括:所述第i-2帧为丢失帧,所述第i-2帧信号的相关值大于所述第十三阈值,且所述第i-1帧信号的激励信号进行了修正;
    如果所述第i-2帧信号和所述第i-1帧信号满足所述条件九,则确定对所述第i帧的激励信号进行修正,如果所述第i-2帧信号和所述第i-1帧信号不满足所述条件九,则确定不对所述第i帧的激励信号进行修正;
    所述根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正,包括:
    根据所述第i帧与所述第i-1的能量稳定性,确定第四修正因子,所述第四修正因子小于1;
    将所述第i帧的激励信号乘以所述第四修正因子得到所述i帧修正后 的激励信号。
  23. 根据权利要求2所述的方法,其特征在于,根据第i-1帧与第i-2帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,当确定对所述第i帧的信号激励信号进行修正时,根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    其中,第i-1帧与第i-2帧信号的相关性,包括:所述第i-2帧信号的相关值与十三阈值的大小关系,所述第i-1帧的激励信号中的代数码书贡献与第十五阈值的大小关系;
    所述根据第i-1帧与第i-2帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,包括:
    判断所述第i-2帧信号和所述第i-1帧信号是否满足条件十,所述条件十包括:所述第i-2帧为丢失帧,所述第i-2帧信号的相关值大于所述第十三阈值,且所述第i-1帧信号的激励信号中的代数码书贡献小于所述第十五阈值;
    如果所述第i-2帧信号和所述第i-1帧信号满足所述条件十,则确定对所述第i帧的激励信号进行修正,如果所述第i-2帧信号和所述第i-1帧信号不满足所述条件十,则确定不对所述第i帧的激励信号进行修正;
    所述根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正,包括:
    根据所述第i帧与所述第i-1的能量稳定性,确定第四修正因子,所述第四修正因子小于1;
    将所述第i帧的激励信号乘以所述第四修正因子得到所述i帧修正后的激励信号。
  24. 根据权利要求2所述的方法,其特征在于,根据第i-1帧与所述第i帧信号的相关性,确定是否对所述第i帧的状态更新的激励信号进行修正,当确定对所述第i帧的状态更新的激励信号进行修正时,根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的状态更新的激励信号进行修正;
    其中,所述第i-1帧与所述第i帧信号的相关性,包括:所述第i-1帧与所述第i帧的相关性大小,以及所述第i-1帧信号的激励信号是否被 修正过;
    所述根据第i-1帧与所述第i帧信号的相关性,确定是否对所述第i帧的状态更新的激励信号进行修正,包括:
    判断所述第i帧信号和所述第i-1帧信号是否满足条件十一,所述条件十一包括:所述第i帧或所述第i-1帧是强相关帧,且所述第i-1帧信号的激励信号做了修正;
    如果所述第i帧信号和所述第i-1帧信号满足所述条件十一,则确定对所述第i帧的状态更新的激励信号进行修正,如果所述第i帧信号和所述第i-1帧信号不满足所述条件十一,则确定不对所述第i帧的状态更新的激励信号进行修正;
    所述根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正,包括:
    根据所述第i帧与所述第i-1的能量稳定性,确定第五修正因子,所述第五修正因子小于1;
    将所述第i帧的状态更新的激励信号乘以所述第五修正因子得到所述第i帧修正后的状态更新的激励信号。
  25. 一种丢帧补偿处理装置,其特征在于,包括:
    丢失帧确定模块,用于通过丢失帧标记位确定第i帧是否为丢失帧;
    估计模块,用于当所述第i帧为丢失帧时,根据所述第i帧的前N帧的帧间关系和所述前N帧的帧内关系中的至少一个,估计所述第i帧的参数;所述前N帧的帧间关系包括所述前N帧的相关性和能量稳定性中的至少一个,所述前N帧的帧内关系包括所述前N帧中的子帧间的相关性和能量稳定性中的至少一个,所述第i帧的参数包括:谱频率参数、基音周期和增益,N为大于或等于1的整数;
    获取模块,用于获取所述第i帧的代数码书;
    生成模块,用于根据所述估计模块估计得到的所述第i帧的基音周期、增益以及所述获取模块获取的所述第i帧的代数码书生成所述第i帧的激励信号;
    信号合成模块,用于根据所述估计模块估计得到的所述第i帧的谱频率参数和所述生成模块生成的所述第i帧的激励信号合成第i帧信号。
  26. 根据权利要求25所述的装置,其特征在于,如果所述第i帧为正常帧,所述装置还包括:
    解码模块,用于根据接收到的码流解码获得所述第i帧的参数,所述第i帧的参数包括:谱频率参数、基音周期、增益以及代数码书;
    所述生成模块还用于:根据所述解码模块解码得到的所述第i帧的基音周期、增益以及代数码书生成所述第i帧的激励信号和所述第i帧的状态更新的激励信号;
    判断模块,用于当第i-1帧或第i-2帧为丢失帧时,根据所述第i帧与所述第i帧的前N帧的帧间关系和帧内关系中的至少一个,确定是否对所述第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正,所述帧间关系包括所述第i帧与所述第i帧的前N帧的相关性和能量稳定性中的至少一个,所述帧内关系包括:所述第i帧与所述第i帧的前N帧的子帧间相关性和能量稳定性中的至少一个;
    修正模块,用于当所述判断模块确定对所述第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正时,根据所述第i帧与所述第i帧的前N帧的帧间关系和帧内关系中的至少一个,对所述第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个进行修正;
    所述信号合成模块还用于:根据所述修正模块对所述第i帧的谱频率参数、激励信号和状态更新的激励信号中的至少一个的修正结果合成第i帧信号,或者,当所述判断模块确定不对所述第i帧的谱频率参数、激励信号和状态更新的激励信号进行修正时,根据所述第i帧的谱频率参数、激励信号和状态更新的激励信号合成第i帧信号。
  27. 根据权利要求25所述的装置,其特征在于,所述第i帧的谱频率参数是所述估计模块根据所述第i帧的前N帧的帧间关系估计得到的;
    所述估计模块具体用于:
    根据所述第i帧的前N帧的相关性确定第i-1帧的谱频率参数的权重和所述第i帧的预置谱频率参数的权重;
    根据所述第i-1帧的谱频率参数的权重和所述第i帧的预置谱频率参数的权重,对所述第i-1帧的谱频率参数和所述第i帧的预置谱频率参数 进行加权运算得到所述第i帧的谱频率参数。
  28. 根据权利要求27所述的装置,其特征在于,所述相关性包括:所述第i-1帧信号的谱倾斜参数与第二阈值的大小关系、所述第i-1帧信号的归一化自相关值与第一阈值的大小关系和所述第i-1帧信号的基因周期的偏差与第三阈值的大小关系;
    所述估计模块具体用于:
    如果第i-1帧信号满足条件一、条件二和条件三中的至少一个,则确定所述第i-1帧的谱频率参数的权重为第一权重,所述第i帧的预置谱频率参数的权重为第二权重,所述第一权重大于所述第二权重,所述条件一为:所述第i-1帧信号的归一化自相关值大于所述第一阈值,所述条件二为:所述第i-1帧信号的谱倾斜参数大于所述第二阈值,所述条件三为:所述第i-1帧信号的基音周期的偏差小于所述第三阈值;
    或者,如果所述第i-1帧信号同时不满足所述条件一、所述条件二和所述条件三,则确定所述第i-1帧的谱频率参数的权重为所述第二权重,所述第i帧的预置谱频率参数的权重为所述第一权重。
  29. 根据权利要求25所述的装置,其特征在于,所述第i帧的基因周期是所述估计模块根据所述第i帧的前N帧的相关性和所述第i帧的前N帧的子帧间的相关性估计得到的;
    所述相关性包括:第i-2帧信号的归一化自相关值与第五阈值的大小关系、所述第i-2帧信号的基因周期的偏差与第四阈值的大小关系和第i-1帧信号的基因周期的偏差与所述第四阈值的大小关系;
    所述估计模块具体用于:
    如果所述第i-1帧信号的基音周期的偏差小于所述第四阈值,则根据所述第i-1帧信号的基音周期确定所述第i-1帧信号的基音周期偏移值;根据所述第i-1帧信号的基音周期偏移值和所述第i-1帧信号的基音周期确定所述第i帧信号的基音周期;所述第i帧信号的基音周期包括所述第i帧的每个子帧的基音周期,所述第i-1帧信号的基音周期偏移值为所述第i-1帧的所有相邻子帧的基音周期的差值的均值;
    或者,如果所述第i-1帧信号的基音周期的偏差大于或等于所述第四阈值,所述第i-2帧信号的归一化自相关值大于所述第五阈值,且所述第 i-2帧信号的基音周期的偏差小于所述第四阈值,则根据所述第i-2帧信号和所述第i-1帧信号的基音周期确定所述第i-2帧信号和所述第i-1帧信号的基音周期偏移值;根据所述第i-1帧信号的基音周期以及所述第i-2帧信号和所述第i-1帧信号的基音周期偏移值确定所述第i帧信号的基音周期。
  30. 根据权利要求29所述的装置,其特征在于,所述估计模块根据如下公式确定所述第i-1帧信号的基音周期偏移值pv:
    pv=(p(-1)(3)-p(-1)(2))+(p(-1)(2)-p(-1)(1))+(p(-1)(1)-p(-1)(0))/3,
    其中,p(-1)(j)是所述第i-1帧的第j个子帧的基音周期,j=0,1,2,3;
    所述估计模块根据如下公式确定所述第i帧信号的基音周期:
    pcur(j)=p(-1)(3)+(j+1)*pv,j=0,1,2,3,其中,p(-1)(3)是所述第i-1帧的第3个子帧的基音周期,pv是所述第i-1帧信号的基音周期偏移值,pcur(j)是所述第i帧的第j个子帧的基音周期。
  31. 根据权利要求29所述的装置,其特征在于,所述估计模块根据如下公式确定所述第i-2帧信号和所述第i-1帧信号的基音周期偏移值pv:
    pv=(p(-2)(3)-p(-2)(2))+(p(-1)(0)-p(-2)(3))+(p(-1)(1)-p(-1)(0))/3;
    其中,p(-2)(m)是所述第i-2帧的第m个子帧的基音周期,p(-1)(n)是所述第i-1帧的第n个子帧的基音周期,m=2,3,n=0,1;
    所述估计模块根据如下公式确定所述第i帧信号的基音周期:
    pcur(x)=p(-1)(3)+(x+1)*pv,x=0,1,2,3;
    其中,p(-1)(3)是所述第i-1帧的第3个子帧的基音周期,pv是所述第i-2帧信号和所述第i-1帧信号的基音周期偏移值,pcur(x)是所述第i帧的第x个子帧的基音周期。
  32. 根据权利要求25所述的装置,其特征在于,所述第i帧的增益包括:自适应码书增益和代数码书增益,所述第i帧的增益是所述估计模块根据所述第i帧的前N帧的相关性和能量稳定性估计得到的;
    所述估计模块具体用于:
    根据第i-1帧的自适应码书增益或预先设定的固定值、所述第i-1帧的相关性以及所述第i帧在连续的多个丢失帧中的序号,确定所述第i帧 的自适应码书增益;
    根据所述第i-1帧的能量稳定性确定所述第i-1帧的代数码书增益的权重以及话音激活检测VAD帧的增益的权重;
    根据所述第i-1帧的代数码书增益的权重和所述VAD帧的增益的权重,对所述第i-1帧的代数码书增益和所述VAD帧的增益进行加权运算得到所述第i帧的代数码书增益。
  33. 根据权利要求32所述的装置,其特征在于,所述第i-1帧的能量越稳定,所述第i-1帧的代数码书增益的权重越大。
  34. 根据权利要求32所述的装置,其特征在于,随着连续丢失帧个数的增加,VAD帧的增益的权重也相应增加。
  35. 根据权利要求32所述的装置,其特征在于,所述根据所述第i-1帧的代数码书增益的权重和所述VAD帧的增益的权重,对所述第i-1帧的代数码书增益和所述VAD帧的增益进行加权运算得到所述第i帧的代数码书增益之前,所述估计模块还用于:
    根据编解码速率确定第一修正因子;
    使用所述第一修正因子对所述第i-1帧的代数码书增益进行修正。
  36. 根据权利要求25所述的装置,其特征在于,所述获取模块具体用于:
    根据随机噪声估计得到所述第i帧的代数码书;
    或者,根据所述第i帧的前N帧的代数码书确定所述第i帧的代数码书。
  37. 根据权利要求25所述的装置,其特征在于,所述第i帧的增益包括:自适应码书增益和代数码书增益;
    所述获取模块还用于:
    根据所述第i-1帧的基音周期的偏差、信号的相关性、谱斜率大小和过零率中的任意一个确定所述第i帧的代数码书贡献的权重,或者,对所述第i-1帧的基音周期的偏差、信号的相关性、谱斜率大小和过零率中的任意组合进行加权运算确定所述第i帧的代数码书贡献的权重;
    对所述第i-1帧的状态更新的激励信号进行内插运算确定所述第i帧的自适应码书;
    所述生成模块具体用于:
    根据所述第i帧的代数码书和所述第i帧的代数码书增益的乘积,确定所述第i帧的代数码书贡献;
    根据所述第i帧的自适应码书和所述第i帧的自适应码书增益的乘积,确定所述第i帧的自适应码书贡献;
    根据所述第i帧的代数码书贡献的权重和自适应码书贡献的权重,对所述第i帧的代数码书贡献和自适应码书贡献进行加权运算,确定所述第i帧的激励信号,所述自适应码书的权重为1。
  38. 根据权利要求26所述的装置,其特征在于,所述判断模块用于根据所述第i帧的相关性,确定是否对所述第i帧的谱频率参数进行修正,当所述判断模块确定对所述第i帧的谱频率参数进行修正时,所述修正模块用于:根据所述第i帧与第i-1帧的谱频率参数对所述第i帧的谱频率参数进行修正,或者,根据所述第i帧的谱频率参数和预置谱频率参数对所述第i帧的谱频率参数进行修正;
    其中,所述第i帧的相关性包括:所述第i帧的相邻谱频率参数的差值的最小值的索引对应的两个谱频率参数中的其中一个谱频率参数与第六阈值的大小关系、所述第i帧的相邻谱频率参数的差值的最小值与第七阈值的大小关系以及所述第i帧的相邻谱频率参数的差值的最小值的索引与第八阈值的大小关系;
    所述判断模块具体用于:
    确定所述第i帧的相邻谱频率参数的差值,每个差值对应一个索引,所述谱频率参数包括导抗谱频率ISF或线谱频率LSF;
    判断所述第i帧的相邻谱频率参数的差值是否满足条件四和条件五中的至少一个,所述条件四包括:所述第i帧的相邻谱频率参数的差值的最小值的索引对应的两个谱频率参数中的其中一个谱频率参数小于所述第六阈值,所述条件五包括:所述第i帧的相邻谱频率参数的差值的最小值的索引值小于所述第八阈值,且所述最小差值小于所述第七阈值;
    如果所述第i帧的相邻谱频率参数的差值满足所述条件四和所述条件五中的至少一个,则确定对所述第i帧谱频率参数进行修正,如果所述第i帧的相邻谱频率参数的差值同时不满足所述条件四和条件五,则确定不 对所述第i帧谱频率参数进行修正;
    所述修正模块具体用于:
    根据所述第i-1帧的谱频率参数和所述第i帧的谱频率参数的加权运算,确定所述第i帧修正后的谱频率参数;
    或者,根据所述第i帧的谱频率参数和预先的谱频率参数的加权运算,确定所述第i帧修正后的谱频率参数。
  39. 根据权利要求26所述的装置,其特征在于,所述判断模块用于根据所述第i帧与第i-1帧的相关性,确定是否对所述第i帧的谱频率参数进行修正,当所述判断模块确定对所述第i帧的谱频率参数进行修正时,所述修正模块用于:根据所述第i帧与第i-1帧的谱频率参数对所述第i帧的谱频率参数进行修正,或者,根据所述第i帧的谱频率参数和预置谱频率参数对所述第i帧的谱频率参数进行修正;
    其中,所述第i帧与第i-1帧的相关性包括:所述第i-1帧和所述第i帧的部分或全部相同索引对应的谱频率参数差值的和与第九阈值的大小关系;
    所述判断模块具体用于:
    确定所述第i帧的相邻谱频率参数的差值,每个差值对应一个索引,所述谱频率参数包括导抗谱频率ISF或线谱频率LSF;
    判断所述第i帧的谱频率参数和所述第i-1帧的谱频率参数是否满足条件六,所述条件六包括:所述第i-1帧和所述第i帧的部分或全部相同索引对应的谱频率参数差值的和大于所述第九阈值;
    如果所述第i帧的谱频率参数和所述第i-1帧的谱频率参数满足所述条件六,则确定对所述第i帧谱频率参数进行修正,如果所述第i帧的谱频率参数和所述第i-1帧的谱频率参数不满足所述条件六,则确定不对所述第i帧谱频率参数进行修正;
    所述修正模块具体用于:
    根据所述第i-1帧的谱频率参数和所述第i帧的谱频率参数的加权运算,确定所述第i帧修正后的谱频率参数;
    或者,根据所述第i帧的谱频率参数和预置谱频率参数的加权运算,确定所述第i帧修正后的谱频率参数。
  40. 根据权利要求26所述的装置,其特征在于,所述判断模块用于根据所述第i帧与第i-1帧的相关性和能量稳定性,确定是否对所述第i帧的激励信号进行修正,当所述判断模块确定对所述第i帧的信号激励信号进行修正时,所述修正模块用于根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    所述判断模块具体用于:
    根据所述第i帧的激励信号和所述第i帧的谱频率参数,确定所述第i帧的预合成信号;
    判断所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的差值的绝对值是否大于第十阈值;
    如果所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的差值的绝对值大于所述第十阈值,则确定对所述第i帧的激励信号进行修正,如果所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的差值的绝对值小于或等于所述第十阈值,则确定不对所述i帧的激励信号进行修正;
    所述修正模块具体用于:
    根据所述第i帧与所述第i-1的能量稳定性确定第二修正因子,所述第二修正因子小于1;
    将所述第i帧的激励信号乘以所述第二修正因子得到所述第i帧修正后的激励信号。
  41. 根据权利要求26所述的装置,其特征在于,所述判断模块用于根据所述第i帧与第i-1帧的相关性和能量稳定性,确定是否对所述第i帧的激励信号进行修正,当所述判断模块确定对所述第i帧的信号激励信号进行修正时,所述修正模块用于根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    所述判断模块具体用于:
    根据所述第i帧的激励信号和所述第i帧的谱频率参数,确定所述第i帧的预合成信号;
    判断所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的比值是否大于第十一阈值,所述第十一阈值大于1;
    如果所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的比值大于所述第十一阈值,则确定对所述第i帧的激励信号进行修正,如果所述第i帧的预合成信号的能量和所述第i-1帧的合成信号的能量的比值小于或等于所述第十一阈值,则确定不对所述i帧的激励信号进行修正;
    所述修正模块具体用于:
    根据所述第i帧与所述第i-1的能量稳定性确定第二修正因子,所述第二修正因子小于1;
    将所述第i帧的激励信号乘以所述第二修正因子得到所述第i帧修正后的激励信号。
  42. 根据权利要求26所述的装置,其特征在于,所述判断模块用于根据所述第i帧与第i-1帧的相关性和能量稳定性,确定是否对所述第i帧的激励信号进行修正,当所述判断模块确定对所述第i帧的信号激励信号进行修正时,所述修正模块用于根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    所述判断模块具体用于:
    根据所述第i帧的激励信号和所述第i帧的谱频率参数,确定所述第i帧的预合成信号;
    判断所述第i-1帧的预合成信号的能量和所述第i帧的合成信号的能量的比值是否小于第十二阈值,所述第十二阈值小于1;
    如果所述第i-1帧的预合成信号的能量和所述第i帧的合成信号的能量的比值小于所述第十二阈值,则确定对所述第i帧的激励信号进行修正,如果所述第i-1帧的预合成信号的能量和所述第i帧的合成信号的能量的比值大于或等于所述第十二阈值,则确定不对所述第i帧的激励信号进行修正;
    所述修正模块具体用于:
    根据所述第i帧与所述第i-1的能量稳定性确定第二修正因子,所述第二修正因子小于;
    将所述第i帧的激励信号乘以所述第二修正因子得到所述第i帧修正后的激励信号1。
  43. 根据权利要求40-42任一项所述的装置,其特征在于,所述修正模块具体用于:
    确定所述第i-1帧的能量和所述第i帧的能量的比值为所述第二修正因子;
    或者,确定所述第i-1帧和所述第i帧相同个数子帧的能量的比值为所述第二修正因子。
  44. 根据权利要求26所述的装置,其特征在于,所述判断模块用于根据第i-1帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,当所述判断模块确定对所述第i帧的信号激励信号进行修正时,所述修正模块用于根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    其中,所述第i-1帧信号的相关性包括:所述第i-1帧信号的相关值与十三阈值的大小关系以及所述第i-1帧信号的基因周期的偏差与第十四阈值的大小关系;
    所述判断模块具体用于:
    判断所述第i-1帧信号是否满足条件七,所述条件七为:所述第i-1帧为丢失帧,所述第i-1信号的相关值大于所述第十三阈值,并且所述第i-1帧信号的基音周期的偏差小于所述第十四阈值;
    如果所述第i-1帧信号满足所述条件七,则确定对所述第i帧的激励信号进行修正,如果所述第i-1帧信号不满足所述条件七,则确定不对所述第i帧的激励信号进行修正;
    所述修正模块具体用于:
    根据所述第i帧与所述第i-1的能量稳定性,确定第三修正因子,所述第三修正因子小于1;
    将所述第i帧的激励信号乘以所述第三修正因子得到所述第i帧修正后的激励信号。
  45. 根据权利要求26所述的装置,其特征在于,所述判断模块用于根据所述第i帧与第i-1帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,当所述判断模块确定对所述第i帧的信号激励信号进行修正时,所述修正模块用于根据所述第i帧与所述第i-1的能量稳定性对所 述第i帧的激励信号进行修正;
    其中,所述第i帧与第i-1帧信号的相关性包括:所述第i-1帧信号的相关值与十三阈值的大小关系以及所述第i帧信号的基因周期的偏差与第十四阈值的大小关系;
    所述判断模块具体用于:
    判断所述第i-1帧信号和所述第i帧信号是否满足条件八,所述条件八包括:所述第i-1帧为丢失帧,所述第i-1帧信号的相关值大于预设的第十三阈值,并且所述第i帧信号的基音周期的偏差小于预设的第十四阈值;
    如果所述第i-1帧信号和所述第i帧信号满足所述条件八,则确定对所述第i帧的激励信号进行修正,如果所述第i-1帧信号和所述第i帧信号不满足所述条件八,则确定不对所述第i帧的激励信号进行修正;
    所述修正模块具体用于:
    根据所述第i帧与所述第i-1的能量稳定性,确定第三修正因子,所述第三修正因子小于1;
    将所述第i帧的激励信号乘以所述第三修正因子得到所述第i帧修正后的激励信号。
  46. 根据权利要求26所述的装置,其特征在于,所述判断模块用于根据第i-1帧与第i-2帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,当所述判断模块确定对所述第i帧的信号激励信号进行修正时,所述修正模块用于根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    其中,第i-1帧与第i-2帧信号的相关性,包括:所述第i-2帧信号的相关值与十三阈值的大小关系,所述第i-1帧的激励信号是否被修正过;
    所述判断模块具体用于:
    判断所述第i-2帧信号和所述第i-1帧信号是否满足条件九,所述条件九包括:所述第i-2帧为丢失帧,所述第i-2帧信号的相关值大于所述第十三阈值,且所述第i-1帧信号的激励信号进行了修正;
    如果所述第i-2帧信号和所述第i-1帧信号满足所述条件九,则确定对所述第i帧的激励信号进行修正,如果所述第i-2帧信号和所述第i-1 帧信号不满足所述条件九,则确定不对所述第i帧的激励信号进行修正;
    所述修正模块具体用于:
    根据所述第i帧与所述第i-1的能量稳定性,确定第四修正因子,所述第四修正因子小于1;
    将所述第i帧的激励信号乘以所述第四修正因子得到所述i帧修正后的激励信号。
  47. 根据权利要求26所述的装置,其特征在于,所述判断模块用于根据第i-1帧与第i-2帧信号的相关性,确定是否对所述第i帧的激励信号进行修正,当所述判断模块确定对所述第i帧的信号激励信号进行修正时,所述修正模块用于根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的激励信号进行修正;
    其中,第i-1帧与第i-2帧信号的相关性,包括:所述第i-2帧信号的相关值与十三阈值的大小关系,所述第i-1帧的激励信号中的代数码书贡献与第十五阈值的大小关系;
    所述判断模块具体用于:
    判断所述第i-2帧信号和所述第i-1帧信号是否满足条件十,所述条件十包括:所述第i-2帧为丢失帧,所述第i-2帧信号的相关值大于所述第十三阈值,且所述第i-1帧信号的激励信号中的代数码书贡献小于所述第十五阈值;
    如果所述第i-2帧信号和所述第i-1帧信号满足所述条件十,则确定对所述第i帧的激励信号进行修正,如果所述第i-2帧信号和所述第i-1帧信号不满足所述条件十,则确定不对所述第i帧的激励信号进行修正;
    所述修正模块具体用于:
    根据所述第i帧与所述第i-1的能量稳定性,确定第四修正因子,所述第四修正因子小于1;
    将所述第i帧的激励信号乘以所述第四修正因子得到所述i帧修正后的激励信号。
  48. 根据权利要求26所述的装置,其特征在于,所述判断模块用于根据第i-1帧与所述第i帧信号的相关性,确定是否对所述第i帧的状态更新的激励信号进行修正,当所述判断模块确定对所述第i帧的状态更新 的激励信号进行修正时,所述修正模块用于根据所述第i帧与所述第i-1的能量稳定性对所述第i帧的状态更新的激励信号进行修正;
    其中,所述第i-1帧与所述第i帧信号的相关性,包括:所述第i-1帧与所述第i帧的相关性大小,以及所述第i-1帧信号的激励信号是否被修正过;
    所述判断模块具体用于:
    判断所述第i帧信号和所述第i-1帧信号是否满足条件十一,所述条件十一包括:所述第i帧或所述第i-1帧是强相关帧,且所述第i-1帧信号的激励信号做了修正;
    如果所述第i帧信号和所述第i-1帧信号满足所述条件十一,则确定对所述第i帧的状态更新的激励信号进行修正,如果所述第i帧信号和所述第i-1帧信号不满足所述条件十一,则确定不对所述第i帧的状态更新的激励信号进行修正;
    所述修正模块具体用于:
    根据所述第i帧与所述第i-1的能量稳定性,确定第五修正因子,所述第五修正因子小于1;
    将所述第i帧的状态更新的激励信号乘以所述第五修正因子得到所述第i帧修正后的状态更新的激励信号。
PCT/CN2016/103481 2016-03-29 2016-10-27 丢帧补偿处理方法和装置 WO2017166800A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610188140.5 2016-03-29
CN201610188140.5A CN107248411B (zh) 2016-03-29 2016-03-29 丢帧补偿处理方法和装置

Publications (1)

Publication Number Publication Date
WO2017166800A1 true WO2017166800A1 (zh) 2017-10-05

Family

ID=58672282

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/103481 WO2017166800A1 (zh) 2016-03-29 2016-10-27 丢帧补偿处理方法和装置

Country Status (4)

Country Link
US (1) US10354659B2 (zh)
EP (1) EP3242442A3 (zh)
CN (1) CN107248411B (zh)
WO (1) WO2017166800A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113539278B (zh) * 2020-04-09 2024-01-19 同响科技股份有限公司 音频数据重建方法及系统
CN111554322A (zh) * 2020-05-15 2020-08-18 腾讯科技(深圳)有限公司 一种语音处理方法、装置、设备及存储介质
CN114079535B (zh) * 2020-08-20 2023-02-17 腾讯科技(深圳)有限公司 转码方法、装置、介质和电子设备
CN112489665B (zh) * 2020-11-11 2024-02-23 北京融讯科创技术有限公司 语音处理方法、装置以及电子设备
CN113571079A (zh) * 2021-02-08 2021-10-29 腾讯科技(深圳)有限公司 语音增强方法、装置、设备及存储介质
CN112802485B (zh) * 2021-04-12 2021-07-02 腾讯科技(深圳)有限公司 语音数据处理方法、装置、计算机设备及存储介质
CN113763973A (zh) * 2021-04-30 2021-12-07 腾讯科技(深圳)有限公司 音频信号增强方法、装置、计算机设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1441950A (zh) * 2000-07-14 2003-09-10 康奈克森特系统公司 处理丢失帧的语音通信系统及方法
CN102158783A (zh) * 2010-01-29 2011-08-17 宝利通公司 通过变换插值进行音频分组丢失隐藏
CN104299614A (zh) * 2013-07-16 2015-01-21 华为技术有限公司 解码方法和解码装置
WO2015063044A1 (en) * 2013-10-31 2015-05-07 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Audio decoder and method for providing a decoded audio information using an error concealment based on a time domain excitation signal
CN104718570A (zh) * 2012-09-13 2015-06-17 Lg电子株式会社 帧丢失恢复方法,和音频解码方法以及使用其的设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6959274B1 (en) 1999-09-22 2005-10-25 Mindspeed Technologies, Inc. Fixed rate speech compression system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1441950A (zh) * 2000-07-14 2003-09-10 康奈克森特系统公司 处理丢失帧的语音通信系统及方法
CN102158783A (zh) * 2010-01-29 2011-08-17 宝利通公司 通过变换插值进行音频分组丢失隐藏
CN104718570A (zh) * 2012-09-13 2015-06-17 Lg电子株式会社 帧丢失恢复方法,和音频解码方法以及使用其的设备
CN104299614A (zh) * 2013-07-16 2015-01-21 华为技术有限公司 解码方法和解码装置
WO2015063044A1 (en) * 2013-10-31 2015-05-07 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Audio decoder and method for providing a decoded audio information using an error concealment based on a time domain excitation signal

Also Published As

Publication number Publication date
CN107248411B (zh) 2020-08-07
US20170287493A1 (en) 2017-10-05
EP3242442A3 (en) 2017-12-13
US10354659B2 (en) 2019-07-16
CN107248411A (zh) 2017-10-13
EP3242442A2 (en) 2017-11-08

Similar Documents

Publication Publication Date Title
WO2017166800A1 (zh) 丢帧补偿处理方法和装置
US10360927B2 (en) Method and apparatus for frame loss concealment in transform domain
RU2419891C2 (ru) Способ и устройство эффективной маскировки стирания кадров в речевых кодеках
US9653088B2 (en) Systems, methods, and apparatus for signal encoding using pitch-regularizing and non-pitch-regularizing coding
US8725499B2 (en) Systems, methods, and apparatus for signal change detection
JP4658596B2 (ja) 線形予測に基づく音声コーデックにおける効率的なフレーム消失の隠蔽のための方法、及び装置
RU2419167C2 (ru) Система, способы и устройство для восстановления при стирании кадра
KR101828186B1 (ko) 개선된 펄스 재동기화를 사용하여 acelp-형 은폐 내에서 적응적 코드북의 개선된 은폐를 위한 장치 및 방법
JP6573178B2 (ja) 復号方法および復号装置
US11423913B2 (en) Apparatus and method for generating an error concealment signal using an adaptive noise estimation
US10381011B2 (en) Apparatus and method for improved concealment of the adaptive codebook in a CELP-like concealment employing improved pitch lag estimation
CN100578618C (zh) 一种解码方法及装置
WO2011047578A1 (zh) 频带扩展方法及装置
US10984811B2 (en) Audio coding method and related apparatus
KR20160124877A (ko) 음성 주파수 코드 스트림 디코딩 방법 및 디바이스
WO2019000178A1 (zh) 一种丢帧补偿方法及设备
JP4451633B2 (ja) 最適窓生成方法、窓最適化処理装置、プログラム、線形予測分析最適化方法及び線形予測分析最適化装置
CN117037808A (zh) 语音信号处理方法、装置、设备及存储介质
Edwards Advanced signal processing techniques for pitch synchronous sinusoidal speech coders

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16896569

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16896569

Country of ref document: EP

Kind code of ref document: A1