EP1433164A1 - Improved frame erasure concealment for predictive speech coding based on extrapolation of speech waveform - Google Patents

Improved frame erasure concealment for predictive speech coding based on extrapolation of speech waveform

Info

Publication number
EP1433164A1
EP1433164A1 EP02757200A EP02757200A EP1433164A1 EP 1433164 A1 EP1433164 A1 EP 1433164A1 EP 02757200 A EP02757200 A EP 02757200A EP 02757200 A EP02757200 A EP 02757200A EP 1433164 A1 EP1433164 A1 EP 1433164A1
Authority
EP
European Patent Office
Prior art keywords
ppfel
time lag
samples
frame
frames
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
EP02757200A
Other languages
German (de)
French (fr)
Other versions
EP1433164B1 (en
EP1433164A4 (en
Inventor
Juin-Hwey Chen
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Broadcom Corp
Original Assignee
Broadcom Corp
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
Priority claimed from US10/183,448 external-priority patent/US7143032B2/en
Priority claimed from US10/183,608 external-priority patent/US7711563B2/en
Priority claimed from US10/183,451 external-priority patent/US7308406B2/en
Application filed by Broadcom Corp filed Critical Broadcom Corp
Publication of EP1433164A1 publication Critical patent/EP1433164A1/en
Publication of EP1433164A4 publication Critical patent/EP1433164A4/en
Application granted granted Critical
Publication of EP1433164B1 publication Critical patent/EP1433164B1/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

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

Definitions

  • the present invention relates to digital communications. More particularly, the present invention relates to the enhancement of speech quality when frames of a compressed bit stream representing a speech signal are lost within the context of a digital communications system.
  • a coder encodes an input speech or audio signal into a digital bit stream for transmission.
  • a decoder decodes the bit stream into an output speech signal.
  • the combination of the coder and the decoder is called a codec.
  • the transmitted bit stream is usually partitioned into frames.
  • frames of transmitted bits are lost, erased, or corrupted. This condition is called frame erasure in wireless communications.
  • the same condition of erased frames can happen in packet networks due to packet loss.
  • the decoder cannot perform normal decoding operations since there are no bits to decode in the lost frame.
  • the decoder needs to perform frame erasure concealment (FEC) operations to try to conceal the quality-degrading effects of the frame erasure.
  • FEC frame erasure concealment
  • One of the earliest FEC techniques is waveform substitution based on pattern matching, as proposed by Goodman, et al. in "Waveform Substitution Techniques for Recovering Missing Speech Segments in Packet Voice Communications", IEEE Transaction on Acoustics, Speech and Signal Processing, December 1986, pp. 1440 - 1448.
  • This scheme was applied to Pulse Code Modulation (PCM) speech codec that performs sample-by-sample instantaneous quantization of speech waveform directly.
  • PCM Pulse Code Modulation
  • This FEC scheme uses a piece of decoded speech waveform immediately before the lost frame as the template, and slides this template back in time to find a suitable piece of decoded speech waveform that maximizes some sort of waveform similarity measure (or minimizes a waveform difference measure).
  • Goodman's FEC scheme then uses the section of waveform immediately following a best-matching waveform segment as the substitute waveform for the lost frame. To eliminate discontinuities at frame boundaries, the scheme also uses a raised cosine window to perform an overlap-add technique between the correctly decoded waveform and the substitute waveform. This overlap-add technique increases the coding delay. The delay occurs because at the end of each frame, there are many speech samples that need to be overlap-added to obtain the final values, and thus cannot be played out until the next frame of speech is decoded.
  • the most popular type of speech codec is based on predictive coding.
  • the first publicized FEC scheme for a predictive codec is a "bad frame masking" scheme in the original TIA IS-54 VSELP standard for North American digital cellular radio (rescinded in September 1996).
  • the scheme repeats the linear prediction parameters of the last frame.
  • This scheme derives the speech energy parameter for the current frame by either repeating or attenuating the speech energy parameter of last frame, depending on how many consecutive bad frames have been counted.
  • the excitation signal or quantized prediction residual
  • this scheme does not perform any special operation. It merely decodes the excitation bits, even though they might contain a large number of bit errors.
  • the first FEC scheme for a predictive codec that performs waveform substitution in the excitation domain is probably the FEC system developed by Chen for the ITU-T Recommendation G.728 Low-Delay Code Excited Linear Predictor (CELP) codec, as described in United States Patent No. 5,615,298 issued to Chen, titled "Excitation Signal Synthesis During Frame Erasure or Packet Loss.”
  • CELP Low-Delay Code Excited Linear Predictor
  • an exemplary FEC technique includes a method of synthesizing a number of corrupted frames output from a decoder including one or more predictive filters.
  • the corrupted frames are representative of one segment of a decoded signal (sq(n)) output from the decoder.
  • the method comprises determining a first preliminary time lag (ppfel) based upon examining a predetermined number (K) of samples of another segment of the decoded signal and determining a scaling factor (ptfe) associated with the examined number (K) of samples when the first preliminary time lag (ppfel) is determined.
  • the method also comprises extrapolating one or more replacement frames based upon the first preliminary time lag (ppfel) and the scaling factor (ptfe).
  • FIG. 1 is a block diagram illustration of a conventional predictive decoder
  • FIG. 2 is a block diagram illustration of an exemplary decoder constructed and arranged in accordance with the present invention
  • FIG. 3(a) is a plot of an exemplary unnormalized waveform attenuation window functioning in accordance with the present invention
  • FIG. 3(b) is a plot of an exemplary normalized waveform attenuation window functioning in accordance with the present invention
  • FIG. 4 is a block diagram of an exemplary computer system on which the present invention can be practiced.
  • the present invention is particularly useful in the environment of the decoder of a predictive speech codec to conceal the quality-degrading effects of frame erasure or packet loss.
  • FIG. 1 illustrates such an environment.
  • the general principles of the invention can be used in any linear predictive codec, although the preferred embodiment described later is particularly well suited for a specific type of predictive decoder.
  • the invention is an FEC technique designed for predictive coding of speech.
  • One characteristic that distinguishes it from the techniques mentioned above, is that it performs waveform substitution in the speech domain rather than the excitation domain. It also performs special operations to update the internal states, or memories, of predictors and filters inside the predictive decoder to ensure maximally smooth reproduction of speech waveform when the next good frame is received.
  • the present invention also avoids the additional delay associated with the overlap-add operation in Goodman's approach and in ITU-T G.711 Appendix I. This is achieved by performing overlap-add between extrapolated speech waveform and the ringing, or zero-input response of the synthesis filter. Other features include a special algorithm to minimize buzzing sounds during waveform extrapolation, and an efficient method to implement a linearly decreasing waveform envelope during extended frame erasure. Finally, the associated memories within the log-gain predictor are updated. [0022] The present invention is not restricted to a particular speech codec.
  • Adaptive Predictive Coding APC
  • MPLPC Multi-Pulse Linear Predictive Coding
  • CELP CELP
  • NFC Noise Feedback Coding
  • FIG. 1 is a block diagram illustration of a conventional predictive decoder 100.
  • the decoder 100 shown in FIG. 1 can be used to describe the decoders of APC, MPLPC, CELP, and NFC speech codecs.
  • the more sophisticated versions of the codecs associated with predictive decoders typically use a short-term predictor to exploit the redundancy among adjacent speech samples and a long-term predictor to exploit the redundancy between distant samples due to pitch periodicity of, for example, voiced speech.
  • the main information transmitted by these codecs is the quantized version of the prediction residual signal after short-term and long-term prediction.
  • This quantized residual signal is often called the excitation signal, because it is used in the decoder to excite the long-term and short-term synthesis filter to produce the output decoded speech.
  • the excitation signal In addition to the excitation signal, several other speech parameters are also transmitted as side information frame-by-frame or subframe-by-subframe.
  • An exemplary range of lengths for each frame (called frame size) is 5 ms to 40 ms, with 10 ms and 20 ms as the two most popular frame sizes for speech codecs.
  • Each frame usually contains a few equal-length subframes.
  • the side information of these predictive codecs typically includes spectral envelope information (in the form of the short-term predictor parameters), pitch period, pitch predictor taps (both long-term predictor parameters), and excitation gain.
  • the conventional decoder 100 includes a bit de-multiplexer
  • the de-multiplexer 105 separates the bits in each received frame of bits into codes for the excitation signal and codes for short-term predictor, long- term predictor, and the excitation gain.
  • the short-term predictor parameters often referred to as the linear predictive coding (LPC) parameters, are usually transmitted once a frame.
  • LPC linear predictive coding
  • LSP line- spectrum pair
  • LSF line-spectrum frequency
  • LSPI represents the transmitted quantizer codebook index representing the LSP parameters in each frame.
  • a short-term predictive parameter decoder 110 decodes LSPI into an LSP parameter set and then converts the LSP parameters to the coefficients for the short-term predictor. These short-term predictor coefficients are then used to control the coefficient update of a short-term predictor 120.
  • Pitch period is defined as the time period at which a voiced speech waveform appears to be repeating itself periodically at a given moment. It is usually measured in terms of a number of samples, is transmitted once a subframe, and is used as the bulk delay in long-term predictors. Pitch taps are the coefficients of the long-term predictor.
  • the bit de-multiplexer 105 also separates out the pitch period index (PPI) and the pitch predictor tap index (PPTT), from the received bit stream.
  • a long-term predictive parameter decoder 130 decodes PPI into the pitch period, and decodes the PPTI into the pitch predictor taps. The decoded pitch period and pitch predictor taps are then used to control the parameter update of a generalized long-term predictor 140.
  • the long-term predictor 140 is just a finite impulse response (FIR) filter, typically first order or third order, with a bulk delay equal to the pitch period.
  • FIR finite impulse response
  • the long-term predictor 140 has been generalized to an adaptive codebook, with the only difference being that when the pitch period is smaller than the subframe, some periodic repetition operations are performed.
  • the generalized long-term predictor 140 can represent either a straightforward FIR filter, or an adaptive codebook, thus covering most of the predictive speech codecs presently in use.
  • the bit de-multiplexer 105 also separates out a gain index GI and an excitation index CI from the input bit stream.
  • An excitation decoder 150 decodes the CI into an unsealed excitation signal, and also decodes the GI into the excitation gain. Then, it uses the excitation gain to scale the unsealed excitation signal to derive a scaled excitation gain signal uq(n), which can be considered a quantized version of the long-term prediction residual.
  • An adder 160 combines the output of the generalized long-term predictor 140 with the scaled excitation gain signal uq( ) to obtain a quantized version of a short- term prediction residual signal dq( ⁇ ).
  • An adder 170 combines the output of the short-term predictor 120 to dq(n) to obtain an output decoded speech signal sq( ⁇ ).
  • a feedback loop is formed by the generalized long-term predictor 140 and the adder 160 and can be regarded as a single filter, called a long-term synthesis filter 180.
  • another feedback loop is formed by the short term predictor 120 and the adder 170.
  • This other feedback loop can be considered a single filter called a short-term synthesis filter 190.
  • the long- term synthesis filter 180 and the short-term synthesis filter 190 combine to form a synthesis filter module 195.
  • the decoder 100 in FIG. 1 Unfortunately looses the indices LSPI, PPI, PPTI, GI, and CI, needed to decode the speech waveform in the current frame.
  • the decoded speech waveform immediately before the current frame is stored and analyzed.
  • a waveform-matching search similar to the approach of Goodman is performed, and the time lag and scaling factor for repeating the previously decoded speech waveform in the current frame are identified.
  • the time lag and scaling factor are sometimes modified as follows. If the analysis indicates that the stored previous waveform is not likely to be a segment of highly periodic voiced speech, and if the time lag for waveform repetition is smaller than a predetermined threshold, another search is performed for a suitable time lag greater than the predetermined threshold. The scaling factor is also updated accordingly.
  • the present invention copies the speech waveform one time lag earlier to fill the current frame, thus creating an extrapolated waveform.
  • the extrapolated waveform is then scaled with the scaling factor.
  • the present invention also calculates a number of samples of the ringing, or zero-input response, output from the synthesis filter module 195 from the beginning of the current frame. Due to the smoothing effect of the short-term synthesis filter 190, such a ringing signal will seem to flow smoothly from the decoded speech waveform at the end of the last frame.
  • the present invention then overlap-adds this ringing signal and the extrapolated speech waveform with a suitable overlap-add window in order to smoothly merge these two pieces of waveform. This technique will smooth out waveform discontinuity at the beginning of the current frame. At the same time, it avoids the additional delays created by G.711 Appendix I or the approach of Goodman.
  • the extrapolated speech signal is attenuated toward zero. Otherwise, it will create a tonal or buzzing sound.
  • the waveform envelope is attenuated linearly toward zero if the length of the frame erasure exceeds a certain threshold. The present invention then uses a memory-efficient method to implement this linear attenuation toward zero.
  • the present invention After the waveform extrapolation is performed in the erased frame, the present invention properly updates all the internal memory states of the filters within the speech decoder. If updating is not performed, there would be a large discontinuity and an audible glitch at the beginning of the next good frame. In updating the filter memory after a frame erasure, the present invention works backward from the output speech waveform. The invention sets the filter memory contents to be what they would have been at the end of the current frame, if the filtering operations of the speech decoder were done normally. That is, the filtering operations are performed with a special excitation such that the resulting synthesized output speech waveform is exactly the same as the extrapolated waveform calculated above.
  • the memory of the short-term synthesis filter 190 is simply the last M samples of the extrapolated speech signal for the current frame with the order reversed. This is because the short- term synthesis filter 190 in the conventional decoder 100 is an all-pole filter. The filter memory is simply the previous filter output signal samples in reverse order.
  • the present invention performs short- term prediction error filtering of the extrapolated speech signal of the current frame, with initial memory of the short-term predictor 120 set to the last M samples (in reverse order) of the output speech signal in the last frame.
  • the present invention After the first received good frame following a frame erasure, the present invention also attempts to correct filter memories within the long-term synthesis filter 180 and the short-term synthesis 190 filter if certain conditions are met.
  • the present invention first performs linear interpolation between the pitch period of the last good frame before the erasure and the pitch period of the first good frame after the erasure. Such linear interpolation of the pitch period is performed for each of the erased frames. Based on this linearly interpolated pitch contour, the present invention then re-extrapolates the long-term synthesis filter memory and re-calculates the short-term synthesis filter memory at the end of the last erased frame (i.e., before decoding the first good frame after the erasure).
  • FIG. 2 is a block diagram illustration of an exemplary embodiment of the present invention.
  • the decoder can be, for example, the decoder 100 shown in FIG. 1.
  • Also included in the embodiment of FIG. 2 is an input frame erasure flag switch 200. If the input frame erasure flag 200 indicates that the current frame received is a good frame, the decoder 100 performs the normal decoding operations as described above. If, however, the frame is the first good frame after a frame erasure, the long-term and short-term synthesis filter memories can be corrected before starting the normal decoding. When a good frame is received, the frame erasure flag switch 200 is in the upper position, and the decoded speech waveform sq( ⁇ ) is used as the output of the system.
  • the current frame of decoded speech sq( ⁇ ) is also passed to a module 201, which stores the previously decoded speech waveform samples in a buffer.
  • the current frame of decoded speech sq( ⁇ ) is used to update that buffer.
  • the remaining modules in FIG. 2 are inactive during a good frame.
  • the operation of the decoder 100 is halted and the frame erasure flag switch 200 is changes to the lower position.
  • the remaining modules of FIG. 2 then perform frame erasure concealment operations to produce the output speech waveform sq '( ) for the current frame, and also update the filter memories of the decoder 100 to prepare the decoder 100 for the normal decoding operations of the next received good frame.
  • the remaining modules of FIG. 2 work in the following way.
  • a module 201 calculates L samples of "ringing," or zero-input response, of the synthesis filter in FIG. 1.
  • a simpler approach is to use only the short-term synthesis filter 190, but a more effective approach (at least for voiced speech) is to use the ringing of the cascaded long-term and short-term synthesis filters 180 and 190. This is done in the following way. Starting with the memory of the synthesis filter (or filters) left in the delay line after the processing of the last frame, the filtering operations for L samples are performed while using a zero input signal to the filter.
  • the resulting L samples of the short-term synthesis filter output signal are simply called the "ringing" signal, r(n), n - ⁇ , 2, ..., L. Both ltr(n) and r(n) are stored for later
  • a module 202 analyzes the previously decoded speech waveform samples stored in the module 201 to determine a first time lag ppfel and an associated scaling factor ptfel for waveform extrapolation in the current frame. This can be done in a number of ways. One way, for example, uses the approaches outlined by Goodman et al. And discussed above. If there are multiple consecutive frames erased, the module 202 is active only at the first erased frame. From the second erased frame on, the time lag and scaling factor found in the first erased frame are used.
  • the present invention will typically usually just search for a "pitch period" in the general sense, as in a pitch-prediction-based speech codec. If the decoder 100 has a decoded pitch period of the last frame, and if it is deemed reliable, then the embodiment of FIG. 2 will simply search around the neighborhood of this pitch period pp to find a suitable time lag. If the decoder 100 does not provide a decoded pitch period, or if this pitch period is deemed unreliable, then the embodiment of FIG. 2 will perform a full-scale pitch estimation to get the desired time lag. In FIG. 2, it is assumed that such a decoded pitch period pp is indeed available and reliable. In this case, the embodiment of FIG. 2 operates as follows.
  • pplasl denote the pitch period of the last good frame before the frame erasure. If pplast is smaller than 10 ms (80 samples and 160 samples for 8 kHz and 16 kHz sampling rates, respectively), the module 202 uses it as the analysis window size K. If pplast is greater than 10 ms, the module 202 uses 10 ms as the analysis window size K. [0050] The module 202 then determines the pitch search range as follows. It subtracts 0.5 ms (4 samples and 8 samples for 8 kHz and 16 kHz sampling, respectively) from pplast, compares the result with the minimum allowed pitch period in the codec, and chooses the larger of the two as the lower bound of the search range, lb. It then adds 0.5 ms to pplast, compares the result with the maximum allowed pitch period in the codec, and chooses the smaller of the two as the upper bound of the search range, ub.
  • N f is the number of samples in a frame.
  • time lags lb, lb+ ⁇ , lb+2, ..., ub- ⁇ , ub
  • the odule 202 calculates the correlation value
  • module 202 finds the time lagy that maximizes
  • the time lag j that maximizes nc(J) is also the time lag within the search range that maximizes the pitch prediction gain for a single-tap pitch predictor. This is called the optimal time lag ppfel, which stands for pitch period foryrame erasure, 1 st version. In the extremely rare case where no c(j) in the search range is positive, ppfel is set to lb in this degenerate case. [0054] Once ppfel is identified, the associated scaling factor ptfel is calculated as follows.
  • Such a calculated scaling factor ptfel is then clipped to 1 if it is greater than 1 and clipped to -1 if it is less than -1. Also, in the degenerate case when the denominator on the right-hand side of the above equation is zero, ptfel is set to 0.
  • the module 202 performs the above calculation only for the first erased frame when there are multiple consecutive erased frames, it also attempts to modify the first time lag ppfe 1 at the second consecutively erased frame, depending on the pitch period contour at the good frames immediately before the erasure. Starting from the last good frame before the erasure, and going backward frame-by-frame for up to 4 frames, the module 202 compares the transmitted pitch period until there is a change in the transmitted pitch period. If there is no change in pitch period found during these 4 good frames before the erasure, then the first time lag ppfel found above at the first erased frame is also used for the second consecutively erased frame.
  • the first pitch change identified in the backward search above is examined to see if the change is relatively small. If the change is within 5%, then, depending on how many good frames back the pitch change is found, the amount of pitch period change per frame is calculated and is rounded to the nearest integer. The module 202 then adds this rounded pitch period change per frame, whether positive or negative, to the ppfel found above at the first erased frame. The resulting value is used as the first time lag ppfel for the second and subsequent consecutively erased frames. This modification of the first time lag after the second erased frame improves the speech quality on average.
  • the present invention uses a module 203 to distinguish between highly periodic voiced speech segments and other types of speech segments. If the module 203 determines that the decoded speech is in a highly periodic voiced speech region, it sets the periodic waveform extrapolation flag pwef to 1; otherwise, pwef is set to 0.
  • a module 204 will find a second, larger time lag ppfe2 greater than 10 ms to reduce or eliminate the buzz sound.
  • the module 203 uses ppfel as its input, the module 203 performs further analysis of the previously decoded speech sq(n) to determine the periodic waveform extrapolation flag pwef. Again, this can be done in many possible ways.
  • One exemplary method of determining the periodic waveform flag pwef is described below.
  • the module 203 calculates three signal features: signal gain relative to long-term average of input signal level, pitch prediction gain, and the first normalized autocorrelation coefficient. It then calculates a weighted sum of these three signal features, and compares the resulting figure of merit with a pre-determined threshold. If the threshold is exceeded, pwef is set to 1, otherwise it is set to 0. The mopdule 203 then performs special handling for extreme cases.
  • Ivl log 2 E ; otherwise, Ig is set to 0.
  • Ivl be the long-term average logarithmic gain of the active portion of the speech signal (that is, not counting the silence).
  • a separate estimator for input signal level can be employed to calculate Ivl.
  • An exemplary signal level estimator is disclosed in U.S. Provisional Application No. 60/312,794, filed August 17, 2001, entitled "Bit Error Concealment Methods for Speech Coding," and U.S. Provisional Application No.
  • the module 203 further calculates the first normalized autocorrelation coefficient
  • the present invention searches for a second time lag ppfe2 > T Q .
  • Two waveforms, one extrapolated using the first time lag ppfel, and the other extrapolated using the second time lag ppfe2 are added together and properly scaled, and the resulting waveform is used as the output speech of the current frame.
  • the present invention searches in the neighborhood of the first integer multiple of ppfel that is no smaller than T Q .
  • T Q the flag pwef should have been 1 and is misclassified as 0
  • an integer multiple of the true pitch period will be chosen as the second time lag ppfe2 for periodic waveform extrapolation.
  • the module 204 sets w, , the lower bound of the time lag search range, to m x ppfel - 3 or T 0 , whichever is larger.
  • the module 204 calculates
  • cor(j) ⁇ sq(n)sq(n - j)
  • the module 205 extrapolates speech waveform for the current erased frame based on the first time lag ppfel. It first extrapolates the first L samples of speech in the current frame using the first time lag ppfel and the corresponding scaling factor ptfel. A suitable value of L is 8 samples. The extrapolation of the first L samples of the current frame can be expressed as
  • the module 205 smoothly merges the sq(n) signal extrapolated above with r(n), the ringing of the synthesis filter calculated in module 206, using the overlap-add method below.
  • the module 205 After the first L samples of the current frame are extrapolated and overlap-added, the module 205 then extrapolates the remaining samples of the current frame. If ppfel ⁇ N f , the extrapolation is performed as
  • a module 207 extrapolates speech waveform for the current erased frame based on the second time lag ppfe2. Its output extrapolated speech waveform sq 2 ( ) is given by
  • the resulting waveform is passed to the module 210.
  • the module 210 starts waveform attenuation at the instant when the frame erasure has lasted for 20 ms. From there, the envelope of the extrapolated waveform is attenuated linearly toward zero and the waveform magnitude reaches zero at 60 ms into the erasure of consecutive frames. After 60 ms, the output is completely muted. See FIG. 3 (a) for a waveform attenuation window that implements this attenuation strategy.
  • the preferred embodiment of the present invention is used with a noise feedback codec that has a frame size of 5 ms.
  • the time interval between each adjacent pair of vertical lines in FIG. 3 (a) represent a frame.
  • the module 210 applies the waveform attenuation window frame-by-frame without any additional buffering. However, starting from the sixth consecutive erased frame (from 25 ms on in FIG. 3), the module 210 cannot directly apply the corresponding section of the window for that frame in FIG. 3 (a). A waveform discontinuity will occur at the frame boundary, because the corresponding section of the attenuation window starts from a value less than unity (7/8, 6/8, 5/8, etc.). This will cause a sudden decrease of waveform sample value at the beginning of the frame, and thus an audible waveform discontinuity.
  • Such normalized attenuation window for each frame is shown in FIG. 3 (b).
  • the present invention Rather than storing every sample in the normalized attenuation window in FIG. 3 (b), the present invention simply stores the decrement between adjacent samples of the window for each of the eight window sections for fifth to twelfth frame. This decrement is the amount of total decline of the window function in each frame (1/8 for the fifth erased frame, 1/7 for the sixth erased frame, and so on), divided by N f , the number of speech samples in a frame.
  • the module 210 does not need to perform any waveform attenuation operation. If the frame erasure has lasted for more than 20 ms, then the module 210 applies the appropriate section of the normalized waveform attenuation window in FIG. 3 (b), depending on how many consecutive frames have been erased so far. For example, if the current frame is the sixth consecutive frame that is erased, then the module 210 applies the section of the window from 25 ms to 30 ms (with window function from 1 to 6/7). Since the normalized waveform attenuation window for each frame always starts with unity, the windowing operation will not cause any waveform discontinuity at the beginning of the frame.
  • the normalized window function is not stored; instead, it is calculated on the fly.
  • the module 210 multiplies the first waveform sample of the current frame by 1, and then reduces the window function value by the decrement value calculated and stored beforehand, as mentioned above. It then multiplies the second waveform sample by the resulting decremented window function value.
  • the window function value is again reduced by the decrement value, and the result is used to scale the third waveform sample of the frame. This process is repeated for all samples of the extrapolated waveform in the current frame.
  • the output of the module 210 that is, sq '( ⁇ ) for the current erased frame, is passed through the switch 200 and becomes the final output speech for the current erased frame.
  • the current frame of sq '( ⁇ ) is passed to the module 201 to update the current frame portion of the sq( ⁇ ) speech buffer stored there.
  • This signal is also passed to a module 211 to update the memory, or internal states, of the filters inside the decoder 100.
  • a module 211 to update the memory, or internal states, of the filters inside the decoder 100.
  • Such a filter memory update is performed in order to ensure that the filter memory is consistent with the extrapolated speech waveform in the current erased frame. This is necessary for a smooth transition of speech waveform at the beginning of the next frame, if the next frame turns out to be a good frame. If the filter memory were frozen without such proper update, then generally there would be audible glitch or disturbance at the beginning of the next good frame.
  • the short-term predictor is of order M
  • the updated memory is simply the last M samples of the extrapolated speech signal for the current erased frame, but with the order reversed.
  • Let stsm(k) be the A th memory value of the short-term synthesis filter, or the value stored in the delay line corresponding to the k-t . short-term predictor coefficient a k . Then, the memory of the short-term synthesis filter 190 is updated as
  • the module 211 extrapolates the long-term synthesis filter memory based on the first time lag ppfel , using procedures similar to speech waveform extrapolation performed at the module 205.
  • the module 211 first extrapolates the first L samples of ltsm(n) in the current frame
  • this extrapolated filter memory is overlap-added with the ringing of the long-term synthesis filter calculated in the module 201 :
  • the module 211 After the first L samples of the current frame are extrapolated and overlap-added, the module 211 then extrapolates the remaining samples of the current frame. If ppfel > N f , the extrapolation is performed as
  • moving-average (MA) predictive coding is used to quantize both the Line-Spectrum Pair (LSP) parameters and the excitation gain.
  • LSP Line-Spectrum Pair
  • the predictive coding schemes for these parameters work as follows. For each parameter, the long-term mean value of that parameter is calculated off-line and subtracted from the unquantized parameter value. The predicted value of the mean-removed parameter is then subtracted from this mean- removed parameter value. A quantizer quantizes the resulting prediction error. The output of the quantizer is used as the input to the MA predictor. The predicted parameter value and the long-term mean value are both added back to the quantizer output value to reconstruct a final quantized parameter value.
  • the predictor memory in the predictive LSP quantizer can be updated as follows.
  • the predicted value for the k-th LSP parameter is calculated as the inner product of the predictor coefficient array and the predictor memory array for the k-t LSP parameter).
  • This predicted value and the long-term mean value of the k-t LSP are subtracted from the A th LSP parameter value at the last frame.
  • the resulting value is used to update the newest memory location for the predictor of the k-t LSP parameter (after the original set of predictor memory is shifted by one memory location, as is well-known in the art). This procedure is repeated for all the LSP parameters (there are M of them).
  • the memory update for the gain predictor is essentially the same as the memory update for the LSP predictors described above.
  • the predicted value of log-gain is calculated (by calculating the inner product of the predictor coefficient array and the predictor memory array for the log- gain). This predicted log-gain and the long-term mean value of the log-gain are then subtracted from the log-gain value of the last frame. The resulting value is used to update the newest memory location for the log-gain predictor (after the original set of predictor memory is shifted by one memory location, as is well-known in the art).
  • the output speech is zeroed out, and the base-2 log-gain is assumed to be at an artificially set default silence level of 0. Again, the predicted log-gain and the long-term mean value of log-gain are subtracted from this default level of 0, and the resulting value is used to update the newest memory location for the log-gain predictor.
  • the frame erasure lasts more than 20 ms but does not exceed 60 ms, then updating the predictor memory for the predictive gain quantizer may be challenging, because the extrapolated speech waveform is attenuated using the waveform attenuation window of FIG. 3.
  • the log-gain predictor memory is updated based on the log-gain value of the waveform attenuation window in each frame.
  • a correction factor is calculated from the log-gain of the last frame based on the attenuation window of FIG. 3, and the correction factor is stored.
  • the following algorithm calculates these 8 correction factors, or log-gain attenuation factors.
  • the above algorithm calculates the base-2 log-gain value of the waveform attenuation window for a given frame, and then determines the difference between this value and a similarly calculated log-gain for the window of the previous frame, compensated for the normalization of the start of the window to unity for each frame.
  • the log- gain predictor memory update for frame erasure lasting 20 ms to 60 ms becomes straightforward. If the current erased frame is the y ' -th frame into frame erasure (4 ⁇ / ⁇ 12), lga(j-4) is subtracted from the log-gain value of the last frame. From the result of this subtraction, the predicted log-gain and the long-term mean value of log-gain are further subtracted, and the resulting value is used to update the newest memory location for the log-gain predictor.
  • the decoder 100 uses these values to update the memories and of its short-term synthesis filter 190, long-term synthesis filter 180, LSP predictor, and gain predictor, in preparation for the decoding of the next frame, assuming the next frame will be received intact.
  • the frame erasure concealment scheme described above can be used as is, and it will provide significant speech quality improvement compared with applying no concealment. So far, essentially all the frame erasure concealment operations are performed during erased frames.
  • the present invention has an optional feature that improves speech quality by performing "filter memory correction" at the first received good frame after the erasure.
  • the short-term synthesis filter memory and the long-term synthesis filter memory are updated in the module 211 based on waveform extrapolation. After the frame erasure is over, at the first received good frame after the erasure, there will be a mismatch between such filter memory in the decoder and the corresponding filter memory in the encoder. Very often the difference is mainly due to the difference between the pitch period (or time lag) used for waveform extrapolation during erased frame and the pitch period transmitted by the encoder. Such filter memory mismatch often causes audible distortion even after the frame erasure is over.
  • the pitch period is typically held constant or nearly constant. If the pitch period is instantaneously quantized (i.e. without using inter-frame predictive coding), and if the frame erasure occurs in a voiced speech segment with a smooth pitch contour, then, linearly interpolating between the transmitted pitch periods of the last good frame before erasure and the first good frame after erasure often provides a better approximation of the transmitted pitch period contour than holding the pitch period constant during erased frames. Therefore, if the synthesis filter memory is re-calculated or corrected at the first good frame after erasure, based on linearly interpolated pitch period over the erased frames, better speech quality can often be obtained.
  • the long-term synthesis filter memory is corrected in the following way at the first good frame after the erasure.
  • the received pitch period at the first good frame and the received pitch period at the last good frame before the erasure are used to perform linear interpolation of the pitch period over the erased frames. If an interpolated pitch period is not an integer, it is rounded off to the nearest integer.
  • the long-term synthesis filter memory is "re-extrapolated" frame-by-frame based on the linearly interpolated pitch period in each erased frame, until the end of the last erased frame is reached. For simplicity, a scaling factor of 1 may be used for the extrapolation of the long-term synthesis filter. After such re-extrapolation, the long-term synthesis filter memory is corrected.
  • the short-term synthesis filter memory may be corrected in a similar way, by re-extrapolating the speech waveform frame-by-frame, until the end of the last erased frame is reached. Then, the last M samples of the re- extrapolated speech waveform at the last erased frame, with the order reversed, will be the corrected short-term synthesis filter memory.
  • Another simpler way to correct the short-term synthesis filter 1 memory is to estimate the waveform offset between the original extrapolated waveform and the re-extrapolated waveform, without doing the re-extrapolation. This method is described below.
  • this waveform offset indicates that the re-extrapolated speech waveform based on interpolated pitch period is delayed by X samples relative to the original extrapolated speech waveform at the end of the last erased frame
  • the short-term synthesis filter memory can be corrected by taking the M consecutive samples of the original extrapolated speech waveform that are X samples away from the end of the last erased frame, and then reversing the order. If, on the other hand, the waveform offset calculated above indicates that the original extrapolated speech waveform is delayed by X samples relative to the re-extrapolated speech waveform (if such re- extrapolation were ever done), then the short-term synthesis filter memory correction would need to use certain speech samples that are not extrapolated yet.
  • the original extrapolation for X more samples can be extended, and the last M samples can be taken with their order reversed.
  • the system can move back one pitch cycle, and use the M consecutive samples (with order reversed) of the original extrapolated speech waveform that are (ppfel - X) samples away from the end of the last erased frame, where ppfel is the time lag used for original extrapolation of the last erased frame, and assuming ppfel > X.
  • One potential issue of such filter memory correction is that the re- extrapolation generally results in a waveform shift or offset; therefore, upon decoding the first good frame after an erasure, there may be a waveform discontinuity at the beginning of the frame.
  • this overlap-add method may not be able to eliminate the audible glitch at the beginning of the first good frame after an erasure. In this case, it is better not to correct the synthesis filter memory unless the time scaling or gradual elimination of waveform offset mentioned above can be used.
  • FIG. 4 An example of such a computer system 400 is shown in FIG. 4.
  • all of the elements depicted in FIGs. 1 and 2, for example, can execute on one or more distinct computer systems 400, to implement the various methods of the present invention.
  • the computer system 400 includes one or more processors, such as a processor 404.
  • the processor 404 can be a special purpose or a general purpose digital signal processor and it's connected to a communication infrastructure 406 (for example, a bus or network).
  • a communication infrastructure 406 for example, a bus or network.
  • the computer system 400 also includes a main memory 408, preferably random access memory (RAM), and may also include a secondary memory 410.
  • the secondary memory 410 may include, for example, a hard disk drive 412 and/or a removable storage drive 414, representing a floppy disk drive, a magnetic tape drive, an optical disk drive, etc.
  • the removable storage drive 414 reads from and/or writes to a removable storage unit 418 in a well known manner.
  • the removable storage unit 418 represents a floppy disk, magnetic tape, optical disk, etc. which is read by and written to by removable storage drive 414.
  • the removable storage unit 418 includes a computer usable storage medium having stored therein computer software and/or data.
  • the secondary memory 410 may include other similar means for allowing computer programs or other instructions to be loaded into the computer system 400.
  • Such means may include, for example, a removable storage unit 422 and an interface 420. Examples of such means may include a program cartridge and cartridge interface (such as that found in video game devices), a removable memory chip (such as an EPROM, or PROM) and associated socket, and the other removable storage units 422 and the interfaces 420 which allow software and data to be transferred from the removable storage unit 422 to the computer system 400.
  • the computer system 400 may also include a communications interface 424. The communications interface 424 allows software and data to be transferred between the computer system 400 and external devices.
  • Examples of the communications interface 424 may include a modem, a network interface (such as an Ethernet card), a communications port, a PCMCIA slot and card, etc.
  • Software and data transferred via the communications interface 424 are in the form of signals 428 which may be electronic, electromagnetic, optical or other signals capable of being received by the communications interface 424. These signals 428 are provided to the communications interface 424 via a communications path 426.
  • the communications path 426 carries the signals 428 and may be implemented using wire or cable, fiber optics, a phone line, a cellular phone link, an RF link and other communications channels.
  • “computer usable medium” are used to generally refer to media such as the removable storage drive 414, a hard disk installed in the hard disk drive 412, and the signals 428. These computer program products are means for providing software to the computer system 400.
  • Computer programs are stored in the main memory 408 and/or the secondary memory 410. Computer programs may also be received via the communications interface 424. Such computer programs, when executed, enable the computer system 400 to implement the present invention as discussed herein.
  • the computer programs when executed, enable the processor 404 to implement the processes of the present invention. Accordingly, such computer programs represent controllers of the computer system 400.
  • the processes/methods performed by signal processing blocks of encoders and/or decoders can be performed by computer control logic.
  • the software may be stored in a computer program product and loaded into the computer system 400 using the removable storage drive 414, the hard drive 412 or the communications interface 424.
  • features of the invention are implemented primarily in hardware using, for example, hardware components such as Application Specific Integrated Circuits (ASICs) and gate arrays.
  • ASICs Application Specific Integrated Circuits
  • gate arrays gate arrays.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

A method and system are provided for synthesizing a number of corrupted frames output from a decoder (100) including one or more predictive filters. The corrupted frames are representative of one segment of a decoded signal (sq(n)) output from the decoder. The method comprises (202) determining a first preliminary time lag (ppfe1) based upon examining a predetermined number of samples of another segment of the decoded signal and determining a scaling factor (ptfe) associated with the examined number of samples when the first preliminary time lag (ppfe1) is determined. The method also comprises extrapolating one or more replacement frames based upon the first preliminary time lag (ppfe1) and the scaling factor (ptfe).

Description

IMPROVED FRAME ERASURE CONCEALMENT FOR PREDICTIVE SPEECH CODING BASED ON EXTRAPOLATION OF SPEECH
WAVEFORM
BACKGROUND OF THE INVENTION
Field of the Invention
[0001] The present invention relates to digital communications. More particularly, the present invention relates to the enhancement of speech quality when frames of a compressed bit stream representing a speech signal are lost within the context of a digital communications system.
Background Art
[0002] In speech coding, sometimes called voice compression, a coder encodes an input speech or audio signal into a digital bit stream for transmission. A decoder decodes the bit stream into an output speech signal. The combination of the coder and the decoder is called a codec. The transmitted bit stream is usually partitioned into frames. In wireless or packet networks, sometimes frames of transmitted bits are lost, erased, or corrupted. This condition is called frame erasure in wireless communications. The same condition of erased frames can happen in packet networks due to packet loss. When frame erasure happens, the decoder cannot perform normal decoding operations since there are no bits to decode in the lost frame. During erased frames, the decoder needs to perform frame erasure concealment (FEC) operations to try to conceal the quality-degrading effects of the frame erasure.
[0003] One of the earliest FEC techniques is waveform substitution based on pattern matching, as proposed by Goodman, et al. in "Waveform Substitution Techniques for Recovering Missing Speech Segments in Packet Voice Communications", IEEE Transaction on Acoustics, Speech and Signal Processing, December 1986, pp. 1440 - 1448. This scheme was applied to Pulse Code Modulation (PCM) speech codec that performs sample-by-sample instantaneous quantization of speech waveform directly. This FEC scheme uses a piece of decoded speech waveform immediately before the lost frame as the template, and slides this template back in time to find a suitable piece of decoded speech waveform that maximizes some sort of waveform similarity measure (or minimizes a waveform difference measure).
[0004] Goodman's FEC scheme then uses the section of waveform immediately following a best-matching waveform segment as the substitute waveform for the lost frame. To eliminate discontinuities at frame boundaries, the scheme also uses a raised cosine window to perform an overlap-add technique between the correctly decoded waveform and the substitute waveform. This overlap-add technique increases the coding delay. The delay occurs because at the end of each frame, there are many speech samples that need to be overlap-added to obtain the final values, and thus cannot be played out until the next frame of speech is decoded.
[0005] Based on the work of Goodman above, David Kapilow developed a more sophisticated version of an FEC scheme for G.711 PCM codec. This FEC scheme is described in Appendix I of the ITU-T Recommendation G.71 1. However, both the FEC of Goodman and the FEC scheme of Kapilow are limited to PCM codecs with instantaneous quantization.
[0006] For speech coding, the most popular type of speech codec is based on predictive coding. Perhaps the first publicized FEC scheme for a predictive codec is a "bad frame masking" scheme in the original TIA IS-54 VSELP standard for North American digital cellular radio (rescinded in September 1996). Here, upon detection of a bad frame, the scheme repeats the linear prediction parameters of the last frame. This scheme derives the speech energy parameter for the current frame by either repeating or attenuating the speech energy parameter of last frame, depending on how many consecutive bad frames have been counted. For the excitation signal (or quantized prediction residual), this scheme does not perform any special operation. It merely decodes the excitation bits, even though they might contain a large number of bit errors. [0007] The first FEC scheme for a predictive codec that performs waveform substitution in the excitation domain is probably the FEC system developed by Chen for the ITU-T Recommendation G.728 Low-Delay Code Excited Linear Predictor (CELP) codec, as described in United States Patent No. 5,615,298 issued to Chen, titled "Excitation Signal Synthesis During Frame Erasure or Packet Loss." In this approach, during erased frames, the speech excitation signal is extrapolated depending on whether the last frame is a voiced or an unvoiced frame. If it is voiced, the excitation signal is extrapolated by periodic repetition. If it is unvoiced, the excitation signal is extrapolated by randomly repeating small segments of speech waveform in the previous frame, while ensuring the average speech power is roughly maintained.
[0008] What is needed therefore is an FEC technique that avoids the noted deficiencies associated with the conventional decoders. For example, what is needed is an FEC technique that avoids the increased delay created in the overlap-add operation of Goodman's approach. What is also needed is an FEC technique that can ensure the smooth reproduction of a speech or audio waveform when the next good frame is received.
BRIEF SUMMARY OF THE INVENTION
[0009] Consistent with the principles of the present invention as embodied and broadly described herein, an exemplary FEC technique includes a method of synthesizing a number of corrupted frames output from a decoder including one or more predictive filters. The corrupted frames are representative of one segment of a decoded signal (sq(n)) output from the decoder. The method comprises determining a first preliminary time lag (ppfel) based upon examining a predetermined number (K) of samples of another segment of the decoded signal and determining a scaling factor (ptfe) associated with the examined number (K) of samples when the first preliminary time lag (ppfel) is determined. The method also comprises extrapolating one or more replacement frames based upon the first preliminary time lag (ppfel) and the scaling factor (ptfe). [0010] Further embodiments, features, and advantages of the present invention, as well as the structure and operation of the various embodiments of the present invention, are described in detail below with reference to the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS/FIGURES
[0011] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate an embodiment of the invention and, together with the description, explain the purpose, advantages, and principles of the invention. In the drawings: [0012] FIG. 1 is a block diagram illustration of a conventional predictive decoder; [0013] FIG. 2 is a block diagram illustration of an exemplary decoder constructed and arranged in accordance with the present invention; [0014] FIG. 3(a) is a plot of an exemplary unnormalized waveform attenuation window functioning in accordance with the present invention; [0015] FIG. 3(b) is a plot of an exemplary normalized waveform attenuation window functioning in accordance with the present invention; and [0016] FIG. 4 is a block diagram of an exemplary computer system on which the present invention can be practiced.
DETAILED DESCRIPTION OF INVENTION
[0017] The following detailed description of the present invention refers to the accompanying drawings that illustrate exemplary embodiments consistent with this invention. Other embodiments are possible, and modifications may be made to the embodiments within the spirit and scope of the present invention. Therefore, the following detailed description is not meant to limit the invention. Rather, the scope of the invention is defined by the appended claims. [0018] It would be apparent to one of skill in the art that the present invention, as described below, may be implemented in many different embodiments of hardware, software, firmware, and/or the entities illustrated in the drawings. Any actual software code with specialized control hardware to implement the present invention is not limiting of the present invention. Thus, the operation and behavior of the present invention will be described with the understanding that modifications and variations of the embodiments are possible, given the level of detail presented herein. Before describing the invention in detail, it is helpful to describe an exemplary environment in which the invention may be implemented.
[0019] The present invention is particularly useful in the environment of the decoder of a predictive speech codec to conceal the quality-degrading effects of frame erasure or packet loss. FIG. 1 illustrates such an environment. The general principles of the invention can be used in any linear predictive codec, although the preferred embodiment described later is particularly well suited for a specific type of predictive decoder.
[0020] The invention is an FEC technique designed for predictive coding of speech. One characteristic that distinguishes it from the techniques mentioned above, is that it performs waveform substitution in the speech domain rather than the excitation domain. It also performs special operations to update the internal states, or memories, of predictors and filters inside the predictive decoder to ensure maximally smooth reproduction of speech waveform when the next good frame is received.
[0021] The present invention also avoids the additional delay associated with the overlap-add operation in Goodman's approach and in ITU-T G.711 Appendix I. This is achieved by performing overlap-add between extrapolated speech waveform and the ringing, or zero-input response of the synthesis filter. Other features include a special algorithm to minimize buzzing sounds during waveform extrapolation, and an efficient method to implement a linearly decreasing waveform envelope during extended frame erasure. Finally, the associated memories within the log-gain predictor are updated. [0022] The present invention is not restricted to a particular speech codec.
Instead, it's generally applicable to predictive speech codecs, including, but not limited to, Adaptive Predictive Coding (APC), Multi-Pulse Linear Predictive Coding (MPLPC), CELP, and Noise Feedback Coding (NFC), etc.
[0023] Before discussing the principles of the invention, a description of a conventional decoder of a standard predictive codec is needed. FIG. 1 is a block diagram illustration of a conventional predictive decoder 100. The decoder 100 shown in FIG. 1 can be used to describe the decoders of APC, MPLPC, CELP, and NFC speech codecs. The more sophisticated versions of the codecs associated with predictive decoders typically use a short-term predictor to exploit the redundancy among adjacent speech samples and a long-term predictor to exploit the redundancy between distant samples due to pitch periodicity of, for example, voiced speech.
[0024] The main information transmitted by these codecs is the quantized version of the prediction residual signal after short-term and long-term prediction. This quantized residual signal is often called the excitation signal, because it is used in the decoder to excite the long-term and short-term synthesis filter to produce the output decoded speech. In addition to the excitation signal, several other speech parameters are also transmitted as side information frame-by-frame or subframe-by-subframe.
[0025] An exemplary range of lengths for each frame (called frame size) is 5 ms to 40 ms, with 10 ms and 20 ms as the two most popular frame sizes for speech codecs. Each frame usually contains a few equal-length subframes. The side information of these predictive codecs typically includes spectral envelope information (in the form of the short-term predictor parameters), pitch period, pitch predictor taps (both long-term predictor parameters), and excitation gain.
[0026] In FIG. 1, the conventional decoder 100 includes a bit de-multiplexer
105. The de-multiplexer 105 separates the bits in each received frame of bits into codes for the excitation signal and codes for short-term predictor, long- term predictor, and the excitation gain. [0027] The short-term predictor parameters, often referred to as the linear predictive coding (LPC) parameters, are usually transmitted once a frame. There are many alternative parameter sets that can be used to represent the same spectral envelope information. The most popular of these is the line- spectrum pair (LSP) parameters, sometimes called line-spectrum frequency (LSF) parameters. In FIG. 1, LSPI represents the transmitted quantizer codebook index representing the LSP parameters in each frame. A short-term predictive parameter decoder 110 decodes LSPI into an LSP parameter set and then converts the LSP parameters to the coefficients for the short-term predictor. These short-term predictor coefficients are then used to control the coefficient update of a short-term predictor 120.
[0028] Pitch period is defined as the time period at which a voiced speech waveform appears to be repeating itself periodically at a given moment. It is usually measured in terms of a number of samples, is transmitted once a subframe, and is used as the bulk delay in long-term predictors. Pitch taps are the coefficients of the long-term predictor. The bit de-multiplexer 105 also separates out the pitch period index (PPI) and the pitch predictor tap index (PPTT), from the received bit stream. A long-term predictive parameter decoder 130 decodes PPI into the pitch period, and decodes the PPTI into the pitch predictor taps. The decoded pitch period and pitch predictor taps are then used to control the parameter update of a generalized long-term predictor 140.
[0029] In its simplest form, the long-term predictor 140 is just a finite impulse response (FIR) filter, typically first order or third order, with a bulk delay equal to the pitch period. However, in some variations of CELP and MPLPC codecs, the long-term predictor 140 has been generalized to an adaptive codebook, with the only difference being that when the pitch period is smaller than the subframe, some periodic repetition operations are performed. The generalized long-term predictor 140 can represent either a straightforward FIR filter, or an adaptive codebook, thus covering most of the predictive speech codecs presently in use.
[0030] The bit de-multiplexer 105 also separates out a gain index GI and an excitation index CI from the input bit stream. An excitation decoder 150 decodes the CI into an unsealed excitation signal, and also decodes the GI into the excitation gain. Then, it uses the excitation gain to scale the unsealed excitation signal to derive a scaled excitation gain signal uq(n), which can be considered a quantized version of the long-term prediction residual. An adder 160 combines the output of the generalized long-term predictor 140 with the scaled excitation gain signal uq( ) to obtain a quantized version of a short- term prediction residual signal dq(ή). An adder 170 combines the output of the short-term predictor 120 to dq(n) to obtain an output decoded speech signal sq(ή).
[0031] A feedback loop is formed by the generalized long-term predictor 140 and the adder 160 and can be regarded as a single filter, called a long-term synthesis filter 180. Similarly, another feedback loop is formed by the short term predictor 120 and the adder 170. This other feedback loop can be considered a single filter called a short-term synthesis filter 190. The long- term synthesis filter 180 and the short-term synthesis filter 190 combine to form a synthesis filter module 195.
[0032] In summary, the conventional predictive decoder 100 depicted in FIG.
1 decodes the parameters of the short-term predictor 120 and the long-term predictor 140, the excitation gain, and the unsealed excitation signal. It then scales the unsealed excitation signal with the excitation gain, and passes the resulting scaled excitation signal uq(n) through the long-term synthesis filter 180 and the short-term synthesis filter 190 to derive the output decoded speech signal sq(n).
[0033] When a frame of input bits is erased due to fading in a wireless transmission or due to packet loss in packet networks, the decoder 100 in FIG. 1 unfortunately looses the indices LSPI, PPI, PPTI, GI, and CI, needed to decode the speech waveform in the current frame.
[0034] According to the principles of the present invention, the decoded speech waveform immediately before the current frame is stored and analyzed. A waveform-matching search, similar to the approach of Goodman is performed, and the time lag and scaling factor for repeating the previously decoded speech waveform in the current frame are identified. [0035] Next, to avoid the occasional buzz sounds due to repeating a waveform at a small time lag when the speech is not highly periodic, the time lag and scaling factor are sometimes modified as follows. If the analysis indicates that the stored previous waveform is not likely to be a segment of highly periodic voiced speech, and if the time lag for waveform repetition is smaller than a predetermined threshold, another search is performed for a suitable time lag greater than the predetermined threshold. The scaling factor is also updated accordingly.
[0036] Once the time lag and scaling factor have been determined, the present invention copies the speech waveform one time lag earlier to fill the current frame, thus creating an extrapolated waveform. The extrapolated waveform is then scaled with the scaling factor. The present invention also calculates a number of samples of the ringing, or zero-input response, output from the synthesis filter module 195 from the beginning of the current frame. Due to the smoothing effect of the short-term synthesis filter 190, such a ringing signal will seem to flow smoothly from the decoded speech waveform at the end of the last frame. The present invention then overlap-adds this ringing signal and the extrapolated speech waveform with a suitable overlap-add window in order to smoothly merge these two pieces of waveform. This technique will smooth out waveform discontinuity at the beginning of the current frame. At the same time, it avoids the additional delays created by G.711 Appendix I or the approach of Goodman.
[0037] If the frame erasure has persisted for an extended period of time, the extrapolated speech signal is attenuated toward zero. Otherwise, it will create a tonal or buzzing sound. In the present invention, the waveform envelope is attenuated linearly toward zero if the length of the frame erasure exceeds a certain threshold. The present invention then uses a memory-efficient method to implement this linear attenuation toward zero.
[0038] After the waveform extrapolation is performed in the erased frame, the present invention properly updates all the internal memory states of the filters within the speech decoder. If updating is not performed, there would be a large discontinuity and an audible glitch at the beginning of the next good frame. In updating the filter memory after a frame erasure, the present invention works backward from the output speech waveform. The invention sets the filter memory contents to be what they would have been at the end of the current frame, if the filtering operations of the speech decoder were done normally. That is, the filtering operations are performed with a special excitation such that the resulting synthesized output speech waveform is exactly the same as the extrapolated waveform calculated above.
[0039] As an example, if the short-term predictor 120 is of an order M, then the memory of the short-term synthesis filter 190, after the FEC operation for the current frame, is simply the last M samples of the extrapolated speech signal for the current frame with the order reversed. This is because the short- term synthesis filter 190 in the conventional decoder 100 is an all-pole filter. The filter memory is simply the previous filter output signal samples in reverse order.
[0040] An example of updating the memory of the FIR long-term predictor
140 will be presented. In this example, the present invention performs short- term prediction error filtering of the extrapolated speech signal of the current frame, with initial memory of the short-term predictor 120 set to the last M samples (in reverse order) of the output speech signal in the last frame.
[0041] Similarly, if quantizers for side information (such as LSP and excitation gain) use inter-frame predictive coding, then the memories of those predictors are also updated based on the same principle to minimize the discontinuity of decoded speech parameters at the next good frame.
[0042] After the first received good frame following a frame erasure, the present invention also attempts to correct filter memories within the long-term synthesis filter 180 and the short-term synthesis 190 filter if certain conditions are met. Conceptually, the present invention first performs linear interpolation between the pitch period of the last good frame before the erasure and the pitch period of the first good frame after the erasure. Such linear interpolation of the pitch period is performed for each of the erased frames. Based on this linearly interpolated pitch contour, the present invention then re-extrapolates the long-term synthesis filter memory and re-calculates the short-term synthesis filter memory at the end of the last erased frame (i.e., before decoding the first good frame after the erasure).
[0043] The general principles of the present invention outlined above are applicable to almost any predictive speech decoder. What will be described in greater detail below is a particular implementation of those general principles, in a preferred embodiment of the present invention applied to the decoder of a two-stage noise feedback codec.
[0044] FIG. 2 is a block diagram illustration of an exemplary embodiment of the present invention. The decoder can be, for example, the decoder 100 shown in FIG. 1. Also included in the embodiment of FIG. 2 is an input frame erasure flag switch 200. If the input frame erasure flag 200 indicates that the current frame received is a good frame, the decoder 100 performs the normal decoding operations as described above. If, however, the frame is the first good frame after a frame erasure, the long-term and short-term synthesis filter memories can be corrected before starting the normal decoding. When a good frame is received, the frame erasure flag switch 200 is in the upper position, and the decoded speech waveform sq(ή) is used as the output of the system. Furthermore, the current frame of decoded speech sq(ή) is also passed to a module 201, which stores the previously decoded speech waveform samples in a buffer. The current frame of decoded speech sq(ή) is used to update that buffer. The remaining modules in FIG. 2 are inactive during a good frame.
[0045] On the other hand, if the input frame erasure flag switch 200 indicates that the current frame was not received, was erased, or was corrupted, then the operation of the decoder 100 is halted and the frame erasure flag switch 200 is changes to the lower position. The remaining modules of FIG. 2 then perform frame erasure concealment operations to produce the output speech waveform sq '( ) for the current frame, and also update the filter memories of the decoder 100 to prepare the decoder 100 for the normal decoding operations of the next received good frame. The remaining modules of FIG. 2 work in the following way.
[0046] A module 201 calculates L samples of "ringing," or zero-input response, of the synthesis filter in FIG. 1. A simpler approach is to use only the short-term synthesis filter 190, but a more effective approach (at least for voiced speech) is to use the ringing of the cascaded long-term and short-term synthesis filters 180 and 190. This is done in the following way. Starting with the memory of the synthesis filter (or filters) left in the delay line after the processing of the last frame, the filtering operations for L samples are performed while using a zero input signal to the filter. The resulting L samples of the long-term synthesis filter output signal form the desired "long-term filter ringing" signal, ltr( ), n =1, 2, ..., L. The resulting L samples of the short-term synthesis filter output signal are simply called the "ringing" signal, r(n), n - \, 2, ..., L. Both ltr(n) and r(n) are stored for later use.
[0047] A module 202 analyzes the previously decoded speech waveform samples stored in the module 201 to determine a first time lag ppfel and an associated scaling factor ptfel for waveform extrapolation in the current frame. This can be done in a number of ways. One way, for example, uses the approaches outlined by Goodman et al. And discussed above. If there are multiple consecutive frames erased, the module 202 is active only at the first erased frame. From the second erased frame on, the time lag and scaling factor found in the first erased frame are used.
[0048] The present invention will typically usually just search for a "pitch period" in the general sense, as in a pitch-prediction-based speech codec. If the decoder 100 has a decoded pitch period of the last frame, and if it is deemed reliable, then the embodiment of FIG. 2 will simply search around the neighborhood of this pitch period pp to find a suitable time lag. If the decoder 100 does not provide a decoded pitch period, or if this pitch period is deemed unreliable, then the embodiment of FIG. 2 will perform a full-scale pitch estimation to get the desired time lag. In FIG. 2, it is assumed that such a decoded pitch period pp is indeed available and reliable. In this case, the embodiment of FIG. 2 operates as follows.
[0049] Let pplasl denote the pitch period of the last good frame before the frame erasure. If pplast is smaller than 10 ms (80 samples and 160 samples for 8 kHz and 16 kHz sampling rates, respectively), the module 202 uses it as the analysis window size K. If pplast is greater than 10 ms, the module 202 uses 10 ms as the analysis window size K. [0050] The module 202 then determines the pitch search range as follows. It subtracts 0.5 ms (4 samples and 8 samples for 8 kHz and 16 kHz sampling, respectively) from pplast, compares the result with the minimum allowed pitch period in the codec, and chooses the larger of the two as the lower bound of the search range, lb. It then adds 0.5 ms to pplast, compares the result with the maximum allowed pitch period in the codec, and chooses the smaller of the two as the upper bound of the search range, ub.
[0051] The sq(ή) buffer in the module 201 stores N + Nf samples of speech, where the samples sq( ), n = 1, 2, ..., N correspond to the decoder output speech for previous frames, with sq(N) being the last sample of decoded speech in the last frame. N f is the number of samples in a frame. The storage spaces sq(ή), n = N +\, N +2, ..., N + Nf are unpopulated at the beginning of a bad frame, but will be filled with extrapolated speech waveform samples once the operations of the modules 202 through 210 are completed. [0052] For time lags = lb, lb+\, lb+2, ..., ub-\, ub, the odule 202 calculates the correlation value
N
CU) = ∑ sq(n)sq(n - j) n = N-K + \
for j e [lb,ub] . Among those time lags that give a positive correlation c(j), module 202 finds the time lagy that maximizes
[0053] The division operation above can be avoided by the "cross-multiply" method. The time lag j that maximizes nc(J) is also the time lag within the search range that maximizes the pitch prediction gain for a single-tap pitch predictor. This is called the optimal time lag ppfel, which stands for pitch period foryrame erasure, 1st version. In the extremely rare case where no c(j) in the search range is positive, ppfel is set to lb in this degenerate case. [0054] Once ppfel is identified, the associated scaling factor ptfel is calculated as follows.
__]\ sq(n) \ ptfel = sign[c(ppfel)] x ?ι=N-K + l
∑\ sq(n - ppfel) \
[0055] Such a calculated scaling factor ptfel is then clipped to 1 if it is greater than 1 and clipped to -1 if it is less than -1. Also, in the degenerate case when the denominator on the right-hand side of the above equation is zero, ptfel is set to 0.
[0056] Although the module 202 performs the above calculation only for the first erased frame when there are multiple consecutive erased frames, it also attempts to modify the first time lag ppfe 1 at the second consecutively erased frame, depending on the pitch period contour at the good frames immediately before the erasure. Starting from the last good frame before the erasure, and going backward frame-by-frame for up to 4 frames, the module 202 compares the transmitted pitch period until there is a change in the transmitted pitch period. If there is no change in pitch period found during these 4 good frames before the erasure, then the first time lag ppfel found above at the first erased frame is also used for the second consecutively erased frame. Otherwise, the first pitch change identified in the backward search above is examined to see if the change is relatively small. If the change is within 5%, then, depending on how many good frames back the pitch change is found, the amount of pitch period change per frame is calculated and is rounded to the nearest integer. The module 202 then adds this rounded pitch period change per frame, whether positive or negative, to the ppfel found above at the first erased frame. The resulting value is used as the first time lag ppfel for the second and subsequent consecutively erased frames. This modification of the first time lag after the second erased frame improves the speech quality on average.
[0057] It has been discovered that if this time lag is used directly as the time lag for periodic repetition in waveform extrapolation of the current frame, buzz sounds occur when a small time lag is used in a segment of speech that does not have a high degree of periodicity. To combat this problem, the present invention uses a module 203 to distinguish between highly periodic voiced speech segments and other types of speech segments. If the module 203 determines that the decoded speech is in a highly periodic voiced speech region, it sets the periodic waveform extrapolation flag pwef to 1; otherwise, pwef is set to 0. If pwef is 0, and if the first time lag ppfel is less than a threshold of 10 ms, then a module 204 will find a second, larger time lag ppfe2 greater than 10 ms to reduce or eliminate the buzz sound.
[0058] Using ppfel as its input, the module 203 performs further analysis of the previously decoded speech sq(n) to determine the periodic waveform extrapolation flag pwef. Again, this can be done in many possible ways. One exemplary method of determining the periodic waveform flag pwef is described below.
[0059] The module 203 calculates three signal features: signal gain relative to long-term average of input signal level, pitch prediction gain, and the first normalized autocorrelation coefficient. It then calculates a weighted sum of these three signal features, and compares the resulting figure of merit with a pre-determined threshold. If the threshold is exceeded, pwef is set to 1, otherwise it is set to 0. The mopdule 203 then performs special handling for extreme cases.
[0060] The three signal features are calculated as follows. First, the module
203 calculates the speech energy in the analysis window:
E = ∑sq2(n) ιι = N-K + \ [0061] If E > 0, the base-2 logarithmic gain is calculated as Ig = log2 E ; otherwise, Ig is set to 0. Let Ivl be the long-term average logarithmic gain of the active portion of the speech signal (that is, not counting the silence). A separate estimator for input signal level can be employed to calculate Ivl. An exemplary signal level estimator is disclosed in U.S. Provisional Application No. 60/312,794, filed August 17, 2001, entitled "Bit Error Concealment Methods for Speech Coding," and U.S. Provisional Application No. 60/344,378, filed January 4, 2002, entitled "Improved Bit Error Concealment Methods for Speech Coding." The normalized logarithmic gain (i.e., signal gain relative to long-term average input signal level) is then calculated as nig = lg- lvl .
[0062] The module 203 further calculates the first normalized autocorrelation coefficient
sq(n)sq(n - l)
[0063] In the degenerate case when E = 0, ?, is set to 0 as well. The module
203 also calculates the pitch prediction gain as f E^ ppg = 101og v *y where c2 (ppfel)
R = E - -
∑sq2(n - ppfel) ιt=N-K + \
is the pitch prediction residual energy. In the degenerate case when R = 0,ppg is set to 20. [0064] The three signal features are combined into a single figure of merit:
fom = nig + 1.25 ppg + 16p Iffom > 16, pwef is set to 1, otherwise it is set to 0. Afterward, the flag pwef may be overwritten in the following extreme cases:
• If nig < - 1 , pwef is set to 0.
• If ppg > 12, pwef is set to 1.
• If , < -0.3 , pwef is set to 0.
[0065] If pwef - 0 and ppfel < T0 , where T0 is the number of samples corresponding to 10 ms, there is a high likelihood for periodic waveform extrapolation to produce a buzz sound. To avoid the potential buzz sound, the present invention searches for a second time lag ppfe2 > TQ . Two waveforms, one extrapolated using the first time lag ppfel, and the other extrapolated using the second time lag ppfe2, are added together and properly scaled, and the resulting waveform is used as the output speech of the current frame. By requiring the second time lag ppfe2 to be large enough, the likelihood of a buzz sound is greatly reduced. To minimize the potential quality degradation caused by a misclassification of a periodic voiced speech segment into something that is not, the present invention searches in the neighborhood of the first integer multiple of ppfel that is no smaller than TQ . Thus, even if the flag pwef should have been 1 and is misclassified as 0, there is a good chance that an integer multiple of the true pitch period will be chosen as the second time lag ppfe2 for periodic waveform extrapolation.
[0066] A module 204 determines the second time lag ppfe2 in the following way if pwef = 0 and ppfel < T0 . First, it finds the smallest integer m that satisfies
m x ppfel ≥ T0 .
[0067] Next, the module 204 sets w, , the lower bound of the time lag search range, to m x ppfel - 3 or T0 , whichever is larger. The upper bound of the search range is set to m2 = m, + N - 1 , where Ns is the number of possible time lags in the search range. Next, for each time lag j in the search range of [m,,m2] , the module 204 calculates
cor(j) = ∑ sq(n)sq(n - j)
and then selects the time lag/ e [m,,m2] that maximizes cor(J). The corresponding scaling factor is set to 1. [0068] The module 205 extrapolates speech waveform for the current erased frame based on the first time lag ppfel. It first extrapolates the first L samples of speech in the current frame using the first time lag ppfel and the corresponding scaling factor ptfel. A suitable value of L is 8 samples. The extrapolation of the first L samples of the current frame can be expressed as
sq(n) = ptfel x sq(n - ppfel) , for n = N + l, N+2, ..., N+L.
[0069] For the first L samples of the current frame, the module 205 smoothly merges the sq(n) signal extrapolated above with r(n), the ringing of the synthesis filter calculated in module 206, using the overlap-add method below.
sq(N + n) — wu(n)sq(N + n) + wd(n)r(n) , for n = 1, 2, ..., L.
[0070] In the equation above, the sign "<— " means the quantity on its right- hand side overwrites the variable values on its left-hand side. The window function w (ή) represents the overlap-add window that is ramping up, while wd(ή) represents the overlap-add window that is ramping down. These overlap-add windows satisfy the constraint:
^u(.n) + Wj(n) = l [0071] A number of different overlap-add windows can be used. For example, the raised cosine window mentioned in the paper by Goodman et al. Is one exemplary method. Alternatively, simpler triangular windows can also be used.
[0072] After the first L samples of the current frame are extrapolated and overlap-added, the module 205 then extrapolates the remaining samples of the current frame. If ppfel ≥ N f , the extrapolation is performed as
sq(n) = ptfel x sq(n - ppfel) , for n = N+L +l, N+L +2, ..., N + Nf .
If ppfel < Nf , then the extrapolation is performed as
sq( ) = ptfel x sq(n - ppfel) , for n = N+L +1, N+L +2, ..., N +ppfel, and then sq(ή) = sq(n - ppfel) , for n = N + ppfel+l , N + ppfel+2, ..., N + Nf .
[0073] A module 207 extrapolates speech waveform for the current erased frame based on the second time lag ppfe2. Its output extrapolated speech waveform sq2( ) is given by
sq(n - ppfe2), for n = N + l,...,N + N f, if pwef - 0 and ppfel < T0 sq2(n) =
0, for n = N + l,...,N + Nf, if pwef ≠ O or ppfel > T0
[0074] If the sq2(n) waveform is zero, a module 208 directly passes the output of the module 205 to a module 209. Otherwise, the module 208 adds the output waveforms of the modules 205 and 207, and scales the result appropriately. Specifically, it calculates the sums of signal sample magnitudes for the outputs of the modules 205 and 207: N + N , suml - ∑\ sq(ή) \ n=N + \
It then adds the two waveforms and assign the result to sq(ri) again:
sq(ή) <— sq(ή) + sq2 ( ), for n = N + 1, N + 2,..., N + Nf .
Next, it calculates the sum of signal sample magnitudes for the summed waveform:
sum - ∑\ sq(n) \ ιι= N + \
[0075] If sum3 is zero, the scaling factor is set to 1 ; otherwise, the scaling factor is set to sfac = min(suml, sum2) I sunύ, where min(suml, suml) means the smaller of suml and sum2. After this scaling factor is calculated, the module 208 replaces sq(ή) with a scaled version: sq(n) <— sfac χ sq(n), for n = N + l,N + 2,...,N + Nf , and the module 209 performs overlap-add of sq(ή) and the ringing of the synthesis filter for the first L samples of the frame. The resulting waveform is passed to the module 210. [0076] If the frame erasure lasts for an extended time period, the frame erasure concealment scheme should not continue the periodic extrapolation indefinitely, otherwise the extrapolated speech sounds like some sort of steady tone signal. In the preferred embodiment of the present invention, the module 210 starts waveform attenuation at the instant when the frame erasure has lasted for 20 ms. From there, the envelope of the extrapolated waveform is attenuated linearly toward zero and the waveform magnitude reaches zero at 60 ms into the erasure of consecutive frames. After 60 ms, the output is completely muted. See FIG. 3 (a) for a waveform attenuation window that implements this attenuation strategy.
[0077] The preferred embodiment of the present invention is used with a noise feedback codec that has a frame size of 5 ms. In this case, the time interval between each adjacent pair of vertical lines in FIG. 3 (a) represent a frame.
[0078] Suppose a frame erasure lasts for 12 consecutive frames (5 12 = 60 ms) or more, the easiest way to implement this waveform attenuation is to extrapolate speech for the first 12 erased frames, store the resulting 60 ms of waveform, and then apply the attenuation window in FIG. 3 (a). However, this simple approach requires extra delay to buffer up 60 ms of extrapolated speech.
[0079] To avoid any additional delay, the module 210 applies the waveform attenuation window frame-by-frame without any additional buffering. However, starting from the sixth consecutive erased frame (from 25 ms on in FIG. 3), the module 210 cannot directly apply the corresponding section of the window for that frame in FIG. 3 (a). A waveform discontinuity will occur at the frame boundary, because the corresponding section of the attenuation window starts from a value less than unity (7/8, 6/8, 5/8, etc.). This will cause a sudden decrease of waveform sample value at the beginning of the frame, and thus an audible waveform discontinuity.
[0080] To eliminate this problem, the present invention normalizes each 5 ms section of the attenuation window in FIG. 3 (a) by its starting value at the left edge. For example, for the sixth frame (25 ms to 30 ms), the window is from 7/8 to 6/8, and normalizing this section by 7/8 will give a window from 1 to (6/8)/(7/8) = 6/7. Similarly, for the seventh frame (30 ms to 35 ms), the window is from 6/8 to 5/8, and normalizing this section by 6/8 will give a window from 1 to (5/8)/(6/8) = 5/6. Such normalized attenuation window for each frame is shown in FIG. 3 (b).
[0081] Rather than storing every sample in the normalized attenuation window in FIG. 3 (b), the present invention simply stores the decrement between adjacent samples of the window for each of the eight window sections for fifth to twelfth frame. This decrement is the amount of total decline of the window function in each frame (1/8 for the fifth erased frame, 1/7 for the sixth erased frame, and so on), divided by Nf , the number of speech samples in a frame.
[0082] If the frame erasure has lasted for only 20 ms or less, the module 210 does not need to perform any waveform attenuation operation. If the frame erasure has lasted for more than 20 ms, then the module 210 applies the appropriate section of the normalized waveform attenuation window in FIG. 3 (b), depending on how many consecutive frames have been erased so far. For example, if the current frame is the sixth consecutive frame that is erased, then the module 210 applies the section of the window from 25 ms to 30 ms (with window function from 1 to 6/7). Since the normalized waveform attenuation window for each frame always starts with unity, the windowing operation will not cause any waveform discontinuity at the beginning of the frame.
[0083] The normalized window function is not stored; instead, it is calculated on the fly. Starting with a value of 1, the module 210 multiplies the first waveform sample of the current frame by 1, and then reduces the window function value by the decrement value calculated and stored beforehand, as mentioned above. It then multiplies the second waveform sample by the resulting decremented window function value. The window function value is again reduced by the decrement value, and the result is used to scale the third waveform sample of the frame. This process is repeated for all samples of the extrapolated waveform in the current frame.
[0084] The output of the module 210, that is, sq '(ή) for the current erased frame, is passed through the switch 200 and becomes the final output speech for the current erased frame. The current frame of sq '(ή) is passed to the module 201 to update the current frame portion of the sq(ή) speech buffer stored there. Let sq '(ri), n = 1, 2, ..., N f be the output of the module 210 for the current erased frame, then the sq(ή) buffer of the module 201 is updated as:
sq(N + ή) = sq' (n) , n = 1, 2, ..., N f . [0085] This signal is also passed to a module 211 to update the memory, or internal states, of the filters inside the decoder 100. Such a filter memory update is performed in order to ensure that the filter memory is consistent with the extrapolated speech waveform in the current erased frame. This is necessary for a smooth transition of speech waveform at the beginning of the next frame, if the next frame turns out to be a good frame. If the filter memory were frozen without such proper update, then generally there would be audible glitch or disturbance at the beginning of the next good frame.
[0086] If the short-term predictor is of order M, then the updated memory is simply the last M samples of the extrapolated speech signal for the current erased frame, but with the order reversed. Let stsm(k) be the A th memory value of the short-term synthesis filter, or the value stored in the delay line corresponding to the k-t . short-term predictor coefficient ak . Then, the memory of the short-term synthesis filter 190 is updated as
stsm(k) = sq(N + N f + 1 - k) , k = 1, 2, ..., M.
[0087] To update the memory of the long-term synthesis filter 180 of FIG. 1, the module 211 extrapolates the long-term synthesis filter memory based on the first time lag ppfel , using procedures similar to speech waveform extrapolation performed at the module 205. Let ltsm(ή) be the memory (or delay line) of the long-term synthesis filter 180, where the indexing convention is the same as that of sq(ή). The module 211 first extrapolates the first L samples of ltsm(n) in the current frame
ltsm(n) = ptfel x ltsm(n - ppfel) , for n = N+l, N+2, ..., N+L.
[0088] Next, this extrapolated filter memory is overlap-added with the ringing of the long-term synthesis filter calculated in the module 201 :
ltsm(N + n) r- wu(ή)ltsm(N + n) + wd(ή)ltr( ) , for n = 1, 2, ..., E. [0089] After the first L samples of the current frame are extrapolated and overlap-added, the module 211 then extrapolates the remaining samples of the current frame. If ppfel > N f , the extrapolation is performed as
ltsm(n) = ptfel x ltsm(n - ppfel) , for n = N +L +1, N+L +2, ..., N
+ Nf .
If ppfel < Nf , then the extrapolation is performed as
ltsm(n) = ptfel x ltsm(n - ppfel) , for n = N +L +1, N +L +2, ..., N +ppfel, and ltsm(n) = ltsm(n - ppfel) , for n = N + ppfel+l, N + ppfel+2, ..., N + Nf .
[0090] If none of the side information speech parameters (LPC, pitch period, pitch taps, and excitation gain) is quantized using predictive coding, the operations of the module 211 are completed. If, on the other hand, predictive coding is used for side information, then the module 21 1 also needs to update the memory of the involved predictors to minimize the discontinuity of decoded speech parameters at the next good frame.
[0091] In the noise feedback codec that the preferred embodiment of the present invention is used in, moving-average (MA) predictive coding is used to quantize both the Line-Spectrum Pair (LSP) parameters and the excitation gain. The predictive coding schemes for these parameters work as follows. For each parameter, the long-term mean value of that parameter is calculated off-line and subtracted from the unquantized parameter value. The predicted value of the mean-removed parameter is then subtracted from this mean- removed parameter value. A quantizer quantizes the resulting prediction error. The output of the quantizer is used as the input to the MA predictor. The predicted parameter value and the long-term mean value are both added back to the quantizer output value to reconstruct a final quantized parameter value.
[0092] In an embodiment of the present invention, the modules 202 through
210 produce the extrapolated speech for the current erased frame. Theoretically, for the current frame, there is no need to extrapolate the side information speech parameters since the output speech waveform has already been generated. However, to ensure that the LSP and gain decoding operations will go smoothly at the next good frame, it is helpful to assume that these parameters are extrapolated from the last frame by simply copying the parameter values from the last frame, and then work "backward" from these extrapolated parameter values to update the predictor memory of the predictive quantizers for these parameters.
[0093] Using the principle outlined in the last paragraph, we can update the predictor memory in the predictive LSP quantizer, can be updated as follows. The predicted value for the k-th LSP parameter is calculated as the inner product of the predictor coefficient array and the predictor memory array for the k-t LSP parameter). This predicted value and the long-term mean value of the k-t LSP are subtracted from the A th LSP parameter value at the last frame. The resulting value is used to update the newest memory location for the predictor of the k-t LSP parameter (after the original set of predictor memory is shifted by one memory location, as is well-known in the art). This procedure is repeated for all the LSP parameters (there are M of them).
[0094] If the frame erasure lasts only 20 ms or less, no waveform attenuation window is applied, and an assumption is made that the excitation gain of the current erased frame is the same as the excitation gain of the last frame. In this case, the memory update for the gain predictor is essentially the same as the memory update for the LSP predictors described above. Basically, the predicted value of log-gain is calculated (by calculating the inner product of the predictor coefficient array and the predictor memory array for the log- gain). This predicted log-gain and the long-term mean value of the log-gain are then subtracted from the log-gain value of the last frame. The resulting value is used to update the newest memory location for the log-gain predictor (after the original set of predictor memory is shifted by one memory location, as is well-known in the art).
[0095] If the frame erasure lasts more than 60 ms, the output speech is zeroed out, and the base-2 log-gain is assumed to be at an artificially set default silence level of 0. Again, the predicted log-gain and the long-term mean value of log-gain are subtracted from this default level of 0, and the resulting value is used to update the newest memory location for the log-gain predictor.
[0096] If the frame erasure lasts more than 20 ms but does not exceed 60 ms, then updating the predictor memory for the predictive gain quantizer may be challenging, because the extrapolated speech waveform is attenuated using the waveform attenuation window of FIG. 3. The log-gain predictor memory is updated based on the log-gain value of the waveform attenuation window in each frame.
[0097] To minimize the code size, for each of the frames from the fifth to the twelfth frames into frame erasure, a correction factor is calculated from the log-gain of the last frame based on the attenuation window of FIG. 3, and the correction factor is stored. The following algorithm calculates these 8 correction factors, or log-gain attenuation factors.
1. Initialize lastlg = 0. (lastlg = last log-gain = log-gain of the last frame)
2. Initialize/ = 1.
3. Calculate the normalized attenuation window array
w(n) = l , n = l, 2, ..., Nf .
(9 - j)Nf f
4. Calculate Ig =
5. Calculate lga(j) = lastlg - Ig
6. If/ < 8, then set lastlg = Ig - 2 log
7. If/ = 8, stop; otherwise, increment/ by 1 (i.e.,/ <— / + 1), then go back to step 3. [0100] Basically, the above algorithm calculates the base-2 log-gain value of the waveform attenuation window for a given frame, and then determines the difference between this value and a similarly calculated log-gain for the window of the previous frame, compensated for the normalization of the start of the window to unity for each frame. The output of this algorithm is the array of log-gain attenuation factors lga(j) for/ = 1, 2, ..., 8. Note that lga(j) corresponds to the (4+ )-th frame into frame erasure.
[0101] Once the lga(j) array has been pre-calculated and stored, then the log- gain predictor memory update for frame erasure lasting 20 ms to 60 ms becomes straightforward. If the current erased frame is the y'-th frame into frame erasure (4 </ < 12), lga(j-4) is subtracted from the log-gain value of the last frame. From the result of this subtraction, the predicted log-gain and the long-term mean value of log-gain are further subtracted, and the resulting value is used to update the newest memory location for the log-gain predictor.
[0102] After the module 211 calculates all the updated filter memory values, the decoder 100 uses these values to update the memories and of its short-term synthesis filter 190, long-term synthesis filter 180, LSP predictor, and gain predictor, in preparation for the decoding of the next frame, assuming the next frame will be received intact.
[0103] The frame erasure concealment scheme described above can be used as is, and it will provide significant speech quality improvement compared with applying no concealment. So far, essentially all the frame erasure concealment operations are performed during erased frames. The present invention has an optional feature that improves speech quality by performing "filter memory correction" at the first received good frame after the erasure.
[0104] The short-term synthesis filter memory and the long-term synthesis filter memory are updated in the module 211 based on waveform extrapolation. After the frame erasure is over, at the first received good frame after the erasure, there will be a mismatch between such filter memory in the decoder and the corresponding filter memory in the encoder. Very often the difference is mainly due to the difference between the pitch period (or time lag) used for waveform extrapolation during erased frame and the pitch period transmitted by the encoder. Such filter memory mismatch often causes audible distortion even after the frame erasure is over.
[0105] During erased frames, the pitch period is typically held constant or nearly constant. If the pitch period is instantaneously quantized (i.e. without using inter-frame predictive coding), and if the frame erasure occurs in a voiced speech segment with a smooth pitch contour, then, linearly interpolating between the transmitted pitch periods of the last good frame before erasure and the first good frame after erasure often provides a better approximation of the transmitted pitch period contour than holding the pitch period constant during erased frames. Therefore, if the synthesis filter memory is re-calculated or corrected at the first good frame after erasure, based on linearly interpolated pitch period over the erased frames, better speech quality can often be obtained.
[0106] The long-term synthesis filter memory is corrected in the following way at the first good frame after the erasure. First, the received pitch period at the first good frame and the received pitch period at the last good frame before the erasure are used to perform linear interpolation of the pitch period over the erased frames. If an interpolated pitch period is not an integer, it is rounded off to the nearest integer. Next, starting with the first erased frame, and then going through all erased from in sequence, the long-term synthesis filter memory is "re-extrapolated" frame-by-frame based on the linearly interpolated pitch period in each erased frame, until the end of the last erased frame is reached. For simplicity, a scaling factor of 1 may be used for the extrapolation of the long-term synthesis filter. After such re-extrapolation, the long-term synthesis filter memory is corrected.
[0107] The short-term synthesis filter memory may be corrected in a similar way, by re-extrapolating the speech waveform frame-by-frame, until the end of the last erased frame is reached. Then, the last M samples of the re- extrapolated speech waveform at the last erased frame, with the order reversed, will be the corrected short-term synthesis filter memory. [0108] Another simpler way to correct the short-term synthesis filter1 memory is to estimate the waveform offset between the original extrapolated waveform and the re-extrapolated waveform, without doing the re-extrapolation. This method is described below. First, "project" the last speech sample of the last erased frame backward by ppfel samples, where ppfel is the original time lag used for extrapolation at that frame, and depending on which frame the newly projected sample lands, it is backward projected by he ppfel of that frame again. This process is continued until a newly projected sample lands on a good frame before the erasure. Then, using the linearly interpolated pitch period, a similar backward projection operation is performed until a newly projected sample lands on a good frame before the erasure. The distance between the two landing points in the good frame, obtained by the two backward projection operations above, is the waveform offset at the end of the last erased frame.
[0109] If this waveform offset indicates that the re-extrapolated speech waveform based on interpolated pitch period is delayed by X samples relative to the original extrapolated speech waveform at the end of the last erased frame, then the short-term synthesis filter memory can be corrected by taking the M consecutive samples of the original extrapolated speech waveform that are X samples away from the end of the last erased frame, and then reversing the order. If, on the other hand, the waveform offset calculated above indicates that the original extrapolated speech waveform is delayed by X samples relative to the re-extrapolated speech waveform (if such re- extrapolation were ever done), then the short-term synthesis filter memory correction would need to use certain speech samples that are not extrapolated yet. In this case, the original extrapolation for X more samples can be extended, and the last M samples can be taken with their order reversed. Alternatively, the system can move back one pitch cycle, and use the M consecutive samples (with order reversed) of the original extrapolated speech waveform that are (ppfel - X) samples away from the end of the last erased frame, where ppfel is the time lag used for original extrapolation of the last erased frame, and assuming ppfel > X. [0110] One potential issue of such filter memory correction is that the re- extrapolation generally results in a waveform shift or offset; therefore, upon decoding the first good frame after an erasure, there may be a waveform discontinuity at the beginning of the frame. This problem can be eliminated if an output buffer is maintained, and the waveform shift is not immediately played out, but is slowly introduced, possibly over many frames, by inserting or deleting only one sample at a time over a long period of time. Another possibility is to use time scaling techniques, which are well known in the art, to speed up or slow down the speech slightly, until the waveform offset is eliminated. Either way, the waveform discontinuity can be avoided by smoothing out waveform offset over time.
[0111] If the additional complexity of such time scaling or gradual elimination of waveform offset is undesirable, a simpler, but sub-optimal approach is outlined below. First, before the synthesis filter memory is corrected, the first good frame after an erasure is decoded normally for the first Y samples of the speech. Next, the synthesis filter memory is corrected, and the entire first good frame after the erasure is decoded again. Overlap-add over the first Y samples is then used to provide a smooth transition between these two decoded speech signals in the current frame. This simple approach will smooth out waveform discontinuity if the waveform offset mentioned above is not excessive. If the waveform offset is too large, then this overlap-add method may not be able to eliminate the audible glitch at the beginning of the first good frame after an erasure. In this case, it is better not to correct the synthesis filter memory unless the time scaling or gradual elimination of waveform offset mentioned above can be used.
[0112] The following description of a general purpose computer system is provided for completeness. As stated above, the present invention can be implemented in hardware, or as a combination of software and hardware. Consequently, the invention may be implemented in the environment of a computer system or other processing system. An example of such a computer system 400 is shown in FIG. 4. In the present invention, all of the elements depicted in FIGs. 1 and 2, for example, can execute on one or more distinct computer systems 400, to implement the various methods of the present invention.
[0113] The computer system 400 includes one or more processors, such as a processor 404. The processor 404 can be a special purpose or a general purpose digital signal processor and it's connected to a communication infrastructure 406 (for example, a bus or network). Various software implementations are described in terms of this exemplary computer system. After reading this description, it will become apparent to a person skilled in the relevant art how to implement the invention using other computer systems and/or computer architectures.
[0114] The computer system 400 also includes a main memory 408, preferably random access memory (RAM), and may also include a secondary memory 410. The secondary memory 410 may include, for example, a hard disk drive 412 and/or a removable storage drive 414, representing a floppy disk drive, a magnetic tape drive, an optical disk drive, etc. The removable storage drive 414 reads from and/or writes to a removable storage unit 418 in a well known manner. The removable storage unit 418, represents a floppy disk, magnetic tape, optical disk, etc. which is read by and written to by removable storage drive 414. As will be appreciated, the removable storage unit 418 includes a computer usable storage medium having stored therein computer software and/or data.
[0115] In alternative implementations, the secondary memory 410 may include other similar means for allowing computer programs or other instructions to be loaded into the computer system 400. Such means may include, for example, a removable storage unit 422 and an interface 420. Examples of such means may include a program cartridge and cartridge interface (such as that found in video game devices), a removable memory chip (such as an EPROM, or PROM) and associated socket, and the other removable storage units 422 and the interfaces 420 which allow software and data to be transferred from the removable storage unit 422 to the computer system 400. [0116] The computer system 400 may also include a communications interface 424. The communications interface 424 allows software and data to be transferred between the computer system 400 and external devices. Examples of the communications interface 424 may include a modem, a network interface (such as an Ethernet card), a communications port, a PCMCIA slot and card, etc. Software and data transferred via the communications interface 424 are in the form of signals 428 which may be electronic, electromagnetic, optical or other signals capable of being received by the communications interface 424. These signals 428 are provided to the communications interface 424 via a communications path 426. The communications path 426 carries the signals 428 and may be implemented using wire or cable, fiber optics, a phone line, a cellular phone link, an RF link and other communications channels.
[0117] In the present application, the terms "computer readable medium" and
"computer usable medium" are used to generally refer to media such as the removable storage drive 414, a hard disk installed in the hard disk drive 412, and the signals 428. These computer program products are means for providing software to the computer system 400.
[0118] Computer programs (also called computer control logic) are stored in the main memory 408 and/or the secondary memory 410. Computer programs may also be received via the communications interface 424. Such computer programs, when executed, enable the computer system 400 to implement the present invention as discussed herein.
[0119] In particular, the computer programs, when executed, enable the processor 404 to implement the processes of the present invention. Accordingly, such computer programs represent controllers of the computer system 400. By way of example, in the embodiments of the invention, the processes/methods performed by signal processing blocks of encoders and/or decoders can be performed by computer control logic. Where the invention is implemented using software, the software may be stored in a computer program product and loaded into the computer system 400 using the removable storage drive 414, the hard drive 412 or the communications interface 424.
[0120] In another embodiment, features of the invention are implemented primarily in hardware using, for example, hardware components such as Application Specific Integrated Circuits (ASICs) and gate arrays. Implementation of a hardware state machine so as to perform the functions described herein will also be apparent to persons skilled in the relevant art(s).
[0121] The foregoing description of the preferred embodiments provide an illustration and description, but is not intended to be exhaustive or to limit the invention to the precise form disclosed. Modifications and variations are possible consistent with the above teachings, or may be acquired from practice of the invention.

Claims

WHAT WE CLAIM IS:
1. A method of synthesizing a number of corrupted frames output from a decoder including one or more predictive filters, the corrupted frames being representative of one segment of a decoded signal (sq(n)) output from the decoder, the method comprising: determining a first preliminary time lag (ppfel) based upon examining a predetermined number (K) of samples of another segment of the decoded signal; determining a scaling factor (ptfe) associated with the examined number (K) of samples when the first preliminary time lag (ppfel) is determined; and extrapolating one or more replacement frames based upon the first preliminary time lag (ppfel) and the scaling factor (ptfe).
2. The method of claim 1, further comprising updating internal states of the filters based upon the extrapolating.
3. The method of claim 2, wherein the examined number (K) of samples is selected from within a number (N) of stored samples; wherein correlation values (c(j)) associated with candidate preliminary time lags (j) are determined in accordance with the expression:
N ) = ∑ sq( )sq(n - j) ; and ιι=N-K + \ wherein the first preliminary time lag (ppfel) is chosen from within the candidate preliminary time lags (j) and maximizes the expression:
4. The method of claim 3, wherein the scaling factor (ptfe) is determined in accordance with the expression:
∑l sq( ) I ptfel = sign[c(ppfel)]x N"=N~K+>
∑\ sq(n - ppfel) \
5. The method of claim 4, further comprising examining the first preliminary lag (ppfel) when (i) the number of frames includes consecutively corrupted frames and (ii) a second of the number of consecutively corrupted frames is received; wherein the other segment includes a last received good frame immediately preceding a first of the number of consecutively corrupted frames.
6. The method of claim 5, wherein the examining includes comparing the first preliminary time lag (ppfel) with other time lags respectively associated with other received good frames, the other good frames immediately preceding the last received good frame.
7. The method of claim 5, further comprising modifying the first preliminary time lag (ppfel) based upon the comparing if a change between the first preliminary time lag (ppfel) and the other time lags exceeds a predetermined amount.
8. The method of claim 7, wherein the predetermined amount is within about five percent and is based upon a change between the first preliminary time lag (ppfel) and each of the other time lags.
9. The method of claim 8, wherein the other received good frames include up to four frames.
10. The method of claim 9, wherein the modifying further includes (i) determining a pitch change per frame, (ii) rounding the determined pitch change per frame to a nearest integer value, (iii) adding the integer value to the first preliminary time lag (ppfel) to produce an adjusted first preliminary time lag (ppfel).
11. The method of claim 10, further comprising performing a first waveform extrapolation to extrapolate a first of the replacement frames based upon the adjusted first preliminary time lag (ppfel) and the scaling factor (ptfe).
12. The method of claim 1, further comprising determining a periodic extrapolation flag (pwef) for the examined predetermined number (K) of samples.
13. The method of claim 12, wherein the determining the extrapolation flag (pwef) includes calculating (i) a normalized logarithmic signal gain (nig), (ii) a pitch prediction gain (ppg), and a (iii) first normalized autocorrelation coefficient(pι), the normalized logarithmic signal gain, the pitch prediction gain, and the normalized autocorrelation coefficient being associated with the decoded signal.
14. The method of claim 13, wherein the determining of the extrapolation flag (pwef) further includes (i) calculating a weighted sum of the normalized logarithmic signal gain, the pitch prediction gain, and the normalized autocorrelation coefficient, and (ii) comparing the calculated weighted sum with a predetermined threshold; wherein if the weighted sum exceeds the predetermined threshold, the periodic extrapolation flag (pwef) is set to a first value; and wherein is the weighted sum does not exceed the predetermined threshold, the periodic extrapolation flag is set to a second value.
15. The method of claim 14, wherein the first value is one and the second value is zero.
16. The method of claim 15, wherein the examining the predetermined number of samples of the other segment is performed in accordance with an analysis window; and wherein an amount of energy (E) within the analysis window in determined in accordance with the expression:
E = ∑sq2(n) . n = N-K + \
17. The method of claim 16, wherein lg is the base-2 logarithmic gain of the decoded signal (sq(n)); and wherein if the amount of energy (E) is greater than zero, then the base-2 logarithmic gain lg equals log E.
18. The method of claim 17, wherein the determining of the normalized logarithmic signal gain (nig) includes determining a long term average (Ivl) of the logarithmic gain of an active portion of the decoded signal (sq(n)); and wherein the normalized logarithmic signal gain (nig) is determined in accordance with the equation: nig = lg - Ivl.
19. The method of claim 18, wherein the calculating the pitch prediction gain (ppg) is determined in accordance with the expression:
/?g = 101og10 v */ where c2(ppfel)
R = E
∑sq2(n - ppfel) ιι=N-K + \
20. The method of claim 19, wherein the calculating of the first normalized autocorrelation coefficient(pι) is determined in accordance with the expression:
∑sq(n)sq(n - l)
21. The method of claim 20, wherein the a normalized logarithmic signal gain (nig), the pitch prediction gain (ppg), and the first normalized autocorrelation coefficient(pι) combine to form a single figure of merit (fom) representative of the decoded signal (sq(n)), the single figure of merit (fom) being determined in accordance with the normalized logarithmic signal gain (nig), the pitch prediction gain (ppg), and the first normalized autocorrelation coefficient(pι); and wherein a status of the periodic extrapolation flag (pwef) is based upon the figure of merit (fom).
22. The method of claim 21 wherein figure of merit (form) is determined in accordance with the expression: fom = nlg + 1.25ppg + 16pι.
23. The method of claim 22, further comprising searching for a second time lag (ppfe2) if (i) the periodic extrapolation flag (pwef) is a predetermined value and (ii) the first preliminary time lag (ppfel) is less than a predetermined amount, the second time lag (ppfe2) being based upon the first time lag (ppfel); wherein the second time lag (ppfe2) is greater than or equal to the predetermined amount.
24. The method of claim 23, wherein the second time lag (ppfe2) maximizes the expression: cor(j) = ∑ sq(ή)sq(n - j) ; n=N-Nr + \ where (Nf) is the number of samples within a frame.
25. The method of claim 23, further comprising performing a second waveform extrapolation to extrapolate the first of the replacement frames based upon the second time lag (ppfe2).
26. The method of claim 25, wherein the first of the replacement frames is defined by the expression:
sq(n - ppfe2), for n = N + l,...,N + Nf if pwef = 0 and ppfel < T0 sq2(ή) =
0, for « = N + l,...,N + N . if pwef ≠ 0 or ppfel > T0
where T0 is the number of samples corresponding to a predetermined amount of time.
27. The method of claim 26, wherein the predetermined amount of time is about ten milliseconds.
28. The method of claim 27, further comprising determining sample magnitudes of the first preliminary time lag (ppfel) and the second time lag (ppfe2).
29. The method of claim 28, wherein the sample magnitudes of the first preliminary time lag (ppfel) and the second time lag (ppfe2) are respectively determined in accordance with the expressions:
N + Nj suml = ∑\ sq(n) | n=N + \
sum2 = ∑\ sq2(n) \ n=N + \
30. The method of claim 29, wherein the waveforms sq(ή) and sq2(ή) are combined in accordance with the expression: sq(n) <- sq(n) + sq2(ή), for n - N + l,N + 2,...,N + Nf where sq(n) is replaced by the sum of sq(n) and sq2(n).
31. The method of claim 30, further comprising summing sample magnitudes of sq(ή) in accordance with the expression:
sum - ∑\ sq(n) \ .
32. The method of claim 31, further comprising scaling the summed waveform.
33. A method of synthesizing a number of corrupted frames output from a decoder including one or more predictive filters, the corrupted frames being representative of one segment of a decoded signal (sq(n)) output from the decoder, the method comprising: determining a first preliminary time lag (ppfel) based upon examining a predetermined number (K) of samples of another segment of the decoded signal; determining a scaling factor (ptfe) associated with the examined number (K) of samples when the first preliminary time lag (ppfel) is determined; extrapolating one or more replacement frames based at least upon the first preliminary time lag (ppfel) and the scaling factor (ptfe); and correcting internal states of the filters when a first good frame is received, the first good frame being received after the number of corrupted frames.
34. The method of claim 33, wherein the updating includes updating short-term and long-term synthesis filters associated with the one or more predictive filters.
35. The method of claim 34, wherein the updating of the short-term predictive filter is performed in accordance with the expression: stsm(k) = sq(N + Nf + l - k) , k = 1, 2, ..., M. wherein, stsm(k) represents the k-th memory value of a short-term synthesis filter associated with the short-term predictive filters;
(M) represents the last M samples of the one segment of the decoded signal;
(N) represents the number of decoder output speech samples in previous frames that are stored; and
N^ represent the number of samples in a frame.
36. The method of claim 35, wherein the updating of the long-term synthesis filter includes updating content of an internal memory and extrapolating a predetermined number of samples (L) of a first of the replacement frames in accordance with the expression: ltsm(n) = ptfel x llsm(n - ppfel) , for n = N +1 , N +2, ... , N +L.
37. The method of claim 36, wherein the updating further includes overlap-adding the content of the internal memory with a ringing of the long- term synthesis filter in accordance with the expression: ltsm(N + ή) <— wu (n)ltsm(N + n) + w(/ (n)ltr(n) , for n = 1, 2, ..., L; where w„ represents a windowing function associated with the first of the replacement waveforms.
38. An apparatus for synthesizing a number of corrupted frames output from a decoder including one or more predictive filters, the corrupted frames being representative of one segment of a decoded signal (sq(n)) output from the decoder, the method comprising: means for determining a first preliminary time lag (ppfel) based upon examining a predetermined number (K) of samples of another segment of the decoded signal; means for determining a scaling factor (ptfe) associated with the examined number (K) of samples when the first preliminary time lag (ppfel) is determined; and means for extrapolating one or more replacement frames based upon the first preliminary time lag (ppfel) and the scaling factor (ptfe).
39. The apparatus of claim 38, further comprising means for updating internal states of the filters based upon the extrapolating.
40. An apparatus for synthesizing a number of corrupted frames output from a decoder including one or more predictive filters, the corrupted frames being representative of one segment of a decoded signal (sq(n)) output from the decoder, the method comprising: means for determining a first preliminary time lag (ppfel) based upon examining a predetermined number (K) of samples of another segment of the decoded signal; means for determining a scaling factor (ptfe) associated with the examined number (K) of samples when the first preliminary time lag (ppfel) is determined; means for extrapolating one or more replacement frames based at least upon the first preliminary time lag (ppfel) and the scaling factor (ptfe); and means for correcting internal states of the filters when a first good frame is received, the first good frame being received after the number of corrupted frames.
41. The apparatus of claim 40, wherein the updating includes updating short-term and long-term synthesis filters associated with the one or more predictive filters.
42. A computer readable medium carrying one or more sequences of one or more instructions for execution by one or more processors to perform a method of synthesizing a number of corrupted frames output from a decoder including one or more predictive filters, the corrupted frames being representative of one segment of a decoded signal (sq(n)) output from the decoder, the instructions when executed by the one or more processors, cause the one or more processors to perform the steps of: determining a first preliminary time lag (ppfel) based upon examining a predetermined number (K) of samples of another segment of the decoded signal; determining a scaling factor (ptfe) associated with the examined number (K) of samples when the first preliminary time lag (ppfel) is determined; and extrapolating one or more replacement frames based upon the first preliminary time lag (ppfel) and the scaling factor (ptfe).
43. The computer readable medium of claim 42, further causing the one or more processors to update internal states of the filters based upon the extrapolating.
44. A computer readable medium carrying one or more sequences of one or more instructions for execution by one or more processors to perform a method for synthesizing a number of corrupted frames output from a decoder including one or more predictive filters, the corrupted frames being representative of one segment of a decoded signal (sq(n)) output from the decoder, the instructions when executed by the one or more processors, cause the one or more processors to perform the steps of: determining a first preliminary time lag (ppfel) based upon examining a predetermined number (K) of samples of another segment of the decoded signal; determining a scaling factor (ptfe) associated with the examined number (K) of samples when the first preliminary time lag (ppfel) is determined; extrapolating one or more replacement frames based at least upon the first preliminary time lag (ppfel) and the scaling factor (ptfe); and correcting internal states of the filters when a first good frame is received, the first good frame being received after the number of corrupted frames.
45. The computer readable medium of claim 44, wherein the updating includes updating short-term and long-term synthesis filters associated with the one or more predictive filters.
EP02757200A 2001-08-17 2002-08-19 Improved frame erasure concealment for predictive speech coding based on extrapolation of speech waveform Expired - Lifetime EP1433164B1 (en)

Applications Claiming Priority (11)

Application Number Priority Date Filing Date Title
US31278901P 2001-08-17 2001-08-17
US312789P 2001-08-17
US34437402P 2002-01-04 2002-01-04
US344374P 2002-01-04
US183451 2002-06-28
US10/183,448 US7143032B2 (en) 2001-08-17 2002-06-28 Method and system for an overlap-add technique for predictive decoding based on extrapolation of speech and ringinig waveform
US10/183,608 US7711563B2 (en) 2001-08-17 2002-06-28 Method and system for frame erasure concealment for predictive speech coding based on extrapolation of speech waveform
US183448 2002-06-28
US10/183,451 US7308406B2 (en) 2001-08-17 2002-06-28 Method and system for a waveform attenuation technique for predictive speech coding based on extrapolation of speech waveform
US183608 2002-06-28
PCT/US2002/026255 WO2003023763A1 (en) 2001-08-17 2002-08-19 Improved frame erasure concealment for predictive speech coding based on extrapolation of speech waveform

Publications (3)

Publication Number Publication Date
EP1433164A1 true EP1433164A1 (en) 2004-06-30
EP1433164A4 EP1433164A4 (en) 2006-07-12
EP1433164B1 EP1433164B1 (en) 2007-11-14

Family

ID=27539098

Family Applications (1)

Application Number Title Priority Date Filing Date
EP02757200A Expired - Lifetime EP1433164B1 (en) 2001-08-17 2002-08-19 Improved frame erasure concealment for predictive speech coding based on extrapolation of speech waveform

Country Status (3)

Country Link
EP (1) EP1433164B1 (en)
DE (1) DE60223580T2 (en)
WO (1) WO2003023763A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10529341B2 (en) 2014-06-13 2020-01-07 Telefonaktiebolaget Lm Ericsson (Publ) Burst frame error handling

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100576318C (en) * 2003-05-14 2009-12-30 冲电气工业株式会社 The apparatus and method that are used for concealing erased periodic signal data
US7519535B2 (en) 2005-01-31 2009-04-14 Qualcomm Incorporated Frame erasure concealment in voice communications

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0747882A2 (en) * 1995-06-07 1996-12-11 AT&T IPM Corp. Pitch delay modification during frame erasures
WO1999066494A1 (en) * 1998-06-19 1999-12-23 Comsat Corporation Improved lost frame recovery techniques for parametric, lpc-based speech coding systems

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1100396C (en) * 1995-05-22 2003-01-29 Ntt移动通信网株式会社 Sound decoding device
US6188980B1 (en) * 1998-08-24 2001-02-13 Conexant Systems, Inc. Synchronized encoder-decoder frame concealment using speech coding parameters including line spectral frequencies and filter coefficients

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0747882A2 (en) * 1995-06-07 1996-12-11 AT&T IPM Corp. Pitch delay modification during frame erasures
WO1999066494A1 (en) * 1998-06-19 1999-12-23 Comsat Corporation Improved lost frame recovery techniques for parametric, lpc-based speech coding systems

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "Frame or packet loss concealment for the LD-CELP decoder" INTERNATIONAL TELECOMMUNICATION UNION. GENEVA, CH, May 1999 (1999-05), XP017400887 *
JUIN-HWEY CHEN: "A high-fidelity speech and audio codec with low delay and low complexity" ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, 2000. ICASSP '00. PROCEEDINGS. 2000 IEEE INTERNATIONAL CONFERENCE ON 5-9 JUNE 2000, PISCATAWAY, NJ, USA,IEEE, vol. 2, 5 June 2000 (2000-06-05), pages 1161-1164, XP010504934 ISBN: 0-7803-6293-4 *
See also references of WO03023763A1 *
WATKINS C R ET AL: "Improving 16 kb/s G.728 LD-CELP speech coder for frame erasure channels" ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, 1995. ICASSP-95., 1995 INTERNATIONAL CONFERENCE ON DETROIT, MI, USA 9-12 MAY 1995, NEW YORK, NY, USA,IEEE, US, vol. 1, 9 May 1995 (1995-05-09), pages 241-244, XP010625214 ISBN: 0-7803-2431-5 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10529341B2 (en) 2014-06-13 2020-01-07 Telefonaktiebolaget Lm Ericsson (Publ) Burst frame error handling
US11100936B2 (en) 2014-06-13 2021-08-24 Telefonaktiebolaget Lm Ericsson (Publ) Burst frame error handling
US11694699B2 (en) 2014-06-13 2023-07-04 Telefonaktiebolaget Lm Ericsson (Publ) Burst frame error handling

Also Published As

Publication number Publication date
DE60223580D1 (en) 2007-12-27
EP1433164B1 (en) 2007-11-14
WO2003023763A1 (en) 2003-03-20
EP1433164A4 (en) 2006-07-12
DE60223580T2 (en) 2008-09-18

Similar Documents

Publication Publication Date Title
US7590525B2 (en) Frame erasure concealment for predictive speech coding based on extrapolation of speech waveform
US7711563B2 (en) Method and system for frame erasure concealment for predictive speech coding based on extrapolation of speech waveform
US7143032B2 (en) Method and system for an overlap-add technique for predictive decoding based on extrapolation of speech and ringinig waveform
US7930176B2 (en) Packet loss concealment for block-independent speech codecs
US6636829B1 (en) Speech communication system and method for handling lost frames
EP1110209B1 (en) Spectrum smoothing for speech coding
US8386246B2 (en) Low-complexity frame erasure concealment
EP2054876B1 (en) Packet loss concealment for sub-band predictive coding based on extrapolation of full-band audio waveform
EP1194924B3 (en) Adaptive tilt compensation for synthesized speech residual
US7324937B2 (en) Method for packet loss and/or frame erasure concealment in a voice communication system
US7308406B2 (en) Method and system for a waveform attenuation technique for predictive speech coding based on extrapolation of speech waveform
US7146309B1 (en) Deriving seed values to generate excitation values in a speech coder
EP1433164B1 (en) Improved frame erasure concealment for predictive speech coding based on extrapolation of speech waveform
US20090055171A1 (en) Buzz reduction for low-complexity frame erasure concealment

Legal Events

Date Code Title Description
PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

17P Request for examination filed

Effective date: 20040317

AK Designated contracting states

Kind code of ref document: A1

Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR IE IT LI LU MC NL PT SE SK TR

A4 Supplementary search report drawn up and despatched

Effective date: 20060609

RIC1 Information provided on ipc code assigned before grant

Ipc: G10L 19/00 20060101AFI20060602BHEP

17Q First examination report despatched

Effective date: 20060831

GRAP Despatch of communication of intention to grant a patent

Free format text: ORIGINAL CODE: EPIDOSNIGR1

RAP1 Party data changed (applicant data changed or rights of an application transferred)

Owner name: BROADCOM CORPORATION

GRAS Grant fee paid

Free format text: ORIGINAL CODE: EPIDOSNIGR3

GRAA (expected) grant

Free format text: ORIGINAL CODE: 0009210

AK Designated contracting states

Kind code of ref document: B1

Designated state(s): DE FR GB

REG Reference to a national code

Ref country code: GB

Ref legal event code: FG4D

REF Corresponds to:

Ref document number: 60223580

Country of ref document: DE

Date of ref document: 20071227

Kind code of ref document: P

ET Fr: translation filed
PLBE No opposition filed within time limit

Free format text: ORIGINAL CODE: 0009261

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: NO OPPOSITION FILED WITHIN TIME LIMIT

26N No opposition filed

Effective date: 20080815

PGFP Annual fee paid to national office [announced via postgrant information from national office to epo]

Ref country code: DE

Payment date: 20130831

Year of fee payment: 12

PGFP Annual fee paid to national office [announced via postgrant information from national office to epo]

Ref country code: FR

Payment date: 20130820

Year of fee payment: 12

Ref country code: GB

Payment date: 20130823

Year of fee payment: 12

REG Reference to a national code

Ref country code: DE

Ref legal event code: R119

Ref document number: 60223580

Country of ref document: DE

GBPC Gb: european patent ceased through non-payment of renewal fee

Effective date: 20140819

REG Reference to a national code

Ref country code: DE

Ref legal event code: R079

Ref document number: 60223580

Country of ref document: DE

Free format text: PREVIOUS MAIN CLASS: G10L0011040000

Ipc: G10L0019040000

REG Reference to a national code

Ref country code: FR

Ref legal event code: ST

Effective date: 20150430

REG Reference to a national code

Ref country code: DE

Ref legal event code: R119

Ref document number: 60223580

Country of ref document: DE

Effective date: 20150303

Ref country code: DE

Ref legal event code: R079

Ref document number: 60223580

Country of ref document: DE

Free format text: PREVIOUS MAIN CLASS: G10L0011040000

Ipc: G10L0019040000

Effective date: 20150520

PG25 Lapsed in a contracting state [announced via postgrant information from national office to epo]

Ref country code: DE

Free format text: LAPSE BECAUSE OF NON-PAYMENT OF DUE FEES

Effective date: 20150303

Ref country code: GB

Free format text: LAPSE BECAUSE OF NON-PAYMENT OF DUE FEES

Effective date: 20140819

PG25 Lapsed in a contracting state [announced via postgrant information from national office to epo]

Ref country code: FR

Free format text: LAPSE BECAUSE OF NON-PAYMENT OF DUE FEES

Effective date: 20140901