TECHNICAL FIELD
This invention relates to information processing and communication.
BACKGROUND AND PROBLEM
The code excited linear predictive (CELP) speech compression procedure has been shown to provide excellent speech quality at low bit rates. Since its original introduction in 1984, much effort has been spent to make the procedure feasible for commercial applications. Thus, while the original procedure was computationally extremely expensive, many different techniques are now available to reduce the computational effort. Its current level of maturity makes the CELP procedure desirable for many applications where bandwidth is at a premium, such as voice mail/storage, secure telephony and mobile telephony.
In some applications the CELP procedure will encounter channel errors. Efforts to minimize the effect of channel errors on speech compression procedures can be divided into methods which change the robustness of the source coder, by taking advantage of redundancies in the transmitted information, and methods which add error correction and/or error detection by means of a separate channel coder. Conventional implementations of the latter approach add a channel coder which maps selected bits of the quantization indices of a compression procedure into generic error-correction/detection codes which do not depend on the source. That this procedure is not optimal is suggested by the fact that the bits to be protected by the error correcting codes are hand picked, based on a judgement of their sensitivity. The separation between source and channel coders is justified if an arbitrarily complex coder-decoder design is optimized for a channel of a particular capacity (usually a worst case channel). Then the source coder rate can be matched to the capacity of this channel, resulting in suboptimal performance for channels of higher or lower capacity (or equal capacity, but with different characteristics). Speech coders usually encounter a variety of error conditions, and in many cases low error rates are prevalent. It is desirable to have a speech coder which exploits maximally the prevalent channels and decreases minimally in performance with diminishing channel capacity. To obtain this behavior, the source distortion must be considered in the design of the channel coder.
As an illustration that the source distortion should be considered in optimizing a channel code which is used in channels of various error rates, consider the example of Table 1. A four level scalar quantizer, of which each level has identical a-priori probability (no redundancy in the transmitted bit stream), is encoded with three different encoding schemes. Assume that virtually all channels are without errors, except a few in which a significant random error rate occurs. Table 1 shows the well known L1 and L2 error criteria for single bit errors (two bit errors per code word are exceedingly unlikely at low error rates) per codeword per error for the three encoding schemes. All codes are optimized for channels with zero error rate and have zero redundancy, but code 1 will result in the lowest L2 distortion, and code 1 and code 2 result in the lowest L1 distortion for noisy channels.
This example makes clear that a coder optimized for a certain channel (a channel with no bit errors in this case) can be further optimized to enhance performance for channels of lower quality by considering the source quality.
A technique known as pseudo-Gray coding, described in J-H. Chen, G. Davidson, A. Bersho, and K. Zeger, "Speech Coding for the Mobile Satellite Experiment", Proc. IEEE Int. Conf. on Communications, 756-763, (June 1987), is used to optimize the arrangement of a codebook to protect against the effects of channel errors. The Chen procedure takes as input a codebook and yields a rearrangement of the codevectors that minimizes the expected time average bit-error distortion. The utility of the Chen procedure is somewhat limited however because it does not include the effects of redundancy in the optimization. This is a serious limitation since in most applications where channel errors are at all significant, some redundancy is desirable despite the typically low bit rates, e.g., 4.8 kilobits per second. Furthermore, the Chen procedure uses a gradient optimization technique which involves iteratively switching the positions of codevectors to reduce the expected value of the bit-error distortion until a locally optimal state is reached. However, since the function being optimized typically has more than one local minimum, the Chen procedure will frequently result in sub-optimum performance.
In view of the foregoing, a recognized need exists in the art for an optimized, source dependent channel coder where the error protective effects of redundancy are included in the optimization and where the resulting code is more than locally optimal.
SOLUTION
This need is met and a technical advance is achieved in accordance with the principles of the invention in a parameter communication arrangement where a parameter that is transmitted over a channel using m-bit codewords or labels is quantized before transmission as one of only p levels, where, significantly, p<k=2.sup.m. Since only p labels are needed to transmit the p levels, the unused k-p labels are advantageously available to provide redundancy. The receiver decodes the redundant labels in accordance with an error routine. An encoding table mapping from the p levels to p labels and a decoding table inverse mapping from the p labels to p levels are obtained using an optimization procedure to minimize the effect of channel errors. The optimization is based on the probability distribution for the p levels such that a relatively high proportion of the error protection made available by having redundant labels inures to the benefit of parameter levels which are more likely to be transmitted. The optimization procedure is a well known technique referred to as simulated annealing which is for the first time applied to source dependent channel coding and which provides a degree of randomness in the perturbation of labels which is gradually reduced to obtain a code which is globally optimum rather than only locally optimum. Since low bit rates are desirable in many applications, a degree of redundancy is afforded by having the number of quantized levels, p, between 2.sup.m-1 and 2.sup.m in illustrative embodiments herein. The expense of such an arrangement in terms of transmitted bits is less than that of simple parity error detection.
A method in accordance with the invention is used to communicate a parameter from a source over a channel to a destination. The parameter is quantized at the source as one of p levels. The term quantization level as used herein refers to either a scalar quantization value, described by a single number, or a quantized vector value, described by an ordered set of numbers. The label that is transmitted over the channel is the one of p, m-bit labels that is associated with the quantized level in an encoding table defining a mapping from each of the p levels to a unique one of the p labels, where p<k=2.sup.m. When the m-bit label received at the destination is one of the p labels, it is decoded as the level associated with that label in a decoding table defining the inverse of the encoding table mapping. When the received label is one of the k-p labels other than the p labels, it is decoded in accordance with an error routine. The mapping of the encoding table and the inverse mapping of the decoding table are obtained to minimize the effect of channel errors and are obtained using simulated annealing based on a probability distribution of the p levels for the parameter.
In one illustrative embodiment, the error routine comprises error correction and the received label is decoded as defined by an additional mapping of the decoding table from each of the k-p redundant labels. The encoding table mapping and the decoding table inverse and additional mappings are obtained concurrently as the result of a single, simulated annealing optimization.
In other illustrative embodiments, the error routine involves error detection and the substitution of another level, for example, a default level or a level based on information received over the channel other than the received label, e.g., the same level obtained from a previous communication of the parameter.
In a further illustrative embodiment, the error routine is a combination of the above error correction and error detection and substitution methods. Certain of the redundant labels are decoded using an additional mapping of the encoding table and the other redundant labels are decoded as substitute levels. The selections of which redundant labels result in error correction and which ones result in error detection and substitution are obtained as a result of the single, simulated annealing optimization.
In the exemplary embodiments herein, the parameter is obtained at the source by analyzing input speech in accordance with a code excited linear prediction (CELP) model; the result obtained by decoding the received label is used at the destination to generate synthetic speech also in accordance with the CELP model. Example parameters are the gain factors and indices for the adaptive and stochastic codebooks used in an illustrative CELP speech processing arrangement. The encoding table and decoding table mappings are obtained to minimize distortion in the synthetic speech generated at the destination.
Another alternative embodiment uses a single, simulated annealing procedure to obtain optimized encoding and decoding tables for each of a number of parameters, where the error measure used in the optimization is an overall error measure.
In accordance with another aspect of the invention, a parameter is quantized at the source as one of p levels. The label that is transmitted over the channel is the one of p, m-bit labels that is associated with the quantized level in an encoding table defining a mapping from each of the p levels to a unique one of the p labels, where p<k=2.sup.m. When the m-bit label received at the destination is one of the p labels, it is decoded as the level associated with that label in a decoding table defining the inverse of the encoding table mapping. When the received label is one of the k-p labels other than the p labels, it is decoded in accordance with an error routine. When the received label is one of at least certain ones of the k-p other labels, it is decoded as defined by an additional mapping of the decoding table. The mapping of the encoding table and the inverse mapping of the decoding table are obtained to minimize the effect of channel errors and are obtained based on a probability distribution of the p levels for the parameter. The inverse and additional mappings are such that at least one of the p labels differs in b bits, 1<=b<m, from a label which maps into the same level as the one of the p labels and which also differs in b bits from a label which maps into a level other than that same level.
In accordance with still another aspect of the invention, a parameter is quantized at the source as one of p levels. The label that is transmitted over the channel is the one of p, m-bit labels that is associated with the quantized level in an encoding table defining a mapping from each of the p levels to a unique one of the p labels, where p<=k=2.sup.m. When the m-bit label received at the destination is one of the p labels, it is decoded as the level associated with that label in a decoding table defining the inverse of the encoding table mapping. The mapping of the encoding table and the inverse mapping of the decoding table are obtained to minimize the effect of channel errors using simulated annealing based on a probability distribution of the p levels for the parameter.
DRAWING DESCRIPTION
FIG. 1 is a block diagram of an exemplary speech coding arrangement using the channel coding method of the present invention;
FIG. 2 illustrates the quantization of an arbitrary parameter X of the type generated by the speech analyzer of FIG. 1;
FIG. 3 is a probability distribution for the parameter X;
FIG. 4 is an encoding table mapping for parameter X as obtained from a simulated annealing optimization procedure and used in the channel encoder of FIG. 1;
FIG. 5 is a decoding table inverse mapping for parameter X as obtained from the simulated annealing procedure and used in the channel decoder of FIG. 1;
FIG. 6 is a decoding table additional mapping for parameter X as obtained from the simulated annealing procedure and used in the channel decoder of FIG. 1 for the case where error correction is performed on redundant labels;
FIGS. 7 and 8 are diagrams depicting the inputs, outputs, and associated error routines for simulated annealing procedures for a single parameter and multiple parameters respectively, which procedures are described in detail with reference to Tables 2-4 herein, and
FIGS. 9 through 15 are data curves used in describing the performance of channel codes illustrating the present invention.
DETAILED DESCRIPTION
1. Introduction
An illustrative speech processing arrangement in accordance with the invention is shown in block diagram form in FIG. 1. Incoming analog speech signals are converted to digitized speech samples by an A/D converter 50. The digitized speech samples from converter 50 are processed by speech analyzer 100, which in the present example uses the CELP speech model for analysis. The results obtained by analyzer 100 are a number of parameters which are transmitted to a channel encoder 200 for encoding and transmission over a channel 300. Advantageously, channel 300 may be a communication transmission path or may be storage media so that voice synthesis may be provided for various applications at a later point in time. A channel decoder 400 receives the quantized parameters from channel 300, decodes them, and transmits the decoded parameters to a speech synthesizer 500. Synthesizer 500 processes the parameters using the CELP speech model to generate digital, synthetic speech samples which are in turn processed by a D/A converter 550 to reproduce the incoming analog speech signals. The present invention focuses on the channel encoding and decoding functions. An encoding table 210 within encoder 200 and a decoding table 410 within decoder 400 are obtained as the result of an optimization procedure referred to as simulated annealing to minimize the effect of channel errors in a manner described in detail herein.
In the present example, speech analyzer 100 and speech synthesizer 500 implement a particular CELP procedure referred to as stochastically excited linear prediction (SELP) as described in W. B. Kleijn, D. J. Krasinski, and R. H. Ketchum, "An Efficient Stochastically Excited Linear Predictive Coding Algorithm for High Quality Low Bit Rate Transmission of Speech", Speech Communication, Vol. VII, 305-316, 1988. The SELP procedure for speech coding offers good performance at bit rates as low as 4.8 kbit/s. Linear predictive coding (LPC) techniques remove the short-term correlation from the speech. A pitch loop removes long-term correlation, producing a noise-like residual, which is vector quantized. Parameters describing the LPC filter coefficients, the long-term predictor, and the vector quantization are obtained by analyzer 100. Several improvements to the SELP procedure are implemented which result in better speech quality and higher computational efficiency. In its closed-loop form, the pitch loop can be interpreted as a vector quantization of the desired excitation signal with an adaptive codebook populated by previous excitation sequences. To better model the non-stationarity of speech, the adaptive codebook is extended with a special set of candidate vectors which are transforms of other codebook entries. The second stage vector quantization is performed using a fixed stochastic codebook. In its original form, the SELP procedure requires a large computational effort. A recursive procedure is employed which performs a very fast search through the adaptive codebook. In this method, the error criterion is modified and th resulting symmetries are exploited. The same fast vector quantization procedure is applied to the stochastic codebook.
As mentioned previously, this invention relates to optimized channel encoding and decoding of parameters such as the codebook indices and gain factors obtained by speech analyzer 100. FIG. 2 illustrates the quantization of an arbitrary parameter, X, as one of six levels 0, 1, 2, 3, 4, and 5. At time t.sub.1, for example, X is quantized as level 5, at time t.sub.2 as level 2, and at time t.sub.3 as level 4. Since X is to be transmitted using a three-bit label and since only six of the possible eight labels are needed to transmit the six levels, two labels are available to provide redundancy. The probability distribution for parameter X is given in FIG. 3, where the levels 0, 1, 2, 3, 4, and 5 have finite probabilities, P(0), P(1), P(2), P(3), P(4), and P(5) and levels 6 and 7 each have zero probability. In a first exemplary embodiment, the redundant labels are used to provide error correction. As functionally depicted in FIG. 7, the probability distribution of parameter X is provided as input to a simulated annealing procedure described in detail herein. The simulated annealing procedure produces as its output the mappings given for example by FIGS. 4, 5, and 6. FIG. 4 illustrates a particular mapping for parameter X in encoding table 210 where the levels 0, 1, 2, 3, 4, and 5 are mapped into the three-bit lables 010, 110, 111, 001, 000, and 100 respectively. FIG. 5 illustrates the inverse mapping for parameter X in decoding table 410 where the labels 010, 110, 111, 001, 000, and 100 are mapped back into the levels 0, 2, 3, 4, and 5 respectively. Since the error routine used in this first exemplary embodiment is error correction, an additional mapping as given by FIG. 6 is included in decoding table 410 for parameter X. When the labels 011 and 101 are received, channel decoder 400 knows that a channel error was made since the labels 011 and 101 are redundant and are not transmitted by encoder 200. The result of the simulated annealing procedure in this embodiment is that the label 011 is mapped into level 0 and the label 101 is mapped in level 5.
In a second exemplary embodiment, the error routine comprises error detection and the substitution of the level obtained during the previous communication of parameter X. In a third exemplary embodiment, the error routine comprises error detection and the substitution of a default level, e.g., level 0. In both the second and third embodiments, no additional mapping for parameter X is required in decoding table 410 like that of FIG. 6 when the error routine was error correction. However, the error routine operation when a redundant label is received is used in determining the error measure which is minimized by the simulated annealing optimization.
In a fourth exemplary embodiment, the error routine is a combination of the above error correction and error detection and substitution methods. Certain of the redundant labels, for example label 011 in the simple, three-bit label case described, are decoded using an additional mapping of the encoding table and the other redundant labels, label 101 in the example, are decoded as substitute levels. The selections of which redundant labels result in error correction and which ones result in error detection and substitution are obtained as a result of the single, simulated annealing optimization.
In a fifth exemplary embodiment, a single, simulated annealing procedure is used to obtain optimized encoding and decoding tables for each of a number of parameters as functionally depicted in FIG. 8, where the error measure used in the optimization is an overall error measure.
The next section describes in detail the method of measuring the immediate effect of decoding errors in the excitation function of CELP caused by channel errors. For reference purposes this section includes a brief description of the CELP procedure used. In section 3 a description of simulated annealing for the optimization of a source-dependent channel encoding is provided. The presented simulated annealing procedures are applicable to the coding of parameters of many (speech) compression procedures, but the focus here is their application to the CELP speech coding procedure. Section 4 studies the error sensitivity of the codebook gains. It applies the simulated annealing procedures to the channel coding of these parameters. In section 5 the focus shifts to the channel encoding of the codebook indices, to which the simulated annealing procedure is applied. Included with the discussion of the codebook indices is an example of the effect that the probability distribution has on the performance of the annealing procedures. This is followed by a conclusion section. Finally, several appendices with tables containing optimal codes for some of the CELP parameters are provided.
2. An Error Criterion for the Effect of Channel Errors on CELP
2.1. Description of the CELP Procedure
The CELP procedure used here is identical to that described in W. B. Kleijn, D. J. Krasinski, and R. H. Ketchum, "An Efficient Stochastically Excited Linear Predictive Coding Algorithm for High Quality Low Bit Rate Transmission of Speech", Speech Communication, Vol. VII, 305-316, 1988. It efficiently encodes a digitized (usually sampled at a rate of 8000 Hz) speech signal on a frame by frame basis. Synthetic speech is generated by filtering an excitation signal. The filter adds the short term correlation to the signal, roughly modeling the effect of the vocal tract and the mouth. It is determined from a linear predictive (LP) analysis of the original speech signal. For transmission, the filter coefficients, are quantized with 35 bits using absolute line spectral frequencies (this method exhibits low sensitivity to channel errors). The ideal excitation signal segment which renders synthetic speech identical to the original speech for the present frame is vector quantized to facilitate transmission. The LP-analysis window length and the update intervals are 240 samples while a frame length of 60 samples is used for the vector quantization of the ideal excitation vector.
The target (or ideal) excitation vector for a frame, which results in a perfect match of the original speech (when it is filtered through the inverse LPC filter) is vector quantized, using a shape-gain vector quantizer, in two sequential stages. The candidate vectors of the two codebooks are selected to minimize a squared error criterion on the synthetic speech. Because of the finite size of a frame, the impulse response of the inverse LPC filter can be truncated and described by a finite impulse response (FIR) filter. The FIR filtering operation can be written as a matrix multiplication of a Toeplitz matrix H, which describes the filter, and a vector describing the excitation. If t is the target excitation vector, s the candidate excitation vector, and .lambda. the scaling of the excitation vector, then the mismatch of speech and synthetic speech is the vector H(.lambda.s-t). Thus, the error criterion to be minimized can be written as (.lambda.s-t).sup.T H.sup.T H(.lambda.s-t). The square matrix H.sup.T H is referred to as the spectral weighting matrix.
For the first stage an "adaptive" codebook is used which contains synthetic excitation functions of the recent past. It uses 4 bits for the gain and 7 or 8 bits for the index. The adaptive codebook is updated after each frame, and allows the excitation to become periodic in nature, facilitating the description of voiced speech. The second stage consists of a search through a fixed codebook, which further refines the excitation function resulting from the search through the adaptive codebook. The stochastic codebook consists of overlapping entries, with adjacent candidates separated by a shift of two samples. Its samples have a Gaussian distribution, center clipped at 1.5 standard deviation. Four bits are used for the gain and 8 bits for the indices. To improve the coding efficiency, the dynamic range of the stochastic codebook gain is reduced by multiplying the stochastic codebook by a scale factor prior to calculating the gain factor. The scale factor is based on energy of the contribution of the adaptive codebook to the present frame.
Thus, without error protection bits, the procedure used in the following sections requires 4233 or 4366 bits/second for a 7 or 8 bit adaptive codebook, respectively.
2.2. Definition of the Error Criterion
In this description, the effect of channel errors on the parameters describing the CELP excitation function and methods for performance improvement are discussed. To evaluate the performance of a CELP procedure under such conditions, an appropriate error criterion must be defined. A natural method would be to compare the signal to noise ratios (using the original speech as reference) of the synthetic speech with and without channel errors, or to compute the signal to noise ratio of the synthetic speech with channel errors using the synthetic speech without channel errors as reference. To evaluate the effect of channel errors on particular parameters, those parameters could be perturbed in a systematic way, while the other parameters are left untouched.
A difficulty with measuring the channel errors on synthetic speech which is corrupted by channel errors is that the result is dependent both on the size of the decoding error, and on the attenuation rate of the resulting distortion over the following frames. However, it may be argured that this method does provide a good measure of the overall channel error performance of a CELP procedure, provided that the errors are introduced such that they do not interfere with each other. Thus, one can evaluate the channel error performance of a particular encoding bit by systematically disturbing that bit in frames which are sufficiently far apart. (Note that at a 1% error rate the probability that the same parameter will be disturbed in adjacent frames is negligibly small. This can be expected to provide a better measure of the performance than perturbing the same bit in every successive frame, which may result in interaction of the errors in successive frames.
However, although systematically disturbing particular bits in frames sufficiently far apart may provide a satisfactory error criterion, it results in very laborious evaluations. This makes this error criterion unsuitable for the combinatorial optimization required to find a good channel code. Instead of using an evaluation criterion which operates on the output speech, including distortion over following frames, a criterion is introduced which maintains the features of the distance measure used in the CELP procedure to select the best candidate from the codebooks. By evaluating synthetic speech quality on a per frame basis the effect of the persistence of the distortion over time is eliminated.
The focus here will be on errors at low channel error rates (i.e. 1% or less); thus, it can safely be assumed that multiple bit errors are highly improbable in the description of a single parameter describing the CELP excitation. However, the following procedures are easily generalized to include more bit errors per parameter.
Let us define c.sup.(i) to be the channel code of a particular excitation parameter (codebook index or codebook gain), with quantization index i. The value or vector associated with the quantization index i is denoted as r.sub.i,i. (The meaning of the double subscript will become clear later.) The probability that channel code c.sup.(i) occurs is denoted as P(c.sup.(i)). Note that, in the case of no redundant codes, P(c.sup.(i)) is the probability that index i provides the parameter with its best fit. The target (optimal) parameter or vector is denoted as t. At the analyzer t is matched by the quantized parameter r.sub.i,i. In general, assume that r.sub.i,i can be the result of multiple quantizations; for example a vector may have a shape index as well as a gain index. If the quantization index is changed from the transmitted value i to j, then denote the resulting parameter or vector at the receive end by r.sub.i,j. Thus, in the parameter r.sub.i,j the index i indicates that the other quantizations describing r.sub.i,j were associated with the index i and not with the received index j.
In this description the target t is always the target excitation vector for the particular codebook search. If the codebook candidate index is considered, then r.sub.i,j is the excitation shape vector of index j but with the gain properly quantized for the excitation vector i. If the codebook gain is considered, r.sub.i,j denotes the gain indexed j with the codebook index obtained from the search. Let us denote by D.sub.i (r.sub.i,j) the mean distance between the parameter r.sub.i,j and the target (optimal) value of the parameter t. Note that D.sub.i (r.sub.i,j) describes a function of j. That is, D.sub.i (r.sub.i,j) is a penalty function for changing the transmission index from i to j under the constraint that the quantization index i is associated with the parameter level or codebook entry of best fit. Further, N is the number of entries or levels, and M denotes the number of bits of a transmission label. An appropriate error criterion, which describes the sensitivity of the parameter encoding to single bit errors is now: ##EQU1## where f(c.sup.(i),k) is the index of the parameter associated with the code word obtained by flipping the k'th bit of code word c.sup.(i). During optimization of the encodings {c}, one compares the criterion .epsilon. for various encoding configuration. Thus, the reference level D.sub.i (r.sub.i,i) is of no significance, and can be omitted from criterion (1).
The error criterion used in the codebook selection process of the CELP procedure cannot be used directly for the penalty function D.sub.i () of equation (1) because the latter is a statistical average of the performance, while the former is evaluated for individual frames only. However, the CELP error criterion can be used as a starting point in the selection of a proper penalty function, which can be evaluated quickly. The selection process of the CELP procedure uses a least-squares error distance measure. The selection process will give identical results if the least-squares criterion is replaced by a signal to noise ratio, or its logarithm. This is important since the least-squares error criterion is not appropriate for averaging over a large number of frames; it weighs frames with large absolute error unduly heavily. To eliminate this problem, the mean logarithmic segmental signal to noise ratio is commonly used to evaluate the objective performance of the CELP and multi-pulse procedures. Thus, it is reasonable to choose D.sub.i (r.sub.i,j) to be the mean logarithmic segmental signal to noise ratio of the distorted speech signal generated with the parameter value or vector r.sub.i,j.
The criterion used for the vector quantization of CELP is commonly modified to better model the perceived error. Due to masking, errors in spectral regions with high signal energy are less noticeable than errors in regions with lower signal energy. Thus, it is advantageous to change the penalty function D() similarly to put more emphasis on the spectral regions of lower energy. Here this type of weighting is used in the evaluation of the segmental signal to noise ratio. This can be expected to result in better perceived performance than a criterion which does not include this weighting. The CELP procedure already uses the weighting, facilitating usage of the modified criterion.
If the spectral weighting matrix H.sup.T H describes the effect of perceptual weighting, the distance measure D.sub.i () for the codebook index (describing the unscaled excitation vector) becomes:
where s.sub.j is the candidate vector associated with index j, which was substituted for the winning candidate vector s.sub.i due to a (single bit) channel error. .lambda..sub.k is the optimally quantized gain factor for s.sub.i, and E[..vertline.s.sub.i ] indicates the expectation value under the condition that s.sub.i is the best match. The distance measure for the gain factor .lambda. looks similar:
where .lambda..sub.j is the gain quantization level associated with index j, which is substituted for the quantization level with index i due to a channel error. The quantization level .lambda..sub.i is the optimally quantized quantization for the winning codebook vector s.sub.k. E[..vertline..lambda..sub.i ] indicates the expectation value under the constraint that .lambda..sub.i is the best match. In the following, the expectation values will be approximated by the mean obtained over a large ensemble of frames.
Employing either equation (2) or (3), and a table which provides the values for the mean distance values D.sub.i () and the probabilities P(c.sup.(i)), the encoding of the parameters describing the excitation can be optimized with respect to the criterion of equation (1).
3. A Simulated Annealing Procedure to Optimize Channel Coding
The minimization of the criterion of equation (1) is a combinatorial optimization. Since it is usually impractical to evaluate the performance for all possible combinations of labels and indices, suboptimal techniques must be employed. A particularly powerful technique, which finds good solutions to a variety of combinatorial optimization problems, is simulated annealing, S. Kirkpatrick, C. D. Gelatt, M. P. Vecchi, "Optimization by Simulated Annealing", Science, Vol. 220, 671-680, 1983. It has also been used for the design of good source-independent channel codes, e.g., A. A. El Gamal, L. A. Hemachandra, I. Shperling, V. K. Wei, "Using Simulated Annealing to Design Good Codes", IEEE Trans. Information Theory, Vol. IT-33, No. 1, 116-123, 1987. Here the simulated annealing procedure is used to develop good source-dependent channel codes. Although the following procedures are easily generalized to include higher error rates, the focus here is to use the annealing procedures to improve the performance of the encoding of the excitation function of the CELP procedure at channel error rates of 1% and less at a minimal increase in the bit rate. As mentioned before, at these bit rates only single bit errors to the individual parameters have to be considered, since multiple bit errors are highly improbable. Furthermore, it is also reasonable to assume that the effect of interference between the errors can be neglected at these rates.
During the annealing process an error criterion .epsilon.-the "energy" of the system- is minimized. This is achieved by lowering an abstract "temperature" T in steps while maintaining the system in equilibrium. At equilibrium, the system state is continuously changing, "traveling" through its phase space in such a manner that the probability of the system being in a certain state with energy .epsilon..sub.t at time t is proportional to the Boltzmann factor exp (-.epsilon..sub.t /T). Thus, the occurrences of the system states have a Boltzmann distribution. States with low energy (error) are more likely than states with high energy. However, at high temperature the distribution is more uniform than at low temperature. Because of the fact that the system has memory (it travels through phase space with small steps), lowering the temperature gradually causes the system to gravitate towards regions of high probability, i.e. wide and/or deep energy basins. The statistical behavior of the annealing process reduces significantly the probability of entrapment in local minima.
The stochastic motion through phase space is achieved by perturbing the system state in a directionally unbiased random manner to obtain a trial state with associated energy .epsilon..sub.trial, and then accepting or rejecting the trial state as the next system state with probability one if .epsilon..sub.trial <.epsilon..sub.t, and probability exp ((.epsilon..sub.t -.epsilon..sub.trial)/T) otherwise. It is easily verified that this indeed results in a Boltzmann distribution of the probabilities of the system states. If .alpha. is some factor slightly smaller than 1, the annealing procedure for optimization of channel codes is as given in Table 2.
For CELP, channel code perturbations can be generated by exchanging two randomly selected transmission labels (codes), i.e. two sequences exchange their transmission label, and compute the difference in the error criterion (1) before and after this change. The exchange of encodings is then preserved or undone depending on the probabilistic criterion.
Note that the transition probability from one channel code to another channel coder depends only on the difference of their error criteria. Thus, to minimize computer run time, the error criterion itself need not be evaluated during each iteration, but only the contributions which are modified by the label exchange. Since only single bit errors are considered, only sequences with transmission labels differing by a single bit from the exchanged labels are involved. When the labels of two sequences are exchanged, the distances of both sequences to all other sequences which have labels which differ by one bit from the labels of the two selected sequences must be considered in the computation. First the sum of these terms is computed for the original configuration, and then the same summation is performed for the trial configuration. If these partial energy evaluations are denoted by .eta..sub.orig and .eta..sub.trial, the inner loop of the procedure is as given in Table 3.
The procedure of Table 3 was discussed for the case where no redundant labels are available for error-protection. The discussion is now generalized to include redundant labels if they are used for error detection (and not for error correction). If the simulated annealing procedure is used, error detection may cover an arbitrary fraction of all transmission errors (it will tend to select for detection those errors with the greatest impact on performance). If a label which is not associated with a parameter index (a redundant label) is obtained at the receive end of the CELP coder, an error is detected. Receive-end logic can be used to decide what value to assume for the affected parameter if an error is detected. In the present case this logic depends only on the fact that an error is detected, and does not use the fact that the erroneous code has a particular set of nearest neighbors. An example of such logic, which will be discussed in later sections, is repeating the previous adaptive codebook delay whenever an error is detected. Alternatively, one could select a default value for the parameter which contains an error. Given the receive-end logic, it is possible to find a value for the distance between the target parameter t, and the quantized parameter value substituted for it in the case of error detection. By using the expectation value of the resulting performance, the penalty function D.sub.i () can be defined in its entirety for all original (non-redundant) labels. The transmission probability of the additional indices (and thus also the associated terms P(c.sup.(i))D.sub.i ()) is equal to zero. Therefore the function D.sub.i () associated with these redundant labels is of no significance. If the set of transmission labels, which can be decoded without any additional logic, are thought of as being associated with quantization levels of finite probability, then the redundant labels are associated with quantization levels of zero probability (fictitious quantization levels). As a result the procedure of Table 3 can be used for the error detection case. The case where an optimal combination of error correction and error detection is used is discussed later herein.
The procedure can be efficiently implemented in software by using an ordered array of pointers indexed c.sup.(i) to structures associated with the parameters r.sub.i. Thus, a pointer array index is the transmission label (code) c.sup.(i), while the structure it points to contains the parameter quantization index i, the label transmission probability P(c.sup.(i)) and the entire distance function D.sub.i (r.sub.ij) as a function of j. In order to save some multiplications it is useful to normalize the distance function D.sub.i () by premultiplying with the probability P(c.sup.(i)). The exchange of labels is now easily implemented as the exchange of pointers. The penalty functions are obtained as follows: (1) determine the neighboring labels to c.sup.(i) (here those labels which differ from c.sup.(i) by one bit), (2) determine the quantization index associated with these neighboring labels (i.e. evaluate f(c.sup.(i),k) for all k), (3) look up D.sub.i (r.sub.i,f(c.spsb.(i).sub.,k)) from the structure pointed to by c.sup.(i) and D.sub.f(c.spsb.(i).sub.,k) (r.sub.f(c.spsb.(i).sub.,k),i) from the structure pointed to by c.sup.(f(c.spsp.(i).sup.,k)).
Although in some cases it is advantageous to use error detection combined with a substitute parameter value from external (or previously transmitted) information, in many cases it is advantageous to use error correction. First the procedure is described for error correction only, and later the procedure is extended to obtain an optimal combination of both error correction and error detection.
The procedure for finding the best neighbors for the ensemble of transmitted transmission labels can be interpreted as a crude form of error correction. If redundant labels are added, this crude error correction can be improved upon by finding better neighbors for the ensemble of transmission labels. If there are a total of N labels, P of which have non-zero transmission probability, then the simulated annealing procedure must be augmented so that the N-P redundant labels can be shuffled between the P valid indices to quantized parameter levels. Thus, each quantization index i has one or more receive labels c.sup.(i) associated with it. One of these labels is the transmission label; this label has a finite P(c.sup.(i)), while the other labels with the same index i have zero probability (this is why the probabilities have been associated with the transmission label, and not with the quantized parameter index i). Thus, each label is associated with an index and is either redundant or not. During the annealing process redundant labels can be distinguished from non-redundant labels by looking at the associated P(c.sup.(i)) (or a separate "redundancy indicator" associated with the label). To perturb the redundant labels one changes the associated index at random to another valid index. This perturbation is performed by the procedure given in Table 4.
This procedure of Table 4 can be added to the inner loop of the procedure to implement error correction of non-uniform accuracy for codes with error-protection bits. Its error correction capability is a function of the number of redundant labels.
The above procedure for (partial) error correction is extended to include error detection. Before, error detection capability was added by introducing fictitious quantization levels, which had zero transmission probability. The same method can be followed here, but now only a single fictitious quantization level is required. Any of the redundant labels can point towards this fictitious quantization level. Receival of such a redundant label would indicate a transmission error, triggering the procedure used when an error is detected (e.g. repeat the previous frame value). Note that the above design procedure results in an optimal trade-off between error correction and error detection.
Until now the procedures discussed assume that single parameters are to be encoded. However, the procedures readily generalize to include the channel encoding of several parameters at once, at the expense of a large increase of computational effort. The penalty functions D.sub.i (x.sub.j), which originally described performance for all quantization levels x.sub.j of parameter x under the constraint that level x.sub.i was optimal, must now be generalized. Thus, for two parameters x and y, the penalty D.sub.ik (x.sub.j, y.sub.l), describes the performance for all combinations of quantization levels of the two parameters, under the constraint that the combination x.sub.i, y.sub.k was obtained by the analyzer.
4. Reduction of the Effect of Channel Errors on the Gain Parameters
The gain parameters determine the energy of the speech signal. Errors in the gain transmission are usually heard as pops and clicks. Coders which do not have an inherent decay of gain errors will eventually overflow or underflow in an environment with channel errors. These problems can be minimized by increasing the attenuation rate of this type of distortion, and by minimizing the size of the decoding error according to the error criterion of equation (1).
4.1. Error Protection for the Codebook Gain Parameters
As mentioned in section 2.1 the CELP coder used to illustrate the techniques here uses 4 bits to transmit the adaptive codebook gain. Table 5 shows the quantization levels used for this gain, which have a large dynamic range, and their probabilities. To prevent adjustment of the error protection for silence, all data of this and the following sections were obtained from frames with a mean energy of amplitude 129 or more per sample. This resulted in a zero probability for the zero gain quantization level.
To improve the behavior of the gain factor under channel error conditions, the penalty functions D.sub.i (r.sub.i,j,t) must be known. The penalty functions for the indices 6 through 15 are approximated by averaging over a set of 19 speakers (19 sentences, 40 seconds of speech) are illustrated in FIG. 9. As expected, gains of small absolute value (which in case of channel errors are often replaced by larger gains) are most sensitive to errors, while large gains are less sensitive to errors.
In Table 6 the signal to noise ratios are shown for the adaptive codebook gain under channel error conditions for various encoding procedures, including a random code assignment, natural binary code (N.B.C.), and Gray code. Without the addition of any error-protection information the simulated annealing approach increases the performance by eliminating neighbors with large gains from the most likely gain levels, which are moderate in absolute magnitude. This is illustrated in Appendix A, which provides the coding tables for the annealing results, as well as a listing of all neighbors for each quantization level.
Table 6 includes an example where less than a single bit is used for protection. For this case the number of quantization levels is dropped from 16 to 12; the first four quantization levels (-10.0 through -0.79) were eliminated. This is consistent with the observation that the sign of the excitation pulses is usually preserved from one frame to the next. The large performance improvement from this four label redundancy is striking. It is associated with a minor clear channel performance reduction. It should be noted that the performance with four redundant labels is improved not only because of the redundant labels, but also because some of the allowed quantization levels which give large errors if erroneously selected have been eliminated. However, a relatively large performance improvement with a fractional bit allotment for error protection is typical of many examples which were informally studied.
Table 6 also displays the performance for a simple parity check with default logic. Using the error criterion of equation (1), the best default quantization level was found to be 0.88 (index 9), which scores an average signal to noise ratio of 3.91. Thus, this is the highest score to be obtained with a conventional parity check. (Here only default values which are part of the quantization table are considered). Using simulated annealing to obtain a good code at the same bit allocation resulted in better performance (4.55 dB). The coding table for this case, is provided in Appendix B, which, like Appendix A, displays the neighbors of all the quantization levels, showing clearly the improvement in similarity of quantization levels of codes which differ by one bit. The performance increased to 4.95 dB if two bits were expended on error correction. If three additional bits are used, complete error correction can be achieved for single bit errors. In this case the annealing method result is equivalent to a Hamming (7,4) code. Note, however, that multiple bit errors are more likely in a 7 bit code word than the original 4 bit code word, and that the table provides, therefore, a somewhat skewed view.
The CELP coder uses 4 bits to describe the gain of the stochastic codebook. The 16 quantization levels for the gain, which are provided in Table 7 are symmetric since the stochastic codebook entries have no preferred orientation. Similarly the probability of occurrence of the various indices is also symmetric.
Because of the symmetry of the stochastic gain statistics, and its small dynamic range, their penalty functions D.sub.i (r.sub.ij) form a particularly good example. The entire set of 16 curves D.sub.i () is provided in FIG. 10. Again, it shows that gains of small absolute value (which in case of an error are replaced by larger gains) are most sensitive to errors, while large gains are less sensitive to errors.
Table 8 shows the performance of the gain encoding for various encoding procedures under channel errors. The clear channel performance of the 16 level quantizer is 6.43 dB. Using a randomly selected gain from the 16 levels, as will occur in a the case of a single bit error for random coding, results in a worst case performance of approximately 2.75 dB. By using a Natural Binary Code (N.B.C.) the least significant bits of the transmitted code will have lower error sensitivity, resulting in a better performance. A Gray encoding of the gains will improve further on this. In fact, it turns out that the Gray encoding for this case is close to the best encoding found with the simulated annealing procedure. By removing the last four quantization levels, but keeping their four (now redundant) labels the annealing procedure can be used to further improve the performance under channel errors. The improvement is not as dramatic as in the case of the adaptive codebook gain because of the smaller dynamic range of the stochastic codebook. Again, this improvement does come at the expense of a minor degradation of clear channel performance.
Table 8 also shows the performance if one bit extra is allowed for error detection. The best default quantization level was -0.22 (index 8), which obtained a score of 5.02 dB. However, the annealing procedure used the same extra bit to define a code table with a score of 5.88 dB. In this case single bit errors become virtually inaudible.
The results described in this section were obtained for the gain of the stochastic and adaptive codebooks of a particular implementation of the CELP procedure. However, generalization of the conclusions which are drawn from the results is expected for other CELP coders. This assertion is supported by the fact that the gain factors of the adaptive and stochastic codebook show similar behavior under channel errors, despite their different dynamic ranges and the differences in the characteristics of the two codebooks.
The actual level of protection required must be determined by considering the performance trade-off between clear channel performance, which decreases if additional information is to be transmitted, and performance under channel error conditions.
5. Reduction of the Effect of Channel Errors on Codebook Indices
The indices of the adaptive and stochastic codebooks determine the shape of their contributions to the CELP excitation function. Only the contribution of the adaptive codebook will be affected directly by past indexing errors. In frames where the adaptive codebook contribution is affected by previous indexing errors, the stochastic codebook contribution, which normally refines the synthetic speech waveform, will be anomalous. The net result is that voiced synthetic speech loses its periodic character and sounds scratchy. The rate of decay of this distortion is determined by the relative size of the contributions of the adaptive and stochastic codebooks. This rate could be increased by forcing the adaptive codebook contribution to be smaller. However, this is not desirable, since this decreases the periodic character of clear-channel speech.
Thus, it is not possible to increase the attenuation rate of the distortion generated by indexing errors without a detrimental effect on the clear channel performance. In the following sections the focus is on reducing the immediate effect of errors in the indices.
5.1. Results for the Adaptive Codebook Index
For the adaptive codebook index the behavior of the mean distance function D.sub.i (r.sub.ij,t) is dominated by the effects of the periodicity of the voiced speech signal. As an example, FIG. 11 shows the mean distance of the target vector to all candidate vectors in an 8 bit adaptive codebook, under the constraint that the target vector is best matched by the candidate vector starting 60 samples prior to the present frame (D.sub.60 (r.sub.60,j) as function of j). In this case, candidate vectors with a delay of close to 30, 60, 90, 120 etc. (and in particular those with a delay of close to 60, 120, 180, 240) are preferred over other candidate vectors. A similar behavior is observed for other delays. These delays correspond to pitch halving and pitch doubling. Thus, if the actual delay is 60 samples a good channel code for this delay would, if it suffers a reversal of a single bit, result in the channel code for a delay near 30, 60, 90, 120, etc.
First the performance of the annealing procedure is considered under the assumption that all delays are equally likely. This assumption is not entirely reasonable but will provide useful information on how the simulated annealing procedure operates. Table 9 shows the performance of several encoding schemes for the adaptive codebook index under this assumption. The codes are compared over a set of 19 sentences from 19 speakers, representing approximately 40 seconds of speech. While the random code is worst, the Natural Binary Code (N.B.C) and the Gray code represent significant improvements. These improvements result since single bit reversals for the least significant bits are likely to result in a neighboring delay. The N.B.C. and Gray codes do not take advantage of the periodic nature of the adaptive codebook. This is in contrast with the simulated annealing procedure developed here, which is capable of taking advantage of this periodicity. However, since there are severe combinatorial constraints on the encoding of the various delays (note that each delay has seven neighbors for a seven bit code), this results in relatively small improvement.
FIG. 12 shows a typical distribution for the observed delays. If this experimental probability distribution is used for the optimization of the channel coding, the effect of the forementioned constraint is reduced. Now delays of low probability will be saddled with dissimilar neighbors, while delays of high probability will have more similar neighbors. The performance for the various channel codes using the proper distribution is provided in Table 10. The clear channel performance is slightly different from that of Table 9. (The more likely delays are relatively short, resulting in a better performance when the probability distribution is taken into account.) The changes of the performance of the random code, the N.B.C. code, as well as the Gray Code are insignificant. However, the channel coding scheme obtained from the simulated annealing scheme shows an improvement of 0.4-0.5 dB because it emphasizes protection of transmission labels of high probability.
FIG. 13 shows the performance of the adaptive codebook as a function of delay, for the optimal case, and for the case that the delay of the previous frame is used in the present frame. Comparing FIG. 11 and FIG. 13 shows that for the case of a delay of 60 samples, repeating the previous frame delay provides significantly better performance than the mean performance of a random delay (within the range 21-276). In fact, for many delays repeating the previous delay is second in mean performance only to the present frame delay. The same result holds for other delays (more so for delays which most often represent a pitch). Thus, repeating the delay of the previous frame is a good strategy if errors can be detected. For example, a parity bit can be used to detect single bit errors in the adaptive codebook index. As is shown in Table 11, a 7 bit code, with an additional parity bit provides a significant improvement in performance under channel error conditions. The advantage of the simulated annealing procedure is that one can provide error detection on delays with high probability, but omit the detection on infrequently chosen delays, lowering the required bit allocation for protection to less than one bit. Note that the annealing procedure simultaneously optimizes the error detection and neighborliness of the codes for the indices. The results of this mixed detection and protection are shown in Table 11. Appendix C provides an example of a 7 bit adaptive codebook index channel coding with limited redundancy. Note that the simulated annealing procedure results in the same code as the parity code for the case where 128 delays are encoded with 8 bits.
5.2. Results for the Stochastic Codebook
The behavior of the mean distance function D.sub.i (r.sub.ij) of the stochastic codebook does not show regularity like that of the adaptive codebook index. The mean distance of the candidate vectors to the target vector given that a certain sequence (D.sub.127 (r.sub.127,j)) provides the best match is illustrated in FIG. 14. The only structure which is clear in this figure results from the overlapping nature of the stochastic codebook (neighboring candidates are shifted by two samples); direct neighbors are often preferred candidates for single bit reversals of the label. The same effect is also visible in the probability distribution (FIG. 15).
The procedures used for the adaptive codebook can also be used for channel coding of stochastic codebook. However, in this case the optimized channel code is dependent on the particular codebook, and code tables are therefore omitted. The difference between clear channel and one bit error performance is not as dramatic as for the adaptive codebook. The results are shown in Table 12. Because of the overlapping nature of the codebook Gray Code and Natural Binary Code perform better than the random labeling. Again, the simulated annealing procedure finds a better code than the other procedures. If error detection is present the performance of the code can be improved if the stochastic codebook contribution is omitted altogether in case of an error. If error detection is present for all bits, then the performance under error conditions will be identical to that of the optimal performance of the adaptive codebook.
6. Conclusion
Using the CELP procedure as example, it has been shown that source-dependent channel coding can be used to improve the performance of (speech) compression procedures operating in a range of channel error conditions.
To eliminate the effects of the feedback employed in many compression procedures, it is useful to divide the analysis of channel errors into the immediate effect of the decoding error and the attenuation rate of the resulting distortion. Usually, the immediate distortion can be described with a concise error criterion, which does not require reevaluation of the speech signal for each permutation of the channel code. Thus, it becomes computationally feasible to consider the source distortion in the optimization of the channel code.
This description focused on the channel encoding of the excitation function of the CELP procedure, and described an appropriate error criterion specific to the excitation function. Although not discussed here, it is straightforward to extend the source-dependent channel coding to the spectral parameters of the CELP procedure. In this case, well-known error criteria, such as the root mean square log spectral distance can be used as a measure of the immediate effect of channel errors. At greater design cost, the coding efficiency can be enhanced by channel encoding multiple parameters at once.
Optimization of the error criteria for source-dependent channel codes was achieved with simulated annealing. The proposed annealing procedures optimize the error criterion for a variety of conditions. Compared to conventional channel coding techniques, the new methods are advantageous in that they provide optimized error protection at any level of redundancy, including zero redundancy and a redundancy less than a full bit. The optimization results in weighted error correction and/or detection, with more probable codes receiving better protection. Optimal trade-off between error correction and detection is easily obtained. Although the description focused on single bit errors per parameter, the procedures can be generalized to include multiple bit errors per encoded parameter (this will require an estimate of the relative probabilities).
The general source-dependent channel codes obtained with the described optimization procedures are not constrained by the particular bit configurations of conventional error correction codes to obtain a certain robustness level. As a result, it is often practical to optimize the protection of the transmission parameters individually, or in small groups.
Usage of the described channel encoding and distortion attenuation techniques result in a CELP procedure with significantly reduced error sensitivity. This is confirmed by informal listening tests, which suggest that, with a bit rate increase of less than 100 bits per second, error rates below 0.1% are inaudible, while a 1% error rate results in minor distortion.
It is to be understood that the above-described embodiments are merely illustrative of the principles of the invention and that many variations may be devised by those skilled in the art without departing from the spirit and scope of the invention. It is therefore intended that such variations be included within the scope of the claims.
APPENDIX A
The following table provides the encoding of the adaptive codebook gain, for the case of no increase in bit rate. The indices of labels which differ by a single bit from the transmission labels (the neighbors) are also provided. Note that the most probable quantization levels do not have levels of large absolute values as neighbors.
APPENDIX B
The following table provides the encoding of the adaptive codebook gain, for the case of one additional bit per frame. The probability column indicates the probability at the CELP analyzer, labels which are not used for transmission are identified as "redundant". The indices of labels which differ by a single bit from the transmission labels (the neighbors) are also provided. Note that the most probable levels have good neighbors and that the redundant levels are all associated with highly probable indices.
APPENDIX C
Adaptive Codebook Encoding I
The following data were obtained for the adaptive codebook of a 240-60-35-7-4-8-4 (length of frame=240 samples, length of subframe=60 samples, 35 bits for LPC parameters, 7 bits for pitch delay, 4 bits for adaptive codebook gain, 8 bits for stochastic codebook index, 4 bits for stochastic codebook gain) procedure with the addition of 20 labels (only delays 21 through 128 are allowed at the transmitter). Seven-bit labels which do not occur in the transmission table are used to detect errors. They result in repetition of the previous delay, indicated as "rep". Note that generally delays of high probability are best protected, i.e. have repeats and/or related pitch values as neighbors.
APPENDIX D
Adaptive Codebook Encoding II
The following data were obtained for the adaptive codebook of a 240-60-35-8-4-8-4 (length of frame=240 samples, length of subframe=60 samples, 35 bits for LPC parameters, 8 bits for pitch delay, 4 bits for adaptive codebook gain, 8 bits for stochastic codebook index, 4 bits for stochastic codebook gain) procedure with the addition of 76 labels (only delays 21 through 180 are allowed at the transmitter). As in Appendix B, labels which do not occur in the transmission table are used to detect errors, resulting in the repetition of the previous delay, indicated as "rep". Since a repeat is usually a good substitute for the actual delay value, the most likely delays generally have repeats as their closest neighbors.